* Add test to check whether the after-gc-hook is run correctly.
[bpt/guile.git] / libguile / ChangeLog
CommitLineData
931dd6e1
DH
12000-11-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
2
3 * backtrace.c (display_expression, display_error_body), fports.c
4 (prinfport), print.c (scm_iprin1): Test for symbols and strings
5 explicitly instead of using SCM_ROSTRINGP.
6
7 * backtrace.c (scm_display_error_message): Don't pass a symbol to
8 scm_simple_format. Prefer high-level output functions.
9
10 (display_error_body): When displaying procedure names, give
11 preference to the name passed as a parameter. Only if none is
12 given extract a name from the stack information.
13
14 * fports.c (scm_fdes_to_port, prinfport), gc.c (scm_gc_mark),
15 ports.c (scm_port_filename, scm_set_port_filename_x): Use
16 SCM_(SET_)?FILENAME.
17
18 * gh_data.c (gh_set_substr, gh_scm2newstr, gh_get_substr,
19 gh_symbol2newstr): Use scm_remember instead of a pair of calls to
20 scm_protect/unprotect_object.
21
22 * goops.c (make_struct_class), objects.c (scm_class_of): Struct
23 table names are symbols.
24
25 * ports.h (SCM_SET_FILENAME): Added.
26
27 * print.c (scm_iprin1): Don't use scm_puts to write symbols or
28 strings in order to treat substrings right. Reposition call to
29 scm_remember after the last use of object's data.
30
31 (scm_simple_format): Treat messages that are substrings right.
32
33 * symbols.h (SCM_ROSTRINGP): Deprecated.
34
66460dfb
DH
352000-11-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
36
37 * environments.c (obarray_replace, obarray_retrieve,
38 obarray_remove): Don't use '==' to compare SCM objects.
39
40 * posix.c (scm_getgroups): Don't create a redundant string.
41
0f87853a
DH
422000-11-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
43
44 * symbols.c (scm_sym2vcell, scm_sym2ovcell_soft,
45 scm_intern_symbol, scm_unintern_symbol): Symbol objects already
46 hold their hash values, no need to recompute them.
47
48 (scm_intern_obarray_soft): Speed up search for a matching symbol
49 by comparing the hash values first.
50
a3a32939
DH
512000-10-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
52
53 * unif.c (scm_make_uve, scm_dimensions_to_uniform_array): Don't
54 allow vectors longer than SCM_LENGTH_MAX. This removes the
55 SCM_HUGE_LENGTH trick, i. e. storing a vector length greater than
56 SCM_LENGTH_MAX at the beginning of the vector's memory. Since not
57 all of guile's code was implemented to be aware of this trick, it
58 is unlikely that it was used anyway. We can implement such a
59 feature more cleanly by using double cells for uniform vector
60 types.
61
62 (scm_shap2ra): Replace SCM_IMP and SCM_NIMP tests by more
63 straightforward predicates.
64
65 (scm_dimensions_to_uniform_array): Require that for dimensions
66 given as lower-bound/upper-bound pairs the upper-bound is never
67 less than the lower bound.
68
a6d9e5ab
DH
692000-10-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
70
71 * dynl.c (scm_dynamic_link, scm_dynamic_func, scm_dynamic_call,
72 scm_dynamic_args_call), filesys.c (scm_chown, scm_chmod,
73 scm_open_fdes, scm_stat, scm_link, scm_rename, scm_delete_file,
74 scm_mkdir, scm_rmdir, scm_opendir, scm_chdir, scm_symlink,
75 scm_readlink, scm_lstat, scm_copy_file), fports.c (scm_open_file),
76 ioext.c (scm_read_delimited_x, scm_fdopen), load.c
77 (scm_primitive_load, scm_parse_path, scm_search_path,
78 scm_sys_search_load_path, scm_primitive_load_path), net_db.c
79 (scm_inet_aton, scm_gethost, scm_getnet, scm_getproto,
80 scm_getserv), numbers.c (scm_string_to_number), ports.c
81 (scm_truncate_file, scm_sys_make_void_port), posix.c
82 (scm_getpwuid, scm_getgrgid, scm_execl, scm_execlp,
83 environ_list_to_c, scm_execle, scm_utime, scm_access,
84 scm_setlocale, scm_mknod), regex-posix.c (scm_make_regexp),
85 simpos.c (scm_system, scm_getenv), socket.c (scm_fill_sockaddr,
86 scm_send, scm_sendto), stime.c (scm_strftime, scm_strptime),
87 strop.c (scm_i_index, scm_string_null_p, scm_string_to_list),
88 strports.c (scm_mkstrport), symbols.c
89 (scm_string_to_obarray_symbol), vports.c (scm_make_soft_port):
90 Don't accept symbols as input parameters. Use SCM_STRING_LENGTH
91 instead of SCM_ROLENGTH.
92
93 * dynl.c (scm_dynamic_link, scm_dynamic_func), error.c
94 (scm_error_scm), filesys.c (scm_chown, scm_chmod, scm_open_fdes,
95 scm_stat, scm_link, scm_rename, scm_delete_file, scm_mkdir,
96 scm_rmdir, scm_opendir, scm_chdir, scm_symlink, scm_readlink,
97 scm_lstat, scm_copy_file), fports.c (scm_open_file), ioext.c
98 (scm_fdopen), net_db.c (scm_inet_aton, scm_gethost, scm_getnet,
99 scm_getproto, scm_getserv), ports.c (scm_truncate_file,
100 scm_sys_make_void_port), posix.c (scm_getpwuid, scm_getgrgid,
101 scm_execl, scm_execlp, scm_execle, scm_utime, scm_access,
102 scm_setlocale, scm_mknod), regex-posix.c (scm_make_regexp,
103 scm_regexp_exec), simpos.c (scm_system, scm_getenv), stime.c
104 (setzone, scm_strftime, scm_strptime), vports.c
105 (scm_make_soft_port): Use SCM_STRING_COERCE_0TERMINATION_X to
106 make sure the characters of a string are followed by a \0.
107 Further, use SCM_STRING_CHARS instead of SCM_ROCHARS on the
108 resulting string.
109
110 * dynl.c (scm_make_argv_from_stringlist), posix.c
111 (scm_convert_exec_args): Aligned to match each other.
112
113 * dynl.c (scm_coerce_rostring): Removed.
114
115 (scm_dynamic_func): Changed the comment to reflect that the
116 function name has to be a string. Further, hide implementation
117 details from the scheme comment.
118
119 * error (scm_error_scm): Don't accept a symbol as message
120 parameter. Fix substring handling.
121
122 * posix.c (environ_list_to_c): Use memcpy to copy environment
123 strings. Handle substrings which don't have a trailing \0.
124
125 * symbols.h (SCM_LENGTH, SCM_ROLENGTH, SCM_SUBSTRP,
126 SCM_SUBSTR_STR, SCM_SUBSTR_OFFSET, SCM_COERCE_SUBSTR):
127 Deprecated.
128
129 * unif.h (SCM_HUGE_LENGTH): Deprecated.
130
131 * validate.h (SCM_VALIDATE_ROSTRING, SCM_VALIDATE_ROSTRING_COPY,
132 SCM_VALIDATE_NULLORROSTRING_COPY): Deprecated.
133
e9bfab50
DH
1342000-10-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
135
136 * random.c: Include unif.h.
137
138 * strings.h (SCM_STRING_COERCE_0TERMINATION_X): Added. This is
139 intended to replace the macro SCM_COERCE_SUBSTR. Such a macro
140 will be necessary, even after copy-on-write strings will be added
141 to guile, but the current naming is inappropriate.
142
143 * strorder.c (scm_string_equal_p, scm_string_ci_equal_p,
144 scm_string_less_p, scm_string_ci_less_p): Don't accept symbols as
145 input parameters. Further, the functions that test for equality
146 are rewritten to compare from back to front, the others are also a
147 little bit more polished.
148
14f1d9fe
MD
1492000-10-25 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
150
151 This change merges the GOOPS code into Guile. However, GOOPS
152 is still not initialized until someone asks for the module.
153 We need to optimize GOOPS initialization time before initializing
154 it together with the rest of libguile. We also need to add the
155 C API + primitive methods. Then we can start using it to
156 modularize Guile, implement a real exception system etc.
157
158 * goops.c, objects.c, objects.h, eval.c (scm_make_extended_class,
159 scm_make_port_classes, scm_change_object_class,
160 scm_memoize_method): Changed to ordinary functions (was plugin
161 slots).
162
163 * goops.c (wrap_init, scm_wrap_object): Unconditionally use
164 SCM_STRUCT_GC_CHAIN.
165 (scm_goops_version): Removed.
166 (scm_oldfmt): and all uses of it: Removed.
167 (scm_shared_array_root, scm_shared_array_offset,
168 scm_shared_array_increments): Removed.
169 (scm_init_goops): No need to support two arg mutex init.
170 Removed #include "versiondat.h", #include "goops.h".
171
172 * goops.h: Removed various superfluous conditions.
f4553de8
MD
173 Renamed class --> cls, new --> newinst in order to accomodate
174 C++.
14f1d9fe
MD
175
176 * init.c (scm_init_guile_1): Call the goops module registration
177 function.
178 Added #include "libguile/goops.h".
179
180 * Makefile.am (libguile_la_SOURCES): Added goops.c
181 (DOT_X_FILES): Added goops.x
182 (DOT_DOC_FILES): Added goops.doc
183 (modinclude_HEADERS): Added goops.h
184
1b9be268
DH
1852000-10-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
186
187 * gc.c (scm_igc): Remove references to scm_vector_set_length_x.
188
189 (scm_gc_sweep): SCM_CONTREGS is never NULL.
190
191 * gc.c (scm_gc_sweep), vectors.c (scm_make_vector): Don't
192 allocate/free memory for zero length vectors.
193
194 * vectors.[ch] (scm_vector_set_length_x): Deprecated.
195
d1ca2c64
DH
1962000-10-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
197
198 * alist.c (scm_assq_ref): Add a suggestion about how to deal with
199 this function when the API gets reviewed.
200
201 * async.c (SET_ASYNC_GOT_IT): Use SCM_TYP16 instead of doing bit
202 operations directly.
203
204 * dynl.c (scm_coerce_rostring), filesys.c (scm_link,
205 scm_copy_file), fports (scm_open_file), hash.c (scm_hasher),
206 posix.c (scm_getpwuid), print.c (scm_iprin1), simpos.c
207 (scm_system), strings.c (scm_string_ref, scm_substring,
208 scm_string_append), strop.c (scm_string_copy), struct.c
209 (scm_make_struct_layout), symbols.c (scm_gensym, scm_gentemp),
210 symbols.h (SCM_COERCE_SUBSTR): Use SCM_STRING_LENGTH instead of
211 SCM_ROLENGTH if the object is known to be a string or substring.
212
213 * eval.c (scm_lookupcar): Use SCM_ITAG7 instead of doing bit
214 operations directly.
215
216 * filesys.c (scm_dirname, scm_basename): Don't create shared
217 substrings as these are going to disappear from guile.
218
219 * gc.c (scm_gc_sweep): Use SCM_UVECTOR_LENGTH instead of
220 SCM_HUGE_LENGTH. (The SCM_HUGE_LENGTH mechanism does not work
221 correctly anyway.)
222
223 * gc.h (SCM_FREEP, SCM_NFREEP): Deprecated.
224
225 * read.c (scm_flush_ws): Don't compare SCM values directly.
226
227 * root.c (scm_make_root), root.h (scm_root_state): Removed
228 system_transformer and top_level_lookup_closure_var from struct.
229 (Since eval is now R5RS, binary compatibility is not granted
230 anyway.)
231
232 * simpos.c (scm_system): Fix condition.
233
234 * strings.c (scm_string_length, scm_string_ref, scm_substring,
235 scm_string_append), strop.c (scm_string_copy), struct.c
236 (scm_make_struct_layout, scm_make_vtable_vtable), symbols.c
237 (scm_gensym, scm_gentemp): Replace SCM_VALIDATE_STRINGORSUBSTR
238 with SCM_VALIDATE_STRING, since they do the same thing.
239
240 * strings.h (scm_make_shared_substring): Deprecated.
241
242 * tags.h (SCM_ITAG7): Added.
243
244 * validated.h (SCM_VALIDATE_STRINGORSUBSTR): Deprecated.
245
f8fa3e38
MV
2462000-10-20 Marius Vollmer <mvo@zagadka.ping.de>
247
248 * init.c (scm_init_guile_1, invoke_main_func): Call
249 scm_load_startup_files in scm_init_guile_1, not in
250 invoke_main_func.
251
0100535b
MV
2522000-10-18 Marius Vollmer <mvo@zagadka.ping.de>
253
c6ba6ce6 254 * print.c (grow_ref_stack): Pass a INUM to scm_make_vector as the
31535422 255 size, not a naked int. Thanks to Brad Knotwell!
c6ba6ce6 256
0100535b
MV
257 * gc_os_dep.c (GC_noop1, GC_bool, TRUE, FALSE, VOLATILE):
258 Definitions copied from Boehm collector.
259
daa6ba18
DH
2602000-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
261
262 * list.[ch] (scm_sloppy_memq, scm_sloppy_memv, scm_sloppy_member):
263 Deprecated.
264
265 (scm_memq, scm_memv, scm_member): Inline the sloppy code.
266
a8a11001
DH
2672000-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
268
269 * alloca.c: Fixed include file path. Thanks to Bruce Korb for
270 the bug report.
271
66ca9392
MV
2722000-10-11 Marius Vollmer <mvo@zagadka.ping.de>
273
274 * gc_os_dep.c: Added real implementation based on code from Boehms
275 collector. This is not well tested yet.
276
277 * gc.h (scm_get_stack_base): Added prototype.
278 * init.c (scm_get_stack_base): Removed prototype.
279
b7ead2ae
DH
2802000-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
281
282 * random.c (scm_seed_to_random_state): Replace SCM_LENGTH with
283 the appropriate SCM_<type>_LENGTH macro.
284
285 (vector_scale, vector_sum_squares, scm_random_solid_sphere_x,
286 scm_random_normal_vector_x): Use scm_uniform_vector_length to
287 determine the length of a vector object generically.
288
b226e5f6
DH
2892000-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
290
291 * ramap.c (scm_array_fill_int, scm_array_index_map_x): Replace
292 SCM_LENGTH with the appropriate SCM_<type>_LENGTH macro.
293
294 (scm_ra_matchp, scm_ramapc, ramap, rafe, scm_array_index_map_x,
295 raeql_1, raeql): Use scm_uniform_vector_length to determine the
296 length of a vector object generically.
297
74014c46
DH
2982000-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
299
300 * unif.c (scm_make_uve, scm_uniform_vector_length, scm_array_p,
301 scm_transpose_array, scm_array_contents, scm_ra2contig,
302 scm_uniform_array_read_x, scm_uniform_array_write, scm_bit_count,
303 scm_bit_position, scm_bit_set_star_x, scm_bit_count_star,
304 scm_bit_invert_x, scm_array_to_list, scm_raprin1): Replace
305 SCM_LENGTH with the appropriate SCM_<type>_LENGTH macro.
306
307 (scm_array_dimensions, scm_make_shared_array, scm_enclose_array,
308 scm_array_in_bounds_p, scm_uniform_vector_ref, scm_array_set_x,
309 scm_array_contents, scm_uniform_array_read_x,
310 scm_uniform_array_write, scm_list_to_uniform_array, rapr1): Use
311 scm_uniform_vector_length to determine the length of a vector
312 object generically.
313
314 (scm_bit_count, scm_bit_set_star_x, scm_bit_count_star,
315 scm_bit_invert_x): Eliminated dummy type dispatch.
316
317 (scm_ra2contig): Fixed array vector access.
318
b5c2579a
DH
3192000-10-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
320
321 * unif.h (SCM_BITVECTOR_P, SCM_BITVECTOR_BASE): Added.
322
323 * eval.c (iqq, SCM_CEVAL, SCM_APPLY, check_map_args, scm_map,
324 scm_for_each, scm_copy_tree), gc.c (scm_igc, scm_gc_mark,
325 scm_gc_sweep), gh_data.c (gh_scm2chars), sort.c
326 (scm_restricted_vector_sort_x, scm_sorted_p, scm_sort_x,
327 scm_sort, scm_stable_sort_x, scm_stable_sort), vectors.c
328 (scm_vector_length, scm_vector_ref, scm_vector_set_x,
329 scm_vector_to_list, scm_vector_fill_x, scm_vector_equal_p,
330 scm_vector_move_left_x, scm_vector_move_right_x, ): Replace
331 SCM_LENGTH with the appropriate SCM_<type>_LENGTH macro.
332
333 * gc.c (scm_gc_sweep): Use SCM_BITVECTOR_BASE for bitvectors.
334
335 * sort.c (scm_restricted_vector_sort_x, scm_sorted_p): Eliminated
336 dummy type dispatch.
337
338 (scm_sort_x, scm_sort, scm_stable_sort_x, scm_stable_sort):
339 Eliminated redundant NIM test.
340
9fd38a3d
DH
3412000-10-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
342
343 * filesys.c (fill_select_type, retrieve_select_type, scm_select),
344 gh_data.c (gh_set_substr, gh_scm2chars, gh_scm2shorts,
345 gh_scm2longs, gh_scm2floats, gh_scm2doubles, gh_symbol2newstr),
346 stime.c (bdtime2c), symbols.c (scm_sym2vcell, scm_sym2ovcell_soft,
347 scm_intern_obarray_soft, scm_symbol_to_string, scm_intern_symbol,
348 scm_unintern_symbol, copy_and_prune_obarray, scm_builtin_bindings,
349 scm_builtin_weak_bindings), validate.h (SCM_VALIDATE_VECTOR_LEN):
350 Replace SCM_LENGTH with the appropriate SCM_<type>_LENGTH macro.
351
352 * filesys.c (scm_dirname, scm_basename), gh_data.c (gh_scm2newstr,
353 gh_get_substr), posix.c (scm_putenv), regex-posix.c
354 (scm_regexp_exec), stime.c (setzone), symbols.c
355 (scm_string_to_symbol): Don't accept symbols as input parameters
356 any more.
357
bfa974f0
DH
3582000-10-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
359
360 * continuations.c (scm_make_cont, copy_stack_and_call,
361 scm_dynthrow), environments.c (obarray_enter, obarray_replace,
362 obarray_retrieve, obarray_remove, obarray_remove_all,
363 leaf_environment_fold), fluids.c (grow_fluids, scm_copy_fluids,
364 scm_fluid_ref, scm_fluid_set_x), hash.c (scm_hasher), hashtab.c
365 (scm_hash_fn_get_handle, scm_hash_fn_create_handle_x,
366 scm_hash_fn_remove_x, scm_internal_hash_fold), ioext.c
367 (scm_read_delimited_x), objects.c (scm_mcache_lookup_cmethod,
368 scm_make_subclass_object), ports.c (scm_unread_string), socket.c
369 (scm_recv, scm_recvfrom), stacks.c (scm_make_stack, scm_stack_id,
370 scm_last_stack_frame), strings.c (scm_string_length,
371 scm_string_set_x), strop.c (scm_substring_move_x,
372 scm_substring_fill_x, scm_string_fill_x, scm_string_upcase_x,
373 scm_string_downcase_x, scm_string_capitalize_x), struct.c
374 (scm_struct_init, scm_struct_vtable_p, scm_make_struct,
375 scm_make_vtable_vtable, scm_struct_ref, scm_struct_set_x), weaks.c
376 (scm_mark_weak_vector_spines, scm_scan_weak_vectors): Replace
377 SCM_LENGTH with the appropriate SCM_<type>_LENGTH macro.
378
b17004b8
DH
3792000-10-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
380
381 * print.c (make_print_state, scm_iprin1): Replace SCM_LENGTH with
382 the appropriate SCM_<type>_LENGTH macro.
383
384 (grow_ref_stack): Don't call scm_vector_set_length_x to resize
385 the print stack.
386
aa3188a7
DH
3872000-10-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
388
389 * numbers.c (big2str): Avoid redundant copying.
390
391 (scm_bigprint): Use SCM_STRING_LENGTH instead of SCM_LENGTH.
392
94115ae3
DH
3932000-10-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
394
395 * numbers.c (big2str), read.c (scm_grow_tok_buf), strports.c
396 (st_resize_port): Don't call scm_vector_set_length_x to resize
397 strings.
398
399 * read.c (scm_lreadr, scm_read_token): Use SCM_STRING_LENGTH for
400 string arguments (instead of SCM_LENGTH).
401
2d349e67
DH
4022000-10-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
403
404 * continuations.h (SCM_CONTINUATION_LENGTH), strings.h
405 (SCM_STRING_LENGTH), symbols.h (SCM_SYMBOL_LENGTH), unif.h
406 (SCM_UVECTOR_LENGTH, SCM_BITVECTOR_LENGTH), vectors.h
407 (SCM_VECTOR_LENGTH): Added as replacements for SCM_LENGTH.
408
4fd03f43
MV
4092000-10-02 Marius Vollmer <mvo@zagadka.ping.de>
410
411 * coop-defs.h (coop_key_create): Don't use the C++ keyword
412 `destructor' in prototype. Thanks to Martin Baulig!
413
77cd7f80
ML
4142000-10-02 Michael Livshin <mlivshin@bigfoot.com>
415
416 * guile-func-name-check.in: now should not confuse SCO nawk
417 anymore. thanks to Bruce Korb for the fix!
418
ed0e0e30
GH
4192000-10-01 Gary Houston <ghouston@arglist.com>
420
0d26a8bc 421 * net_db.c: declare inet_aton only if HAVE_INET_ATON is not
ed0e0e30
GH
422 defined. thanks to Han-Wen Nienhuys.
423
e655d034
GH
4242000-09-30 Gary Houston <ghouston@arglist.com>
425
426 * filesys.c (scm_stat2scm), posix.c (s_scm_mknod): don't use
427 S_ISSOCK or S_IFSOCK if not defined. thanks to Bruce Korb.
428
6ec589e2
NJ
4292000-09-29 Neil Jerram <neil@ossau.uklinux.net>
430
9d29e990
NJ
431 * Makefile.am (guile-procedures.txt): Insert a new rule such that
432 the output from guile-snarf.awk is processed by makeinfo to
433 produce guile-procedures.txt.
434
435 * guile-snarf.awk.in: Modify the way we snarf docstrings such that
436 the output is Texinfo-compliant and suitable for post-processing
437 with makeinfo. (Trim leading "./" from C file name if
438 present; reformat procedure prototype line in @deffn format;
439 improve representation of args to show optional and rest args;
440 explicitly quote quotation marks where they are used inside an AWK
441 regexp.)
442
6ec589e2
NJ
443 * net_db.c (scm_inet_ntoa): Docstring fix: missing newline
444 inserted.
445
446 * hashtab.c (scm_hashx_create_handle_x, scm_hashx_ref): Insert
447 spaces between C parameters so that the snarfer doesn't coalesce
448 them all into a single very long-named parameter.
449
4502000-09-27 Neil Jerram <neil@ossau.uklinux.net>
451
452 * list.c (scm_append): Use @example texinfo markup in docstring.
453
bbe4e612
DH
4542000-09-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
455
456 * strings.c (scm_string, scm_make_string, scm_string_set_x,
457 scm_string_append), strop.c (scm_string_upcase_x,
458 scm_string_downcase_x), strports.c (st_resize_port), symbols.c
459 (scm_sym2vcell, scm_sym2ovcell_soft, scm_intern_obarray_soft,
460 scm_intern_symbol, scm_unintern_symbol), unif.c (scm_cvref,
461 scm_uniform_vector_ref, scm_array_set_x, rapr1): Replace calls to
462 SCM_UCHARS with SCM_STRING_UCHARS or SCM_SYMBOL_UCHARS.
463
464 * symbols.h (SCM_UCHARS): Deprecated.
465
405aaef9
DH
4662000-09-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
467
468 * gc.c (scm_gc_sweep): Replace SCM_CHARS by SCM_COMPLEX_MEM.
469
470 * numbers.h (SCM_COMPLEX_MEM): Added as a replacement for
471 SCM_CHARS.
472
473 (SCM_COMPLEX_REAL, SCM_COMPLEX_IMAG): Use it.
474
475 * ramap.c (scm_array_fill_int, racp, raeql_1): Replace SCM_CHARS
476 with SCM_STRING_CHARS or SCM_UVECTOR_BASE.
477
478 (racp): Fix: Make sure that src and dst types match.
479
480 * read.c (scm_grow_tok_buf, scm_lreadr, scm_read_token): Replace
481 SCM_CHARS with SCM_STRING_CHARS.
482
483 * symbols.h (SCM_CHARS): Deprecated.
484
485 * unif.c (scm_enclose_array, scm_uniform_vector_ref, scm_cvref,
486 scm_array_set_x, scm_uniform_array_read_x, rapr1, freera,
487 scm_uniform_array_write): Replace SCM_CHARS with
488 SCM_STRING_CHARS, SCM_UVECTOR_BASE or SCM_ARRAY_MEM.
489
490 * unif.h (SCM_ARRAY_MEM): Added as a replacement for SCM_CHARS.
491
492 (SCM_ARRAY_V, SCM_ARRAY_BASE, SCM_ARRAY_DIMS): Use it.
493
494 * validate.h (SCM_COERCE_ROSTRING): Removed.
495
06ee04b2
DH
4962000-09-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
497
498 * gc.c (scm_igc): : Eliminate references to SCM_LENGTH and
499 SCM_CHARS from comment.
500
501 (scm_gc_mark, scm_gc_sweep): Replace SCM_CHARS with
502 SCM_SYMBOL_CHARS or SCM_CCLO_BASE or SCM_UVECTOR_BASE or
503 SCM_BDIGITS, and replace SCM_VELTS with SCM_VECTOR_BASE or
504 SCM_CONTREGS, according to the corresponding types.
505
506 (scm_gc_sweep): Simplify sweeping of uniform vectors.
507
74cc8503
DH
5082000-09-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
509
510 * procs.h (SCM_CCLO_LENGTH, SCM_SET_CCLO_LENGTH, SCM_CCLO_BASE,
511 SCM_SET_CCLO_BASE, SCM_CCLO_REF, SCM_CCLO_SET, SCM_CCLO_SUBR,
512 SCM_SET_CCLO_SUBR): Added resp. changed such that none of the
513 macros SCM_CHARS, SCM_SETCHARS, SCM_VELTS and SCM_LENGTH have to
514 be used with compiled closures any more.
515
516 * procs.c (scm_makcclo), gsubr.h (SCM_GSUBR_TYPE, SCM_GSUBR_PROC):
517 Replace uses of SCM_CHARS, SCM_SETCHARS and SCM_VELTS with regards
518 to compiled closures.
519
520 * gsubr.h (SCM_SET_GSUBR_TYPE, SCM_SET_GSUBR_PROC): Added.
521
522 * gsubr.c (scm_make_gsubr): Use them.
523
9eb364fc
DH
5242000-09-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
525
526 * numbers.c (scm_adjbig): Use SCM_BDIGITS instead of SCM_CHARS.
527
528 (big2str, scm_bigprint): Use SCM_STRING_CHARS instead of
529 SCM_CHARS.
530
531 * vectors.c (scm_vector_set_length_x): Distinguish between
532 strings, scheme vectors and uniform vectors, thus getting rid of
533 references to SCM_CHARS. (The code still needs improvement.)
534
3db4adfc
DH
5352000-09-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
536
537 * eval.c (scm_m_letrec1, SCM_CEVAL, SCM_APPLY): Use
538 SCM_STRING_U?CHARS or SCM_SYMBOL_U?CHARS instead of SCM_U?CHARS.
539
540 * unif.h (SCM_UVECTOR_BASE), vectors.h (SCM_VECTOR_BASE): Added
541 as replacements for SCM_CHARS and SCM_VELTS.
542
a002f1a2
DH
5432000-09-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
544
545 * continuations.c (scm_make_cont, scm_dynthrow), print.c
546 (scm_iprin1), stacks.c (scm_make_stack, scm_stack_id,
547 scm_last_stack_frame): For continuations, use SCM_CONTREGS
548 instead of SCM_CHARS.
549
550 * coop-threads.c (scm_threads_mark_stacks): Eliminate references
551 to SCM_LENGTH and SCM_CHARS from comments.
552
553 * dynl.c (scm_dynamic_link, scm_dynamic_func), symbols.h
554 (SCM_ROCHARS, SCM_ROUCHARS): Cleanly distinguish between string
555 and symbol arguments.
556
557 * hash.c (scm_hasher), keywords.c (prin_keyword), objects.c
558 (scm_make_subclass_object), print.c (scm_iprin1), regex-posix.c
559 (scm_regexp_error_msg), stime.c (bdtime2c, scm_strftime), struct.c
560 (scm_struct_init, scm_struct_vtable_p, scm_struct_ref,
561 scm_struct_set_x): Use SCM_STRING_U?CHARS or SCM_SYMBOL_U?CHARS
562 instead of SCM_U?CHARS.
563
564 * strings.h (SCM_STRING_UCHARS): Added as a replacement for
565 SCM_UCHARS for string arguments.
566
567 * strorder.c: Include strings.h and symbols.h.
568
569 * symbols.h: Replaced SCM_CHARS in comment.
570
571 (SCM_SYMBOL_UCHARS): Added as a replacement for SCM_UCHARS for
572 symbol arguments.
573
574 (SCM_SLOPPY_SUBSTRP): Deprecated.
575
576 * tags.h: Fixed comments not to reference SCM_LENGTH or
577 SCM_CHARS.
578
1660782e
DH
5792000-09-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
580
581 * gc.c (scm_gc_mark, scm_gc_sweep), tags.h: Removed the
582 scm_tc7_lvector type tag.
583
f151f912
DH
5842000-09-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
585
586 * eval.c (scm_m_define), evalext.c (scm_m_undefine): Removed dead
587 code.
588
589 * gc.c (scm_gc_sweep): Use SCM_STRING_CHARS or SCM_SYMBOL_CHARS
590 instead of SCM_CHARS.
591
86c991c2
DH
5922000-09-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
593
594 * backtrace.c (display_frame_expr), environments.c
595 (print_observer, print_leaf_environment, print_eval_environment,
596 print_import_environment, print_export_environment), gh_data.c
597 (gh_set_substr, gh_symbol2newstr), keywords.c
598 (scm_make_keyword_from_dash_symbol), ports.c (scm_drain_input),
599 posix.c (scm_mknod), print.c (scm_iprin1), regexp-posix.c
600 (scm_regexp_error_msg), script.c (scm_compile_shell_switches),
601 simpos.c (scm_getenv), socket.c (scm_recv, scm_recvfrom),
602 strings.c (scm_makfromstr), strop.c (scm_substring_move_x,
603 scm_substring_fill_x, scm_string_capitalize_x), symbols.c
604 (scm_symbol_to_string), unif.c (scm_make_uve, scm_array_p),
605 validate.h (SCM_VALIDATE_STRING_COPY): Use SCM_STRING_CHARS or
606 SCM_SYMBOL_CHARS instead of SCM_CHARS.
607
c1aef037
DH
6082000-09-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
609
610 * strings.h (SCM_STRING_CHARS): Added, should be used instead of
611 SCM_CHARS whenever the argument is known to be a string.
612
613 (SCM_SLOPPY_STRINGP): Deprecated.
614
615 * symbols.h (SCM_SYMBOL_CHARS): Added, should be used instead of
616 SCM_CHARS whenever the argument is known to be a symbol.
617
1bee0e70
NJ
6182000-09-22 Neil Jerram <neil@ossau.uklinux.net>
619
620 * struct.c (scm_make_struct): Fix texinfo warning in docstring by
621 using @pxref rather than @xref.
622
623 * root.c (scm_call_with_dynamic_root): Fix texinfo warning in
624 docstring by using @code for (thunk) rather than @var.
625
f7b0a8d1 6262000-09-20 Marius Vollmer <mvo@zagadka.ping.de>
216b559a 627
f7b0a8d1
MV
628 * numbers.c (scm_istr2flo): Throw an `out of range' error when
629 exponent is too large instead of returning `#f'. The rationale is
630 that in this case the string represents a valid number but we
631 can't deal with it.
216b559a 632
0f8c9efa
DH
6332000-09-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
634
635 * symbols.c (scm_intern_obarray_soft,
636 scm_sysintern0_no_module_lookup): Make sure that symbol
637 properties initially form an empty list. Thanks to Keisuke
638 Nishida for pointing this out.
639
5a2a5407
DH
6402000-09-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
641
642 * throw.c (scm_handle_by_message): Added a FIXME comment.
643
644 (scm_ithrow): Removed some redundant tests. When compiling on
645 gcc, always add the GCSE bug workaround.
646
57b74422
GH
6472000-09-14 Gary Houston <ghouston@arglist.com>
648
649 * print.c (scm_iprin1): write the ascii delete character as #\del
650 instead of '#\', so it can be read back. like in SCM.
651
02821239
MD
6522000-09-12 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
653
654 * symbols.c (duplicate_string): Don't try to copy the byte after
655 the string. This might not be `\0' and might even not be
656 allocated memory.
657
8e93e199
DH
6582000-09-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
659
660 * symbols.c (scm_symbol_p): Eliminate redundant SCM_IMP test.
661
28b06554
DH
6622000-09-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
663
664 This patch unifies the formerly distinct ssymbol and msymbol types
665 to a common symbol type scm_tc7_symbol. The representation of the
666 new symbol type uses a double cell with the following layout:
667 <type/length, chars, raw_hash, prop-pair>, where the car of
668 prop-pair holds the symbol's function property and the cdr of
669 prop-pair holds the symbol's other properties. In the long run,
670 these properties will be removed. Then, the generic property
671 functions will be uses.
672
673 * eval.c (SCM_CEVAL), objects.c (scm_class_of), print.c
674 (scm_iprin1), tag.c (scm_tag): Use scm_tc7_symbol instead of
675 scm_tc7_ssymbol, scm_tc7_msymbol or scm_tcs_symbols.
676
677 * gc.c (scm_gc_mark): Mark the symbols property pair.
678
679 (scm_gc_sweep): There are no symbol slots any more.
680
681 * hash.c (scm_hasher): Instead of re-calculating the hash value
682 of a symbol, use the raw_hash value stored in the symbol itself.
683
684 * properties.h: Fix typo.
685
686 * strings.[ch] (scm_makstr, scm_makfromstr): The slot parameter
687 is not used any more.
688
689 * symbols.[ch] (scm_strhash): Deprecated, replaced by a macro.
690
691 (scm_intern_obarray_soft): Made softness parameter unsigned.
692
693 (scm_string_hash): New function with the same functionality as
694 scm_strhash had before, except that the hash value is not adjusted
695 to a hash table size. Instead, the 'raw' hash value is returned.
696
697 * symbols.c (duplicate_string): New static convenience function.
698
699 (scm_sym2vcell, scm_sym2ovcell_soft, scm_intern_obarray_soft):
700 Renamed local variable from scm_hash to hash.
701
702 (scm_intern_obarray_soft): Don't check for a negative softness
703 any more. When generating symbol cells, use the new layout and
704 store the raw hash value in the symbol's cell.
705
706 (scm_symbol_to_string): Removed unnecessary cast.
707
708 (scm_intern_symbol, scm_unintern_symbol): Use scm_string_hash to
709 determine the hash values.
710
711 (msymbolize): Removed.
712
713 (scm_symbol_fref, scm_symbol_pref, scm_symbol_fset_x,
714 scm_symbol_pset_x, scm_symbol_hash): No need to distinguish
715 between different symbol types any more.
716
717 (scm_symbol_hash): Comment fixed.
718
719 * symbols.h: Comment about the distinction between ssymbols and
720 msymbols removed.
721
722 (SCM_SYMBOLP, SCM_ROSTRINGP): No need to distinguish between
723 different symbol types any more.
724
725 (SCM_PROP_SLOTS, SCM_SET_PROP_SLOTS): Added.
726
727 (SCM_SYMBOL_FUNC, SCM_SET_SYMBOL_FUNC, SCM_SYMBOL_PROPS,
728 SCM_SET_SYMBOL_PROPS, SCM_SYMBOL_HASH, SCM_SET_SYMBOL_HASH): Use
729 the new symbol cell layout.
730
731 * tags.h (scm_tc7_ssymbol, scm_tc7_msymbol, scm_tcs_symbols):
732 Deprecated.
733
302f229e
MD
7342000-09-12 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
735
736 * symbols.h (scm_gentemp): Declared.
737
738 * symbols.c (scm_gensym): Reimplemented. Now only takes one
739 optional argument which should be a *string*.
740 (scm_gentemp): Reimplemented and moved from boot-9.scm.
741
5bcdfa2e
KN
7422000-09-10 Keisuke Nishida <kxn30@po.cwru.edu>
743
744 * modules.c: Use applicable smobs for eval closures instead of
745 compiled closures. Include "libguile/smob.h".
746 (f_eval_closure): Removed.
747 (scm_eval_closure_tag): New variable.
748 (scm_eval_closure_lookup): Renamed from eval_closure.
749 This function now takes a smob instead of a compiled closure.
750 (scm_standard_eval_closure): Create a smob instead of a compiled
751 closure.
752 (scm_init_modules): Initialize the eval closure type as a smob.
753 * modules.h (SCM_EVAL_CLOSURE_P): New macro.
754 (scm_eval_closure_tag, scm_eval_closure_lookup): Declare.
755 * symbols.c: Include "libguile/smob.h".
756 (scm_sym2vcell): Call scm_eval_closure_lookup directly if THUNK
757 is an eval closure.
758
370646da
MD
7592000-09-10 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
760
4c7cb8ba
MD
761 * Makefile.am (.x.doc): Bugfix: Added $(srcdir) to path in order
762 to allow for builds in separate tree.
763
370646da
MD
764 * symbols.c (scm_gensym): Bugfixed my previous bugfix. (Thanks to
765 Dale P. Smith.)
766
3cbe8373
KN
7672000-09-10 Keisuke Nishida <kxn30@po.cwru.edu>
768
769 * eval.c (SCM_APPLY): Fixed bugs in the applicable-smob calls.
770
a2d47b23
DH
7712000-09-07 Dirk Herrmann <D.Herrmann@tu-bs.de>
772
773 * environments.c (obarray_enter, obarray_retrieve,
774 obarray_remove): Make sure the hash value is a valid obarray
775 index.
776
777 (obarray_enter, obarray_remove): Documentation improved.
778
779 (obarray_replace): Added.
780
781 (leaf_environment_define, leaf_environment_undefine): Cleaned up
782 and optimized.
783
a2550d0e
MD
7842000-09-05 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
785
786 * symbols.c (scm_gensym): Check that argument is a symbol, not a
370646da 787 string. (Thanks to Ralf Mattes.)
a2550d0e 788
f0cb8787
MV
7892000-09-05 Marius Vollmer <mvo@zagadka.ping.de>
790
791 * init.c: Include "libguile/properties.h".
792
793 * gh_data.c (gh_scm2char): Validate that argument is a character.
794
4c199a26
DH
7952000-08-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
796
797 * environments.h (SCM_IMPORT_ENVIRONMENT_P,
798 SCM_EXPORT_ENVIRONMENT_P): Before fetching the environment
799 functions, make sure that we really got an environment.
800
9e9e264f
MD
8012000-09-03 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
802
803 * validate.h (SCM_VALIDATE_NUMBER_DEF_COPY): New macro.
804
468fbf58
MV
8052000-09-03 Marius Vollmer <mvo@zagadka.ping.de>
806
807 * Makefile.am (.x.doc): Pretend to create .doc files from .x files
808 and give explicit dependencies for .x files that depend on
809 generated files. This allows parallel builds. Thanks to Matthias
810 Koeppe!
811
8122000-08-27 Marius Vollmer <mvo@zagadka.ping.de>
813
814 * Makefile.am: Added gc_os_dep.c, properties.c, properties.x,
815 properties.h and properties.doc in the suitable places.
816
817 * init.h (scm_init_guile): New prototype.
818
819 * init.c (scm_init_guile, scm_init_guile_1): New interface for
820 initializing Guile that does return to the caller.
821 (scm_boot_guile_1): Use scm_init_guile_1 to initialize Guile.
822 Do not establish a catch-all, this is no longer needed.
823
824 * root.h (scm_properties_whash): New `sys_protect', used in
825 properties.c.
826
827 * throw.c (scm_ithrow): Perform catch-all handling here when no
828 suitable handler has been found. That way, we don't have to rely
829 on the user establishing a catch-all, which might be difficult for
830 him if he is using scm_init_guile instead of scm_boot_guile.
831
11768c04
NJ
8322000-09-03 Neil Jerram <neil@ossau.uklinux.net>
833
834 * vectors.c (scm_vector): Docstring: add @deffnx line for
835 list->vector.
836
837 * unif.c (scm_uniform_vector_ref): Docstring: add @deffnx line for
838 array-ref.
839 (scm_array_set_x): Docstring: add @deffnx line for
840 uniform-array-set!.
841
842 * symbols.c (scm_symbol_to_string): Docstring: complete an
843 incomplete Texinfo reference to a node in r4rs.texi.
844 (scm_symbol_to_string): Escape double quotes correctly within
845 docstring.
846
847 * struct.c (scm_make_struct, scm_make_vtable_vtable): Docstring
848 fixes: `@dots' changed to `@dots{}'.
849
850 * strop.c (scm_substring_move_x): Docstring: add @deffnx lines for
851 substring-move-left! and substring-move-right!.
852
853 * strings.c (scm_string): Docstring: add @deffnx line for
854 list->string.
855
856 * stime.c (scm_strptime): Fix spelling mistake in docstring.
857 (scm_current_time): Docstring fix: insert missing newline.
858
859 * socket.c (scm_recvfrom): Docstring format fix: missing newline
860 inserted.
861
862 * ramap.c (scm_array_copy_x): Docstring: add @deffnx line for
863 array-copy-in-order!.
864 (scm_array_map_x): Docstring: add @deffnx line for
865 array-map-in-order!.
866
867 * posix.c (scm_mknod): Docstring format fix: missing newlines
868 inserted.
869
870 * modules.c (scm_interaction_environment): Docstring fix: add
871 newlines.
872
873 * eval.c (scm_cons_source): Added newly written docstring.
874
eacb9dc2
ML
8752000-09-03 Michael Livshin <mlivshin@bigfoot.com>
876
877 the following changes let Guile get rid of the `allocated' cell
878 state.
879
880 * smob.c (scm_smob_prehistory): don't init the "allocated" smob
881 type.
882
883 * tags.h (scm_tc16_allocated): removed.
884
885 * gc.h: removed now-obsolete comments about the `allocated' cell
886 state.
887 (SCM_NEWCELL): don't change cell type to `allocated'.
888 (SCM_NEWCELL2): ditto.
889
890 * gc.c (scm_mark_locations): mark freecells too, and don't worry
891 about any possible false positives.
892 (scm_debug_newcell): don't change cell type to `allocated'.
893 (scm_debug_newcell2): ditto.
894 (scm_gc_for_newcell): ditto.
895 (scm_gc_mark): remove the tc16_allocated case.
896
69b5f65a
MD
8972000-08-26 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
898
adf9e959
MD
899 * gdbint.c (gdb_print): Removed superfluous macro definition.
900
0745d387
MD
901 * objects.c (scm_init_objects), print.c (scm_init_print), struct.c
902 (scm_init_struct): First arg to scm_make_vtable_vtable should be a
903 string, not a symbol. (`make-vtable-vtable' needs to append this
904 string to another string and then pass it through
905 `make-struct-layout'.)
906
907 * stacks.c (scm_init_stacks): Pass a string, not a layout object,
908 to scm_make_vtable_vtable. (Thanks to Dale P. Smith.)
909
910 * struct.c (scm_make_struct_layout): Removed reference to
911 "read-only string" in comment; Check that argument is a string.
912 (scm_make_vtable_vtable): Check that argument is a string.
913
69b5f65a
MD
914 * environments.c (scm_init_environments): All internal includes in
915 libguile must use the prefix "libguile/" in path names since inly
916 the top-level source directory is on the include list. (That, in
917 turn, is because we want to distinguish between system header
918 files and hedares files internal to libguile.)
919
920 * strings.c (scm_make_shared_substring, scm_read_only_string_p):
921 Deprecated.
922 (scm_string_length, scm_string_ref, scm_substring,
923 scm_string_append): Don't accept symbols as arguments (R5RS).
924
92ccc1f1
NJ
9252000-08-25 Neil Jerram <neil@ossau.uklinux.net>
926
927 * ports.c (scm_set_port_column_x): Fix docstring so that it
928 mentions set-port-line! rather than set-port-column! twice.
929
930 * guardians.c (scm_make_guardian): Remove spurious . from doc string.
931
5d3e2388
DH
9322000-08-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
933
934 * Makefile.am: Added all necessary environments.* files.
935
936 * init.c: Include environments.h.
937
938 (scm_boot_guile_1): Initialize the environments.
939
940 * environments.[ch]: Added. Most of the credit for these files
941 goes to Jost Boekemeier.
942
28819f62
MD
9432000-08-25 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
944
167d89cf 945 * procprop.c: #include "libguile/smob.h"; handle applicable smobs.
28819f62 946
14fb1c83
KN
9472000-08-24 Keisuke Nishida <kxn30@po.cwru.edu>
948
949 * smob.h (scm_smob_descriptor): Added `apply' and `gsubr_type'.
950 * smob.c (scm_make_smob_type): Initialize `apply' and `gsubr_type'.
951 (scm_set_smob_apply): New function.
952 (scm_smob_apply_0, scm_smob_apply_1, scm_smob_apply_2,
953 scm_smob_apply_3): New functions.
954 * eval.c (SCM_CEVAL, SCM_APPLY): Added dispatch for applicable smobs.
28819f62 955 * procs.c (scm_procedure_p): Check applicable smobs.
14fb1c83 956
665fc4e6
MD
9572000-08-24 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
958
959 * Makefile.am (BUILT_SOURCES): Experimentally added scmconfig.h
960 also here. (This is supposed to make sure that scmconfig.h is
961 built before all sources in order to prevent that everything has
962 to be rebuilt again. Hope it works---I'm just guessing. :)
963
964 * fluids.c (scm_fluid_set_x): Return SCM_UNSPECIFIED.
965
38525772
MD
9662000-08-23 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
967
968 * gc.c (scm_gc_mark): Don't use GUILE_DEBUG flag to compile in
969 extra tests. (GUILE_DEBUG is only supposed to make extra
970 debugging functions available.)
971
ca55e62c
ML
9722000-08-21 Michael Livshin <mlivshin@bigfoot.com>
973
974 * gc.h (SCM_GC_CARD_N_CELLS): change to be a nice non-confusing
975 constant.
976
005b5978
ML
9772000-08-19 Michael Livshin <mlivshin@bigfoot.com>
978
d8d4d493
ML
979 * gc.c (scm_gc_sweep): added a `continue' statement that have
980 fallen through the cracks in the merge. thanks to Shuji Narazaki!
981
005b5978
ML
982 * gc.h: removed some stuff that broke compilation for people and
983 wasn't actually needed anyway.
984
cdbc7418
NJ
9852000-08-18 Neil Jerram <neil@ossau.uklinux.net>
986
55892d87
NJ
987 * filesys.c (scm_fcntl): Docstring fix - missing newlines inserted.
988
d46e4713
NJ
989 * net_db.c (scm_gethost, scm_getnet, scm_getproto, scm_sethost,
990 scm_setnet, setproto, setserv): Argument names changed to match
991 doc string.
005b5978 992
d46e4713
NJ
993 * feature.c (scm_program_arguments): New docstring.
994
995 * simpos.c (scm_getenv): Reflow docstring.
996
cdbc7418
NJ
997 * eq.c (scm_eq_p, scm_eqv_p, scm_equal_p): Add texinfo markup to
998 docstrings.
005b5978 999
cdbc7418
NJ
1000 * chars.c (scm_char*): Docstring fixes - texinfo markup.
1001
10022000-08-18 Neil Jerram <neil@ossau.uklinux.net>
1003
1004 * boolean.c (scm_not, scm_boolean_p): Docstring fixes - add
1005 texinfo markup and remove trailing newlines.
1006
dc16aa36
ML
10072000-08-17 Michael Livshin <mlivshin@bigfoot.com>
1008
1009 this changes the Guile GC to use cards (aka "chunklets").
005b5978 1010 (most of the ideas and some of the code are by Greg Harvey, though
bbe6d8db
ML
1011 the code is probably unrecognizable now. the original chunklet
1012 proposal, way back, is by Dale Jordan).
dc16aa36
ML
1013
1014 * tags.h: (SCM_GCTYPE16, SCM_GCCDR, SCM_GC[8]MARKP,
1015 SCM_SETGC[8]MARK, SCM_CLRGC[8]MARK): moved from here into gc.h.
1016 some (most) of these are probably going to be deprecated.
1017
1018 * gc.h (SCM_MARKEDP): simplified, there are no different mark bit
1019 locations anymore.
1020 (SCM_GC_CARD_*, SCM_C_BVEC_*): lots of new macros to deal with
1021 cards and bvecs (bit-vectors).
1022
1023 * gc.c: (scm_default_init_heap_size_*): defined to take cards into
1024 account, but keeping more or less the same values as previously.
1025 added some simple helper macros.
1026 (CLUSTER_SIZE_IN_BYTES, ALIGNMENT_SLACK): defined to take cards
1027 into account.
1028 (BVEC_*, scm_mark_space_t, current_mark_space, mark_space_ptr,
1029 current_mark_space_offset, mark_space_head, get_bvec,
1030 clear_mark_space): new functions and supporting variables, types
1031 and macros that implement mark space management.
1032 (scm_igc): clear the mark space (all of it) before beginning the
1033 mark phase.
1034 (scm_gc_mark): changed the tests for rogue cells, much simplified
1035 throughout (no different mark bit locations to worry about now).
1036 (scm_mark_locations): don't consider card header cells.
1037 (scm_cellp): ditto.
1038 (scm_gc_sweep): simplified.
1039 (init_heap_seg): changed to take cards into account.
1040
83238bc1
ML
10412000-08-16 Michael Livshin <mlivshin@bigfoot.com>
1042
1043 * stime.c (scm_c_get_internal_run_time): new function, same as
1044 scm_get_internal_run_time but returns a long. it's used by the GC
1045 for timekeeping, since with scm_get_internal_run_time there is a
1046 (extremely theoretical) possibility of consing.
1047 (scm_get_internal_run_time): redefined in terms of
1048 scm_c_get_internal_run_time.
1049
1050 * stime.h: added prototype for scm_c_get_internal_run_time.
1051
1052 * gc.c (scm_gc_stats): add more obscure stats, such as: mark time,
1053 sweep time, total marked cells, total swept cells, and number of
1054 times GC was invoked.
1055 (gc_start_stats): renamed from scm_gc_start, made static, taught
1056 to init the new stats.
1057 (gc_end_stats): renamed from scm_gc_end, made static, taught to
1058 calculate the new stats.
1059 (scm_igc): don't call gc_start_stats unless we are sure that we
1060 are indeed going to collect. also, added some timekeeping between
1061 the mark and sweep phases.
1062 (scm_gc_sweep): count number of cells we sweep as we go.
1063
1064 * gc.h: removed prototypes for scm_gc_{start,end}.
1065
a94da0e0
MD
10662000-08-13 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
1067
1068 * alist.c (scm_assq, scm_assv, scm_assoc): Report argument type
1069 error for the alist rather than the sublist where the type
1070 mismatch is discovered.
1071
2a2a730b
NJ
10722000-08-13 Neil Jerram <neil@ossau.uklinux.net>
1073
1074 * root.c (s_scm_call_with_dynamic_root): Docstring fix - rogue
1075 newline.
83238bc1 1076
f0a7af1a
NJ
10772000-08-12 Neil Jerram <neil@ossau.uklinux.net>
1078
2a2a730b
NJ
1079 * numbers.c (scm_ash): Docstring fix - missing newlines.
1080
1081 * ports.c (scm_port_filename): Docstring fix - missing newline.
1082
1083 * strports.c (scm_eval_string): Docstring fix - missing newline.
1084
ee826bae
NJ
1085 * vports.c (s_scm_make_soft_port): Docstring updated so that
1086 example is correct.
1087
1670bef9
NJ
1088 * strop.c: Docstring fixes - quotation marks and backslashes
1089 needed quoting.
1090
f0a7af1a
NJ
1091 * numbers.c (s_scm_logand): Docstring fix - "@end lisp" inserted.
1092
872e0c72
NJ
10932000-08-11 Neil Jerram <neil@ossau.uklinux.net>
1094
1095 * macros.c: Remove surplus newlines from end of docstrings.
1096
1097 * list.c (scm_list_tail): Add @deffnx line to docstring for
1098 list-cdr-ref.
83238bc1 1099
872e0c72
NJ
1100 * keywords.c: Docstring improvements in conjunction with new
1101 reference manual doc on keywords.
1102
1103 * error.c (scm_error_scm): Fix texinfo syntax error in
1104 docstring. (@code(~S) should be @code{~S}.)
1105
1106 * dynl.c: Remove surplus newlines from end of docstrings.
1107
3a33a9b1
MD
11082000-08-11 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
1109
1110 * eval.c (scm_eval): Backward incompatible change: Now takes an
1111 environment specifier as second arg. `eval' hereby becomes R5RS
1112 compatible.
1113 (scm_i_eval_x, scm_i_eval): New functions (replace
1114 scm_eval_3).
1115 (scm_eval2, scm_eval_3): Deprecated.
1116 (scm_top_level_lookup_closure_var): Deprecated.
1117
1118 * eval.h: #include "struct.h".
1119
1120 * evalext.c (scm_definedp): Have to work before module system is
1121 booted.
1122
1123 * modules.h (SCM_MODULEP, SCM_VALIDATE_MODULE,
1124 SCM_MODULE_OBARRAY, SCM_MODULE_USES, SCM_MODULE_BINDER,
1125 SCM_MODULE_EVAL_CLOSURE): New macros.
1126 (scm_module_index_obarray, scm_module_index_uses,
1127 scm_module_index_binder, scm_module_index_eval_closure): New
1128 constants; #include "validate.h".
83238bc1 1129
3a33a9b1
MD
1130 * modules.c (scm_module_tag, scm_module_system_booted_p): New
1131 globals.
1132 (scm_post_boot_init_modules): Initialize scm_module_tag.
1133 (scm_interaction_environment): New primitive.
1134
1135 * symbols.c (scm_can_use_top_level_lookup_closure_var): Removed.
1136 #include "modules.h".
1137
1138 * strports.c (scm_eval_string): Evaluate in
1139 scm_interaction_environment ().
1140
1141 * script.c (scm_shell): Pass scm_the_root_module () as second arg
1142 to new scm_eval_x.
1143
1144 * load.c (load): Use `scm_selected_module' to compute second arg
1145 to new scm_i_eval_x; Don't call it if module system hasn't booted.
1146 (scm_read_and_eval_x): Deprecated.
1147 #include "modules.h".
1148
1149 * debug.c (scm_local_eval): Use scm_i_eval and scm_i_eval_x.
1150 (scm_start_stack): Use scm_i_eval.
1151
1152 * strports.c: #include "modules.h".
1807c7b8
MD
1153
1154 * print.c (scm_simple_format): Be case-insensitive for ~A and ~S
1155 directives.
1156
1a2f1b90
MD
11572000-08-09 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
1158
1159 The following changes are intended to ensure that struct instances
1160 are freed before their vtables. It's optimized for the most
1161 common case, which is freeing of struct instances.
1162
1163 * gc.c (scm_gc_mark, scm_gc_sweep): Remove vcell = 1 magic.
1164 (scm_structs_to_free): New variable.
1165 (scm_gc_sweep): Hook up structs to free on the scm_structs_to_free
1166 chain.
1167
1168 * struct.h (SCM_STRUCT_GC_CHAIN, SCM_SET_STRUCT_GC_CHAIN): New
1169 macros.
1170 (scm_structs_to_free, scm_struct_prehistory): Declare.
1171
1172 * struct.c (scm_make_struct, scm_make_vtable_vtable): Structs
1173 handles are now double cells; Initialize SCM_STRUCT_GC_CHAIN to
1174 0.
1175 (scm_struct_gc_init, scm_free_structs): New GC C hooks.
1176 (scm_struct_prehistory): Install them.
1177
1178 * init.c (scm_boot_guile_1): Call scm_struct_prehistory.
1179
b054684d
MV
11802000-08-06 Marius Vollmer <mvo@zagadka.ping.de>
1181
1182 * read.c (scm_flush_ws): Include filename in error message when it
1183 is not `#f'.
1184
7ca38734
MV
11852000-08-05 Marius Vollmer <mvo@zagadka.ping.de>
1186
1187 * iselect.c: Include <unistd.h>. Thanks to Bertrand Petit!
1188
b62cc1c2
MD
11892000-08-02 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
1190
89e941f1
MD
1191 * struct.c (scm_make_struct_layout, scm_make_struct,
1192 scm_make_vtable_vtable): Updated documentation.
1193
b62cc1c2
MD
1194 * print.c (scm_simple_format): Bugfix: Coerce port before using
1195 it.
1196
3bc0c6df
GH
11972000-07-31 Gary Houston <ghouston@arglist.com>
1198
cdaf0a20 1199 * net_db.c: declare h_errno only if HAVE_H_ERRNO is not defined
3bc0c6df
GH
1200 (thanks to Richard Kim for the bug report).
1201
3ccd1860
MV
12022000-07-30 Marius Vollmer <mvo@zagadka.ping.de>
1203
1204 * alist.c (scm_assq_remove_x, scm_assv_remove_x,
1205 scm_assoc_remove_x): Use scm_delq1_x instead of scm_delq_x, since
1206 using the latter is pointless.
1207
11102992
DH
12082000-07-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
1209
1210 * gc.c (scm_gc_sweep): Renamed local variable from 'free' to
1211 'free_struct_data' to avoid confusion with stdlib's 'free'.
1212
a75923bb
DH
12132000-07-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
1214
1215 * vectors.c (scm_make_vector): Fix the initialization order of
1216 the vector such that the type cell is initialized last.
1217
f7620510
DH
12182000-07-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
1219
1220 * struct.[ch] (scm_struct_init): Made static. Fixed not to rely
1221 on the struct cell to be fully initialized.
1222
1223 * struct.c (scm_make_struct, scm_make_vtable_vtable): Fix the
1224 initialization order of the struct such that the type cell is
1225 initialized last.
1226
17dd060d
MV
12272000-07-25 Marius Vollmer <mvo@zagadka.ping.de>
1228
1229 * alist.c (scm_assq_remove_x, scm_assv_remove_x,
1230 scm_assoc_remove_x): Remove only the first cell with a matching
1231 key, not all.
1232
b73bde31
MV
12332000-07-24 Marius Vollmer <mvo@zagadka.ping.de>
1234
1235 * stime.c (scm_strftime): Recognize a return value of zero from
1236 strftime as buffer overflow and take care to detect a valid zero
1237 length result regardless. Thanks to David Barts!
1238
e85da7d9
MV
12392000-07-23 Marius Vollmer <mvo@zagadka.ping.de>
1240
1241 * alist.c (scm_assq_remove_x, scm_assv_remove_x,
1242 scm_assoc_remove_x): Remove all cells whose key is eq, eqv, or
1243 equal (respectively) to the argument key, not all cells that are
1244 eq, eqv, or equal to the first cell with the argument key. Thanks
1245 to Neil Jerram!
83238bc1 1246
78a3503e
DH
12472000-07-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
1248
1249 * gc.h (SCM_FREE_CELL_CDR, SCM_SET_FREE_CELL_CDR), hooks.c
1250 (make_hook), modules.c (OBARRAY, USES, BINDER): Pack and unpack
1251 SCM values appropriately.
1252
1253 * modules.c (scm_standard_eval_closure): Don't pass an inum to
1254 scm_makcclo, but rather a long value.
1255
62850ef3
DH
12562000-07-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
1257
1258 read.c (scm_lreadrecparen), srcprop.c (scm_set_source_property_x):
1259 SCM_SETCDR and SCM_WHASHSET macros don't deliver a return value.
1260 Thanks to Han-Wen Nienhuys for the bug report.
1261
cc4feeca
DH
12622000-07-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
1263
1264 * root.[ch] (scm_call_catching_errors): Deprecated.
1265
1266 * root.c (scm_init_root): Initialize the root smob type using the
1267 standard initialization functions.
1268
007e7c35
MV
12692000-07-17 Marius Vollmer <mvo@zagadka.ping.de>
1270
1271 * eval.c (unmemocopy): Don't rely on V being a list of at least
1272 one element. Thanks to Bill Schottstaedt!
1273
9d47a1e6
ML
12742000-07-15 Michael Livshin <mlivshin@bigfoot.com>
1275
1276 * gc.c (scm_done_free): new.
1277 expanded comments about scm_done_malloc.
1278
1279 * gc.h: added prototype for scm_done_free
1280
406c7d90
DH
12812000-07-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
1282
1283 * gc.h (scm_take_stdin): Removed.
1284
1285 * gc.h (SCM_VALIDATE_CELL): Delegate cell checks to function
1286 scm_assert_cell_valid to allow extensions to the checking
1287 functionality without need to recompile everything.
1288
1289 * gc.[ch] (scm_assert_cell_valid, scm_set_debug_cell_accesses_x):
1290 Added as conditionally compiled functions for the case that
1291 SCM_DEBUG_CELL_ACCESSES is enabled.
1292
1293 * gc.c (debug_cells_p): Added to indicate whether compile-time
1294 included cell access debugging is run-time enabled.
1295
1296 * gc.[ch] (scm_gc_running_p): Added to indicate that scm_igc is
1297 being executed. Intended to be used instead of scm_gc_heap_lock
1298 at most places.
1299
1300 * error.c (scm_error), gdbint.c (SCM_GC_P): Use scm_gc_running_p
1301 instead of scm_gc_heap_lock.
1302
1303 * gc.c (scm_igc): Set scm_gc_running_p to true while running.
1304
1305 * gc.c (scm_mark_locations): Don't mark free cells.
1306
1307 * weaks.c (scm_scan_weak_vectors): Use SCM_FREE_CELL_P instead of
1308 SCM_FREEP.
1309
c4da09e2
DH
13102000-07-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
1311
1312 * gc.c (scm_mark_locations): Minimized some variable scopes and
1313 simplified the code a bit.
1314
3f5d82cd
DH
13152000-07-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
1316
1317 * gc.h (SCM_SET_FREE_CELL_TYPE, SCM_SET_FREE_CELL_CDR,
1318 SCM_FREE_CELL_P, SCM_FREE_CELL_CDR): Added since free cells
1319 should not be accessed via SCM_C[AD]R. Further, using dedicated
1320 macros to access free cells allows all other cell accessing macros
1321 to treat acesses to free cells as errors, thus enabling better
1322 error checks for cell accesses. SCM_FREE_CELL_P is supposed to
1323 replace SCM_FREEP some time.
1324
1325 * gc.h (SCM_NEWCELL, SCM_NEWCELL2), gc.c (map_free_list,
1326 free_list_length, scm_check_freelist, scm_debug_newcell,
1327 scm_debug_newcell2, freelist_length, scm_gc_for_newcell,
1328 scm_gc_mark, scm_gc_sweep, init_heap_seg): Only use the dedicated
1329 cell accessors when accessing free cells.
1330
f706a58b
DH
13312000-07-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
1332
1333 * gc.h (SCM_CELL_WORD, SCM_CELL_OBJECT): Treat the referenced
1334 object as const in order to make the compiler warn about code like
1335 SCM_CELL_WORD (x, n) = y. Instead, SCM_SET_CELL_WORD (x, n, y)
1336 should be used.
1337
1338 (SCM_CELL_WORD_LOC, SCM_CARLOC, SCM_CDRLOC): Return the address
1339 as an address to a non-const object, since these macros are used
1340 to allow direct write access to objects.
1341
cbaadf02
DH
13422000-07-07 Dirk Herrmann <D.Herrmann@tu-bs.de>
1343
1344 * hashtab.c (scm_hash_fn_create_handle_x): Signal an error if the
1345 given hash table has no slots.
1346
a6c12a04
DH
13472000-07-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
1348
b6efc951
DH
1349 * gc.c (policy_on_error): Added in order to allow alloc_some_heap
1350 to react to malloc failures in a context dependent way.
1351
1352 (scm_check_freelist): No need to flush streams before abort().
1353
1354 (scm_gc_for_newcell): Try to allocate new memory in three phases:
1355 grow heap if preferred, if still no memory available collect
1356 garbage, if still no memory available grow heap.
1357
1358 (heap_segment_table_size): Added to always reflect the actual
1359 size of the heap segment table, because scm_n_heap_segs may differ
1360 from the heap segment table size.
1361
1362 (alloc_some_heap): In case of malloc failure, react according to
1363 the new policy_on_error parameter (either return to caller or
1364 abort immediately). Further, keep heap_segment_table_size up to
1365 date.
1366
1367 (scm_init_storage): Initialize heap_segment_table_size.
1368
13692000-07-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
1370
1371 * gh.h: Don't include <stdio.h>. Thanks to Han-Wen Nienhuys for
a6c12a04
DH
1372 the hint.
1373
b63a956d
DH
13742000-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
1375
1376 * __scm.h (SCM_OUTOFRANGE, SCM_NALLOC, SCM_HUP_SIGNAL,
1377 SCM_INT_SIGNAL, SCM_FPE_SIGNAL, SCM_BUS_SIGNAL, SCM_SEGV_SIGNAL,
1378 SCM_ALRM_SIGNAL, SCM_GC_SIGNAL, SCM_TICK_SIGNAL, SCM_SIG_ORD,
1379 SCM_ORD_SIG, SCM_NUM_SIGS): Re-introduce these as deprecated
1380 symbols.
1381
1382 * error.c (scm_wta): Re-introduce dispatching for SCM_OUTOFRANGE
1383 and SCM_NALLOC, but as a deprecated feature.
1384
a75a7aff
MD
13852000-06-30 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
1386
38ec519c
MD
1387 * debug.c: Added #include fluids.h.
1388
a75a7aff
MD
1389 * numbers.c (scm_gr_p, scm_leq_p, scm_geq_p): Turned into
1390 primitive generics. (Thanks to Nicolas Neuss.)
1391
c7387918
DH
13922000-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
1393
1394 * gc.c (alloc_some_heap): Use scm_memory_error to indicate a
1395 failed attempt to get additional memory from the system.
1396
1397 (scm_gc_for_newcell): Changed the control structure to make the
1398 behaviour explicit for the case that gc is not able to free any
1399 cells.
1400
685c0d71
DH
14012000-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
1402
1403 * __scm.h (SCM_OUTOFRANGE): Removed.
1404
1405 * error.c (scm_wta): Removed sick dispatch code for range
1406 errors. (More sick dispatches still to be removed.)
1407
1408 * hashtab.c (scm_hash_fn_get_handle, scm_hash_fn_create_handle_x,
1409 scm_hash_fn_remove_x): Eliminate redundant test for if unsigned
1410 value is non-negative. Use scm_out_of_range to signal range
1411 errors.
1412
1413 * hooks.c (make_hook), unif.c (scm_aind): Use scm_out_of_range to
1414 signal range errors.
1415
1416 * list.c (scm_list_ref, scm_list_set_x, scm_list_cdr_set_x): Fix
1417 error reporting (now uses original input parameter to report wrong
1418 type argument errors). Use SCM_OUT_OF_RANGE to report range
1419 errors and SCM_WRONG_TYPE_ARG to report type errors.
1420
1421 * strings.c (scm_substring): Make range checks for negative
1422 values explicit (former behaviour relied on an implicit
1423 conversion from signed to unsigned). Don't use SCM_ASSERT for
1424 range checks.
1425
1426 * unif.c (scm_aind, scm_transpose_array, scm_bit_set_star_x,
1427 scm_bit_count_star): Use scm_out_of_range to signal range
1428 errors.
1429
1430 * unif.c (scm_transpose_array, scm_bit_position), vectors.c
1431 (scm_vector_ref, scm_vector_set_x, scm_vector_move_left_x,
1432 scm_vector_move_right_x): Use SCM_ASSERT_RANGE to check ranges.
1433
fdf25853
DH
14342000-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
1435
1436 * validate.h (SCM_VALIDATE_INUM_MIN_COPY,
1437 SCM_VALIDATE_INUM_MIN_DEF_COPY, SCM_VALIDATE_INUM_RANGE_COPY):
1438 Perform all range checks based on the input value. The former way
1439 of using the value that is assigned to the target variable fails
1440 if the assignment to the target variable itself can change the
1441 value because of type conversion.
1442
1443 (SCM_ASSERT_RANGE): Use scm_out_of_range to signal range errors.
1444
627df128
MD
14452000-06-30 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1446
1447 * gc.c (scm_gc_for_newcell): Behave gracefully also if scm_igc
1448 doesn't yield any new cells. In theory this could happen if all
1449 cells allocated with NEWCELL are either in use or conservatively
1450 marked and all cluster spine cells are conservatively marked.
1451 (Thanks to Dirk.)
1452
2500356c
DH
14532000-06-29 Dirk Herrmann <D.Herrmann@tu-bs.de>
1454
1455 * __scm.h (SCM_NALLOC): Removed.
1456
1457 * error.c (scm_wta): Removed sick dispatch code for memory
1458 errors. (More sick dispatches still to be removed.)
1459
1460 * numbers.c (scm_mkbig, scm_adjbig), ports.c (scm_make_port_type),
1461 random.c (scm_i_copy_rstate, scm_c_make_rstate), smob.c
1462 (scm_make_smob_type), srcprop.c (scm_make_srcprops), vectors.c
1463 (scm_vector_set_length_x): Now using scm_memory_error to signal
1464 memory errors.
1465
9b166f12
DH
14662000-06-29 Dirk Herrmann <D.Herrmann@tu-bs.de>
1467
1468 * __scm.h: Removed some commented code and fixed some comments.
1469
1470 (SCM_HUP_SIGNAL, SCM_INT_SIGNAL, SCM_FPE_SIGNAL, SCM_BUS_SIGNAL,
1471 SCM_SEGV_SIGNAL, SCM_ALRM_SIGNAL, SCM_GC_SIGNAL, SCM_TICK_SIGNAL,
1472 SCM_SIG_ORD, SCM_ORD_SIG, SCM_NUM_SIGS): Removed.
1473
1474 * async.c: Removed some commented code.
1475
acf4331f
DH
14762000-06-29 Dirk Herrmann <D.Herrmann@tu-bs.de>
1477
1478 * gc.c (scm_gc_mark, scm_gc_sweep, scm_must_malloc,
1479 scm_must_realloc, scm_must_free, alloc_some_heap): Use the
1480 appropriate error signalling function.
1481
fc3d7778
DH
14822000-06-29 Dirk Herrmann <D.Herrmann@tu-bs.de>
1483
1484 * root.h (scm_first_type): Removed.
1485
14862000-06-29 Dirk Herrmann <D.Herrmann@tu-bs.de>
0a7a7445
DH
1487
1488 * gc.c (MIN_GC_YIELD): Removed.
1489
150c200b
ML
14902000-06-28 Michael Livshin <mlivshin@bigfoot.com>
1491
1492 * gc.c (scm_gc_for_newcell): don't try to do GC if it's blocked,
1493 allocate instead.
1494
939794ce
DH
14952000-06-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
1496
1497 * async.c (scm_gc_async, scm_gc_vcell, scm_sys_gc_async_thunk):
1498 Moved to gc.c.
1499
1500 (scm_init_async): Moved initialization for scm_gc_async and
1501 scm_gc_vcell to gc.c. Moved initialization of scm_asyncs here
1502 from gc.c.
1503
1504 * async.h (scm_gc_async): Not globally visible any more.
1505
1506 * gc.c (scm_gc_stats): Made callable even from within regions
1507 where gc is blocked.
1508
1509 (scm_gc_end): Eliminate the hardcoding of the marking of the
1510 scm_gc_async from the gc core.
1511
1512 (scm_init_storage): Don't initialize the scm_asyncs list here.
1513 This is now done in asyncs.c.
1514
1515 (scm_gc_vcell): Moved here from async.c.
1516
1517 (gc_async): Renamed from scm_gc_async, moved here from async.c
1518 and made static.
1519
1520 (gc_async_thunk): Renamed from scm_sys_gc_async_thunk and moved
1521 here from async.c.
1522
1523 (mark_gc_async): New hook function for scm_after_gc_c_hook.
1524
1525 (scm_init_gc): Added initialization of scm_gc_vcell and
1526 gc_async. Further, add mark_gc_async to scm_after_gc_c_hook.
1527
1528 * init.c (scm_boot_guile_1): scm_init_gc requires asyncs to be
1529 initialized.
1530
12acbbef
DH
15312000-06-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
1532
1533 * gc.c (scm_igc): Removed commented code that once was intended
1534 to unprotect struct types with no instances.
1535
1536 * root.h (scm_type_obj_list): Removed.
1537
73ea78af
DH
15382000-06-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
1539
1540 * async.c (scm_init_async): Switch to standard way of smob
1541 initialization.
1542
7f40b48a
ML
15432000-06-21 Michael Livshin <mlivshin@bigfoot.com>
1544
1545 * guile-doc-snarf.in: use cut instead of sed, that's much much
83238bc1
ML
1546 faster. also, don't call basename more than needed. and, to gain
1547 a couple of microseconds more, don't call cat needlessly. (thanks
7f40b48a
ML
1548 to Brad Knotwell).
1549
3c6d9d71
DH
15502000-06-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
1551
1552 * guile-snarf.awk.in, guile-snarf.in, snarf.h: Rename SCM__I to
1553 SCM_SNARF_INIT_START, SCM__D to SCM_SNARF_DOC_START, SCM__S to
1554 SCM_SNARF_DOCSTRING_START and SCM__E to SCM_SNARF_DOCSTRING_END.
1555
2b6e0d2b
MD
15562000-06-21 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
1557
1558 * eval.c, eval.h (scm_top_level_lookup_closure_var): Added.
1559 #include "libguile/fluids.h".
1560
1561 * eval.h (SCM_TOP_LEVEL_LOOKUP_CLOSURE): New macro which replaces
1562 SCM_CDR (scm_top_level_lookup_closure_var) everywhere.
1563
1564 * root.h (scm_top_level_lookup_closure_var,
1565 scm_system_transformer): Removed. (It's no sense in having the
1566 *variable* be a "fluid".)
1567
1568 * root.c (mark_root): Removed marking of
1569 s->top_level_lookup_closure_var and s->system_transformer.
1570
1571 * modules.c (scm_selected_module): the_module is now a fluid.
1572
5bc9cbd2
MD
15732000-06-20 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1574
1575 * gc.h, tags.h: Be kind to compilers which must see hash signs in
1576 column 0. (Thanks to Ian Grant.)
1577
1578 * numbers.h: Put #ifdef HAVE_LONG_LONGS around declarations using
1579 the long_long type. (Thanks to Bernard Urban.)
1580
b5074b23
MD
15812000-06-20 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
1582
1583 * gc.c, gc.h (scm_default_init_heap_size_1,
1584 scm_default_min_yield_1, scm_default_init_heap_size_2,
1585 scm_default_min_yield_2, scm_default_max_segment_size): New global
1586 variables. Can be customized by the application before booting
1587 Guile. (We might want to be able to control these parameters
1588 dynamically through the "options interface" in the future, but
1589 note that that is additional functionality. Here we're giving
1590 default values which the environment variables can override.)
1591
1592 * list.c (scm_cons_star): Updated comment.
1593
1594 * smob.h: Changed comments for scm_make_smob_type and
1595 scm_make_smob_type_mfpe, warning that the latter might be
1596 deprecated in a future release.
1597
0a9e521f
MD
15982000-06-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
1599
1600 * list.[ch] (scm_cons_star/cons*): Renamed from
1601 scm_list_star/list*.
1602
1603 * list.[ch] (scm_list_star/list*): Provided as a deprecated alias
1604 for scm_cons_star/cons*.
1605
1606 * gc.c (scm_protect_object): Updated comment.
1607
1608 * numbers.h (SCM_NEWREAL, SCM_NEWCOMPLEX): Removed.
1609
1610 * tags.h (SCM_UNPACK_CAR, SCM_NDOUBLE_CELLP): Removed.
1611
264871aa
MD
16122000-06-19 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
1613
1614 * init.c, init.h (scm_initialized_p): Renamed from `initialized'
1615 and made global.
1616
1617 * gdbint.c (gdb_print): Print warning instead of calling scm_write
1618 if Guile isn't yet initialized.
1619
1620 * print.c (scm_current_pstate, scm_make_print_state): Simplified
1621 tests, using the assumption that Guile has been initialized.
1622
3785f317
GB
1623Sun Jun 18 14:45:21 2000 Greg J. Badros <gjb@cs.washington.edu>
1624
1625 * print.c (s_scm_current_pstate): Do not segfault when the
1626 print_state_pool is unitialized in `current-pstate', and better
1627 verify its state before altering it in scm_make_print_state().
1628
6732de1b
ML
16292000-06-18 Michael Livshin <mlivshin@bigfoot.com>
1630
1631 * scmsigs.c (s_scm_sigaction): guard the SIGIOT case with an
1632 #ifdef -- it's missing on at least one platform. (thanks to
1633 Jan Nieuwenhuizen).
1634
79494f15
DH
16352000-06-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
1636
1637 * list.c (list*): Added documentation from common-list.scm.
1638
6a199940
DH
16392000-06-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
1640
1641 * gc.c (scm_unprotect_object): The reference count is guaranteed
1642 to be a positive number.
1643
3243bcc0
MD
16442000-06-15 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
1645
1646 * eval.c: Updated comment above scm_map.
1647
26c9c3ce
MD
16482000-06-14 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1649
1650 * gc.c (scm_protect_object): Avoid looking up the object handle
1651 twice.
1652 (scm_unprotect_object): Abort if scm_unprotect_object is called on
1653 an unprotected object.
1654
2dd6a83a
ML
16552000-06-14 Michael Livshin <mlivshin@bigfoot.com>
1656
1657 * gc.c (scm_unprotect_object): fix a nasty typo bug (thanks to
1658 Dirk Herrmann).
1659
97ebbbca
MD
16602000-06-14 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
1661
43fbd20f
MD
1662 * socket.c (scm_getsockopt): Changed type for `optlen' from int to
1663 size_t.
1664 (scm_accept, scm_getsockname, scm_getpeername, scm_recvfrom):
1665 Ditto for `tmp_size'.
1666 (scm_addr_buffer_size): Changed type from int to size_t.
1667
1668 * random.c: #include <string.h>. (Needed by memcpy.)
1669
97ebbbca
MD
1670 * guile-snarf.awk.in: Replace the dot_doc_file arg with "-",
1671 indicating stdin, instead of "" and don't reset ARGC. This is a
1672 workaround for `nawk' in AIX 4.3 on RS6000 but, as far as I know,
1673 it is correct, and perhaps even better.
1674
14d72d48
GH
16752000-06-14 Gary Houston <ghouston@arglist.com>
1676
1677 * scmsigs.c (scm_init_scmsigs): if HAVE_SIGINTERRUPT is not
1678 defined, add SA_RESTART to the sigaction flags correctly
1679 (thanks to Dale P. Smith).
1680
d99783cb
MD
16812000-06-13 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1682
010d1e9d
MD
1683 * strings.c: #include <string.h>. (Thanks to Bill Schottstaedt.)
1684
1685 * net_db.c (scm_resolv_error): Only use macro NETDB_INTERNAL if
1686 defined. It isn't on sgi irix 5.3. (Thanks to Bill Schottstaedt.)
1687
d99783cb
MD
1688 * Makefile.am (.c.doc): Pipe output (the .x contents) to /dev/null.
1689
c47e8cc1
MD
16902000-06-13 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
1691
e36a0870
MD
1692 * fports.c (scm_setvbuf): Use `free' instead of `scm_must_free'
1693 since read and write buffers are allocated by `malloc'.
1694
c47e8cc1
MD
1695 * Makefile.am: Removed old test code.
1696
1697 * gh_test_c.c, gh_test_repl.c: Removed.
1698
341f78c9
MD
16992000-06-12 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
1700
a8861fa0
MD
1701 * iselect.c (SCM_NLONGBITS): Add workaround for the Sun 4.2
1702 compiler.
1703
1704 * inet_aton.c (inet_aton): Cast init value for `cp'.
1705
1706 * ramap.c (s_scm_array_fill_x): Cast `ve' properly in case
1707 `scm_tc7_uvect'.
1708
1709 * symbols.c (scm_intern_obarray_soft,
1710 scm_sysintern0_no_module_lookup): Cast `name' to unsigned char ptr
1711 in calls to scm_strhash.
1712
1713 * strports.c (st_resize_port): Substituted SCM_UCHARS for
1714 SCM_CHARS.
1715 (st_write): Cast argument to strncpy to char ptr.
1716 (scm_mkstrport): Substituted SCM_ROUCHARS for SCM_ROCHARS.
1717 (scm_strport_to_string): Cast argument to scm_makfromstr to char
1718 ptr.
1719
1720 * ports.c (scm_ungetc): Cast value to unsigned char ptr before
1721 storing in putback_buf.
1722 (scm_unread_string): Substituted SCM_ROCHARS for SCM_ROUCHARS.
1723
1724 * ioext.c (s_scm_read_line): Cast result of call to
1725 scm_do_read_line to unsigned char ptr.
1726
d230c130
MD
1727 * gdbint.c (SEND_STRING): Cast argument to char pointer.
1728
1729 * fports.c (fport_flush): Declare `ptr' as unsigned char (was
1730 char).
1731
9c8dca4e
MD
1732 * Makefile.am (DOT_DOC_FILES): List doc-files explicitly. (We
1733 shouldn't use Make rules which aren't supported by most Make
1734 programs.)
d230c130
MD
1735 (OMIT_DEPENDENCIES): Defined to "libguile.h ltdl.h". (We don't
1736 want these dependencies recorded, since they would get bogus
1737 relative paths; libguile.h is only used in gh.h and guile.c.)
9c8dca4e
MD
1738 (EXTRA_DOT_X_FILES, EXTRA_DOT_DOC_FILES): New variables.
1739 (guile-procedures.txt): Depend on EXTRA_DOT_DOC_FILES.
1740 (modinclude_HEADERS): Removed kw.h.
1741
69fc343a
MD
1742 * guile-snarf.in: Change regexp "^SCM__I" --> "^ *SCM__I".
1743 (The preprocessor might insert spaces before the identifier.)
1744
341f78c9
MD
1745 * snarf.h (SCM_SNARF_HERE, SCM_SNARF_INIT, SCM_SNARF_DOCS):
1746 Renamed from SCM_HERE, SCM_INIT, SCM_DOCS.
1747
1748 * smob.h (scm_smobfuns): Removed deprecated type.
1749
1750 * smob.c, smob.h (scm_newsmob): Removed deprecated function.
1751 (Replaced by `scm_make_smob_type'.)
1752
1753 * keywords.c (scm_tc16_kw): Removed deprecated type.
1754 (Replaced by scm_tc16_keyword.)
1755
341f78c9
MD
1756 * kw.h: Removed deprecated header file.
1757
1758 * evalext.c (serial-map): Removed deprected alias for scm_map.
1759 (Has been replaced by `map-in-order'.)
1760
1761 * ramap.c (serial-array-copy!, serial-array-map!): Removed
1762 depracted aliases. (Replaced by `array-copy-in-order!' and
1763 `array-map-in-order'.)
1764
4f60fa74
MD
17652000-06-11 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
1766
1767 * gc.h (SCM_VALIDATE_CELL): Rewritten.
1768 (SCM_CELL_WORD, SCM_CELL_OBJECT, SCM_SET_CELL_WORD,
1769 SCM_SET_CELL_OBJECT): Use new version of SCM_VALIDATE_CELL.
1770 (Thanks to Han-Wen Nienhuys.)
1771
adb2c53b
ML
17722000-06-10 Michael Livshin <mlivshin@bigfoot.com>
1773
1774 * guile-doc-snarf.in: don't pipe the CPP output right into sed --
1775 write it to the temp file first and check the CPP return code.
1776 (I introduced this bug earlier, and this probably caused people
1777 with non-GNU C preprocessors to get empty *.x files and not to
1778 have the build fail right away...).
1779
1780 * scmsigs.c (s_scm_sigaction): guard the SIGSYS case with an ifdef
1781 -- at least my libc5-based Linux system doesn't define SIGSYS.
1782
0abbd8f4
MD
17832000-06-08 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
1784
aa169af8
MD
1785 * snarf.h, guile-snarf.awk.in, guile-snarf.in: Replaced snarf
1786 markers with identifiers (SCM__I, SCM__D, SCM__S, SCM__E).
1787 (Thanks to Bernard Urban.)
0abbd8f4 1788
a6596faa
MD
17892000-06-06 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1790
1791 * modules.c (scm_system_module_env_p): Fixed detection of system
1792 modules.
1793
c29ee3e5
MV
17942000-06-06 Marius Vollmer <mvo@zagadka.ping.de>
1795
1796 * scmsigs.c (scm_sigaction): Silently ignore setting handlers for
1797 `program error signals' because they can't currently be handled by
1798 Scheme code.
1799
2d9cdf4e
DH
18002000-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
1801
1802 * procs.h (SCM_SET_SUBRF): Added.
1803
1804 * procs.c (scm_make_subr_opt): Don't assign to SCM_SUBRF, use
1805 SCM_SET_SUBRF instead. Thanks to Bernard Urban for the bug
1806 report.
1807
4b479d98
DH
18082000-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
1809
1810 * gc.h (SCM_CARLOC, SCM_CDRLOC): Don't take the address of a SCM
1811 value.
1812
1813 * sort.c (scm_sorted_p, scm_merge, scm_merge_list_x,
1814 scm_merge_list_step): Don't take the address of SCM_CAR. Use
1815 SCM_CARLOC instead. Thanks to Bernard Urban for the bug report.
1816
9a09deb1
DH
18172000-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
1818
1819 * boolean.h (SCM_TRUE_P): Removed, as people might use it as a
1820 replacement for !SCM_FALSEP.
1821
1822 * backtrace.c (display_error_body), boolean.h (SCM_BOOLP), gc.c
1823 (scm_unhash_name), gh_data.c (gh_module_lookup), load.c
1824 (scm_primitive_load), print.c (scm_simple_format), procs.c
1825 (scm_procedure_documentation), procs.h (SCM_TOP_LEVEL), ramap.c
1826 (scm_array_fill_int), scmsigs.c (scm_sigaction), stacks.c
1827 (narrow_stack, scm_make_stack, scm_stack_id), symbols.c
1828 (scm_string_to_obarray_symbol), throw.c (scm_catch,
1829 scm_lazy_catch, scm_ithrow), unif.c (scm_make_uve, scm_array_p,
1830 scm_array_set_x, scm_bit_set_star_x, scm_bit_count_star),
1831 validate.h (SCM_VALIDATE_BOOL_COPY, SCM_VALIDATE_PROC): Replace
1832 uses of SCM_TRUE_P (x) with SCM_EQ_P (x, SCM_BOOL_T).
1833
2c4fc472
MD
18342000-06-04 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
1835
542bfe1d
MD
1836 * eval.c (scm_badformalsp): New static function.
1837 (SCM_CEVAL): Check arguments for procedure-with-setter closures.
1838 (Thanks to Keisuke Nishida.)
1839
2c4fc472
MD
1840 The major reason for Guile's slow loading speed has been the fact
1841 that a chain of Scheme level procedures has been evaluated for
1842 every top-level symbol lookup during the first pass through the
1843 code.
83238bc1 1844
2c4fc472
MD
1845 The following is a kludge which I suggested four years ago, and
1846 which I've repeatedly suggested since. Personally, I've never
1847 been bothered by Guile's slow loading speed, so I thought I would
1848 let someone else do it...
1849
1850 But since the new environments will be included first in
1851 Guile-1.5, I thought it would make people happy to get the kludge
1852 into 1.4.
83238bc1 1853
2c4fc472
MD
1854 * modules.c: Added #include "libguile/vectors.h";
1855 Added #include "libguile/hashtab.h";
1856 Added #include "libguile/struct.h";
1857 Added #include "libguile/variable.h";
1858 Capture Scheme level `module-make-local-var!' to be used in the
1859 standard eval closure.
1860 (scm_standard_eval_closure): New primitive.
1861
1862 * modules.h (scm_standard_eval_closure): Declare.
1863
1864 * eval.c (scm_lookupcar): Test for !SCM_CONSP (SCM_CAR (env))
1865 instead of SCM_TRUE (scm_procedurep (SCM_CAR (env))).
1866
1867 * symbols.c (scm_sym2vcell): Bypass dispatch in the evaluator for
1868 standard eval closures.
1869
1870 * variable.c: Code layout fixes.
1871
96372e45
MD
18722000-06-03 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1873
1874 * Makefile.am: Added LIBS line to libpath which accidentally
1875 disappeared in the change of 2000-06-01.
1876 (Thanks to Dale P. Smith.)
1877
cc0bb1ef
MD
18782000-06-03 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
1879
6784d5c0
MD
1880 * scmsigs.c (scm_segfault): Removed. (Was probably added by
1881 mistake since it is not mentioned in ChangeLog.)
1882
cc0bb1ef
MD
1883 * gc.h (SCM_VALIDATE_CELL): Cast result to (void) in order to
1884 avoid compiler warnings in gcc. (Does this work for other
1885 compilers?)
1886
f8d4d8e5
MD
18872000-06-03 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1888
4ecf5aa3
MD
1889 * gc.h (SCM_VALIDATE_CELL): Don't "use" the value returned by
1890 abort ().
1891 (SCM_CARLOC, SCM_CDRLOC): Define directly instead of using
1892 SCM_CELL_OBJECT_0 and SCM_CELL_OBJECT_1. It's not correct to take
1893 the address of these expressions since they use SCM_VALIDATE_CELL.
1894 (Thanks to Bernard Urban.)
1895
f8d4d8e5
MD
1896 * dynl.c: Changed #include <ltdl.h> --> #include
1897 "libltdl/ltdl.h". (Thanks to Bill Schottstaedt.)
1898
b6fae158
CB
18992000-06-01 Craig Brozefsky <craig@red-bean.com>
1900
1901 * Makefile.am: libguile_la_LDFLAGS gets -version-info args
1902 from GUILE-VERSION definition of LIBGUILE version. Added to
1903 libpath.h definitions for guileversion and libguileversion which
1904 both get their values from GUILE-VERSION definition.
1905
7272f6d8
DH
19062000-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
1907
1908 * numbers.h (SCM_BIGP): Don't use SCM_SMOB_PREDICATE in header
1909 file: Code using numbers should not be required to include
1910 smob.h.
1911
b2728432
DH
19122000-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
1913
1914 * coop-threads.c.cygnus, coop-threads.h.cygnus, fsu-pthreads.h,
1915 mit-pthreads.c, mit-pthreads.h: Deleted.
1916
1917 * Makefile.am (EXTRA_DIST), scmsigs.c, threads.[ch]: Drop
1918 references to deleted files and fsu/mit thread support in
1919 general.
1920
f8eaf8b9
DH
19212000-05-29 Dirk Herrmann <D.Herrmann@tu-bs.de>
1922
1923 * hooks.c (symbol_name, scm_create_hook): Restored the original
1924 behaviour of scm_create_hook. Changing it was bad as Carl
1925 R. Witty has pointed out.
1926
1927 * gc.c (scm_init_gc): We can still rely on scm_create_hook to
1928 protect the object.
1929
e11f8b42
DH
19302000-05-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
1931
1932 * gc.c (scm_init_gc): Protect scm_after_gc_hook, since this will
1933 soon not be done by scm_create_hook any longer.
1934
1935 * hooks.c (make_hook, print_hook, scm_create_hook,
1936 scm_make_hook_with_name, scm_make_hook), hooks.h (SCM_HOOK_NAME,
1937 SCM_HOOK_PROCEDURES, SCM_SET_HOOK_PROCEDURES,
1938 scm_make_hook_with_name), init.c (scm_boot_guile_1): Hooks no
1939 longer have names. As an intermediate solution, the name
1940 predicate is emulated via object properties, but use of this
1941 feature is deprecated.
1942
1943 * hooks.h (scm_free_hook): Removed, as it is never defined.
1944
47457e8a
DH
19452000-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
1946
894a712b
DH
1947 * numbers.[ch] (SCM_POSFIXABLE, SCM_NEGFIXABLE, SCM_FIXABLE):
1948 Un-deprecated since otherwise user code can't determine whether a
1949 number fits into an inum any longer. The names should be changed
1950 some time, though.
1951
1952 * numbers.c (scm_big2inum): Eliminated use of SCM_UNEGFIXABLE.
1953
1954 * tags.h (SCM_UNPACK_CAR): Deprecated.
1955
19562000-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
1957
1958 * filesys.h (SCM_OPDIRP), fluids.h (SCM_FLUIDP, SCM_FLUID_NUM),
47457e8a
DH
1959 fports.h (SCM_OPFPORTP, SCM_OPINFPORTP, SCM_OPOUTFPORTP), hooks.h
1960 (SCM_HOOK_ARITY), keywords.h (SCM_KEYWORDP, SCM_KEYWORDSYM),
83238bc1 1961 numbers.h (SCM_NUMP, SCM_BIGSIGN, SCM_BDIGITS, SCM_NUMDIGS):
47457e8a
DH
1962 Replace SCM_UNPACK_CAR appropriately. Don't access cells via
1963 SCM_{SET}?C[AD]R unless they are known to be cons cells.
1964
1965 * gc.c (scm_heap_seg_data_t, scm_mark_locations, scm_cellp,
1966 init_heap_seg): Remove unused struct member variable 'valid'.
1967
f9a64404
DH
19682000-05-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
1969
1970 * fports.c (fport_write), ports.c (scm_markstream, scm_port_mode,
1971 scm_print_port_mode), ports.h (SCM_OPPORTP, SCM_OPINPORTP,
1972 SCM_OPOUTPORTP, SCM_INPUT_PORT_P, SCM_OUTPUT_PORT_P, SCM_OPENP),
1973 procs.h (SCM_CLOSCAR), unif.h (SCM_ARRAY_NDIM, SCM_ARRAY_CONTP),
1974 variable.h (SCM_VARIABLEP): Replace SCM_UNPACK_CAR
1975 appropriately.
1976
206d3de3
DH
19772000-05-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
1978
1979 * gc.c (free_list_length), hash.c (scm_hasher), macros.c
1980 (scm_macro_type), objects.c (scm_class_of), options.c
1981 (scm_options), print.c (scm_iprin1), strports.c (st_seek), throw.c
1982 (SCM_LAZY_CATCH_P): Replace SCM_UNPACK_CAR appropriately.
1983
445f675c
DH
19842000-05-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
1985
1986 * eval.c (scm_macroexp, SCM_CEVAL, scm_force), tags.h: Replace
1987 SCM_UNPACK_CAR with SCM_CELL_TYPE or SCM_CELL_WORD_0.
1988
1989 * eval.c (scm_force): Add documentation.
1990
1991 * eval.c (scm_force, scm_cons_source): Don't access cells via
1992 SCM_{SET}?C[AD]R unless they are known to be cons cells.
1993
6ba93e5e
DH
19942000-05-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
1995
1996 * strings.h (SCM_NSTRINGP, SCM_NRWSTRINGP), tags.h
1997 (SCM_NDOUBLE_CELLP), vectors.h (SCM_NVECTORP): Deprecated.
1998
1999 * gc.c (scm_igc), gc.h (SCM_PTR_MASK, SCM_PTR_LT): Removed #ifdef
2000 nosve #endif conditionally compiled code.
2001
fe517a7d
ML
20022000-05-23 Michael Livshin <mlivshin@bigfoot.com>
2003
2004 * gc.c (scm_heap_seg_data_t): fixed comment for the `span' member.
2005
a564e775
ML
20062000-05-22 Michael Livshin <mlivshin@bigfoot.com>
2007
2008 * guile-doc-snarf.in: put the preprocessed file through sed to
cf00e803
ML
2009 trim all lines to 1024 chars. I hope it doesn't break anybody's
2010 sed. we'll see. (note: this is lossy trimming, i.e. the spill
2011 isn't wrapped around but actually chopped off. this seemed to me
2012 safe because the current snarfer doesn't understand multi-line
2013 cookies anyway. in the long term, it would be nice not to depend
2014 on AWK for anything.)
a564e775 2015
83238bc1 2016 * gc.h (SCM_[SET_]CELL_{WORD,OBJECT}, SCM_VALIDATE_CELL): reverted
a564e775
ML
2017 the previous change to this macros, after deciding to torture the
2018 snarfer instead.
2019
686765af
ML
20202000-05-21 Michael Livshin <mlivshin@bigfoot.com>
2021
2022 * gc.h (SCM_[SET_]CELL_{WORD,OBJECT}, SCM_VALIDATE_CELL): brought
cebd4392
ML
2023 the yucky, ugly and nasty conditional compilation back. sorry,
2024 but it was either that or requiring GAWK to build Guile.
2025 (lots of places): removed the code that implemented the old GC
2026 scheme.
686765af
ML
2027
2028 * init.c (scm_boot_guile_1): removed the code conditioned on
2029 !GUILE_NEW_GC_SCHEME.
2030
2031 * __scm.h: (GUILE_NEW_GC_SCHEME): removed.
2032
2033 * gc.c (scm_protect_object, scm_unprotect_object): change the
2034 implementation to more efficient (at least in the time complexity
2035 sense). the calls should now also be thread-safe -- I suspect
2036 that people expect them to be. (thanks to Han-Wen Nienhuys)
cebd4392
ML
2037 (lots of places): removed the code that implemented the old GC
2038 scheme.
686765af
ML
2039
2040 * hashtab.c (scm_hash_fn_create_handle_x): add missing
cebd4392
ML
2041 SCM_REALLOW_INTS before return. I really wonder about the
2042 possible interactions between hashtables, threads & GC. it
83238bc1 2043 doesn't look healthy at all.
686765af 2044
44e47754
DH
20452000-05-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
2046
2047 * unif.c (scm_bit_count): Fixed the parameter checks. Thanks to
2048 Dale P. Smith.
2049
46d53380
DH
20502000-05-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
2051
2052 * __scm.h (SCM_DEBUG_CELL_ACCESSES), gc.h (SCM_): Added as a new
2053 debug option to verify all accesses to cells actually access
2054 objects on the heap.
2055
2056 * gc.h (SCM_VALIDATE_CELL): Added. Only performs validation if
2057 SCM_DEBUG_CELL_ACCESSES is set to 1.
2058
2059 (SCM_CELL_WORD, SCM_CELL_OBJECT, SCM_SET_CELL_WORD,
2060 SCM_SET_CELL_OBJECT): Use SCM_VALIDATE_CELL to check every cell
2061 that is accessed.
2062
1a548472
DH
20632000-05-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
2064
2065 * gh_data.c (gh_scm2chars, gh_scm2shorts, gh_scm2longs,
2066 gh_scm2floats, gh_scm2doubles): Change !SCM_NIMP to SCM_IMP.
2067
2068 * gc.c (scm_cellp): Fixed and simplified.
2069
2070 * throw.c (JBJMPBUF, SETJBJMPBUF, SCM_JBDFRAME, SCM_SETJBDFRAME,
2071 make_jmpbuf, scm_init_throw): Now using double cells to represent
2072 jump buffers when using debug extensions.
2073
2074 (freejb): Removed.
2075
bcee10dd
DH
20762000-05-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
2077
2078 * gh.h gh_data.c gh_funcs.c (gh_new_procedure*, gh_chars2byvect,
2079 gh_shorts2svect, gh_longs2ivect, gh_ulongs2uvect, gh_floats2fvect,
2080 gh_doubles2dvect, gh_doubles2scm, gh_define, gh_lookup,
2081 gh_module_lookup): Accept const pointers as parameters.
2082
2083 * gh.h gh_data.c (gh_int2scmb): Deprecated.
2084
20852000-05-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
af45e3b0
DH
2086
2087 * __scm.h (SCM_DEBUG_REST_ARGUMENT): Renamed from
2088 SCM_DEBUG_REST_ARGUMENTS in order to clarify that we don't test
2089 the actual arguments in the list, but rather the rest argument as
2090 a list of arguments.
2091
2092 * validate.h (SCM_VALIDATE_REST_ARGUMENT): Added.
2093
2094 * async.c (scm_noop), eval.c (scm_map, scm_for_each), list.c
2095 (scm_list_star, scm_append, scm_append_x), ports.c
2096 (scm_close_all_ports_except), ramap.c (scm_array_map_x,
2097 scm_array_for_each), regex-posix.c (scm_make_regexp), stacks.c
2098 (scm_make_stack), strings.c (scm_string_append), struct.c
2099 (scm_make_struct, scm_make_vtable_vtable): Validate rest arguments.
2100
2101 * dynl.c (DYNL_GLOBAL, sysdep_dynl_link, kw_global, sym_global,
2102 scm_dynamic_link, scm_init_dynamic_linking), dynl.h
2103 (scm_dynamic_link): Removed possibility to pass flags to
2104 scm_dynamic_link, as it had no effect anyway.
2105
2106 * filesys.c (scm_fcntl): Made single optional rest argument into
2107 a standard optional argument.
2108
2109 * hooks.c (scm_run_hook): A list of rest arguments is never
2110 SCM_UNBNDP.
2111
2112 * list.c (scm_append, scm_append_x), stacks.c (scm_make_stack),
2113 strings.c (scm_string_append): Don't perform half-hearted checks
2114 to see whether the rest argument forms a proper list any more, use
2115 SCM_VALIDATE_REST_ARGUMENTS instead.
2116
2117 * ports.c (scm_close_all_ports_except): Accept empty list of rest
2118 arguments.
2119
2120 * posix.c (scm_convert_exec_args), print.c (scm_simple_format):
2121 Simplify verification of rest argument.
2122
2123 * stacks.c (scm_make_stack), stacks.h (scm_make_stack), throw.c
2124 (ss_handler, handler_message): Make first mandatory rest argument
83238bc1 2125 of scm_make_stack into a standard mandatory argument.
af45e3b0
DH
2126
2127 * unif.c (scm_transpose_array, scm_enclose_array,
2128 scm_array_in_bounds_p), unif.h (scm_transpose_array,
2129 scm_enclose_array, scm_array_in_bounds_p): Make first mandatory
2130 rest argument into a standard mandatory argument.
2131
c8a54c4b
DH
21322000-05-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
2133
2134 * __scm.h: Added SCM_DEBUG as default debug option. (Thanks to
2135 Keisuke Nishida for the suggestion.) Added debug option
2136 SCM_DEBUG_REST_ARGUMENTS.
2137
2138 * eval.c (scm_map, scm_for_each): Make sure all lists have the
2139 same length. Also, removed redundant parameter checks.
2140
56100716
DH
21412000-05-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
2142
2143 * Makefile.am: Let 'make clean' remove *.x and *.doc files.
2144
2145 * __scm.h: Improved explanation of giving options to make.
2146
2147 * __scm.h (SCM_DEBUG_TYPING_STRICTNESS), tags.h
2148 (SCM_STRICT_TYPING, SCM_DEBUG_TYPING_STRICTNESS): Renamed
2149 SCM_STRICT_TYPING to SCM_DEBUG_TYPING_STRICTNESS and moved the
2150 corresponding declaration and comment to __scm.h.
2151
2152 * _scm.h (errno), gc.h (SCM_CELLPTR, SCM_PTR_LT), numbers.c
2153 (scm_remainder, scm_modulo), numbers.h (SCM_SRS, SCM_MAKINUM,
2154 SCM_INUM): Removed conditionally compiled code for Turbo C.
2155
2156 * gdbint.c (gdb_maybe_valid_type_p): Eliminated call to scm_tag.
2157 That check can be assumed to be redundant except for very rare
2158 conditions that actually indicate broken heap data.
2159
3c9f20f8
DH
21602000-05-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
2161
2162 * numbers.c (scm_logcount, scm_integer_length): Reordered
2163 dispatch sequence.
2164
8536a982
GH
21652000-05-15 Gary Houston <ghouston@arglist.com>
2166
2167 * stime.c (scm_strftime): don't reset TZ if zone is an empty
2168 string. append a "0" to the zone for TZ.
c8a54c4b 2169
78166ad5
DH
21702000-05-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
2171
2172 * numbers.c (scm_logbit_p, scm_bit_extract): Reordered dispatch
2173 sequence.
2174
2175 (scm_bit_extract): Fixed handling of bignums.
2176
f5f2dcff
DH
21772000-05-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
2178
2179 * async.c (scm_sys_gc_async_thunk), chars.h (SCM_ICHRP, SCM_ICHR,
2180 SCM_MAKICHR), continuations.h (SCM_SETJMPBUF), error.c
2181 (scm_sysmissing), error.h (scm_sysmissing), evalext.c
2182 ('serial-map), ioext.c (scm_fseek), ioext.h (scm_fseek),
2183 keywords.c (scm_tc16_kw, scm_init_keywords), ports.h (SCM_CRDY,
2184 SCM_INPORTP, SCM_OUTPORTP), ramap.c ('serial-array-copy!,
2185 'serial-array-map!), smob.c (scm_newsmob), smob.h (scm_smobfuns,
2186 scm_newsmob), tag.c (scm_tag), tag.h (scm_tag), tags.h
2187 (scm_tc16_flo, scm_tc_flo, scm_tc_dblr, scm_tc_dblc): Wrapped
2188 deprecated code between #if (SCM_DEBUG_DEPRECATED == 0) #endif.
2189
2190 * fports.c (scm_fport_buffer_add), ports.c (scm_input_port_p,
2191 scm_output_port_p), print.c (scm_get_print_state), validate.h
2192 (SCM_VALIDATE_CHAR): Replace use of deprecated macros
2193 SCM_INPORTP, SCM_OUTPORTP, SCM_ICHRP by SCM_INPUT_PORT_P,
2194 SCM_OUTPUT_PORT_P, SCM_CHARP, respectively.
2195
07ccd85d
GH
21962000-05-14 Gary Houston <ghouston@arglist.com>
2197
32f1b9fd
GH
2198 * stime.c (scm_strftime): if HAVE_TM_ZONE is not defined, hack the
2199 TZ environment variable so that the %Z format returns the zone
2200 from the input vector instead of the system default.
2201
07ccd85d
GH
2202 from Keisuke Nishida:
2203 * fports.c (scm_setvbuf): minor docstring fix.
2204 * ports.h (scm_generic_fgets): obsolete prototype deleted.
2205
3a9809df
DH
22062000-05-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
2207
2208 * __scm.h: Added new section for debugging options.
2209
2210 (SCM_DEBUG_DEPRECATED): If 1, no deprecated code is included to
2211 help developers to get rid of references to deprecated code.
2212
2213 * numbers.[ch] (SCM_POSFIXABLE, SCM_NEGFIXABLE, SCM_UNEGFIXABLE,
2214 SCM_FIXABLE, SCM_FLOBUFLEN): These macros are no longer provided
2215 as part of the interface and are marked as deprecated in the
2216 header file.
2217
2218 * numbers.c (scm_make_real, scm_make_complex): Inlined the
2219 corresponding macros SCM_NEWREAL and SCM_NEWCOMPLEX,
2220 respectively.
2221
2222 * numbers.h (SCM_NEWREAL, SCM_NEWCOMPLEX, SCM_INEXP, SCM_CPLXP,
2223 SCM_REAL, SCM_IMAG, SCM_REALPART, scm_makdbl, SCM_SINGP,
2224 SCM_NO_BIGDIG, SCM_NUM2DBL, scm_dblproc): Deprecated.
2225
e828cb75
DH
22262000-05-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
2227
2228 * gc.h (scm_cell, SCM_CELL_WORD, SCM_CELL_OBJECT,
2229 SCM_SET_CELL_WORD, SCM_SET_CELL_OBJECT): Scheme cells now consist
2230 of two scm_bits_t values instead of two SCM values, because it is
2231 legal for cell entries to hold values that are not scheme objects.
2232
2233 (SCM_SETAND_CAR, SCM_SETAND_CDR, SCM_SETOR_CAR, SCM_SETOR_CDR):
2234 Use SCM_SETC[AD]R to modify contents of pairs.
2235
5986c47d
DH
22362000-05-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
2237
2238 * numbers.c (IS_INF, isfinite): Added FIXME comment.
2239
2240 (scm_abs, scm_magnitude): Make these two independent of each
2241 other. scm_abs now reports an error if given a complex argument.
2242
2243 (scm_istr2flo, scm_integer_p). Use SCM_REAL_VALUE instead of
2244 SCM_REALPART if the object is known to be real.
2245
2246 (scm_init_numbers): No need to use SCM_NEWREAL macro for speed
2247 here.
2248
2249 * numbers.h (SCM_SINGP): Set to 0 instead of SCM_BOOL_F.
2250
eb42e2f0
DH
22512000-05-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
2252
2253 * eq.c (scm_eqv_p): Separate handling of real and complex
2254 values. Remove #ifdef SCM_BIGDIG #endif test.
2255
2256 * eval.c (SCM_CEVAL, SCM_APPLY), gh_data.c (gh_scm2floats,
2257 gh_scm2doubles), hash.c (scm_hasher), ramap.c (scm_array_fill_int,
2258 ramap_rp, scm_array_map_x), random.c (vector_scale,
2259 vector_sum_squares), unif.c (scm_make_uve, scm_array_p,
2260 scm_array_set_x): Use SCM_REAL_VALUE instead of SCM_REALPART if
2261 the object is known to be real. Use SCM_COMPLEXP instead of
2262 deprecated SCM_CPLXP. Use SCM_INEXACTP instead of deprecated
2263 SCM_INEXP.
2264
7235ee58
DH
22652000-05-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
2266
2267 * numbers.c: No need to include unif.h.
2268
2269 (IS_INF): Returned to old test for now: x == x + 1 will not work
2270 for large numbers due to rounding errors.
2271 Thanks to Kalle Olavi Niemitalo.
2272
bb628794
DH
22732000-05-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
2274
2275 * numbers.c (scm_divbigdig): Removed outdated comment.
2276
2277 (scm_number_to_string, scm_string_to_number, scm_number_p,
2278 scm_real_p, scm_integer_p, scm_inexact_p, scm_gr_p, scm_leq_p,
2279 scm_geq_p, scm_make_rectangular, scm_make_polar,
2280 scm_inexact_to_exact): Added comments.
2281
2282 (add1, scm_init_numbers): Removed add1.
2283
98cb6e75
DH
22842000-05-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
2285
2286 * numbers.c (IS_INF): The new test is x == x + 1. The old test
2287 x == x/2 did not work for zero values. Thanks to Han-Wen Nienhuys
2288 and Ivan Toshkov.
2289
2290 (scm_number_to_string, scm_sum, scm_difference, scm_two_doubles,
2291 scm_num2long, scm_num2long_long, scm_num2ulong): Reordered
2292 dispatch sequence.
2293
c45c2b6b
MV
22942000-05-09 Marius Vollmer <mvo@zagadka.ping.de>
2295
2296 * scmsigs.c (take_signal): Execute SCM_ASYNC_TICK for SIGSEGV,
2297 SIGILL and SIGBUS signals. These signals are not continuable and
2298 must be handled for real right away.
2299
c2ff8ab0
DH
23002000-05-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
2301
2302 * numbers.c (scm_zero_p, scm_positive_p, scm_negative_p,
2303 scm_real_part, scm_imag_part, scm_magnitude,
2304 scm_inexact_to_exact): Reordered dispatch sequence.
2305
1a450153
DH
23062000-05-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
2307
2308 * feature.c: No need to include "libguile/smob.h"
2309
2310 (scm_loc_features, features, scm_add_feature, scm_init_feature):
2311 Removed variable 'scm_loc_features' as a pointer to the SCM value
2312 holding the features list. Using variable 'features' instead,
2313 which holds the interned pair. Thus, SCM_SETCDR can be used
2314 instead of pointer trickery.
2315
665aeda3
DH
23162000-05-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
2317
2318 * alist.c (scm_acons): Use SCM{_SET}?_CELL_OBJECT as long as a
2319 cell is not known to be a valid pair.
2320
ab66ae47
DH
23212000-05-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
2322
2323 * eval.c (ASRTSYNTAX, scm_m_body, scm_m_letrec1): Removed
2324 ASRTSYNTAX. Using SCM_ASSYNT instead.
2325
2326 (scm_m_body): Don't create a redundant cons cell.
2327
2328 (scm_m_do): Removed redundant test 'bodycheck'.
2329
2330 (bodycheck): Removed.
2331
2332 * stacks.c (stack_depth, read_frame, read_frames): Removed
2333 redundant calculation of size, minimized some variable scopes.
2334
4983cbe4
DH
23352000-05-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
2336
2337 * pairs.c (scm_cons, scm_cons2): Use SCM{_SET}?_CELL_OBJECT as
2338 long as a cell is not known to be a valid pair.
2339
2340 (scm_pair_p): Eliminated redundant SCM_IMP test.
2341
44d3cb0d
DH
23422000-05-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
2343
2344 * eval.c (scm_m_body, scm_macroexp, unmemocopy, scm_eval_args,
2345 scm_deval_args): Eliminated redundant SCM_IMP tests.
2346
2347 * hashtab.c (scm_ihashx, scm_sloppy_assx, scm_delx_x), weaks.c
2348 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table,
2349 scm_make_doubly_weak_hash_table): Fixed critical sections.
2350 Thanks to Keisuke Nishida.
2351
9a00c9fc
DH
23522000-05-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
2353
2354 * numbers.c (scm_logand, scm_logior, scm_logxor, scm_logtest):
2355 Fixed some goto-related initialization bugs (introduced by me).
2356
b82c6ce0
DH
23572000-05-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
2358
2359 * numbers.h (SCM_INUM0): Uses SCM_MAKINUM instead of SCM_PACK.
2360
2361 * dynl.c (dynl_obj, DYNL_OBJ, get_dynl_obj): Removed.
2362
2363 (DYNL_FILENAME, DYNL_HANDLE): Use SCM_CELL... macros instead of
2364 pointer trickery.
2365
2366 (SET_DYNL_HANDLE): Added.
2367
2368 (scm_dynamic_object_p): Simplified.
2369
2370 (scm_dynamic_unlink, scm_dynamic_func): Changed comment. Deliver
2371 better error message when accessing unlinked dynamic objects.
2372 Eliminated call to get_dynl_obj.
2373
106428b3
MV
23742000-05-03 Marius Vollmer <mvo@zagadka.ping.de>
2375
7eea5296 2376 * scmsigs.c (orig_handlers) [!HAVE_SIGACTION]: Fix declaration to
106428b3
MV
2377 be an array of function pointers instead of being a pointer to an
2378 array returning function. Thanks to Kalle Olavi Niemitalo!
2379
f4c627b3
DH
23802000-05-03 Dirk Herrmann <D.Herrmann@tu-bs.de>
2381
2382 * numbers.c (scm_divbigbig, scm_divbigint), numbers.h
2383 (scm_divbigbig, scm_divbigint): Don't return zero any more to
2384 indicate that a division has a remainder, return SCM_UNDEFINED
2385 instead. It is improbable that anyone actually used these
2386 functions outside of numbers.c. For this reason and due to the
2387 change in behaviour the functions are static now. Thus, if
2388 surprisingly there are users of these functions they will at least
2389 get alarmed.
2390
2391 * numbers.c: Removed #ifdef SCM_BIGDIG #endif in those functions,
2392 that already have a clean dispatch order. Note: SCM_BIGDIG is
2393 always defined.
2394
2395 * numbers.c (scm_inexact_p): Simplified.
2396
2397 * numbers.c (scm_num_eq_p, scm_less_p, scm_max, scm_min,
2398 scm_product, scm_num2dbl, scm_angle): Reordered dispatch
2399 sequence, thereby fixing some comparisons of SCM values with
2400 integer constants.
2401
2402 * numbers.c (scm_divide): Division by zero of inums leads to an
2403 error now. (Formerly, an infinite number was returned.)
2404
2405 Respect the fact, that scm_divbigbig does now return SCM_UNDEFINED
2406 if a division has a remainder.
2407
3a6e6616
GH
24082000-05-02 Gary Houston <ghouston@arglist.com>
2409
2410 * Makefile.am (INCLUDES): add ${INCLTDL} (thanks to Tim Mooney).
2411
f8de44c1
DH
24122000-05-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
2413
2414 * numbers.c (scm_logtest, scm_division): Reordered dispatch
2415 sequence, thereby fixing some comparisons of SCM values with
2416 integer constants.
2417
2418 * numbers.h (scm_makdbl): Mark as deprecated at the point of
2419 declaration.
2420
2421 * eval.c (SCM_CEVAL, SCM_APPLY), gh_data.c (gh_double2scm,
2422 gh_doubles2scm), numbers.c (scm_istr2flo, scm_max, scm_min,
2423 scm_sum, scm_difference, scm_product, scm_divide, scm_sys_expt,
2424 scm_sys_atan2, scm_make_rectangular, scm_make_polar,
2425 scm_real_part, scm_imag_part, scm_magnitude, scm_angle,
2426 scm_long2num, scm_long_long2num, scm_ulong2num), ramap.c
2427 (ramap_rp, scm_array_map_x), random.c (scm_random,
2428 scm_random_uniform, scm_random_normal_vector_x, scm_random_exp),
2429 struct.c (scm_struct_ref), unif.c (scm_array_to_list): Replace
2430 call to scm_makdbl with a call to scm_make_real or
2431 scm_make_complex, depending on whether the imaginary part is known
2432 to be zero.
2433
7f5fa419
GH
24342000-05-01 Gary Houston <ghouston@arglist.com>
2435
0607c109
GH
2436 * scmsigs.c: fix the definition of orig_handlers for the case
2437 that HAVE_SIGACTION is not defined (thanks to
2438 Kalle Olavi Niemitalo).
2439
7f5fa419
GH
2440 * Makefile.am: remove include_HEADERS (was libguile.h)
2441 libguile.h: moved to top level directory.
2442
09fb7599
DH
24432000-04-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
2444
2445 * numbers.c (SCM_SWAP): Moved to the top of the file to allow for
2446 a wider use.
2447
2448 * numbers.c (scm_modulo, scm_gcd, scm_lcm, scm_logand, scm_logior,
2449 scm_logxor): Reordered dispatch sequence, thereby fixing some
2450 comparisons of SCM values with integer constants.
2451
2452 * number.c (scm_logtest): Removed some redundant SCM_{N}?IMP
83238bc1 2453 tests.
09fb7599 2454
89a7e495
DH
24552000-04-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
2456
2457 * numbers.c (scm_quotient, scm_remainder): Removed code that was
2458 conditionally compiled based on BADIVSGNS. BADIVSGNS does not
2459 occur anywhere else throughout guile.
2460
2461 * numbers.c (scm_quotient): Fixed parameter number in error
2462 message.
2463
2464 * numbers.c (scm_remainder): Reordered dispatch sequence.
2465
a4fbabb3
GH
24662000-04-25 Gary Houston <ghouston@arglist.com>
2467
2468 * posix.c (scm_execlp): docstring fix (thanks to Martin
2469 Grabmueller).
2470
09e4d064
DH
24712000-04-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
2472
2473 * eval.c (undef_object): Made into a local static variable
2474 (suggested by Jost Boekemeier).
2475
e59bb516
DH
24762000-04-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
2477
2478 * pairs.c (cxrs, scm_init_pairs): Simplify initialization of
2479 c[ad]+r functions.
2480
2481 * procs.c (scm_init_iprocs), procs.h (scm_subr, scm_iproc,
2482 scm_dsubr, scm_init_iprocs): Removed.
2483
2484 * procs.h (SCM_SUBRF, SCM_DSUBRF): Access the cell words
2485 directly instead of casting a cell to a C struct.
2486
820920e6
MD
24872000-04-22 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
2488
2489 Better modularization of GC extensions through new C level GC
2490 hooks:
83238bc1 2491
820920e6
MD
2492 * weaks.c (scm_weaks_prehistory): New function: Add
2493 scm_weak_vector_gc_init to scm_before_mark_c_hook; Add
2494 scm_mark_weak_vector_spines to scm_before_sweep_c_hook.
2495 (scm_scan_weak_vectors): New function; added to
2496 scm_after_sweep_c_hook.
2497
2498 * weaks.h (scm_weak_vectors, scm_weaks_prehistory): Added
2499 declarations.
2500
2501 * guardians.h (scm_guardian_gc_init, scm_guardian_zombify): Are
2502 now static.
2503
2504 * guardians.c (scm_guardian_gc_init): Turned into a hook function
2505 and added to scm_before_mark_c_hook.
2506 (scm_guardian_zombify): Turned into a hook function and added to
2507 scm_before_sweep_c_hook.
2508
2509 * async.c (scm_sys_gc_async_thunk): Run after-gc-hook.
2510 Added #include "libguile/gc.h".
2511
2512 * gc.h: Added #include "libguile/hooks.h".
2513
2514 * gc.c: Removed #include "libguile/guardians.h".
2515 (scm_before_gc_c_hook, scm_before_mark_c_hook,
2516 scm_before_sweep_c_hook, scm_after_sweep_c_hook,
2517 scm_after_gc_c_hook): New C level hooks.
2518 (scm_after_gc_hook): New Scheme level hook.
2519 (scm_gc_sweep): Moved scanning of weak vectors to weaks.c.
2520 (scm_igc): Moved initialization of scm_weak_vectors and the call
2521 to scm_guardian_gc_init to respective module.
2522 (scm_mark_weak_vector_spines): Moved to weaks.c;
2523 Call to scm_guardian_zombify moved to guardians.c;
2524 Run scm_before_gc_c_hook, scm_before_sweep_c_hook,
2525 scm_after_gc_c_hook at appropriate places.
2526 (scm_init_gc): Initialize scm_after_gc_hook.
2527
2528 * hooks.c, hooks.h (scm_make_hook_with_name): Removed deprecated
2529 function.
2530
2531 * init.c (scm_boot_guile_1): Added `scm_init_hooks'.
2532
2533 * Makefile.am: Added hooks.c, hooks.h, hooks.x.
2534
2535 * feature.c, feature.h: Broke out hook code into separate files.
2536
2537 * hooks.c, hooks.h: New files.
9764c29b 2538
a0599745
MD
2539 * *.*: Change includes so that they always use the "prefixes"
2540 libguile/, qt/, guile-readline/, or libltdl/.
2541 (Thanks to Tim Mooney.)
2542
2543 * Makefile.am (INCLUDES): Removed THREAD_CPPFLAGS and INCLTDL.
2544 (DEFS): Added. automake adds -I options to DEFS, and we don't
2545 want that.
2546 Removed all -I options except for the root source directory and
2547 the root build directory.
2548
f4b0c568
MD
2549 * numbers.c (scm_odd_p, scm_even_p): Use SCM_WRONG_TYPE_ARG
2550 instead of SCM_ASSERT (0, ...). (Some compilers will complain
2551 about control reaching end of function otherwise, and, besides,
2552 the new code is not less clear.)
2553
9764c29b 2554 * gc.c (scm_must_malloc, scm_must_realloc, scm_must_free): Added
83238bc1 2555 calls to malloc debugging functions.
9764c29b
MD
2556
2557 * init.c (scm_boot_guile_1): Added calls to debug-malloc init
2558 functions.
2559
2560 * Makefile.am: Added debug-malloc.c, debug-malloc.h,
2561 debug-malloc.x.
2562
2563 * debug-malloc.c, debug-malloc.h: New files.
2564
4219f20d
DH
25652000-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
2566
2567 * numbers.c (scm_exact_p, scm_odd_p, scm_even_p): Added
2568 documentation strings.
2569
2570 * numbers.c (scm_exact_p, scm_odd_p, scm_even_p, scm_abs,
2571 scm_quotient): Reordered dispatch sequence to first handle
2572 immediates, second handle bignums and finally handle generic
2573 functions respectively signal wrong type arguments. Hopefully
2574 this will allow for easier separation when goops is integrated.
2575
195e6201
DH
25762000-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
2577
2578 * gc.c (which_seg): Use SCM2PTR to convert a non immediate SCM
2579 variable into a pointer to a heap cell.
2580
2581 * gc.c (scm_mark_locations, scm_cellp, init_heap_seg,
2582 scm_unhash_name): Remove redundant cast to SCM_CELLPTR.
2583
9e882eec
DH
25842000-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
2585
2586 * print.c (scm_iprin1): Don't assign zero to SCM values, use
2587 SCM_UNDEFINED instead.
2588
2589 * weaks.c (scm_make_weak_vector): Fix assignment of zero to a
2590 vector element. (Still to be improved)
2591
3201d763
DH
25922000-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
2593
2594 * eval.c (undef_cell): Removed, replaced by:
2595
2596 (undef_object): Added to replace undef_cell.
2597
2598 (scm_lookupcar, scm_lookupcar1): Use undef_object.
2599
2600 * eval.c (scm_lookupcar, scm_lookupcar1, scm_m_atfop,
2601 scm_m_atbind, CHECK_EQVISH, SCM_CEVAL), procs.h (SCM_SETCODE):
2602 Don't perform arithmetic operations with SCM values.
2603
2604 * eval.c (scm_lookupcar, scm_lookupcar1, scm_m_atfop,
2605 scm_m_atbind, scm_eval_args, scm_deval_args, SCM_CEVAL): Use
2606 symbolic names for the tc3 type codes.
2607
2608 * eval.c (scm_m_define, SCM_CEVAL, SCM_APPLY): Remove redundant
2609 cast to SCM.
2610
2611 * eval.c (scm_eval_args, scm_deval_args, SCM_CEVAL): Made the
2612 access of the struct vcell element explicit.
2613
f7c38587
MD
26142000-04-19 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
2615
2616 * struct.c (scm_struct_free_light, scm_struct_free_standard,
2617 scm_struct_free_entity): Use `scm_must_free' instead of `free'.
2618
2619 * procs.c (scm_make_subr_opt): Tell scm_must_realloc that we're
2620 realloc:ing scm_subr_table ("what" instead of "who").
2621
2622 * numbers.c (scm_adjbig): Ditto.
2623
e8293eb6
GB
2624Tue Apr 18 08:22:41 2000 Greg J. Badros <gjb@cs.washington.edu>
2625
83238bc1
ML
2626 * validate.h: Do not cast to (unsigned) in SCM_VALIDATE_INUM_RANGE
2627 when testing high-end of the range. Mikael Djurfeldt noticed this
e8293eb6
GB
2628 anomaly -- thanks Mikael!
2629
baa702c8
DH
26302000-04-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
2631
2632 * unif.c (l2ra): Don't eliminate the call to scm_array_set_x
2633 itself, as was done in the previous 'patch'. (Thanks to Radey
2634 Shouman)
2635
fee7ef83
DH
26362000-04-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
2637
2638 * options.c (scm_options), read.c (recsexpr): Remove redundant
2639 SCM_IMP test.
2640
2641 * print.c (scm_iprin1): Made the access of the struct vcell
2642 element explicit.
2643
2644 * print.h (SCM_PRINT_CLOSURE): Added call to SCM_PACK.
2645
2646 * ramap.c (scm_ra_eqp, ra_compare), unif.c
2647 (scm_uniform_vector_ref, scm_cvref, rapr1): Separated accesses to
2648 unsigned long and signed long arrays and clarified the way the
2649 access is performed.
2650
2651 * ramap.c (scm_array_map_x, raeql), read.c (scm_lreadr), stacks.c
2652 (narrow_stack), unif.c (scm_cvref, scm_uniform_array_read_x,
2653 scm_raprin1): Use SCM_EQ_P to compare SCM values.
2654
2655 * strings.c (scm_makstr): Treat the msymbol slots as a field of
2656 scm_bits_t values.
2657
2658 * struct.h (SCM_SET_VTABLE_DESTRUCTOR): Treat the struct data as
2659 a field of scm_bits_t values.
2660
2661 * unif.c (l2ra): Don't test result of scm_array_set_x against
2662 zero: It is always SCM_UNSPECIFIED.
2663
9d0633a8
MD
26642000-04-18 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2665
2666 * script.c (scm_compile_shell_switches): Also enable
2667 record-positions when given the --debug option. (Thanks to Diego
2668 Dainese.)
2669
230d095f
DH
26702000-04-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
2671
2672 * print.c (ENTER_NESTED_DATA, print_circref, scm_iprlist):
2673 Compare SCM's with SCM_EQ_P.
2674
2675 * print.c (scm_make_print_state), srcprop.c
2676 (scm_source_properties): Use valid scheme object to initialize
2677 SCM variable.
2678
2679 * print.c (scm_iprin1): Remove redundant calls to SCM_UNPACK.
2680
c8045e8d
DH
26812000-04-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
2682
2683 * struct.c (scm_alloc_struct, scm_struct_free_0,
2684 scm_struct_free_light, scm_struct_free_standard,
2685 scm_struct_free_entity, scm_make_struct, scm_make_vtable_vtable),
2686 struct.h (scm_struct_free_t, scm_alloc_struct, scm_struct_free_0,
2687 scm_struct_free_light, scm_struct_free_standard,
2688 scm_struct_free_entity): Struct data regions (and thus also
2689 vtable data regions) are now C arrays of scm_bits_t elements.
2690
2691 * gc.c (scm_gc_mark, scm_gc_sweep, scm_unhash_name): Made the
2692 mixup of glocs and structs explicit.
2693
2694 * gc.c (scm_unprotect_object): Compare SCM's with SCM_EQ_P.
2695
b0c54567
DH
26962000-04-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
2697
2698 * eval.c (scm_unmemocar): Use macros to test for gloc cell.
2699 Minimize scope of variable 'ir'.
2700
2701 * eval.h (SCM_IFRAME, SCM_IDIST), weaks.h (SCM_IS_WHVEC_ANY):
2702 Added missing call to SCM_UNPACK.
2703
b9c90f11
MD
27042000-04-17 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
2705
7aac9824 2706 * validate.h (SCM_VALIDATE_INUM_RANGE_COPY,
2891588b 2707 SCM_VALIDATE_NUMBER_COPY): New macros.
b9c90f11 2708
9ae58e2d
MD
27092000-04-16 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2710
2711 * script.c (scm_compile_shell_switches): Added --debug option.
2712
49e12eb3
MD
27132000-04-16 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
2714
2715 * vectors.c (scm_vector_set_x): Return SCM_UNSPECIFIED (as
2716 specified by R5RS).
2717
7c1e0b12
MD
27182000-04-15 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
2719
2720 * ports.h (SCM_INPUT_PORT_P, SCM_OUTPUT_PORT_P): New macros.
2721 (SCM_INPORTP, SCM_OUTPORTP): Marked as deprecated.
2722
2723 * validate.h (SCM_VALIDATE_INPUT_PORT, SCM_VALIDATE_OUTPUT_PORT):
2724 New macros.
2725 Cleanup of code layout.
2726
2727 * ports.c, ports.h (close-input-port, close-output-port): New R5RS
2728 procedures.
2729
01c8a3dd
DH
27302000-04-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
2731
2732 * continuations.c (scm_make_cont, scm_dynthrow): Completely
2733 separated implementations for defined (CHEAP_CONTINUATIONS) and
2734 !defined (CHEAP_CONTINUATIONS). Also, now using memcpy for stack
2735 copying.
2736
2737 * continuations.c (grow_stack): Renamed from grow_throw.
2738
2739 * continuations.c (copy_stack_and_call): New static function.
2740
2741 * continuations.c (scm_dynthrow): Simplified and made static.
2742
2743 * continuations.h (scm_dynthrow): Made static.
2744
553f4414
MD
27452000-04-13 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
2746
2747 * unif.c, unif.h (shared-array-root, shared-array-offset,
2748 shared-array-increments): New primitives.
2749
cf551a2b
DH
27502000-04-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
2751
2752 * gc.c (scm_gc_sweep): Simplify the computation of freed memory
2753 size for msymbols.
2754
2755 * symbols.h (SCM_SLOTS, SCM_SYMBOL_FUNC, SCM_SYMBOL_PROPS,
2756 SCM_SYMBOL_HASH): The msymbol slots are now a field of scm_bits_t
2757 values.
2758
2759 * symbols.h (SCM_SET_SYMBOL_FUNC, SCM_SET_SYMBOL_PROPS): New
2760 macros.
2761
2762 symbols.c (scm_intern_obarray_soft, msymbolize, scm_symbol_fset_x,
2763 scm_symbol_pset_x): Use them.
2764
83238bc1 2765 * symbols.c (scm_symbol_hash): Unpack to access SCM raw data.
cf551a2b 2766
12a8b769
DH
27672000-04-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
2768
2769 * ports.c (scm_port_print): The port data is read as raw data.
2770
2771 * ports.h (SCM_TC2PTOBNUM, SCM_PTOBNUM): Fix SCM/scm_bits_t
2772 mismatch.
2773
d8c40b9f
DH
27742000-04-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
2775
2776 * eval.c (SCM_CEVAL), objects.c (scm_mcache_lookup_cmethod,
2777 scm_make_subclass_object), objects.h (SCM_CLASS_FLAGS,
2778 SCM_ENTITY_PROCEDURE, SCM_ENTITY_SETTER), struct.c
2779 (scm_struct_init, scm_struct_vtable_p, scm_make_struct,
2780 scm_struct_ref, scm_struct_set_x), struct.h (SCM_STRUCT_DATA):
2781 The struct data is now an array of scm_bits_t variables.
2782
2783 * objects.h (SCM_SET_ENTITY_PROCEDURE): New macro.
2784
cf551a2b 2785 objects.c (scm_set_object_procedure_x): Use it.
d8c40b9f
DH
2786
2787 * struct.c (scm_struct_init): Unused variable 'data' removed.
2788
2789 (scm_struct_vtable_p): Redundant SCM_IMP tests removed.
2790
1c3e63f0
DH
27912000-04-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
2792
2793 * objects.h (SCM_OBJ_CLASS_FLAGS, SCM_OBJ_CLASS_REDEF), struct.h
2794 (SCM_STRUCT_VTABLE_DATA, SCM_STRUCT_LAYOUT, SCM_STRUCT_VTABLE,
2795 SCM_STRUCT_PRINTER): The struct vtable data is now an array of
2796 scm_bits_t variables.
2797
2798 * struct.h (SCM_SET_STRUCT_LAYOUT): New macro.
2799
cf551a2b 2800 struct.c (scm_make_vtable_vtable): Use it.
1c3e63f0 2801
bc66755e
DH
28022000-04-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
2803
2804 * symbols.c (scm_sym2vcell, scm_sym2ovcell_soft, scm_sym2ovcell,
2805 scm_intern_obarray_soft, scm_sysintern0,
2806 scm_string_to_obarray_symbol, scm_intern_symbol,
2807 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned_p,
2808 scm_symbol_bound_p, scm_symbol_set_x): Don't use C operators to
2809 compare SCM values.
2810
828865c3
DH
28112000-04-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
2812
2813 * numbers.c (scm_quotient, scm_modulo): Reordered to handle the
2814 case of immediate numbers parameters first. Also, only use
2815 decoded numbers for numerical comparison.
83238bc1 2816
1cf49a85
MD
28172000-04-10 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
2818
2819 * objects.h: Don't redeclare scm_call_generic_0 and
2820 scm_apply_generic. (Thanks to Tal Tversky.)
2821
dba97178
DH
28222000-04-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
2823
2824 * hash.c (scm_hasher): Use symbolic names for the tc3 constants.
2825 Unpack SCM value to use it as a switch parameter. Don't cast SCM
2826 values to int values.
2827
3da01fa3
MD
28282000-04-10 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2829
2830 * coop.c (mother): Handled EINTR (the wait has been interrupted by
2831 a signal).
2832
451e591c
DH
28332000-04-07 Dirk Herrmann <D.Herrmann@tu-bs.de>
2834
2835 * __scm.h (SCM_WTA_DISPATCH_[012n]): To test whether a SCM value
2836 contains a raw zero value it has to be unpacked.
2837
2838 * debug.c (with_traps_inner, scm_with_traps): Passing SCM values
2839 via void * requires unpacking / packing.
2840
2841 * stacks.h (SCM_STACKP): Remove unnecessary SCM_NIMP test and use
2842 SCM_EQ_P to compare SCM values.
2843
2844 * stacks.h (SCM_FRAME_VOID_P, SCM_FRAME_REAL_P, SCM_FRAME_PROC_P,
2845 SCM_FRAME_EVAL_ARGS_P, SCM_FRAME_OVERFLOW_P): Remove unnecessary
2846 call to SCM_UNPACK.
2847
2848 * tags.h (SCM_NECONSP): Define in terms of SCM_ECONSP
2849
2850 * tags.h (SCM_ECONSP): Clarify the test for glocs. This is still
2851 quite ugly.
2852
e94e3f21
ML
28532000-04-05 Michael Livshin <mlivshin@bigfoot.com>
2854
2855 * async.[ch]: unexpose low-level async access macros (thanks to
2856 Dirk Herrmann).
2857
2858 * validate.h: move async validation macros to async.c (nobody else
2859 needs them anyway), and rename them.
2860
843e4e9d
ML
28612000-04-04 Michael Livshin <mlivshin@bigfoot.com>
2862
2863 * async.h: kill the scm_async_t struct. having a heap cell
2864 pretending to be a C struct is not helthy, and is not needed here
2865 anyway, as asyncs happily fit in one heap cell.
2866
2867 * async.c: reflect the fact that asyncs are now represented by
2868 single heap cell each.
2869
873c35ee
GH
28702000-04-04 Gary Houston <ghouston@arglist.com>
2871
2872 * error.c (scm_syserror): save errno before doing anything else,
2873 since it's used in two expressions and may get mutated (thanks to
2874 Dirk Herrmann).
2875
4260a7fc
DH
28762000-04-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
2877
2878 * debug.c (scm_procedure_source, scm_procedure_environment),
2879 gsubr.c (scm_make_gsubr_with_generic, scm_gsubr_apply), procs.c
2880 (scm_procedure, scm_setter): Return valid scheme value as dummy.
2881
2882 * filesys.c (scm_readdir, scm_rewinddir, scm_closedir,
2883 scm_dir_print, scm_dir_free), numbers.h (SCM_COMPLEX_REAL,
2884 SCM_COMPLEX_IMAG), regex-posix.h (SCM_RGX), throw.c (JBJMPBUF,
2885 SETJBJMPBUF, JBJMPBUF, SETJBJMPBUF, freejb, print_lazy_catch,
2886 scm_ithrow), unif.c (scm_uniform_vector_ref, scm_cvref,
2887 scm_array_set_x, rapr1), unif.h (SCM_ARRAY_V, SCM_ARRAY_BASE),
2888 vectors.h (SCM_VELTS, SCM_VELTS_AS_STACKITEMS, SCM_SETVELTS): Use
2889 SCM_{SET_}?CELL_WORD* to access cell entries with raw data.
2890
2891 * filesys.c (scm_closedir), numbers.c (scm_addbig), numbers.h
2892 (SCM_SETNUMDIGS), throw.c (JBACTIVE, SCM_JBDFRAME,
2893 SCM_SETJBDFRAME): Read and modify data bits in cell entry #0 using
2894 SCM_{SET_}?CELL_WORD_0.
2895
2896 * filesys.c (fill_select_type, retrieve_select_type, scm_select),
2897 numbers.c (scm_gcd, scm_lcm, scm_integer_expt, scm_zero_p,
2898 scm_product, scm_divide), posix.c (scm_getgrgid), ramap.c
2899 (scm_array_fill_int, racp), throw.c (scm_catch, scm_lazy_catch,
2900 scm_ithrow), unif.c (scm_make_uve, scm_array_p,
2901 scm_transpose_array, scm_array_set_x, scm_bit_set_star_x,
2902 scm_bit_count_star, l2ra), variable.c (prin_var,
2903 scm_make_variable, scm_make_undefined_variable,
2904 scm_builtin_variable), vectors.c (scm_vector_set_length_x),
2905 vports.c (sf_flush, sf_close): Don't use C operators to compare
2906 SCM values.
2907
2908 * numbers.c (scm_odd_p, scm_even_p), variable.c (prin_var): Must
2909 unpack SCM values to access their raw contents.
2910
2911 * numbers.c (big2str): Eliminate unnecessary casts to SCM.
2912
2913 * numbers.h (SCM_NEWREAL), regex-posix.h (SCM_RGXP), vports.c
2914 (scm_make_soft_port): Use SCM_{SET_}?CELL_TYPE to access the cell
2915 type information.
2916
2917 * throw.c (printjb): Eliminated unnecessary unpack.
2918
2919 * variable.c (make_vcell_variable): Smob data is of type
2920 scm_bits_t.
2921
5b15c3b4
MD
29222000-04-04 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2923
2924 * print.c: Removed promise to rewrite printer code before next
2925 release. :)
2926
395c8567
MD
29272000-04-03 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2928
2929 * iselect.c (add_fd_sets): Insert empty statement after label.
2930 (Thanks to Tim Mooney.)
2931
50fecba9
ML
29322000-04-03 Michael Livshin <mlivshin@bigfoot.com>
2933
2934 * guardians.c (scm_guardian_zombify): mark all zombies in a
2935 separate loop after processing all the currently known live
2936 guardians, so as to not introduce order dependencies (thanks to
f6e2fd8b 2937 Gary Houston). note that the order problems are still there if
843e4e9d 2938 some guardians are themselves zombies, but that's a sick case that
f6e2fd8b
ML
2939 I'm not going to worry about.
2940 also, make another outer loop to process zombified
50fecba9
ML
2941 guardians (which are uncovered while marking zombies).
2942
54778cd3
DH
29432000-04-03 Dirk Herrmann <D.Herrmann@tu-bs.de>
2944
2945 * evalext.c (scm_definedp, scm_m_undefine), gc.c
2946 (scm_mark_weak_vector_spines, scm_gc_sweep), hashtab.c
2947 (scm_hashq_ref, scm_hashv_ref, scm_hash_ref, scm_hashx_ref),
2948 keywords.c (scm_make_keyword_from_dash_symbol), lang.c
2949 (scm_nil_eq), lang.h (SCM_NILP, SCM_NIL2EOL), load.c
2950 (scm_primitive_load), modules.c (scm_module_full_name), objects.c
2951 (scm_class_of, scm_mcache_lookup_cmethod, scm_make_class_object),
2952 ports.c (scm_close_all_ports_except), ports.h (SCM_EOF_OBJECT_P),
2953 print.c (scm_iprin1, scm_prin1, scm_iprlist, scm_simple_format),
2954 print.h (SCM_PRINT_STATE_P), procprop.c (scm_i_procedure_arity,
2955 scm_stand_in_scm_proc, scm_procedure_property,
2956 scm_set_procedure_property_x), procs.c
2957 (scm_procedure_documentation), read.c (scm_lreadr, scm_lreadparen,
2958 scm_lreadrecparen, scm_read_hash_extend), script.c
2959 (scm_compile_shell_switches), srcprop.c (scm_source_property,
2960 scm_set_source_property_x), srcprop.h (SCM_WHASHFOUNDP), stacks.c
2961 (read_frame, NEXT_FRAME, read_frames, narrow_stack,
2962 scm_make_stack, scm_stack_id), strop.c (scm_i_index,
2963 scm_string_index, scm_string_rindex), struct.c (scm_struct_init),
2964 validate.h (SCM_VALIDATE_BOOL_COPY, SCM_VALIDATE_INUM_DEF,
2965 SCM_VALIDATE_INUM_DEF_COPY, SCM_VALIDATE_PROC,
2966 SCM_VALIDATE_ARRAY): Don't use C operators to compare SCM values.
2967
2968 * feature.c (make_hook), keywords.c
2969 (scm_make_keyword_from_dash_symbol), macros.c (scm_makacro,
2970 scm_makmacro, scm_makmmacro), print.c (scm_iprin1,
2971 scm_printer_apply, scm_port_with_print_state): Smob data is of type
2972 scm_bits_t.
2973
2974 * feature.c (print_hook), gc.c (scm_object_address), hash.c
2975 (scm_ihashq, scm_ihashv), print.c (scm_iprin1, scm_ipruk), smob.c
843e4e9d 2976 (freeprint), struct.c (scm_print_struct): Must unpack
54778cd3
DH
2977 SCM values to access their raw contents.
2978
2979 * fluids.c (apply_thunk, scm_with_fluids), hashtab.c (fold_proc,
2980 scm_hash_fold), load.c (load, scm_primitive_load): Passing SCM
2981 values via void * requires unpacking / packing.
2982
2983 * fports.c (scm_fport_buffer_add, scm_setvbuf), procs.h
2984 (SCM_SUBRNUM, SCM_SET_SUBRNUM), srcprop.h (SRCPROPBRK, SRCBRKP):
2985 Read and modify data bits in cell entry #0 using
2986 SCM_{SET_}?CELL_WORD_0.
2987
2988 * fports.c (scm_fdes_to_port), gc.c (scm_gc_for_newcell,
2989 scm_gc_sweep, init_heap_seg), init.c (start_stack), ports.c
2990 (scm_void_port), procs.c (scm_make_subr_opt,
2991 scm_make_procedure_with_setter), root.c (scm_internal_cwdr),
2992 smob.c (scm_make_smob), strports.c (scm_mkstrport): Use
2993 SCM_SET_CELL_TYPE to write the cell type information.
2994
2995 * gc.c (scm_gc_mark): Use SCM_CELL_OBJECT* to access SCM values
2996 from cells that are no scheme pairs.
2997
2998 * gc.c (scm_gc_sweep), mallocs.c (prinmalloc), mallocs.h
2999 (SCM_MALLOCDATA, SCM_SETMALLOCDATA), print.c (scm_ipruk), random.h
3000 (SCM_RSTATE), root.h (SCM_ROOT_STATE), smob.c (scm_smob_free),
3001 srcprop.c (freesrcprops), srcprop.h (SRCPROPPOS, SRCPROPFNAME,
3002 SRCPROPCOPY, SRCPROPPLIST), struct.c (scm_make_struct,
3003 scm_make_vtable_vtable): Use SCM_{SET_}?CELL_WORD* to access cell
3004 entries with raw data.
3005
3006 * gc.c (scm_init_storage), sort.c (applyless), strop.c
3007 (scm_string_to_list): Eliminate unnecessary casts to SCM.
3008
3009 * mallocs.c (scm_malloc_obj): Store result of malloc as raw
3010 data.
3011
3012 * ports.c (scm_close_all_ports_except): Duplicate documentation
3013 text removed.
3014
3015 * print.c (scm_iprin1): Use SCM_ITAG3.
3016
3017 * procs.h (SCM_SET_SUBRNUM): Fix shift direction.
3018
3019 * snarf.h (SCM_GPROC, SCM_GPROC1, SCM_SYMBOL, SCM_GLOBAL_SYMBOL,
3020 SCM_KEYWORD, SCM_GLOBAL_KEYWORD, SCM_VCELL, SCM_GLOBAL_VCELL,
3021 SCM_VCELL_INIT, SCM_GLOBAL_VCELL_INIT): Don't initialize globals
3022 and static variables at their point of declaration, but rather in
3023 the init function.
3024
3025 * tags.h (SCM_PACK): Automatically cast to scm_bits_t.
3026
abeed821
GH
30272000-04-02 Gary Houston <ghouston@arglist.com>
3028
3029 * guardians.c (TCONC_IN, scm_make_guardian): set the CDR of the
3030 empty tconc pair to SCM_EOL instead of SCM_BOOL_F, avoiding the
3031 use of an improper list (which breaks g_print. g_print isn't
3032 used).
3033 guardians.c: Added more comments and modified the make-guardian
3034 docstring. Reordered a few procedures.
3035
cf498326
DH
30362000-04-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
3037
3038 * eval.c (scm_lookupcar1, scm_lookupcar, scm_m_case, scm_m_cond,
3039 scm_m_lambda, iqq, scm_m_define, scm_m_expand_body, unmemocopy,
3040 SCM_CEVAL), procs.h (SCM_TOP_LEVEL): Don't use C operators to
3041 compare SCM values.
3042
3043 (scm_makprom): Smob data is of type scm_bits_t.
3044
cffcab30
DH
30452000-03-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
3046
3047 * backtrace.c (display_error_body), debug.c (scm_procedure_source,
3048 scm_reverse_lookup), dynl.c (scm_dynamic_link): Don't use C
3049 operators to compare SCM values.
3050
3051 * debug.c (scm_make_debugobj), debug.h (SCM_DEBUGOBJ_FRAME,
3052 SCM_SET_DEBUGOBJ_FRAME): Update SCM_{SET_}?DEBUGOBJ_FRAME to
3053 access raw cell data with SCM_{SET_}?CELL_WORD_1.
3054
3055 * debug.c (scm_make_debugobj): Don't use SCM_SETCAR to set types.
3056
3057 * debug.c (scm_make_memoized), dynl.c (scm_dynamic_link): Smob
3058 data is of type scm_bits_t.
3059
7fa93bf8
DH
30602000-03-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
3061
3062 * gdbint.c (gdb_maybe_valid_type_p), guardians.c (TCONC_EMPTYP,
3063 scm_guardian_zombify): Use SCM_EQ_P to compare SCM values.
3064
3065 * guardians.c (GUARDIAN): Use SCM_CELL_WORD_1 for raw data.
3066
74a16888
DH
30672000-03-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
3068
3069 * ports.h (scm_port): Change type of stream member to scm_bits_t.
3070
3071 * gdbint.c (unmark_port, remark_port), ports.c (scm_markstream),
3072 strports.c (st_resize_port, scm_mkstrport), vports (sf_flush,
3073 sf_write, sf_fill_input, sf_close, scm_make_soft_port): Since
3074 streams are now of type scm_bits_t, SCM streams have to be
3075 unpacked/packed.
3076
3077 * ports.h (SCM_SETPTAB_ENTRY, SCM_SETSTREAM): Cast input to
3078 scm_bits_t.
3079
b6cc0ef6
MD
30802000-03-31 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
3081
6a878357
MD
3082 * coop-defs.h (struct coop_t): Added `sto'-field again because of
3083 binary compatibility---let's remove it next time we alter some
3084 major structure.
3085
b6cc0ef6
MD
3086 * coop.c (coop_quitting_p, coop_cond_create, coop_mutex_create,
3087 coop_mother, coop_child): New variables.
3088 (mother): New function.
3089 (coop_create): New thread spawning mechanism which uses a "mother
3090 thread". The "dummy" pthreads aren't healthy enough to give birth
3091 to new threads since Linux threads thinks they are asleep.
3092
3093 * coop-defs.h (struct coop_t): Removed dummy_mutex.
3094
3095 * coop-defs.h, coop-threads.c (struct coop_t): Eliminate
3096 `sto'-field when GUILE_PTHREAD_COMPAT is enabled.
3097
843524cc
DH
30982000-03-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
3099
3100 * arbiters.c (scm_make_arbiter), async.c (scm_async), dynwind.c
3101 (scm_internal_dynamic_wind): Smob data is always of type
3102 scm_bits_t.
3103
3104 * arbiters.c (SCM_ARB_LOCKED, SCM_LOCK_ARB, SCM_UNLOCK_ARB):
3105 Access the locking information in cell entry 0 with
3106 SCM_{SET_}?CELL_WORD_0 instead of SCM_*CAR.
3107
3108 * async.c (scm_run_asyncs): Use SCM_NULLP to test for the empty
3109 list.
3110
3111 * dynwind.c (scm_dowinds): Use SCM_EQ_P to compare SCM values.
3112
3113 * ports.h (SCM_PTAB_ENTRY, SCM_SETPTAB_ENTRY): Access the ptab
3114 entry data using SCM_{SET_}?CELL_WORD_1 instead of SCM_{SET}?CDR.
3115
fbd485ba
DH
31162000-03-29 Dirk Herrmann <D.Herrmann@tu-bs.de>
3117
3118 * alist.c (scm_sloppy_assq, scm_assq), eq.c (scm_eq_p, scm_eqv_p,
3119 scm_equal_p), list.c (scm_ilength, scm_last_pair, scm_reverse,
3120 scm_sloppy_memq, scm_delq_x, scm_delq1_x), tags.h (SCM_UNBNDP):
3121 Don't use C operators == and != to compare SCM values, use
3122 SCM_EQ_P instead.
3123
3124 * boolean.c (scm_boolean_p): Use SCM_BOOLP to determine whether a
3125 SCM value is equal to #t or #f.
3126
3127 * eq.c (scm_eqv_p, scm_equal_p): Don't use SCM_CAR to access the
3128 cell type entry of non immediate objects of unknown type. Use
3129 SCM_CELL_TYPE instead.
3130
3131 * gh_data.c (gh_scm2bool, gh_module_lookup), list.c
3132 (scm_sloppy_memv, scm_sloppy_member, scm_delv_x, scm_delete_x,
3133 scm_delv1_x, scm_delete1_x), scmsigs.c (scm_sigaction): Use
3134 SCM_FALSEP and SCM_TRUE_P to compare SCM values against #f and
3135 #t.
3136
3137 * list.c (scm_listify): Use SCM_UNBNDP to test for an unbound
3138 scheme value.
3139
64e3bf6c
MD
31402000-03-29 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
3141
0208baa0
MD
3142 * coop-threads.c (scm_call_with_new_thread, scm_spawn_thread,
3143 scm_make_mutex, scm_make_condition_variable): Cast data to
3144 scm_bits_t in SCM_SET_CELL_WORD and SCM_NEWSMOB macros.
3145
64e3bf6c
MD
3146 * coop.c (coop_create): Set `specific' field, not `data' to NULL.
3147
94113249
DH
31482000-03-29 Dirk Herrmann <D.Herrmann@tu-bs.de>
3149
3150 * smob.h (SCM_NEWSMOB, SCM_NEWSMOB2, SCM_NEWSMOB3, SCM_SMOB_DATA,
3151 SCM_SET_SMOB_DATA, SCM_TC2SMOBNUM, SCM_SMOBNUM): To access smob
3152 data, use SCM_{SET_}?CELL_TYPE or SCM_{SET_}?WORD_[1-3].
3153
3154 Note that this implies that smob data has always to be passed as
3155 values of type scm_bits_t.
3156
1978b33e
MD
31572000-03-29 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
3158
3159 * threads.c (scm_init_threads): Pass 0 size to scm_make_smob_type
3160 for scm_tc16_thread. As the current COOP threads are written, GC
3161 is not supposed to manage storage for threads.
3162
3163 * error.c (scm_error): Don't try to throw an error if
3164 scm_gc_heap_lock is true.
3165
3166 * coop.c (coop_finish): New function. Called at exit.
3167 (coop_aborthelp): Free thread structures when threads die.
3168 Finished LinuxThreads compatibility support => COOP threads now
3169 mesh with LinuxThreads.
843e4e9d 3170
1978b33e
MD
3171 * coop-threads.c (scm_call_with_new_thread, scm_spawn_thread):
3172 Changed SETCDR --> SET_CELL_WORD_1.
3173
3174 * coop-threads.c (scheme_launch_thread): Set word 1 of handle to 0
3175 when thread dies.
3176
dd039d6d
DH
31772000-03-29 Dirk Herrmann <D.Herrmann@tu-bs.de>
3178
3179 * boolean.h (SCM_TRUE_P): New macro.
3180
3181 * boolean.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP), pairs.h
3182 (SCM_NULLP, SCM_NNULLP): Use SCM_EQ_P to compare SCM values.
3183
8b3bda20
DH
31842000-03-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
3185
3186 * continuations.h (SCM_CONTREGS, SCM_SET_CONTREGS): New macros to
3187 access continuation data.
3188
3189 (SCM_SETJMPBUF): Deprecated. Use SCM_SET_CONTREGS instead.
3190
3191 (SCM_JMPBUF, SCM_DYNENV, SCM_THROW_VALUE, SCM_BASE, SCM_SEQ,
3192 SCM_DFRAME): Use SCM_CONTREGS instead of SCM_CHARS to access
3193 continuation data.
3194
843e4e9d 3195 * continuations.c (scm_make_cont), init.c (start_stack),
8b3bda20
DH
3196 root.c (scm_internal_cwdr): Use SCM_SET_CONTREGS instead of
3197 SCM_SETJMPBUF.
3198
3210f49a
DH
31992000-03-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
3200
3201 * symbols.h (SCM_LENGTH, SCM_SETLENGTH): Access the length field
3202 of strings and symbols by using SCM_{SET_}?CELL_WORD_0.
3203
3204 (SCM_CHARS, SCM_UCHARS, SCM_SETCHARS): Use SCM_{SET_}?CELL_WORD_1
3205 to access the char * field of strings and symbols.
3206
2d67e390
DH
32072000-03-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
3208
3209 * gc.h (SCM_NEWCELL, SCM_NEWCELL2): Use SCM_SET_CELL_TYPE to set
3210 the type entry of a new cell. Added a comment about things to
3211 remember when updating the list of free cells.
3212
3213 (SCM_FREEP, SCM_MARKEDP): Use SCM_CELL_TYPE to access the type
3214 entry of a cell.
3215
76a369d9
DH
32162000-03-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
3217
3218 * pairs.h (SCM_CAR, SCM_CDR, SCM_SETCAR, SCM_SETCDR): Use
3219 SCM_CELL_OBJECT and SCM_SET_CELL_OBJECT. This change implies that
3220 with strict type checking enabled these macros will only work if
3221 given valid SCM parameters.
3222
3210f49a 3223 (SCM_GCCDR): Moved to tags.h.
76a369d9
DH
3224
3225 * tags.h (SCM_GCCDR): Moved here from pairs.h.
3226
2549a709
DH
32272000-03-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
3228
3229 * tags.h (SCM2PTR, PTR2SCM): Moved to gc.h.
3230
3231 * pairs.h (scm_cell, SCM_CELLPTR, SCM_CELL_WORD*, SCM_CELL_OBJECT*,
3232 SCM_SET_CELL_WORD*, SCM_SET_CELL_OBJECT*, SCM_CELL_TYPE,
3233 SCM_SET_CELL_TYPE, SCM_PTR_LT, SCM_PTR_MASK, SCM_PTR_GT,
3234 SCM_PTR_LE, SCM_PTR_GE, SCM_CELL_WORD_LOC, SCM_NEWCELL,
3235 SCM_NEWCELL2): Moved to gc.h.
3236
3237 (SCM_CARLOC, SCM_CDRLOC, SCM_SETAND_CAR, SCM_SETAND_CDR,
3238 SCM_SETOR_CAR, SCM_SETOR_CDR): Moved to gc.h. These names should
3239 be changed, though, since the macros are not only pair related.
3240
3241 (SCMPTR): Deleted.
3242
3243 * gc.h (SCM2PTR, PTR2SCM, scm_cell, SCM_CELLPTR, SCM_CELL_WORD*,
3244 SCM_CELL_OBJECT*, SCM_SET_CELL_WORD*, SCM_SET_CELL_OBJECT*,
3245 SCM_CELL_TYPE, SCM_SET_CELL_TYPE, SCM_PTR_LT, SCM_PTR_MASK,
3246 SCM_PTR_GT, SCM_PTR_LE, SCM_PTR_GE, SCM_CELL_WORD_LOC,
3247 SCM_NEWCELL, SCM_NEWCELL2, SCM_CARLOC, SCM_CDRLOC, SCM_SETAND_CAR,
3248 SCM_SETAND_CDR, SCM_SETOR_CAR, SCM_SETOR_CDR): Moved here from
3249 tags.h and pairs.h.
3250
8d3356e7
DH
32512000-03-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
3252
3253 * tags.h (SCM_STRICT_TYPING): New macro that, if defined,
3254 activates strict compile time type checking for variables of
3255 type SCM.
3256 (SCM, SCM_PACK, SCM_UNPACK): Define according to whether
3257 SCM_STRICT_TYPING or SCM_VOIDP_TEST are defined.
3258 (SCM_EQ_P): Defined as a macro equivalent for eq?.
3259
96f6f4ae
DH
32602000-03-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
3261
3262 * tags.h (SCM_POINTERS_MUNGED): Removed.
3263
3264 * gc.c (scm_gc_sweep, init_heap_seg): Removed use of
3265 SCM_POINTERS_MUNGED, thus fixing some illegal casts to SCM.
3266
0cbaaf0b
DH
32672000-03-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
3268
3269 * pairs.h (SCM_CELL_OBJECT, SCM_CELL_OBJECT_[0-3],
3270 SCM_SET_CELL_OBJECT, SCM_SET_CELL_OBJECT_[0-3], SCM_CELL_TYPE,
3271 SCM_SET_CELL_TYPE): Added a set of low level macros for accessing
3272 cell entries.
3273 (SCM_CELL_WORD_[0-3]): Renamed from the SCM_CELL_WORD[0-3].
3274
3275 * procs.h, procs.c: Instead of SCM_{SET_}?CELL_WORD[12], use the
3276 newly introduced SCM_{SET_}?CELL_OBJECT_[12] macros.
3277
7284d584
MD
32782000-03-23 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3279
3280 * tags.h: Disabled definition of SCM_VOIDP_TEST.
3281
3282 Defining SCM as void * introduces problems which haven't been
3283 handled yet. Developers who work with these issues can enable it
3284 in their working copies.
3285
3286 Disabling this definition exposes a set of newly introduced and
3287 older misuses of types which causes warning messages during
3288 compilation. We'll fix this successively.
3289
3290 * gc.c (scm_mark_locations): Changed * (SCM **) X --> * (SCM *) X
3291 in order to obtain a value of type SCM.
3292 (scm_cellp): Updated with new changes to scm_mark_locations.
3293
3294 * continuations.h (SCM_SETJMPBUF): Cast second arg into SCM.
3295
2f9055ea
MD
3296 * continuations.c (scm_make_cont): Removed cast of size_t into
3297 long.
3298
7284d584
MD
3299 * symbols.h (SCM_SETCHARS): Cast second arg into SCM.
3300
f81e080b
DH
33012000-03-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
3302
3303 * numbers.h (SCM_SETNUMDIGS): Use SCM_BIGSIZEFIELD macro for
3304 shifting, not constant. Thanks to Dale P. Smith.
3305
3306 * numbers.c (scm_sum, scm_difference): Don't test a SCM value
3307 for being less than zero. Decode it to a C value first. Again,
3308 thank you Dale.
3309
1ff2fa6e
DH
33102000-03-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
3311
3312 * numbers.h, ramap.c, struct.h, vectors.h: Don't use SCM2PTR for
3313 non scheme values. If raw data is stored in SCM variables, it has
3314 to be accessed using SCM_UNPACK until a better solution is found.
3315
3920465b
MD
33162000-03-22 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3317
6f29dc6d
MD
3318 * tags.h (SCM_ECONSP, SCM_NECONSP): More corrections of
3319 pointer-arithmetic induced by the SCM_PACK/UNPACK change.
3320
3321 * print.c (scm_iprin1): SCM_PACK/UNPACK corrections.
3322
3323 * gc.c (scm_gc_sweep): SCM_PACK/UNPACK corrections.
3324
3325 * eval.c (SCM_CEVAL, scm_unmemocar): SCM_PACK/UNPACK corrections.
3326
3327 * dynwind.c (scm_swap_bindings): SCM_PACK/UNPACK corrections.
3328
3920465b
MD
3329 * async.c, __scm.h: Removed lots of the old async click logic. It
3330 is possible to reinsert it by defining GUILE_OLD_ASYNC_CLICK in
3331 __scm.h. Let's try this out and dump the old code after the
3332 threads reorganization.
3333 (set-tick-rate, set-switch-rate): Conditionally removed.
3334
90cca6f9
MD
33352000-03-21 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3336
3337 * gc.c (scm_gc_mark): Bugfix 1: The recent SCM_PACK/UNPACK change
3338 made SCM values into pointers. This turned an arithmetic
3339 computation of the address of the vcell into a pointer-arithmetic
3340 one, thereby screwing up marking of structs.
3341 Bugfix 2: Removed incompletely introduced loop variable `j' used
3342 when protecting the tail array of a struct.
3343
8246bf3e
DH
33442000-03-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
3345
3346 * struct.h (SCM_STRUCT_DATA): Don't cast SCM values to pointers.
3347
95c9e176
DH
33482000-03-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
3349
3350 * symbols.h, symbols.c (scm_strhash): Declare the string
3351 parameter as constant, since it is not modified.
3352
3353 * symbols.c (scm_intern_obarray_soft,
3354 scm_sysintern0_no_module_lookup): Can now pass constant strings
3355 to scm_strhash without need for casting.
3356
7352d0b2
DH
33572000-03-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
3358
3359 * vectors.h (SCM_VELTS, SCM_VELTS_AS_STACKITEMS): Don't cast SCM
3360 values to pointers. Use SCM2PTR instead.
3361
b00c8cdc 33622000-03-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
9b139b4e
DH
3363
3364 * async.c (scm_set_tick_rate, scm_set_switch_rate): Don't unpack
3365 results of SCM_INUM.
3366
df2d5178
MD
33672000-03-21 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
3368
bd54e664
MD
3369 * init.c (scm_boot_guile_1): Renamed GUILE_GC_TRIGGER_1 -->
3370 GUILE_MIN_YIELD_1, GUILE_GC_TRIGGER_2 --> GUILE_MIN_YIELD_2.
3371 GUILE_MIN_YIELD_X now take *positive* fractions of heap size.
3372
3373 * gc.c, gc.h (SCM_MIN_YIELD_1, SCM_MIN_YIELD_2,
3374 min_yield_fraction, min_yield, adjust_min_yield): Renamed from
3375 SCM_GC_TRIGGER_1, SCM_GC_TRIGGER_2, gc_trigger_fraction,
3376 gc_trigger, adjust_gc_trigger.
3377
df2d5178
MD
3378 * gc.c (alloc_some_heap): Further improvement of minimal heap size
3379 prediction.
3380 (SCM_MAX): New macro.
3381 (scm_freelist_t): New field: collected_1. Previous amount of
3382 collected cells.
3383 (gc_sweep_freelist_finish): Trigger based on two last values of
3384 freelist->collected to avoid unnecessary allocation due to
3385 temporary peaks.
bd54e664
MD
3386 (SCM_INIT_HEAP_SIZE_1, SCM_GC_TRIGGER_1, SCM_GC_TRIGGER_2):
3387 Adjusted to 45000 cells, 40% and 40%. Gives quick startup
3388 without extra heap allocation.
df2d5178 3389
f2961ccd
DH
33902000-03-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
3391
3392 * numbers.h (SCM_MAKINUM): The parameter to SCM_MAKINUM should
3393 already be a C value. No need to unpack it.
3394
3210f49a 3395 * numbers.c (scm_long_long2num): Cast the parameter to scm_bits_t
f2961ccd
DH
3396 if we know it fits into an inum.
3397
3398 * ramap.c (ramap_rp): An scm_tc7_[ui]vect object does point to a
3399 field of long values. In contrast, SCM_VELTS accesses a field of
3400 SCM values.
3401
7b4cc831
MD
34022000-03-20 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3403
f1d316dd
MD
3404 * gc.c (scm_gc_stats): Inserted explanation of local_scm_mtrigger
3405 etc.
80770ddc
MD
3406 (scm_gc_yield_1): New variable: Holds previous yield. Used to
3407 make better judgements.
f1083dd7
MD
3408 (gc_sweep_freelist_finish): Inserted explanation of use of
3409 gc_trigger.
f1d316dd
MD
3410
3411 * print.h, stacks.h, options.c, options.h: Changed C++
3412 commentaries to C.
7b4cc831 3413
7a710745
DH
34142000-03-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
3415
3416 * tags.h (SCM2PTR, PTR2SCM): Use SCM_PACK / SCM_UNPACK correctly.
3417
3418 * numbers.h (SCM_INUMP, SCM_MAKINUM, SCM_INUM0, SCM_COMPLEX_REAL,
3419 SCM_COMPLEX_IMAG, SCM_NUMP, SCM_BDIGITS): Use SCM_PACK /
3420 SCM_UNPACK / SCM2PTR correctly.
3421
1ef20c80
MD
34222000-03-20 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3423
3424 * gc.c (adjust_gc_trigger): Improved documentation.
3425 (alloc_some_heap): Since gc_trigger is used against
3426 freelist->collected, this is the value which should be used to
3427 predict minimum growth.
3428
b464b970
DH
34292000-03-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
3430
3431 * eval.h: Fix mixup of packed/unpacked SCM values. (Thanks
3432 Thien-Thi Nguyen for the patch.)
3433
3ab9f56e
DH
34342000-03-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
3435
3436 * numbers.c (scm_ash): Fixed typing problems with the second
3437 parameter and added some documentation. (Thanks Thien-Thi Nguyen
3438 for indicating the problem.)
3439
05bc3265
MD
34402000-03-19 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3441
78a4915a
MD
3442 * gc.c, gc.h (scm_gc_yield): New variable.
3443 (adjust_gc_trigger): Use scm_gc_yield.
3444 (alloc_some_heap): Use scm_gc_yield instead of
3445 scm_gc_cells_collected.
3446
05bc3265
MD
3447 * coop-threads.c: Addd #include "root.h", #include "strings.h".
3448
3449 * debug.c: Added #include "root.h". (Thanks to Thien-Thi Nguyen.)
3450
3451 * gc.c (scm_gc_for_newcell, adjust_gc_trigger): Improved GC
3452 trigger adjustmeant: Take yield (freed cells) for all freelists
3453 into account.
3454 (SCM_INIT_HEAP_SIZE_1, SCM_GC_TRIGGER_1, SCM_GC_TRIGGER_2): Tuned
3455 to 50000 cell heap with 45% trigger.
3456 (scm_gc_cells_collected): Reintroduced.
3457 (SCM_HEAP_SIZE): New macro.
3458 (scm_gc_sweep): Reintroduced correct computation of
3459 scm_cells_allocated.
3460 (scm_freelist_t): Corrected commentary for field `cluster_size':
3461 Clustersize counts objects, not cells; New member
3462 `clusters_allocated'.
3463
89e00824
ML
34642000-03-19 Michael Livshin <mlivshin@bigfoot.com>
3465
3466 * *.[hc]: add Emacs magic at the end of file, to ensure GNU
3467 indentation style.
3468
afcfc5bb
MD
34692000-03-19 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
3470
3471 * threads.h: Added #include "libguile/throw.h". (Thanks to
3472 Thien-Thi Nguyen.)
3473
a00c95d9
ML
34742000-03-18 Michael Livshin <mlivshin@bigfoot.com>
3475
50fecba9
ML
3476 * tags.h: (SCM_DOUBLE_CELLP, SCM_NDOUBLE_CELLP): new macros (bad
3477 names, anyone got any better ones?)
a00c95d9
ML
3478
3479 * gc.h: (typedef struct scm_freelist_t) remove from here.
3480
50fecba9 3481 * gc.c: (CELL_UP, CELL_DN) made these macros take additional
a00c95d9
ML
3482 parameter (the span).
3483 (CLUSTER_SIZE_IN_BYTES, ALIGNMENT_SLACK) new macros.
50fecba9 3484 (typedef struct scm_freelist_t) moved here from gc.h, it had no
a00c95d9
ML
3485 business being externally visible.
3486 (typedef struct scm_heap_seg_data_t) renamed from
3487 scm_heap_seg_data, to be style-compliant.
3488 (scm_mark_locations) if the possible pointer points to a
50fecba9
ML
3489 double-cell, check that it's properly aligned.
3490 (init_heap_seg) align double-cells properly, work with the
3491 assumption that the segment size divides cleanly by cluster size.
a00c95d9
ML
3492 (round_to_cluster_size) new function.
3493 (alloc_some_heap, make_initial_segment) use round_to_cluster_size
3494 to satisfy the new init_heap_seg invariant.
3495
28b3236d
DH
34962000-03-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
3497
3498 * _scm.h: Don't include async.h everywhere...
3499
3500 * eq.c eval.c iselect.c: ... only include it here.
3501
ba11fd4c
DH
35022000-03-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
3503
3504 * _scm.h: Don't include root.h everywhere...
3505
3506 * async.c continuations.c eq.c eval.c evalext.c feature.c gc.c
3507 gdbint.c gsubr.c ioext.c keywords.c lang.c load.c macros.c
3508 numbers.c objprop.c ports.c print.c procprop.c ramap.c read.c
3509 srcprop.c stackchk.c stacks.c strports.c symbols.c unif.c
3510 variable.c vectors.c vports.c: ... only include it here.
3511
7ab3fdd5
DH
35122000-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
3513
3514 * _scm.h: Don't include strings.h everywhere...
3515
3516 * backtrace.c dynl.c error.c feature.c filesys.c fports.c gc.c
3517 gdbint.c ioext.c load.c net_db.c numbers.c objects.c options.c
3518 ports.c posix.c print.c procs.c random.c read.c regex-posix.c
3519 simpos.c socket.c stacks.c stime.c strop.c strports.c struct.c
3520 symbols.c unif.c vectors.c version.c vports.c: ... only include it
3521 here.
3522
f04d8caf
DH
35232000-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
3524
3525 * _scm.h: Don't include ports.h everywhere...
3526
3527 * arbiters.c backtrace.c debug.c dynl.c dynwind.c eval.c feature.c
3528 fluids.c gc.c gdbint.c guardians.c hash.c keywords.c mallocs.c
3529 numbers.c objects.c print.c read.c root.c smob.c srcprop.c
3530 stackchk.c strports.c struct.c throw.c variable.c: ... only
3531 include it here.
3532
003d1fd0
DH
35332000-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
3534
3535 * _scm.h: Don't include vectors.h everywhere...
3536
3537 * eq.c eval.c filesys.c gc.c gsubr.c guardians.c hash.c hashtab.c
3538 keywords.c net_db.c numbers.c objects.c posix.c print.c procprop.c
3539 procs.c ramap.c random.c read.c scmsigs.c socket.c sort.c stime.c
3540 strports.c symbols.c unif.c vports.c weaks.c: ... only include it
3541 here.
3542
0fa27efa
DH
35432000-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
3544
3545 * genio.h: removed. (Only content was '/* delete me */'.)
3546
3547 * Makefile.am arbiters.c backtrace.c debug.c dynl.c dynwind.c
3548 error.c filesys.c fluids.c gc.c gsubr.c guardians.c keywords.c
3549 libguile.h mallocs.c numbers.c print.c random.c read.c root.c
3550 srcprop.c stackchk.c struct.c threads.c throw.c variable.c:
3551 Removed reference to genio.h
3552
148f31de
MD
35532000-03-17 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
3554
3555 * gc.c, gc.h: Cleanup of the change of 2000-03-15.
3556 Cluster sizes are now independent of GC trigger values.
3557 GUILE_GC_TRIGGER_n can now specify a relative trigger value:
3558 A negative integer gives fraction of total heap size in percent.
1eb489a2 3559 (SCM_GC_TRIGGER_1, SCM_GC_TRIGGER_2): Default values set to -40.
148f31de
MD
3560
3561 * init.c (scm_boot_guile_1): Introduced new variable
3562 GUILE_MAX_SEGMENT_SIZE; New environment variable names:
3563 GUILE_INIT_SEGMENT_SIZE_1, GUILE_GC_TRIGGER_1,
3564 GUILE_INIT_SEGMENT_SIZE_2, GUILE_GC_TRIGGER_2
3565
6d0f81dd 35662000-03-16 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
a00c95d9 3567
6d0f81dd
MD
3568 * __scm.h (GC_FREE_SEGMENTS): Disable this until we have made
3569 freeing of segment work with the new GC scheme. (Thanks to
bc2c8d98
MD
3570 Michael Livshin.) Oops, also happened to make GUILE_NEW_GC_SCHEME
3571 the default, but I'll let this change stay in CVS Guile since this
3572 code is not expected to contain serious bugs.
a00c95d9 3573
17351a6f 35742000-03-16 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
c5133dc9 3575
6c7c449e
MD
3576 * gc.c, gc.h (scm_map_free_list): Define also if GUILE_DEBUG is
3577 defined.
5a551542
MD
3578 (scm_free_list_length): New procedure (GUILE_DEBUG).
3579 Fixed a small but serious bug introduced by the previous change.
3580
17351a6f
MD
3581 * gc.c (scm_gc_sweep): Moved variable n_objects to inner sweep
3582 loop and declare as register.
6c7c449e 3583
c5133dc9
MD
3584 * gc.c (scm_gc_sweep): Sigh... forgot to clear private freelists
3585 after GC.
3586
3820581c
GB
3587Wed Mar 15 08:27:04 2000 Greg J. Badros <gjb@cs.washington.edu>
3588
3589 * fluids.c: Docstring patch from Keisuke Nishida. Some
3590 reindentation, too, and a couple formals renamed. Should
3591 fluid-set! return UNSPECIFIED instead of a value?
3592
3593Wed Mar 15 08:24:58 2000 Greg J. Badros <gjb@cs.washington.edu>
3594
3595 * Makefile.am: Separate out DOT_X_FILES and DOT_DOC_FILES, and
a00c95d9 3596 generate the latter from the concrete listing of the former. Then
3820581c
GB
3597 make guile-procedures.txt depend on DOT_DOC_FILES instead of
3598 *.doc, so that rebuilding it works.
3599
dd6390bf
GB
3600Wed Mar 15 08:12:14 2000 Greg J. Badros <gjb@cs.washington.edu>
3601
3602 * libguile.h: Include libguile/validate.h. Thanks Keisuke Nishida!
3603
3604 * guile-snarf.awk.in: Replace docstring line-ending \n" and \n\n"
3605 with nothing and \n, respectively. Thanks Keisuke Nishida for
3606 noticing this problem.
3607
4fdb0ae2
MD
36082000-03-15 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3609
3610 * __scm.h (GUILE_NEW_GC_SCHEME): Define this if you want to test a
3611 new way of allocating heap. It makes Guile fast, but still
3612 contains bugs.
3613
3614 * gc.c, gc.h, pairs.h, init.c: Implementation of a new way of
3615 allocating heap. The basic idea is to trigger GC every Nth
3616 allocated cell and grow heap when free list runs out. The scheme
3617 has been extended so that GC isn't triggered until all remaining
3618 cells are used. The implementation is also prepared for
3619 development in the direction of POSIX threads.
3620
3621 * gc.c (SCM_EXPHEAP): In order to grow by a factor of 1.5,
3622 SCM_EXPHEAP should return half of the heap size.
3623
3d8d1283
MD
36242000-03-14 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
3625
5f4edb86
MD
3626 The following change to init.c is only enabled if Guile was
3627 configured with --enable-guile-debug.
a00c95d9 3628
5f4edb86
MD
3629 * init.c (scm_i_getenv_int): New function.
3630 (scm_boot_guile_1): Use the environment variables
3631 GUILE_INIT_HEAP_SIZE, GUILE_INIT_HEAP_SIZE2 to select heap size if
3632 they exist. (This may be replaced by a Scheme level mechanism in
3633 the future.)
3634
3d8d1283 3635 * objprop.c (s_scm_set_object_property_x): Use scm_assq instead of
90e77861 3636 scm_assoc. (Thanks to Keisuke Nishida.)
3d8d1283 3637
b0e37c83
MD
36382000-03-14 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3639
3640 * eval.c, lang.c, lang.h (scm_lisp_nil, scm_lisp_t): Renamed from
2b260c0f 3641 scm_nil, scm_t. (Thanks to Keisuke Nishida.)
b0e37c83 3642
16d35552
MD
36432000-03-14 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
3644
5ebf0091
MD
3645 * init.c (scm_boot_guile_1): Use same initial segment size for
3646 1-word and 2-word segments. Having the smaller size causes Guile
3647 to GC too often. Obviously something needs to be done to allow
3648 for a smaller 2-word segment without this to happen. (The amount
3649 of heap for each type should be automatically adapted to the
3650 application somehow.)
3651
31ed4cff
MD
3652 [Almost all of these changes should be documented in the NEWS
3653 file.]
3654
cf2c7413
MD
3655 * gc.h (scm_freelist_t): New type.
3656
3657 * pairs.h (SCM_NEWCELL, SCM_NEWCELL2): Use new style freelists.
3658
3659 * gc.c (SCM_INIT_HEAP_SIZE): Changed from 32768 --> 40000 so that
3660 all of Guile basics fits into one segment and there suitable room
3661 for work.
3662 (SCM_EXPHEAP): Now takes an argument. Grow by a factor of 1.5
3663 instead of 2.
3664 (scm_freelist, scm_freelist2): Now of type scm_freelist_t.
3665 Freelists now contains information about object span, cells
3666 collected and amount of cells in heap segments belonging to the
3667 list.
3668 (scm_heap_size, scm_gc_cells_collected): Removed.
3669
3670 * init.c (scm_boot_guile_1): Make 2-word segment 8K (512 cells).
3671
16d35552
MD
3672 * Makefile.am (libguile_la_LDFLAGS): Bumped library version
3673 number.
3674
cf2c7413 3675 * __scm.h eq.c, eval.c, gc.c, gc.h, gh_data, hash.c, numbers.c,
16d35552
MD
3676 numbers.h, objects.c, ramap.c, random.c, unif.c, unif.h: Extensive
3677 rewrite of handling of real and complex numbers.
3678 (SCM_FLOATS, SCM_SINGLES): These #ifdef conditionals have been
3679 removed along with the support for floats. (Float vectors are
3680 still supported.)
3681
3682 * tags.h (scm_tcs_bignums): Removed.
3683 (scm_tc16_bigpos, scm_tc16_bigneg): Replaced by scm_tc16_big.
3684 Use SCM_BIGSIGN(x) to test for sign!
3685 (scm_tc16_big): The new bignum type.
3686 (SCM_REAL_PART, SCM_IMAG_PART): Removed.
3687
3688 * numbers.h (SCM_BIGSIGN): Sign moved to bit 16.
3689 (scm_makdbl): Deprecated.
3690 (SCM_NEWREAL, SCM_NEWCOMPLEX): New macros.
3691 (SCM_SINGP): Deprecated.
3692 (SCM_FLO): Removed.
3693 (SCM_INEXP, SCM_CPLXP): Deprecated.
3694 (SCM_INEXACTP, SCM_COMPLEXP): New macros.
3695 (SCM_COMPLEX_REAL, SCM_COMPLEX_IMAG): Renamed from
3696 SCM_REAL, SCM_IMAG (and now only valid for complex numbers).
3697 (SCM_REAL, SCM_IMAG): New, *deprecated*, selectors which work both
3698 for doubles and complex numbers.
3699 (SCM_REAL_VALUE): New selector for doubles.
3700 (scm_double_t, scm_complex_t): New types.
3701 (scm_dbl): Removed.
3702
3703 * numbers.c (scm_floprint, scm_floequal): Removed.
3704 (scm_print_real, scm_print_complex, scm_real_equalp,
3705 scm_complex_equalp): New functions.
3706
3707 * unif.c (scm_makflo): Removed.
3708
3709 * smob.h (SCM_SMOB_PREDICATE): New macro.
3710 (SCM_NEWSMOB2, SCM_RETURN_NEWSMOB2, SCM_NEWSMOB3,
3711 SCM_RETURN_NEWSMOB3): New macros.
3712
37131999-11-21 Michael Livshin <mlivshin@bigfoot.com>
3714
3715 The following changes implement primitive support for double cells
3716 (i.e. four-word cells) and change the representation of some
3717 things to multi-cells instead of cons+malloc. (Applied and
3718 modified by mdj.)
3719
3720 * pairs.h (SCM_NEWCELL2): double-cell variants of SCM_NEWCELL.
3721 (SCM_CELL_WORD, SCM_CELL_WORDLOC, SCM_SET_CELL_WORD): primitive
3722 multi-cell access macros (used by the ones below).
3723 (SCM_CELL_WORD[0-3], SCM_SET_CELL_WORD[0-3]): multi-cell access
3724 macros.
3725
3726 * gc.c (scm_freelist2): multi-cell freelists.
3727 (inner_map_free_list): map_free_list, parameterized on ncells.
3728 "nn cells in segment mm" was misleading for ncells > 1; changed to
3729 "objects". still print cells too, though.
3730 (scm_map_free_list): rewritten using inner_map_free_list.
3731 (scm_check_freelist): get freelist as parameter, since now we have
3732 more than one.
3733 (scm_debug_newcell2): multi-cell variants of
3734 scm_debug_newcell.
3735 (scm_gc_for_newcell): take ncells and freelist pointer as
3736 parameters.
3737 (scm_gc_mark): add case for tc7_pws (procedures with setters are
3738 now double cells).
3739 (scm_gc_sweep): don't free the float data, since it's not malloced
3740 anymore.
3741 (init_heap_seg): didn't understand what n_new_objects stood for,
3742 so changed to n_new_cells.
3743 (make_initial_segment): new function, makes an initial segment
3744 according to given ncells.
3745 (scm_init_storage): call make_initial_segment, for ncells={1,2,3}.
3746
3747 * numbers.c (scm_makdbl): no malloc'ing needed, so the
3748 {DEFER,ALLOW}_INTS thing removed.
3749
3750 * numbers.h (struct scm_dbl): changed to represent a double cell,
3751 with the number in the second half.
16d35552
MD
3752
3753 * dynwind.c: changed the wind-guards representation to double
3754 cell.
3755
3756 * procs.c, procs.h: changed the procedure-with-setter representation
3757 to double cell.
3758
3759 * async.c, async.h: made async representation a double cell.
3760
16d35552 3761 * dynl.c: made dynamic_obj representation a double cell.
a00c95d9 3762
b70ecbd0
GH
37632000-03-13 Gary Houston <ghouston@arglist.com>
3764
3765 * ports.c (flush_void_port): renamed to flush_port_default.
3766 (end_input_void_port): renamed to end_input_default.
3767
3768 * init.c (scm_standard_stream_to_port): create a void port instead
3769 of opening /dev/null if the standard file descriptors are bad.
3770 advantages: no portability problems, doesn't waste a file descriptor,
3771 simplifies the code (thanks to Marius for the idea).
3772
3773 * vports.c (s_scm_make_soft_port): call scm_port_non_buffer.
3774
3775 * void ports: make reading from a void port give EOF instead of
3776 segv:
3777 * ports.c (s_scm_sys_make_void_port): modified docstring.
3778 (fill_input_void_port): new proc.
3779 (scm_init_ports): set up fill_input_void_port.
3780 * ports.c (scm_port_non_buffer): new proc.
3781 (scm_void_port): call scm_port_non_buffer.
3782
3783 * fports.c (scm_setvbuf): docstring: remove the fcntl documentation
3784 which was incorrectly appended.
3785
fdc7ea2d
MD
37862000-03-13 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3787
3788 * guile-doc-snarf.in: Don't use absolute path for `sed'. (Note
3789 that we can't use autoconf for this. Autoconf itself relies on
26fba922 3790 the existence of `sed' somewhere on your path.) (Thanks to Dirk
fdc7ea2d 3791 Herrman.)
a00c95d9 3792
68933ba3
MD
37932000-03-13 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
3794
b44a555a
MD
3795 * Makefile.am (libguile_la_SOURCES): Moved iselect.c here from
3796 EXTRA_libguile_la_SOURCES.
3797
3798 * iselect.h: Always declare scm_internal_select.
3799
3800 * iselect.c (scm_internal_select): Added SCM_ASYNC_TICK at the
3801 end. Also let scm_internal_select be a real function also when
3802 not using threads.
3803
68933ba3
MD
3804 * __scm.h (SCM_TICK): Oops! Forgot to put SCM_ASYNC_TICK here...
3805
c7f6ea11
MD
38062000-03-13 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3807
3808 * __scm.h (SCM_ALLOW_INTS, SCM_REALLOW_INTS): Removed call to
3809 SCM_ASYNC_TICK. (This is a preparation for POSIX threads support,
3810 and kind of an experiment: Will this cause problems?)
3811
62dbc244
GB
3812Sun Mar 12 13:26:30 2000 Greg J. Badros <gjb@cs.washington.edu>
3813
3814 * Makefile.am: Added *.doc to DISTCLEANFILES.
3815
4f2f645d
GH
38162000-03-12 Gary Houston <ghouston@arglist.com>
3817
3818 * fports.c (scm_fdes_to_port): call fcntl F_GETFL to test that
3819 the fdes is valid before doing anything else. check that
3820 the file descriptor supports the modes required.
3821 (scm_fport_buffer_add): don't throw an error if fstat doesn't
3822 work: just use the default buffer size.
3823
3824 * throw.c: change an outdated comment about scm_internal_catch
3825 BODY: it doesn't take a jumpbuf arg.
3826
3827 * init.c (scm_standard_stream_to_port): install a handler in case
3828 scm_fdes_to_port throws an error. don't check here whether the
3829 file descriptor is valid, since scm_fdes_to_port will do that.
3830 set the revealed count depending on whether the port got the
3831 standard file descriptor.
3832 (stream_body_data): new type.
3833 (stream_body, stream_handler): new procs.
3834
7f782a0a
MD
38352000-03-12 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
3836
67673f75
MD
3837 * stacks.c, stacks.h, struct.c, tags.h, unif.c (scm_bits_t):
3838 Renamed from SCMWORD.
3839
3840 * tags.h (SCM_NCELLP): Removed (SCMWORD).
3841
f1267706 3842 * arbiters.c (SCM_ARB_LOCKED): Use SCM_UNPACK_CAR.
67673f75 3843
74a426ae
MD
3844 * async.c, boolean.h, debug.c, dynl.c, dynwind.c, eval.c, eval.h,
3845 feature.h, filesys.h, fluids.h, fports.c, fports.h, gc.c, gc.h,
3846 hash.c, keywords.h, macros.c, numbers.c, numbers.h, objects.c,
3847 objects.h, options.c, pairs.h, ports.c, ports.h, print.c,
3848 procs.h, ramap.c, read.c, smob.c, smob.h, srcprop.h, stacks.c,
3849 stacks.h, strports.c, struct.c, struct.h, tag.c, tags.h,
3850 throw.c, unif.c, unif.h, variable.h, vectors.h, weaks.c,
f1267706 3851 weaks.h (SCM_PACK, SCM_UNPACK, SCM_UNPACK_CAR): Renamed from
74a426ae
MD
3852 SCM_ASSCM, SCM_ASWORD, SCM_CARW).
3853
7f782a0a
MD
3854 * numbers.h (SCM_SRS, SCM_INUM): Corrected SCM_ASSCM/ASWORD fixes.
3855
3856 * alist.c, eval.c, net_db.c, posix.c, print.c, snarf.h, struct.c,
3857 tags.h: Fixed copyright notices.
3858
3859 * struct.c, coop-threads.c: SCM_ASSCM/ASWORD fixes.
0cd87628 3860
7f782a0a 38612000-03-12 Marius Vollmer <mvo@zagadka.ping.de>
a00c95d9 3862
0cd87628
MV
3863 * init.c (scm_standard_stream_to_port): Check whether the file
3864 descriptor is valid and substitute "/dev/null" when not.
a00c95d9 3865
f3b5e185
MD
38662000-03-12 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
3867
3868 * coop-defs.h (struct timespec): Conditionally defined.
3869
3870 * coop.c (coop_condition_variable_timed_wait_mutex): Use ETIMEDOUT
3871 instead of ETIME.
38eca29b
MD
3872
3873 * readline.c (match_paren): Bugfix: First arg to select is not
3874 number of descriptors but the number of the highest descriptor +
3875 1.
3876
3877 This is a preliminary attempt at a cleanup of the threads support
3878 code. It moves things to better places, makes arguments more
3879 consistent with the POSIX API (which is used in GNOME's glib), and
3880 adds new functionality.
a00c95d9 3881
38eca29b
MD
3882 * readline.c (scm_init_readline): Added new arg to scm_init_mutex.
3883
3884 * coop-defs.h (scm_mutex_trylock): New macro: alias for
3885 coop_mutex_trylock.
3886 (scm_cond_init): Changed definition to
3887 coop_new_condition_variable_init.
a00c95d9 3888
38eca29b
MD
3889 * coop.c: #include <errno.h>
3890 (coop_timeout_qinsert): Moved here from iselect.c
3891 (coop_new_mutex_init, coop_new_condition_variable_init): New
3892 functions. The strange names are temporary. Use scm_mutex_init
3893 and scm_cond_init instead.
3894 (coop_mutex_trylock): New function. Uses errno.h:EBUSY. errno.h
3895 is ANSI C, but should we check for individual error codes in
3896 configure.in?
3897 (coop_condition_variable_timed_wait_mutex): New function.
3898 (coop_key_create, coop_setspecific, coop_getspecific,
7f782a0a 3899 coop_key_delete): New functions.
38eca29b
MD
3900
3901 * iselect.c (coop_timout_qinsert): Moved to coop.c
3902
32e1616c
MD
39032000-03-11 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
3904
3905 * pairs.h (SCM_SETAND_CAR, SCM_SETAND_CDR, SCM_SETOR_CAR,
3906 SCM_SETOR_CDR): Corrected SCM_ASSCM/WORD fixes.
3907
3908 * tags.h (SCM_VOIDP_TEST): Renamed from VOIDP_TEST.
3909 Layout cleanups.
3910
3911 * objects.h (SCM_CLASS_FLAGS, SCM_OBJ_CLASS_FLAGS,
3912 SCM_SET_CLASS_INSTANCE_SIZE), struct.h (SCM_STRUCT_VTABLE_DATA),
3913 proc.h (SCM_CLOSCAR): SCM_ASSCM/WORD fixes.
3914
3915 * eval.c (scm_lookupcar1): Inserted SCM_ASWORD in expressions
3916 dealing with ilocs.
3917
d5c39069
GB
39182000-03-11 Dale P. Smith <dpsm@en.com>, applied by Greg J. Badros, <gjb@cs.washington.edu>
3919
3920 * numbers.c (scm_copy_big_dec, scm_copy_smaller, scm_big_ior,
3921 scm_big_xor, scm_big_and, scm_big_test): Added new lowlevel bignum
3922 logical functions from SCM.
3923
3924 (logand, logior, logxor, logtest, logbit?): Extended scheme
3925 logical functions to use bignums from SCM.
3926
3927 (lognot): Removed call to `SCM_VALIDATE_INUM' that prevented
3928 lognot from using bignums.
3929
3e892913
GB
3930Thu Mar 9 11:33:25 2000 Greg J. Badros <gjb@cs.washington.edu>
3931
a00c95d9 3932 * vectors.h (SCM_VELTS_AS_STACKITEMS): Added this macro to help in
3e892913
GB
3933 eliminating some warnings.
3934
3935 * unif.c, strports.c, print.c, options.c: Fix some warnings on
3936 mis-use of SCM/long
3937
3938 * gc.c, gc.h: Added scm_return_first_int(), and added comment re:
3939 what the scm_return_first* functions do.
3940
7ac030d6
GB
39412000-03-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>, applied by Greg J. Badros, <gjb@cs.washington.edu>
3942
3943 * libguile/*.[ch]: make a distinction between SCM as a generic
3944 name for a Scheme object (now a void*), and SCM as 32 bit word for
3945 storing tags and immediates (now a long int). Introduced
3946 SCM_ASWORD and SCM_ASSCM for conversion. Fixed various dubious
3947 code in the process: arbiter.c (use macros), unif.c (scm_array_p),
a00c95d9 3948
f635d2d4
GB
3949Wed Mar 8 10:15:59 2000 Greg J. Badros <gjb@cs.washington.edu>
3950
3951 * numbers.c: Use SCM_VALIDATE_LONG_COPY, and longs, not ints, in
3952 various logXXX primitives. Thanks Eric Moore!
3953
9eaa7fb6
GB
3954Tue Mar 7 08:05:22 2000 Greg J. Badros <gjb@cs.washington.edu>
3955
3956 * run-test, remaining-docs-needed: Added these scripts. The
3957 second one is only temporary until the docstring additions are
3958 complete. run-test may best live on, but is here mostly for
3959 convenience and awareness for now.
3960
3961 * hash.c: Docs, minor cleanup patch from Dirk Herrman.
3962
49673698
GB
3963Thu Mar 2 16:06:58 2000 Greg J. Badros <gjb@cs.washington.edu>
3964
3965 * error.h, error.c: Added `scm_wrong_type_arg_msg' to support
3966 displaying the expected type. Use SCM_LISTn in a couple places
3967 instead of scm_cons-ing by hand.
3968
3969 * __scm.h: Added SCM_ASSERT_TYPE macro.
3970
3971 * validate.h, scm_validate.h: Added the former, as a renamed
3972 version of the latter with SCM_ASSERT_TYPE used in
3973 SCM_MAKE_VALIDATE (instead of just SCM_ASSERT)
3974
3975 * Makefile.am: Rename scm_validate.h to validate.h.
3976
3977 * *.c, *.h: Include validate.h, not scm_validate.h (old name's
3978 prefix was superfluous).
3979
417bdef8
GB
3980Thu Mar 2 15:33:12 2000 Greg J. Badros <gjb@cs.washington.edu>
3981
3982 * hashtab.c: Improved documentation for lots of functions. Added
3983 handwritten docs for `hash-fold'.
3984
3985Thu Mar 2 15:13:25 2000 Greg J. Badros <gjb@cs.washington.edu>
3986
3987 * list.c: Added hand-written docs for `del{q,v,ete}1!'.
3988
26a760c6
GB
3989Thu Mar 2 12:38:30 2000 Greg J. Badros <gjb@cs.washington.edu>
3990
a00c95d9 3991 * list.c: Moved append docs to append! Thanks Dirk Hermann. Also,
26a760c6
GB
3992 added append docs from R4RS.
3993
3994 * strings.c: Docstring typo fix, + eliminate unneeded IMP tests.
3995 Thanks Dirk Hermann!
3996
3997 * chars.h: Provide SCM_CHARP, SCM_CHAR, SCM_MAKE_CHAR and
3998 deprecate SCM_ICHRP, SCM_ICHR, SCM_MAKICHR. Thanks Dirk Hermann!
a00c95d9 3999
26a760c6
GB
4000 * *.h, *.c: Use SCM_CHARP, SCM_CHAR, SCM_MAKE_CHAR throughout.
4001 Drop use of SCM_P for function prototypes... assume an ANSI C
4002 compiler. Thanks Dirk Hermann!
4003
898942f8
GB
4004Sat Feb 19 12:20:12 2000 Greg J. Badros <gjb@cs.washington.edu>
4005
4006 * ports.c: Made `set-port-column!' and `set-port-line!' each
4007 return SCM_UNSPECIFIED instead of a (not-scheme-object) integer
4008 that caused a seg fault. Also fixed `set-port-column!'s
4009 docstring. Thanks Han-Wen Nienhuys for finding the bug!
4010
84a3df2c
GB
4011Sun Feb 13 19:11:42 2000 Greg J. Badros <gjb@cs.washington.edu>
4012
4013 * arbiters.c, eq.c, gc.c, guardians.c, list.c, ports.c, print.c,
a00c95d9 4014 regex-posix.c, scmsigs.c, stime.c, strings.c, variable.c, stime.c,
84a3df2c
GB
4015 strings.c, variable.c: Added lots of documentation, cleaned up
4016 some existing documentation. Occasionally changed formal params
4017 to match docs. Also folded an #ifdef into the inners of a
4018 primitive instead of having two copies of the primitive
4019 (`get-internal-real-time', from stime.c)
4020
4021Sun Feb 13 18:12:19 2000 Greg J. Badros <gjb@cs.washington.edu>
4022
4023 * ports.c: Added docs for primitives missing them. Written by
4024 hand.
4025
3f557de6
GB
4026Sun Feb 13 09:40:36 2000 Greg J. Badros <gjb@cs.washington.edu>
4027
4028 * guile-doc-snarf.in: Use ${AWK} -f guile-func-name-check, not
4029 just execing guile-func-name-check. Thanks Michael Livshin!
4030
ddcccdb3
GB
4031Thu Feb 10 11:43:23 2000 Greg J. Badros <gjb@cs.washington.edu>
4032
4033 * guile-snarf.awk.in: Tweak to work with Sun/HP awk, removed some
4034 dead code. Patch from Michael Livshin.
4035
4036 * guile-doc-snarf.in: Tweak to work with Sun/HP sh. Patch from
4037 Michael Livshin.
4038
720e8692
GH
40392000-02-09 Gary Houston <ghouston@arglist.com>
4040
4041 * init.c (scm_init_standard_ports): when stdout is a tty, make the
4042 current-output-port unbuffered by default. this is less confusing
4043 for interactive use. it was line-buffered because of a
4044 performance problem with unbuffered ports, but I think it will be
4045 OK now.
4046
43ff3170
GH
40472000-02-08 Gary Houston <ghouston@arglist.com>
4048
4049 * __scm.h: don't define long_long or ulong_long if HAVE_LONG_LONGS
4050 is not defined.
4051
4052 * stime.c (scm_localtime, scm_mktime): if neither HAVE_TM_ZONE nor
4053 HAVE_TZNAME are defined, use an empty string instead of giving two
4054 spurious compile-time errors.
4055
4ba47302
GB
4056Tue Feb 8 13:57:46 2000 Greg J. Badros <gjb@cs.washington.edu>
4057
4058 * ports.c: Doc patches from Richard Kim. Pasted from MIT Scheme.
4059 Thanks Richard!
4060
09a617f7
GB
4061Mon Feb 7 09:07:31 2000 Greg J. Badros <gjb@cs.washington.edu>
4062
4063 * macros.c: Doc patches from Richard Kim. Pasted from scm.texi.
4064
9dbcf010
GB
4065Sun Feb 6 20:26:21 2000 Greg J. Badros <gjb@cs.washington.edu>
4066
4067 * pairs.c: Doc patches from Richard Kim. Pasted from MIT Scheme
4068 (which is GNU GPL'd).
4069
bd9e24b3
GH
40702000-01-31 Gary Houston <ghouston@arglist.com>
4071
4072 * strings.h: don't use SCM_P. don't include <string.h>.
4073 * error.c, gh_data.c, ports.c, script.c, strop.c: include <string.h>.
a00c95d9 4074
bd9e24b3
GH
4075 * strings.c (scm_string_ref): make the 2nd argument compulsory.
4076 previously it defaulted to zero for no good reason that I can see.
4077 use a local variable for SCM_INUM (k). replace
4078 SCM_VALIDATE_INUM_DEF with SCM_VALIDATE_INUM_COPY.
4079
4080 (scm_makfromstr): cosmetic changes.
4081
4082 (scm_string): Accept only chars in the list, not strings, for
4083 conformance to R5RS (particularly for list->string, which is
4084 supposed to be the inverse of string->list.) remove
4085 SCM_DEFER_INTS/SCM_ALLOW_INTS, which is unnecessary since
4086 scm_makstr handles the cell allocation. when reporting wrong-type
4087 arg, don't report the position as 1.
4088
4089 * posix.c (scm_init_posix): intern PIPE_BUF if it's defined.
4090
28d77376
GH
40912000-01-29 Gary Houston <ghouston@arglist.com>
4092
ae1b098b
GH
4093 * posix.c (scm_pipe): rewrote the docstring.
4094
28d77376
GH
4095 * filesys.c (scm_select, retrieve_select_type, get_element,
4096 fill_select_type, set_element): modified so that Scheme
4097 "select" tests port buffers for the ability to provide input
4098 or accept output. Previously only the underlying file descriptors
4099 were checked. Rewrote the docstring.
a00c95d9 4100
7f1497ce
GB
4101Thu Jan 27 10:14:25 2000 Greg J. Badros <gjb@cs.washington.edu>
4102
4103 * vectors.c, symbols.c, strorder.c: Documentation cut and pasted
4104 from Gregg Reynolds. Thanks Gregg!
4105
2288ff9b
GB
4106Thu Jan 27 09:59:38 2000 Greg J. Badros <gjb@cs.washington.edu>
4107
4108 * strop.c (scm_i_index): Obfuscated commented-out SCM_DEFINE by
4109 adding "x" prefix to the line so that guile-func-name-check
4110 doesn't complain unnecessarily.
4111
349af6dd
GB
4112Wed Jan 26 17:33:52 2000 Greg J. Badros <gjb@cs.washington.edu>
4113
4114 * throw.c: Factor out an #ifdef/#else/#endif choice more finely
4115 for maintainability.
4116
4117 * strop.c: Documentation added by Gregg A. Reynolds. Pasted in
4118 from qdocs, RnRs.
4119
a28eb127
GB
4120Wed Jan 26 10:02:11 2000 Greg J. Badros <gjb@cs.washington.edu>
4121
a00c95d9 4122 * tag.c: Added doc for `tag', but mark as deprecated since Mikael
a28eb127
GB
4123 suggests removing tag.c altogether (and using a new `class-of'
4124 instead).
4125
4126 * strings.c: Added documentation from Gregg A. Reynolds. Edited
4127 a bit by me to use FOO instead of @var{foo} and to have the
a00c95d9 4128 summary come before preconditions on input. Also dropped trailing
a28eb127
GB
4129 (rnrs) note.
4130
4131 * gsubr.c: Do not use SCM_DEFINE for `gsubr-apply'. Register the
4132 function with scm_make_subr_opt w/ last arg of 0 so it is not
4133 visible at the Scheme level. Mikael says that this is the right
4134 thing because the first arg to the proc is the guts of a compiled
4135 closure and shouldn't be exposed to the Scheme level.
4136
ac2259fc
GB
4137Tue Jan 25 17:15:47 2000 Greg J. Badros <gjb@cs.washington.edu>
4138
4139 * sort.c: typo in comment fixed.
4140
4141 * keywords.c: Added documentation.
4142
4143 * guardians.c: Added documentation (could be better).
4144
4145 * gc.c: Added docs for gc-set-debug-check-freelist.
4146
4147 * eq.c: Added docs for eq?, eqv? equal? abridged from R4RS.
4148
4149 * boolean.c: Added docs for `not', `boolean?' (by hand).
a00c95d9 4150
d928e0b4
GB
4151Tue Jan 25 13:28:56 2000 Greg J. Badros <gjb@cs.washington.edu>
4152
4153 * random.c: Added documentation, from SLIB page:
4154 http://angela.ctrl-c.liu.se/~calle/scheme/slib_toc.html
4155
4156Mon Jan 24 17:50:20 2000 Greg J. Badros <gjb@cs.washington.edu>
4157
4158 * variable.c, version.c: Added documentation, written by hand
4159 since I could not find anything already written that was
4160 relevant.
4161
d831b039
GH
41622000-01-23 Gary Houston <ghouston@arglist.com>
4163
a00c95d9 4164 * filesys.c (scm_chown): omit port/fdes support if HAVE_FCHOWN is
d831b039
GH
4165 not defined (thanks to Richard Y. Kim).
4166
88ec97ad
GB
4167Thu Jan 20 13:00:38 2000 Greg J. Badros <gjb@cs.washington.edu>
4168
4169 * Makefile.in: Removed, this is auto-generated.
4170
078e9092
GB
4171Thu Jan 20 11:33:47 2000 Dirk Hermann <dirk@ida.ing.tu-bs.de> --applied 01/20/00 gjb
4172
4173 * list.c: Put some variable initialization code at the point of
4174 declaration; Added a comment for list*; Formatting changes.
4175
4176 * load.c: use SCM_NNULLP to make sure the end of a list is not
4177 reached yet.
4178
e7a96050
MD
41792000-01-18 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4180
a177af34
MD
4181 * backtrace.c (scm_display_error_message): Bugfix: Don't use
4182 result of scm_list_p as C boolean.
4183 (scm_display_error_message, scm_set_print_params_x): Use new
4184 validation macros. (Thanks to Dirk Herrmann.)
4185
d06bcb02
MD
4186 * net_db.c (scm_resolv_error): Cast result from hstrerror.
4187
4188 * strports.c (st_end_input): Inserted parenthesis to get operator
4189 grouping correct.
4190
4191 * list.h (scm_init_list): Removed SCM_P around prototypes.
4192
4193 * fports.c, list.c, numbers.c, ports.c, stime.c, symbols.c,
4194 filesys.c, posix.c: Converted docstrings to ANSI C format and
e7a96050
MD
4195 escaped " occurring inside string literals.
4196
682eefe9
MD
4197Tue Jan 18 13:21:08 2000 Mikael Djurfeldt <mdj@r11n07-s.pdc.kth.se>
4198
4199 * posix.c (scm_mknod): Escape " occuring inside docstring.
4200
56cfe22b
MD
42012000-01-18 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4202
4203 * alist.c, chars.c, debug.c, dynl.c, dynwind.c, error.c, eval.c,
4204 evalext.c, filesys.c, gc.c, hash.c, hashtab.c, ioext.c,
4205 keywords.c, list.c, load.c, macros.c, net_db.c, numbers.c,
4206 objprop.c, ports.c, posix.c, print.c, procprop.c, procs.c,
4207 ramap.c, regex-posix.c, root.c, scmsigs.c, simpos.c, socket.c,
4208 stacks.c, stime.c, strings.c, strop.c, strports.c, struct.c,
4209 symbols.c, throw.c, unif.c, vectors.c, version.c, vports.c,
4210 weaks.c: Converted docstrings to ANSI C format.
a00c95d9 4211
56cfe22b
MD
4212 * filesys.c (scm_chmod), simpos.c (scm_system), version
4213 (scm_version), vports (scm_make_soft_port): Escape " occuring
4214 inside docstring.
4215
fcb1720f
GB
4216Mon Jan 17 11:41:22 2000 Greg J. Badros <gjb@cs.washington.edu>
4217
4218 * scm_validate.h: Added SCM_VALIDATE_ULONG_COPY,
4219 SCM_VALIDATE_LONG_COPY
4220
4221 * numbers.c: Use SCM_VALIDATE_ULONG_COPY, instead of
4222 SCM_VALIDATE_INUM_COPY to let bigger numbers be used. Rename a
4223 couple of formal arguments (and fix their uses) to make arguments
4224 match the documentation.
4225
b9af3d0e
MS
42262000-01-14 <mstachow@alum.mit.edu>
4227
4228 * Makefile.am: Augment path when running guile-doc-snarf so
4229 guile-func-name-check is found.
4230
153511a7
GB
4231Fri Jan 14 09:34:55 2000 Greg J. Badros <gjb@cs.washington.edu>
4232
4233 * scm_validate.h (SCM_NUM2LONG_DEF): Fix this macro to just use
4234 def, not SCM_MAKINUM(def); thanks Janis Bzerins!
4235
59d5245f
GB
4236Wed Jan 12 00:06:53 2000 Greg J. Badros <gjb@cs.washington.edu>
4237
4238 * net_db.c (s_scm_inet_makeaddr): Use SCM_NUM2ULONG since that's
4239 the way guile-1.3.4 worked, but #if 0 out the version using
4240 SCM_VALIDATE_INUM_COPY for stricter testing.
4241
95aec69f
GB
4242Tue Jan 11 18:24:18 2000 Greg J. Badros <gjb@cs.washington.edu>
4243
4244 * guile-doc-snarf.in: Use new $fullfilename for running
4245 guile-func-name-check, and put "$fullfilename" and "$filename" in
4246 quotes at uses to make sure re-splitting on whitespace does not
a00c95d9 4247 occur (so filenames w/ embedded whitespace would work okay, though
95aec69f
GB
4248 I sure hope we never have to deal with that! :-) ). Thanks to
4249 Mikael for pointing out the source_dir != build_dir was broken.
4250
b7ac2837
GB
4251Tue Jan 11 17:42:40 2000 Greg J. Badros <gjb@cs.washington.edu>
4252
4253 * scm_validate.h: Added SCM_NUM2LONG_DEF macro. Make
4254 SCM_OUT_OF_RANGE use SCM_MAKINUM, not scm_long2num. Added
4255 SCM_COERCE_ROSTRING macro. Added SCM_VALIDATE_NONEMPTYLIST
4256 macro. Fix SCM_VALIDATE_STRINGORSUBSTR macro to not use SLOPPY
4257 variants.
4258
4259 * ports.c (scm_port_closed_p): Validate that the arg is a PORT,
4260 then return whether it's an open port (was validating that it was
4261 an open port -- this was a bug I introduced back in December, but
4262 my careful reading of diffs caught it).
4263
4264 * numbers.c: Recombine the two conditional-compilation paths for
4265 all the log* primitives -- they were split based on #ifndef
4266 scm_long2num; factored out a SCM_LOGOP_RETURN macro, and fixed
4267 some bugs and inconsistencies in the two sets of implementations.
4268 (scm_lognot) Fixed *atrocious* re-use of a SCM as an integer!
4269
4270 * ioext.c: Use SCM_ASSERT_RANGE in a couple places, and
4271 SCM_VALIDATE_INUM_COPY once where it should've been used.
4272
4273 * fluids.c (scm_internal_with_fluids): Use
4274 SCM_VALIDATE_LIST_COPYLEN.
4275
4276 * filesys.c: Use SCM_NUM2LONG instead of SCM_VALIDATE_INUM_COPY;
4277 this is questionable as it relaxes type safety, but other changes
4278 were useful and all SCM_NUM2LONG's should probably be
4279 revisited. Use SCM_OUT_OF_RANGE, SCM_WRONG_TYPE_ARG.
4280
4281 * evalext.c: line-break change on 1 line.
4282
4283 * eval.c (nconc2last): Takes a non-empty list as its first
4284 argument, not just a list.
4285
4286 * dynl.c: Use new SCM_COERCE_ROSTRING macro.
4287
4288Tue Jan 11 15:44:23 2000 Greg J. Badros <gjb@cs.washington.edu>
4289
4290 * dynl.c, feature.c, filesys.c, fports.c, list.c, load.c,
4291 net_db.c, sort.c, stacks.c, unif.c: Use SCM_WTA, SCM_MISC_ERROR
4292 where possible.
4293
4294 * symbols.c (scm_sysintern0): Fixed the function name in a
4295 scm_misc_error invocation.
4296
4297 * print.c (scm_simple_format): Do not need SCM_COERCE_SUBSTR, and
4298 use scm_return_first to ward off latent GC bug that Mikael caught.
4299
4300 * async.c: Use SCM_VALIDATE_ASYNC_COPY one place where it wasn't
4301 used before but should've been.
4302
d61f6b02
MD
43032000-01-12 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
4304
4305 * snarf.h (SCM_PROC1): Replaced SCM (*) (...) with
4306 SCM_FUNC_CAST_ARBITRARY_ARGS.
4307
88423ab1
GB
4308Tue Jan 11 13:44:07 2000 Greg J. Badros <gjb@cs.washington.edu>
4309
4310 * guile-func-name-check.in: Added this script to statically check
4311 #define FUNC_NAME, #undef FUNC_NAME in the source.
4312
4313 * sort.c, posix.c: Fix #undef FUNC_NAME lines to not have trailing
4314 redundant comment, semicolon; caught by new guile-func-name-check
4315 script.
4316
4317 * debug.c: Fix mistaken #define FUNC_NAME for scm_make_iloc.
4318 Caught by new guile-func-name-check-script.
4319
4320 * Makefile.am: Added guile-func-name-check to bin_SCRIPTS
4321
4322 * ramap.c: Fix #if 0'd out code to be syntactically acceptable to
4323 guile-func-name-check.
4324
a00c95d9 4325 * guile-doc-snarf.in: Run guile-func-name-check on the file before
88423ab1
GB
4326 doing the snarf.
4327
7f15e635
GB
4328Tue Jan 11 11:31:10 2000 Greg J. Badros <gjb@cs.washington.edu>
4329
4330 * fports.c, ports.c, ports.h, strports.c, vports.c: Make write
4331 port function take const void*, not void*.
4332
bf121b59
GB
4333Tue Jan 11 11:18:07 2000 Greg J. Badros <gjb@cs.washington.edu>
4334
4335 * scm_validate.h, chars.c, ports.c, print.c, read.c, strings.c,
4336 strop.c: Use SCM_VALIDATE_ICHR, SCM_VALIDATE_ICHR_COPY instead of
4337 SCM_VALIDATE_CHAR, SCM_VALIDATE_CHAR_COPY. Change made for
4338 consistency with the other macros dealing with immediate
4339 characters. (Similar to INT -> INUM change a week or so ago).
4340
7965d98f
GB
4341Tue Jan 11 10:41:46 2000 Greg J. Badros <gjb@cs.washington.edu>
4342
4343 * dynl.c, error.c, eval.c, feature.c, filesys.c, fports.c, list.c, load.c,
4344 net_db.c, read.c, socket.c: Update error messages to use ~A for
4345 %s, ~S for %S to work with new `simple-format' format and be
4346 standardized better.
4347
4348 * print.h, print.c (scm_simple_format): Added `simple-format'
4349 primitive. It's the old scm_display_error, with ARGS now a rest
a00c95d9 4350 parameter, and the destination first instead of last (and a couple
7965d98f
GB
4351 new capabilities inspired by `format' -- #t as destination means
4352 current-output-port, #f means return the formatted text as a
4353 string.
4354
4355 * gh.h, gh_data.c, ports.h, ports.c: Added some missing const specifications.
4356
4357 * backtrace.c (scm_display_error_message): Rewrote to use
4358 scm_simple_format() procedure.
4359
4360 * __scm.h: Added commented-out #define of GUILE_DEBUG_FREELIST
4361
f73d2411
MV
43622000-01-09 Marius Vollmer <mvo@zagadka.ping.de>
4363
4364 Finally applied the libltdl patch from Thomas Tanner, with slight
4365 modifications.
4366
4367 * DYNAMIC-LINKING: Removed because it is obsolete.
4368 * dynl.c: Use ANSI prototypes.
4369 (sysdep_dynl_link): Use lt_dlopenext instead of lt_dlopen.
4370 * scmconfig.h.in: Do not change, as it is automatically generated.
a00c95d9 4371
f73d2411
MV
4372 1999-07-25 Thomas Tanner <tanner@ffii.org>
4373
4374 * dynl-dl.c, dynl-dld.c, dynl-shl.c, dynl-vms.c: deleted
4375 (obsolete)
4376 * Makefile.am: likewise, add INCLTDL (libltdl headers) to
4377 INCLUDES, set dlpreopened files in LDFLAGS, link libguile
4378 against libltdl
4379 * dynl.c: use libltdl if DYNAMIC_LINKING is enabled,
4380 * guile.c: register preloaded modules
4381 * scmconfig.h.in: remove obsolete symbols
4382
38c1d3c4
GH
43832000-01-09 Gary Houston <ghouston@arglist.com>
4384
4385 * These changes should make it unnecessary to call tzset from
4386 Scheme after modifying the TZ environment variable, even if the
4387 system date facilities cache the value.
4388 * stime.c (setzone, scm_localtime): added comments.
4389 (tzset): don't define a noop tzset macro if HAVE_TZSET not defined.
4390 (setzone): don't call tzset.
4391 (restorezone): call tzset only if HAVE_TZSET is defined.
4392 (scm_tzset): don't define if HAVE_TZSET not defined. Change the
4393 doc string to indicate that this procedure isn't likely to do
4394 anything useful.
4395 (scm_localtime, scm_strftime, scm_mktime): call tzset if
4396 LOCALTIME_CACHE is defined.
4397
9359d657
MD
43982000-01-09 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
4399
4400 * posix.c (scm_sync): Return SCM_UNSPECIFIED.
4401
f25f761d
GH
44022000-01-09 Gary Houston <ghouston@arglist.com>
4403
4404 * eval.c: define scm_unbound_variable_key ('unbound-variable).
4405 scm_lookupcar1: throw an error with key 'unbound-variable instead
4406 of 'misc-error when an unbound variable is encountered.
4407
a00c95d9 4408 * filesys.c (scm_mkdir, scm_rmdir, scm_getcwd, scm_select,
f25f761d
GH
4409 scm_symlink, scm_readlink, scm_lstat),
4410 posix.c (scm_setpgid, scm_setsid, scm_ctermid, scm_tcgetpgrp,
4411 scm_tcsetpgrp, scm_uname, scm_setlocale, scm_mknod, scm_nice,
4412 scm_sync),
a00c95d9 4413 simpos.c (scm_system),
f25f761d
GH
4414 stime.c (scm_times, scm_strptime):
4415 move the HAVE_XXX feature tests out of the procedure bodies.
4416 don't use SCM_SYSMISSING.
4417 scm_validate.h (SCM_SYSMISSING): removed.
4418 error.h, error.c (scm_sysmissing): comment that this is deprecated.
4419 see ChangeLog entry for 1999-12-28.
4420
a4dd2611
GB
4421Sat Jan 8 19:52:04 2000 Greg J. Badros <gjb@cs.washington.edu>
4422
4423 * scm_validate.h (SCM_VALIDATE_BOOL_COPY): Fix typo.
4424
4425Sat Jan 8 17:06:46 2000 Greg J. Badros <gjb@cs.washington.edu>
4426
4427 * backtrace.c: Fix spelling typo in a comment.
4428
4429 * snarf.h: Use new SCM_DOCS macro to encapsulate the non SCM_INIT
4430 text. Reformatted some of the expansions.
4431
5ac36451
GB
4432Fri Jan 7 15:50:46 2000 Greg J. Badros <gjb@cs.washington.edu>
4433
4434 * scm_validate.h (SCM_OUT_OF_RANGE): Use scm_out_of_range_pos to
4435 report the position of the argument.
4436
a00c95d9 4437 * error.h, error.c (scm_out_of_range_pos): Added this function to
5ac36451 4438 take extra "pos" argument, the position number of the errant
a00c95d9 4439 argument.
5ac36451
GB
4440
4441 * debug.c: Use SCM_OUT_OF_RANGE instead of scm_out_of_range.
4442
4443 * snarf.h: Use SCM_HERE and SCM_INIT as names, not SCM_NOTSNARF
4444 and SCM_SNARFING. Also put the %%% in the SCM_INIT since Mikael
4445 prefers that and I'm reasonably indifferent.
4446
4447Fri Jan 7 15:03:32 2000 Greg J. Badros <gjb@cs.washington.edu>
4448
4449 * snarf.h: Factor out differences between C++ and non-C++ into
4450 SCM_FUNC_CAST_ARBITRARY_ARGS macro. Modify all the snarf macro
4451 definitions to use SCM_NOTSNARF and SCM_SNARFING macros (like
4452 Mikael's macros, below, but changed names and SCM_SNARFING no
4453 longer expands to include %%% -- that must appear in the argument
4454 so that the token appears at the call-site as a reminder).
4455
088bb1d4
MD
44562000-01-07 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
4457
4458 * snarf.h (SCM_INSITU, SCM_INIT): New snarf macros for use in user
4459 snarf macro definitions.
4460
636480e6
MD
44612000-01-06 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4462
4463 * chars.c (scm_integer_to_char): Use Greg's nice
4464 SCM_VALIDATE_INUM_RANGE macro for argument checking for closer
4465 adherence to R5RS.
4466
7c5628e2
GB
4467Thu Jan 6 11:48:49 2000 Greg J. Badros <gjb@cs.washington.edu>
4468
4469 * *.c, snarf.h: Replace GUILE_PROC1 with SCM_DEFINE1 throughout.
4470
2cc0f8cb
GB
4471Thu Jan 6 11:22:53 2000 Greg J. Badros <gjb@cs.washington.edu>
4472
4473 * Makefile.am (ETAGS_ARGS): Switch to SCM_DEFINE, SCM_DEFINE1
4474 instead of GUILE_PROC.
4475
4476Thu Jan 6 11:21:49 2000 Greg J. Badros <gjb@cs.washington.edu>
4477
a00c95d9 4478 * alist.c: Do not report mismatch errors on some uses of `tmp' (do
2cc0f8cb
GB
4479 this by using SCM_ARG2 instead of `2' in the SCM_VALIDATE_CONS
4480 macro call.
4481
9179dcdd
GB
4482Thu Jan 6 09:54:33 2000 Dirk Herrmann <dirk@ida.ing.tu-bs.de> --gjb applied
4483
4484 * scm_validate.h: Remove some redundant NIMP tests.
4485
4486 * alist.c: minimize scope of the tmp variables, and initialize
4487 them when declared. The strange SCM_NIMP tests are replaced by
4488 SCM_CONSP tests that more closely reflect the intended semantics.
4489 However, we don't get a performance penalty here, because the
4490 SCM_CONSP test was performed by the ALISTCELL test anyway. * The
4491 extremely ugly use of ASRTGO macros was removed: The calls to
4492 ASRTGO were not encapsulated by "#ifndef SCM_RECKLESS", but got a
4493 label parameter that only exists when SCM_RECKLESS is not defined.
4494 This works, because ASRTGO itself is defined in a way that it only
4495 makes use of the label parameter if SCM_RECKLESS is not defined
4496 (shudder!). Does guile make at all use of the possibility to
4497 define SCM_RECKLESS? * Codesize is likely to be reduced, since
4498 instead of two calls to SCM_ASSERT performed by the ALISTCELL test
4499 we now only get one test.
4500
4501 * list.c: Use SCM_NNULLP, not SCM_NIMP as appropriate. Also use
4502 SCM_NULLP instead of SCM_IMP. Drop use of "register" keyword on
4503 some variables in `list?'. Fix `reverse' and `reverse!'
4504 primitives to handle improper lists better.
4505
15b33280
GB
4506Wed Jan 5 11:24:53 2000 Greg J. Badros <gjb@cs.washington.edu>
4507
4508 * *.[ch]: Whitespace changes -- added space after SCM_VALIDATE_*
4509 macros and SCM_DEFINE macros to match GNU coding standards.
4510
ca8cd130
GB
4511Wed Jan 5 11:04:24 2000 Greg J. Badros <gjb@cs.washington.edu>
4512
4513 * *.[ch]: Replace GUILE_PROC w/ SCM_DEFINE.
4514
fb764465
GB
4515Wed Jan 5 10:59:06 2000 Greg J. Badros <gjb@cs.washington.edu>
4516
4517 * *.[ch]: Replace SCM_VALIDATE_INT w/ SCM_VALIDATE_INUM for
4518 better consistency with the names of other SCM_VALIDATE_ macros
4519 and better conformance to guile naming policy.
4520
4521Wed Jan 5 10:50:39 2000 Greg J. Badros <gjb@cs.washington.edu>
4522
4523 * ports.c (s_scm_close_all_ports_except): Use SCM_ARG1 in a
4524 SCM_VALIDATE instead of 1 to avoid a check on the argument (since
4525 it's not the actual name of the formal).
1e484823
GB
4526
4527 * guile-snarf.awk.in: Do argument/number mismatch checking and
4528 print warnings in an Emacs compile-mode parseable format.
4529
4530 * struct.c: Use SCM_ASSERT_RANGE instead of SCM_ASSERT w/
4531 SCM_OUTOFRANGE as 3rd argument.
4532
4533 * random.c: Fix argument/number mismatch (that I introduced :-( ).
4534
4535 * __scm.h: Do not #define SCM_ARG* when snarfing;
4536 lets us distinguish between 1 and SCM_ARG1 when snarfing as only
4537 the former (using the number) requires the argument to match the
4538 formal in the current argument snarfing check.
4539
4540 * snarf.h: Give new definition of SCM_ASSERT when in
a00c95d9 4541 snarfing mode to output a lexically-identifiable sequence that the
1e484823
GB
4542 guile-snarf.awk script uses to verify argument/position matching.
4543
4544 * ramap.c: Remove extraneous #undef FUNC_NAME.
4545
53fc4636
GB
4546Wed Jan 5 08:36:38 2000 Greg J. Badros <gjb@cs.washington.edu>
4547
4548 * guile-doc-snarf.awk.in: Removed -- guile-snarf.awk.in is the
a00c95d9 4549 current version of the same functionality; it writes the .x output
53fc4636
GB
4550 to stdout instead of directly into the file.
4551
4552Wed Jan 5 08:15:04 2000 Greg J. Badros <gjb@cs.washington.edu>
4553
4554 * unif.c, symbols.c, strings.c, stacks.c, random.c, print.c,
4555 posix.c: Eliminated a bunch of SCM_NIMP(..)s that are now
4556 redundant with the safer macros. Patch from Dirk Hermann applied
4557 by hand. Thanks Dirk!
4558
4559 * scm_validate.h: Added SCM_VALIDATE_VECTOR_OR_DVECTOR for some
4560 uses in random.c.
4561
4562 * ramap.c: whitespace change.
4563
3b5345d9
GB
4564Tue Jan 4 14:21:35 2000 Greg J. Badros <gjb@cs.washington.edu>
4565
4566 * options.c, objects.c, keywords.c, gc.c: Some redundant SCM_NIMP
4567 removals from Dirk Hermann.
4568
4569 * alist.c: Rename formals to match the parameter names in the
4570 documentation, updates to documentation. Thanks Dirk Hermann!
4571
169aec65
MD
45722000-01-04 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4573
db62436e
MD
4574 * eval.c (SCM_CEVAL): Reverse order of
4575 scm_stack_checking_enabled_p and SCM_STACK_OVERFLOW_P
4576 (Thanks to Brad Knotwell.)
169aec65 4577
da43d822
GB
4578Mon Jan 3 08:30:02 2000 Greg Harvey <Greg.Harvey@thezone.net> (applied --01/03/00 gjb)
4579
4580 * gc.c (scm_debug_newcell): Added SCM_SETCAR of the newly
a00c95d9 4581 allocated cell.
da43d822
GB
4582
4583 * pairs.h: Added a comment about the need for the SCM_SETCAR in
4584 SCM_NEWCELL macro.
4585
4586Mon Jan 3 08:25:19 2000 Greg J. Badros <gjb@cs.washington.edu>
4587
4588 * dynl-vms.c, debug.c, coop-threads.c, backtrace.c, eval.c: More
4589 SCM_NIMP tests that were redundant are now eliminated. Patches
4590 from Dirk Hermann applied by hand.
4591
339999c7 4592The ChangeLog continues in the file: "ChangeLog-1996-1999"