* Avoid using eval-in-module in example code. Thanks to Neil Jerram.
[bpt/guile.git] / libguile / ChangeLog
CommitLineData
09074dbf
DH
12000-12-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
2
3 * eval.c (change_environment, inner_eval, restore_environment):
4 New functions.
5
6 (scm_eval): Bring the global variable that holds the current
7 environment up to date when entering or leaving the scope of the
8 evaluated code. Thanks to Matthias Koeppe for the bug report.
9
a261c0e9
DH
102000-12-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
11
12 * numbers.c (scm_init_numbers): Re-introduced bindings for
13 most-positive-fixnum and most-negative-fixnum as requested by
14 Mikael Djurfeldt.
15
0f979f3f
DH
162000-12-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
17
18 The variable scm_symbols is made static within symbols.c and
19 renamed to symbols. The initialization of the symbols hash table
20 is done in function scm_symbols_prehistory.
21
22 * gc.c (scm_init_storage): Don't initialize scm_symbols. Don't
23 define most-positive-fixnum, most-negative-fixnum and
24 bignum-radix.
25
26 * init.c (scm_init_guile_1): Call scm_symbols_prehistory.
27
28 * root.h (scm_symbols): Not in scm_sys_protects any more.
29
30 * symbols.c (symbols): Renamed from scm_symbols and made static.
31
32 (scm_mem2symbol): scm_symbols is renamed to symbols.
33
34 * symbols.[ch] (scm_symbols_prehistory): Added.
35
b52e071b
DH
362000-12-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
37
38 * gc.c (scm_init_storage), root.h (scm_weak_symhash, scm_symbols):
39 Removed the former scm_weak_symhash hash table. Added scm_symbols
40 hash table.
41
42 * stacks.c (get_applybody): scm_sym2vcell may return #f.
43
44 * symbols.c (scm_mem2symbol): This function is now responsible
45 for creating symbol objects and storing them in the global
46 scm_symbols hash table.
47
48 (scm_str2symbol): Rewritten in terms of scm_mem2symbol.
49
50 (scm_sym2vcell): For system bindings, there is now only one
51 obarray - scm_symhash. If scm_sym2vcell is called to look up a
52 symbol that can't be found and shall not be created, #f is
53 returned. Most callers of scm_sym2vcell have expected this
54 behaviour anyway.
55
56 (scm_intern_obarray_soft): Removed reference to scm_weak_symhash
57 from comment.
58
59 (scm_intern_obarray_soft, scm_sysintern0_no_module_lookup): These
60 functions are not responsible for symbol creation any more, only
61 for creation of bindings.
62
63 (scm_symbol_value0): Don't use scm_intern_obarray_soft to create
64 a symbol object.
65
66 (scm_symbol_interned_p): scm_weak_symhash is removed.
67
68 * symbols.[ch] (scm_builtin_weak_bindings): Removed. There are
69 no weak bindings any more.
70
a3fc3be9
DH
712000-12-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
72
73 * hooks.c (scm_create_hook), script.c
74 (scm_compile_shell_switches), snarf.h (SCM_VCELL,
75 SCM_GLOBAL_VCELL, SCM_VCELL_INIT, SCM_GLOBAL_VCELL_INIT): Create
76 a binding in one go (instead of first creating a vcell and then
77 setting its cdr).
78
ba393257
DH
792000-12-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
80
81 * hash.[ch] (scm_string_hash), symbols.[ch] (scm_string_hash):
82 Moved function scm_string_hash to hash.c.
83
30eaf3cc
MV
842000-12-11 Marius Vollmer <mvo@zagadka.ping.de>
85
86 * gc_os_dep.c (scm_get_stack_base) [MSWIN32]: Added detection of
87 page size on the w32 architecture. Updated from Boehms gc5.2.
88 Thanks to Lars J. Aas!
89
85db4a2c
DH
902000-12-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
91
92 * debug.c (scm_sym_procname, scm_sym_dots, scm_sym_source,
93 scm_init_debug), eval.c (scm_sym_dot, scm_sym_arrow, scm_sym_else,
94 scm_sym_unquote, scm_sym_uq_splicing, scm_sym_enter_frame,
95 scm_sym_apply_frame, scm_sym_exit_frame, scm_sym_trace,
96 scm_init_eval), gsubr.c (scm_sym_name, scm_init_gsubr), srcprop.c
97 (scm_sym_filename, scm_sym_copy, scm_sym_line, scm_sym_column,
98 scm_sym_breakpoint), variable.c (anonymous_variable_sym):
99 Initialize symbols by using SCM_(GLOBAL_)?SYMBOL.
100
101 * gc.c (scm_i_getenv_int): Moved here from init.c.
102
103 * gc.[ch] (scm_init_storage): Read gc configuration environment
104 variables here, not in init.c.
105
106 * init.c (scm_i_getenv_int): Moved to gc.c.
107
108 (scm_init_guile_1): Move configuration code to scm_init_storage.
109 Make sure procprops get initialized early.
110
111 * keywords.c (scm_c_make_keyword): Report amount of memory freed
112 by scm_must_free. Use scm_str2symbol instead of scm_sysintern0.
113
114 * options.c (scm_init_opts): Use scm_str2symbol instead of
115 scm_sysintern0.
116
24737ba0
MD
1172000-12-10 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
118
119 * threads.h (SCM_MUTEXP): Typo: removed extra parenthesis.
120
e841c3e0
KN
1212000-12-08 Keisuke Nishida <kxn30@po.cwru.edu>
122
123 * tags.h (SCM_TYP16_PREDICATE): New macro.
124 * arbiters.c (scm_tc16_arbiter): Typed as scm_bits_t.
125 (arbiter_print): Renamed from prinarb.
126 (scm_init_arbiters): Don't use scm_make_smob_type_mfpe.
127 * async.c (tc16_async): Typed as scm_bits_t.
128 (SCM_ASYNCP): Use SCM_TYP16_PREDICATE.
129 (async_mark): Renamed from mark_async.
130 (scm_init_async): Updated.
131 * continuations.h (SCM_CONTINUATIONP): Use SCM_TYP16_PREDICATE.
132 * debug.c (scm_tc16_memoized, scm_tc16_debugobj): Typed as scm_bits_t.
133 (memoized_print): Renamed from prinmemoized.
134 (debugobj_print): Renamed from prindebugobj.
135 (scm_init_debug): Don't use scm_make_smob_type_mfpe.
136 * debug.h (scm_tc16_memoized, scm_tc16_debugobj): Typed as scm_bits_t.
137 (SCM_DEBUGOBJP, SCM_MEMOIZEDP): Use SCM_TYP16_PREDICATE.
138 * dynl.c (scm_tc16_dynamic_obj): Typed as scm_bits_t.
139 (dynl_obj_mark): Renamed from mark_dynl_obj.
140 (dynl_obj_print): Renamed from print_dynl_obj.
141 (scm_dynamic_object_p): Use SCM_TYP16_PREDICATE.
142 (scm_init_dynamic_linking): Updated.
143 * dynwind.c (SCM_GUARDSP): Use SCM_TYP16_PREDICATE.
144 (tc16_guards): Typed as scm_bits_t.
145 (guards_print): Renamed from printguards.
146 (scm_init_dynwind): Don't use scm_make_smob_type_mfpe.
147 * environments.c (scm_tc16_environment, scm_tc16_observer):
148 Typed as scm_bits_t.
149 (environment_mark, environment_free, environment_print,
150 observer_mark, observer_print, leaf_environment_mark,
151 leaf_environment_free, leaf_environment_print,
152 eval_environment_mark, eval_environment_free,
153 eval_environment_print, import_environment_mark,
154 import_environment_free, import_environment_print,
155 export_environment_mark, export_environment_free,
156 export_environment_print): Renamed from mark_environment,
157 free_environment, print_environment, mark_observer,
158 print_observer, mark_leaf_environment, free_leaf_environment,
159 print_leaf_environment, mark_eval_environment,
160 free_eval_environment, print_eval_environment,
161 mark_import_environment, free_import_environment,
162 print_import_environment, mark_export_environment,
163 free_export_environment, and print_export_environment, respectively.
164 (free_observer): Removed.
165 (leaf_environment_funcs, eval_environment_funcs,
166 import_environment_funcs, export_environment_funcs,
167 scm_environments_prehistory): Updated.
168 * environments.h (scm_tc16_environment, scm_tc16_observer):
169 Typed as scm_bits_t.
170 * eval.c (scm_tc16_promise): Typed as scm_bits_t.
171 (promise_print): Renamed from prinprom.
172 (scm_promise_p): Use SCM_TYP16_PREDICATE.
173 (scm_init_eval): Updated.
174 * eval.h (scm_tc16_promise): Typed as scm_bits_t.
175 * filesys.c (scm_tc16_dir): Typed as scm_bits_t.
176 (scm_init_filesys): Don't use scm_make_smob_type_mfpe.
177 * filesys.h (scm_tc16_dir): Typed as scm_bits_t.
178 * fluids.c (scm_tc16_fluid): Typed as scm_bits_t.
179 (fluid_print): Renamed from print_fluid.
180 (scm_init_fluids): Don't use scm_make_smob_type_mfpe.
181 * fluids.h (scm_tc16_fluid): Typed as scm_bits_t.
182 * fports.c (fport_print): Renamed from prinfport.
183 (scm_make_fptob): Updated.
184 * guardians.c (tc16_guardian): Typed as scm_bits_t.
185 * hooks.c (scm_tc16_hook): Typed as scm_bits_t.
186 (hook_print): Renamed from print_hook.
187 (scm_init_hooks): Updated.
188 * hooks.h (scm_tc16_hook): Typed as scm_bits_t.
189 (SCM_HOOKP): Use SCM_TYP16_PREDICATE.
190 * keywords.c (scm_tc16_keyword): Typed as scm_bits_t.
191 (keyword_print): Renamed from prin_keyword.
192 (scm_init_keywords): Don't use scm_make_smob_type_mfpe.
193 * keywords.h (scm_tc16_keyword): Typed as scm_bits_t.
194 * macros.c (scm_tc16_macro): Typed as scm_bits_t.
195 (scm_macro_p, scm_macro_type): Use SCM_TYP16_PREDICATE.
196 (scm_init_macros): Don't use scm_make_smob_type_mfpe.
197 * macros.h (scm_tc16_macro): Typed as scm_bits_t.
198 * mallocs.c (scm_tc16_malloc): Typed as scm_bits_t.
199 (malloc_free): Renamed from fmalloc.
200 (malloc_print): Renamed from prinmalloc.
201 (scm_init_mallocs): Don't use scm_make_smob_type_mfpe.
202 * mallocs.h (scm_tc16_malloc): Typed as scm_bits_t.
203 * modules.h (SCM_EVAL_CLOSURE_P): Use SCM_TYP16_PREDICATE.
204 (scm_tc16_eval_closure): Renamed from scm_eval_closure_tag.
205 (scm_standard_eval_closure, scm_init_modules): Updated.
206 * ports.c (scm_tc16_void_port): Typed as scm_bits_t.
207 * print.c (scm_tc16_port_with_ps): Typed as scm_bits_t.
208 (port_with_ps_print): Renamed from print_port_with_ps.
209 (scm_init_print): Updated.
210 * print.h (scm_tc16_port_with_ps): Typed as scm_bits_t.
211 (SCM_PORT_WITH_PS_P): Use SCM_TYP16_PREDICATE.
212 * random.c (scm_tc16_rstate): Typed as scm_bits_t.
213 (rstate_free): Renamed from free_rstate.
214 (scm_init_random): Don't use scm_make_smob_type_mfpe.
215 * random.h (scm_tc16_rstate): Typed as scm_bits_t.
216 (SCM_RSTATEP): Use SCM_TYP16_PREDICATE.
217 * regex-posix.c (scm_tc16_regex): Typed as scm_bits_t.
218 (regex_free): Renamed from free_regex.
219 (scm_init_regex_posix): Don't use scm_make_smob_type_mfpe.
220 * regex-posix.h (scm_tc16_regex): Typed as scm_bits_t.
221 * root.c (scm_tc16_root): Typed as scm_bits_t.
222 (root_mark): Renamed from mark_root.
223 (root_print): Renamed from print_root.
224 (scm_init_root): Updated.
225 * root.h (scm_tc16_root): Typed as scm_bits_t.
226 (SCM_ROOTP): Use SCM_TYP16_PREDICATE.
227 * smob.c (free_print): Renamed from freeprint.
228 (scm_smob_prehistory): Don't use scm_make_smob_type_mfpe.
229 * smob.h (SCM_SMOB_PREDICATE): Use SCM_TYP16_PREDICATE.
230 * srcprop.c (scm_tc16_srcprops): Typed as scm_bits_t.
231 (srcprops_mark): Renamed from marksrcprops.
232 (srcprops_free): Renamed from freesrcprops.
233 (srcprops_print): Renamed from prinsrcprops.
234 (scm_init_srcprop): Don't use scm_make_smob_type_mfpe.
235 * srcprop.h (scm_tc16_srcprops): Typed as scm_bits_t.
236 (SRCPROPSP): Use SCM_TYP16_PREDICATE.
237 * threads.c (scm_tc16_thread, scm_tc16_mutex, scm_tc16_condvar):
238 Typed as scm_bits_t.
239 * threads.h (scm_tc16_thread, scm_tc16_mutex, scm_tc16_condvar):
240 Typed as scm_bits_t.
241 (SCM_THREADP, SCM_MUTEXP, SCM_CONDVARP): Use SCM_TYP16_PREDICATE.
242 * throw.c (tc16_jmpbuffer): Renamed from scm_tc16_jmpbuffer.
243 (make_jmpbuf): Updated.
244 (tc16_lazy_catch): Typed as scm_bits_t.
245 (SCM_JMPBUFP, SCM_LAZY_CATCH_P): Use SCM_TYP16_PREDICATE.
246 (jmpbuffer_print): Renamed from printjb.
247 (lazy_catch_print): Renamed from print_lazy_catch.
248 (scm_init_throw): Don't use scm_make_smob_type_mfpe.
249 * unif.c (scm_tc16_array): Typed as scm_bits_t.
250 (array_mark): Renamed from markra.
251 (array_free): Renamed from freera.
252 (scm_init_unif): Don't use scm_make_smob_type_mfpe.
253 * unif.h (scm_tc16_array): Typed as scm_bits_t.
254 (SCM_ARRAYP): Use SCM_TYP16_PREDICATE.
255 * validate.h (SCM_VALIDATE_SMOB): Use SCM_TYP16_PREDICATE.
256 * variable.c (scm_tc16_variable): Typed as scm_bits_t.
257 (variable_print): Renamed from prin_var.
258 (variable_equalp): Renamed from var_equal.
259 (scm_markvar): Removed.
260 (scm_init_variable): Don't use scm_make_smob_type_mfpe.
261 * variable.h (scm_tc16_variable): Typed as scm_bits_t.
262
38ae064c
DH
2632000-12-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
264
265 * feature.c (scm_add_feature), gh_data.c (gh_symbol2scm), goops.c
266 (scm_sys_prep_layout_x, scm_make_class, scm_add_slot,
267 scm_init_goops), load.c (init_build_info), print.c
268 (scm_init_print), read.c (scm_lreadr), snarf.h (SCM_SYMBOL,
269 SCM_GLOBAL_SYMBOL), stacks.c (scm_init_stacks), struct.c
270 (scm_make_struct_layout), symbols.c (scm_sysintern0,
271 scm_string_to_symbol, scm_gensym), throw.c
272 (scm_handle_by_message): Use scm_mem2symbol or scm_str2symbol
273 instead of scm_intern_* to create a symbol object.
274
275 * goops.c (Intern): Removed.
276
277 (CALL_GF1, CALL_GF2, CALL_GF3, CALL_GF4, build_class_class_slots,
278 create_basic_classes, scm_class_name, scm_class_direct_supers,
279 scm_class_direct_slots, scm_class_direct_subclasses,
280 scm_class_direct_methods, scm_class_precedence_list,
281 scm_class_slots, scm_class_environment,
282 scm_generic_function_methods, scm_method_generic_function,
283 scm_method_specializers, scm_method_procedure,
284 scm_accessor_method_slot_definition, purgatory, scm_make,
285 make_stdcls, create_standard_classes, make_class_from_template,
286 scm_make_class): Replaced calls to Intern with calls to
287 scm_str2symbol.
288
289 * ramap.c (init_raprocs): Use scm_symbol_binding instead of
290 scm_intern.
291
292 * symbols.c (scm_sym2vcell): Add a bogus return to avoid compiler
293 warnings.
294
295 * unif.c (scm_array_prototype): Fix prototype return value for
296 svects and llvects.
297
23ade5e7
DH
2982000-12-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
299
300 * symbols.[ch] (scm_mem2symbol, scm_str2symbol): New functions.
301 These shall replace all those calls to scm_intern... which are
302 only required to create a scheme symbol from a C string or a field
303 of chars.
304
93d40df2
DH
3052000-12-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
306
307 * environments.c (DEFAULT_OBARRAY_SIZE), gc.c
308 (DEFAULT_SYMHASH_SIZE): Added to locally determine arbitrary
309 default values for obarrays, thus removing the dependency from
310 scm_symhash_dim.
311
312 * environments.c (scm_make_leaf_environment,
313 scm_make_eval_environment), gc.c (scm_init_storage): Don't use
314 scm_symhash_dim.
315
316 * symbols.c (NUM_HASH_BUCKETS), symbols.[ch] (scm_symhash_dim):
317 Removed.
318
319 * symbols.c (scm_sym2vcell, scm_sysintern0_no_module_lookup):
320 Eliminate a redundant SCM_IMP test.
321
322 (scm_sym2vcell, scm_sysintern0_no_module_lookup):
323 Don't assume a fixed obarray size any more.
324
23670993
DH
3252000-12-07 Dirk Herrmann <D.Herrmann@tu-bs.de>
326
327 * gc.c (scm_init_gc): gc_async is already protected from gc,
328 namely via scm_asyncs. Thanks to Keisuke Nishida for pointing
329 this out.
330
7c58e21b
KN
3312000-12-07 Keisuke Nishida <kxn30@po.cwru.edu>
332
333 * smob.h (scm_smob_apply_0, scm_smob_apply_1, scm_smob_apply_2,
334 scm_smob_apply_3): Removed declarations.
335 (scm_set_smob_apply): Takes unsigned integers.
336 (scm_make_smob_type_mfpe, scm_set_smob_mfpe): Deprecated.
337 * smob.c (scm_smob_apply_0_000, scm_smob_apply_1_010,
338 scm_smob_apply_2_020): Removed.
339 (scm_set_smob_apply): Takes unsigned integers + some optimization.
340 (Thanks to Dirk Herrmann)
341 (scm_make_smob_type_mfpe, scm_set_smob_mfpe): Deprecated.
342
68b06924
KN
3432000-12-07 Keisuke Nishida <kxn30@po.cwru.edu>
344
345 * smob.h (SCM_SMOB_APPLICABLE_P, SCM_SMOB_APPLY_0,
346 SCM_SMOB_APPLY_1, SCM_SMOB_APPLY_2, SCM_SMOB_APPLY_3): New macros.
347 * eval.c (SCM_CEVAL, SCM_APPLY): Use macros above.
348 * procprop.c (scm_i_procedure_arity): Ditto.
349 * smob.c (scm_make_smob_type): Initialize gsubr_type.
350
cb1c46c5
KN
3512000-12-06 Keisuke Nishida <kxn30@po.cwru.edu>
352
353 * smob.h (scm_smob_descriptor): New fields `apply_0', `apply_1',
354 `apply_2', and `apply_3'.
355 * smob.c (scm_make_smob_type): Init new fields.
356 (SCM_SMOB_APPLY0, SCM_SMOB_APPLY1, SCM_SMOB_APPLY2, SCM_SMOB_APPLY3):
357 New macros.
358 (scm_smob_apply_0_000, scm_smob_apply_0_010, scm_smob_apply_0_020,
359 scm_smob_apply_0_030, scm_smob_apply_0_001, scm_smob_apply_0_011,
360 scm_smob_apply_0_021, scm_smob_apply_0_error,
361 scm_smob_apply_1_010, scm_smob_apply_1_020, scm_smob_apply_1_030,
362 scm_smob_apply_1_001, scm_smob_apply_1_011, scm_smob_apply_1_021,
363 scm_smob_apply_1_error,
364 scm_smob_apply_2_020, scm_smob_apply_2_030, scm_smob_apply_2_001,
365 scm_smob_apply_2_011, scm_smob_apply_2_021, scm_smob_apply_2_error,
366 scm_smob_apply_3_030, scm_smob_apply_3_001, scm_smob_apply_3_011,
367 scm_smob_apply_3_021, scm_smob_apply_3_error): New functions.
368 (scm_set_smob_apply): Set new fields to the above functions.
369 (scm_smob_apply_0, scm_smob_apply_1, scm_smob_apply_2,
370 scm_smob_apply_3): Removed.
371 * eval.c (SCM_CEVAL, SCM_APPLY): Rewrote smob calls.
372
73369d67
DH
3732000-12-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
374
375 * gc.c (scm_init_gc): gc_async must be protected from gc. I
376 wonder why we never ran into problems up to now...
377
78573619
DH
3782000-12-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
379
380 * gc.c (scm_init_gc): Don't create a binding for %gc-thunk.
381
a4bb4e6d
DH
3822000-12-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
383
384 * gsubr.c: No need to include vector.h.
385
386 (scm_gsubr_apply): Use SCM_GSUBR_MAX instead of hard-coded value.
387 Added FUNC_NAME wrapping. Improved (temporarily?) disabled
388 debugging code. Replaced SCM_IMP with SCM_NULLP. Eliminated call
389 to ASRTGO.
390
391 (scm_init_gsubr): Eliminated outdated comment.
392
fd336365
DH
3932000-12-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
394
395 * async.c (SCM_ASYNCP): Use SCM_TYP16 instead of SCM_GCTYP16.
396
397 * eval.c (scm_m_vref, scm_m_vset, scm_m_define, SCM_CEVAL,
398 SCM_APPLY, scm_copy_tree): Remove commented code.
399
400 (SCM_CEVAL, SCM_APPLY): Remove #ifdef CCLO conditionals. Without
401 CCLO being defined, guile would not compile at all anyway.
402
403 * gc.h (SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16,
404 SCM_GCCDR): Deprecated.
405
406 * gdbint.c (unmark_port, remark_port, gdb_read), procs.c
407 (scm_mark_subr_table): Use SCM_(SET|CLR)?GCMARK(P)? instead of
408 SCM_(SET|CLR)?GC8MARK(P)?.
409
410 * gh_data.c (gh_scm2char): Remove bogus ';'.
411
412 * tags.h: Removed comment about GCTYP16 macro.
413
414 * weaks.c (scm_mark_weak_vector_spines): Use SCM_CDR instead of
415 SCM_GCCDR.
416
e34f941a
DH
4172000-12-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
418
419 * print.c (scm_iprin1): Use scm_tc3_* codes instead of hardcoded
420 values. Added comment about tc3 codes that may appear in
421 immediates. Got rid of one goto command.
422
01449aa5
DH
4232000-12-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
424
425 * dynl.c (sysdep_dynl_link): Improved error reporting.
426
427 * guardians.c: Changed the representation from a compiled closure
428 to an applicable smob.
429
430 (guard1, CCLO_G): Removed.
431
432 (guard, g_mark, g_print, scm_tc16_guardian, scm_guardian_gc_init,
433 scm_guardian_zombify): Renamed to guardian_apply, guardian_mark,
434 guardian_print, tc16_guardian, guardian_gc_init and
435 guardian_zombify, respectively.
436
437 (guardian_free): Added, fixes a memory leak.
438
439 (guardian_print): Don't use sprintf hack.
440
441 (guardian_apply, scm_guard, scm_get_one_zombie,
442 scm_make_guardian): Don't use a compiled closure.
443
444 (guardian_zombify): Prefer !SCM_NULLP over SCM_NIMP. No need to
445 use SCM_GCCDR any more. Simplified loop condition.
446
447 (scm_init_guardian): Don't use scm_make_smob_type_mfpe for smob
448 initialization. Initialize applicable smob.
449
362306b9
DH
4502000-12-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
451
452 * chars.c (scm_char_eq_p): Minor cleanup/optimization.
453
454 * gc.c (scm_gc_mark): Don't use SCM_VELTS for CCLOs.
455
456 * procprop.c (scm_i_procedure_arity): Separate handling of smobs
457 and CCLOs.
458
8c921d5c
DH
4592000-12-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
460
461 * tags.h (scm_tc_free_cell, scm_tc16_big, scm_tc16_real,
462 scm_tc16_complex): Eliminate hard-coded value of scm_tc7_smob.
463
79a3dafe
DH
4642000-12-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
465
466 * list.[ch] (scm_c_memq): Added as a fast C level alternative for
467 scm_memq for the case that the list parameter is known to be a
468 proper list.
469
470 * goops.c (filter_cpl, remove_duplicate_slots, applicablep),
471 goops.h (SCM_SUBCLASSP): Use scm_c_memq if we are sure that we
472 pass proper lists.
473
23437298
DH
4742000-12-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
475
476 * goops.c (scm_sys_compute_slots, scm_i_get_keyword,
477 scm_get_keyword, scm_slot_ref_using_class,
478 scm_slot_set_using_class_x): Update the code to match guile's
479 current style (e. g. using SCM_DEFINE, adding comments, removing
480 unnecessary SCM_NIMP tests etc.).
481
21e8f468
DH
4822000-11-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
483
484 Thanks to Julian Satchell for the bug report:
485
486 * coop-threads.c (scm_join_thread): Check whether a thread is
487 finished before trying to join it.
488
489 * coop.c (coop_aborthelp, coop_join): When a thread finishes, its
490 stack base is not set to NULL any more.
491
2b7b76d5
DH
4922000-11-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
493
494 * strop.c (scm_i_index): Removed outdated comment.
495
e51fe79c
DH
4962000-11-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
497
498 * struct.c (scm_struct_ref, scm_struct_set_x), symbols.c
499 (scm_intern_obarray_soft), symbols.h (SCM_ROUCHARS): Eliminate
500 use of SCM_SYMBOL_UCHARS by using chars instead of unsigned
501 chars.
502
503 (SCM_SYMBOL_UCHARS): Removed.
504
ce212434
GH
5052000-11-26 Gary Houston <ghouston@arglist.com>
506
507 * reimplementation of values, call-with-values as primitives:
508
509 * values.c, values.h: new files. use a struct to contain multiple
510 values, similar to the previous Scheme-level implementation.
511 * Makefile.am: add values.c, values.h, values.x.
512 * continuations.c (continuation_apply): support R5RS multiple value
513 continuations.
514 * init.c: call scm_init_values.
515 * struct.h: define SCM_SET_STRUCT_PRINTER.
516
5f144b10
GH
5172000-11-25 Gary Houston <ghouston@arglist.com>
518
519 * use an applicable SMOB to represent continuations, instead of a
520 custom tc7 type. This will make it easier to support R5RS
521 multiple value continuations, without the use of a Scheme-level
522 wrapper.
523
524 * continuations.c (scm_tc16_continuation, continuation_mark,
525 continuation_free, continuation_print, continuation_apply):
526 new SMOB support.
527 (scm_make_continuation): new procedure, replaces scm_make_cont
528 with a different interface.
529 (copy_stack_and_call, scm_dynthrow, scm_init_continuations): rewritten.
530 (CHEAP_CONTINUATIONS): removed non-working code completely.
531 (scm_call_continuation): removed.
532 * continuations.h (struct scm_contregs): add num_stack_items and
533 stack fields. previously stack was stored following this struct:
534 use a tail array instead.
535 (SCM_CONTINUATIONP): new macro.
536 (SCM_CONTINUATION_LENGTH, SCM_SET_CONTINUATION_LENGTH):
537 rewritten.
538 (SCM_SET_CONTREGS): removed.
539 * tags.h: removed scm_tc7_contin (was tag 61).
540 * debug.c, gc.c, hash.c, print.c, procprop.c, procs.c:
541 removed scm_tc7_contin support.
542 * eval.c: use scm_make_continuation instead of scm_make_cont.
543 don't set jump buffers here. remove scm_tc7_contin support.
544 * init.c, root.c: create SMOB continuation for rootcont instead
545 of scm_tc7_contin. call scm_init_continuations before
546 scm_init_root.
547 * root.c: remove support for static jmpbuf. It's not used by
548 default and I broke it. create SMOB continuation for rootcont.
549 * stacks.c: use SCM_CONTINUATIONP.
550
7f555fb4
DH
5512000-11-24 Matthias Koeppe <mkoeppe@mail.math.uni-magdeburg.de>
552
553 * goops.c (filter_cpl, remove_duplicate_slots), goops.h
554 (SCM_SUBCLASSP): Fix previous change: In contrast to
555 scm_sloppy_memq the function scm_memq returns #f if the
556 object was not contained in the list.
557
ca83b028
DH
5582000-11-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
559
560 * goops.c: Include validate.h.
561
562 (DEFVAR, scm_add_method): Don't use deprecated scm_eval2.
563
564 (scm_sys_fast_slot_ref, scm_sys_fast_slot_set_x,
565 scm_m_atdispatch): Provide FUNC_NAME definition. Don't use
566 deprecated SCM_OUTOFRANGE macro.
567
568 (scm_sloppy_num2ulong, scm_sys_logand): Removed. Guile's logand
569 function now provides the desired behaviour.
570
571 * goops.c (filter_cpl, remove_duplicate_slots), goops.h
572 (SCM_SUBCLASSP): Don't use deprecated scm_sloppy_memq.
573
5b9eb8ae
DH
5742000-11-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
575
576 * symbols.h (SCM_LENGTH_MAX): Deprecated.
577
578 * unif.c (scm_make_uve): Use SCM_BITVECTOR_MAX_LENGTH and
579 SCM_UVECTOR_MAX_LENGTH instead of SCM_LENGTH_MAX. Postpone length
580 checks for strings and vectors to their constructors. Eliminate
581 redundant SCM_IMP test.
582
583 (scm_dimensions_to_uniform_array): Postpone length checks to
584 scm_make_uve.
585
586 * unif.h (SCM_BITVECTOR_MAX_LENGTH, SCM_UVECTOR_MAX_LENGTH):
587 Added.
588
5892000-11-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
6a0476fd
DH
590
591 * gh_data.c (makvect), numbers.c (scm_mkbig, scm_adjbig),
592 strings.c (scm_makstr, scm_take_str), symbols.c
593 (scm_intern_obarray_soft, scm_sysintern0_no_module_lookup), unif.c
594 (scm_make_uve), vectors.c (scm_make_vector): Use appropriate
595 SCM_SET_<type>_(CHARS|BASE) macro instead of SCM_SETCHARS.
596
597 * numbers.h (SCM_SET_BIGNUM_BASE), strings.h
598 (SCM_SET_STRING_CHARS), symbols.h (SCM_SET_SYMBOL_CHARS), unif.h
599 (SCM_SET_UVECTOR_BASE, SCM_SET_BITVECTOR_BASE), vectors.h
600 (SCM_SET_VECTOR_BASE): Added.
601
602 * symbols.c (SCM_SETCHARS): Deprecated.
603
93778877
DH
6042000-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
605
606 * gc.c (scm_gc_sweep), unif.c (scm_make_uve): Don't allocate or
607 free memory for empty bitvectors.
608
609 * gh_data.c (makvect), strings.c (scm_makstr, scm_take_str),
610 symbols.c (scm_intern_obarray_soft,
611 scm_sysintern0_no_module_lookup), unif.c (scm_make_uve): Use
612 appropriate SCM_SET_<type>_LENGTH macro instead of SCM_SETLENGTH.
613
614 * strings.h (SCM_SET_STRING_LENGTH), symbols.h
615 (SCM_SET_SYMBOL_LENGTH), unif.h (SCM_SET_UVECTOR_LENGTH,
616 SCM_SET_BITVECTOR_LENGTH): Added.
617
618 * symbols.h (SCM_SETLENGTH): Deprecated.
619
d7cf4325
DH
6202000-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
621
622 * continuations.c (scm_make_cont): Use
623 SCM_SET_CONTINUATION_LENGTH instead of SCM_SETLENGTH.
624
625 * continuations.h (SCM_SET_CONTINUATION_LENGTH): Added.
626
bc0eaf7b
DH
6272000-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
628
629 * vectors.c (scm_make_vector), weaks.c (scm_make_weak_vector):
630 Use SCM_SET_VECTOR_LENGTH instead of SCM_SETLENGTH.
631
632 * vectors.h (SCM_SET_VECTOR_LENGTH): Added.
633
34f0f2b8
DH
6342000-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
635
636 * dynl.c (scm_make_argv_from_stringlist), filesys.c (scm_dirname,
637 scm_basename), gh_data.c (gh_scm2newstr, gh_get_substr), hash.c
638 (scm_hasher), load.c (scm_parse_path, scm_search_path,
639 scm_primitive_load_path), numbers.c (scm_string_to_number),
640 ports.c (scm_unread_string), posix.c (scm_convert_exec_args,
641 environ_list_to_c, scm_putenv), print.c (scm_iprin1,
642 scm_simple_format), random.c (scm_seed_to_random_state), socket.c
643 (scm_fill_sockaddr, scm_send, scm_sendto), strings.c
644 (scm_string_ref, scm_substring, scm_string_append), strings.h
645 (SCM_STRING_COERCE_0TERMINATION_X), strop.c (scm_i_index,
646 scm_string_to_list, scm_string_copy), strorder.c
647 (scm_string_equal_p, scm_string_ci_equal_p, scm_string_less_p,
648 scm_string_ci_less_p), strports.c (scm_mkstrport), struct.c
649 (scm_make_struct_layout), symbols.c (scm_string_to_symbol,
650 scm_string_to_obarray_symbol, scm_gensym, scm_gentemp): Replace
651 calls to SCM_ROU?CHARS with the corresponding call to
652 SCM_STRING_U?CHARS.
653
654 * symbols.h (SCM_ROCHARS, SCM_ROUCHARS): Deprecated.
655
f0942910
DH
6562000-11-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
657
658 * ports.c: Include eval.h.
659
660 * strings.c (scm_string_set_x), strings.h (SCM_RWSTRINGP),
661 validate.h (SCM_VALIDATE_RWSTRING): Deprecate SCM_RWSTRINGP and
662 SCM_VALIDATE_RWSTRING.
663
664 * strings.h (SCM_STRING_UCHARS, SCM_STRING_CHARS): Handle strings
665 and substrings uniformly. However, substring handling is
666 deprecated.
667
668 (SCM_RWSTRINGP): Deprecated.
669
fc40e1fd
GH
6702000-11-18 Gary Houston <ghouston@arglist.com>
671
672 * Makefile.am (.c.x): don't prefix ".:" to $PATH when running
673 guile-doc-snarf. it doesn't seem to do anything useful, but would
674 fail if $PATH contained whitespace. Thanks to Lars J. Aas.
675
8dc9439f
MV
6762000-11-17 Marius Vollmer <mvo@zagadka.ping.de>
677
678 * alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,
679 continuations.c, debug-malloc.c, debug.c, dynl.c, dynwind.c,
680 environments.c, eq.c, error.c, eval.c, evalext.c, feature.c,
681 filesys.c, fluids.c, fports.c, gc.c, goops.c, guardians.c, hash.c,
682 hashtab.c, hooks.c, ioext.c, iselect.c, keywords.c, lang.c,
683 list.c, load.c, macros.c, modules.c, net_db.c, numbers.c,
684 objects.c, objprop.c, options.c, pairs.c, ports.c, posix.c,
685 print.c, procprop.c, procs.c, properties.c, ramap.c, random.c,
686 read.c, regex-posix.c, root.c, scmsigs.c, script.c, simpos.c,
687 socket.c, sort.c, srcprop.c, stackchk.c, stacks.c, stime.c,
688 strings.c, strop.c, strorder.c, strports.c, struct.c, symbols.c,
689 tag.c, threads.c, throw.c, unif.c, variable.c, vectors.c,
690 version.c, vports.c, weaks.c: Makes sure the snarfer output
691 inclusion is disabled when the snarfer is run on the file. Thanks
692 to Lars J. Aas!
693
694 * Makefile.am: Install guile-procedures.txt in version-specific
695 directory to enable multiple installed guile versions. Suggested
696 by Karl M. Hegbloom <karlheg@debian.org, patch by Matthias Koeppe.
697
6b72ac1d
GH
6982000-11-13 Gary Houston <ghouston@arglist.com>
699
700 * fports.c: include gc.h.
701 (fport_flush, fport_close): silently ignore I/O errors when
702 closing a port during gc. it's better than aborting in scm_error.
703
704 * throw.c (scm_handle_by_message): remove obsolete comment.
705
9f561420
GH
7062000-11-12 Gary Houston <ghouston@arglist.com>
707
708 * fports.c (scm_open_file): fix the 'b' option. Thanks
709 to George Caswell.
710
b875c468
GH
7112000-11-09 Gary Houston <ghouston@arglist.com>
712
713 * ports.c, ports.h (scm_close_all_ports_except): deprecated.
714 use port-for-each. Updated its docstring.
715
c2ca4493
GH
7162000-11-07 Gary Houston <ghouston@arglist.com>
717
718 * ports.c (scm_port_for_each): new proc. implements port-for-each,
719 which applies a procedure to each port in the port table.
720 ports.h: declare scm_port_for_each.
721
722 * ioext.c (scm_dup2): new proc. implements "dup2" which is a simple
723 wrapper for the dup2 system call (unlike dup->fdes or
724 primitive-move->fdes).
725 * ioext.h: declare scm_dup2.
726
727 * filesys.c (scm_close_fdes): new proc. implements "close-fdes"
728 which is a simple wrapper for close system call (unlike scm_close).
729 * filesys.h: declare for scm_close_fdes.
730
b100f5ee
MD
7312000-11-06 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
732
733 * eval.c (SCM_IM_DISPATCH), objects.c (scm_mcache_lookup_cmethod):
734 Count n_specialized + 1 turns before letting a match through.
735
736 * goops.c (scm_sys_invalidate_method_cache_x): Don't convert
737 scm_si_n_specialized from fixnum and don't take absolute value.
738 (Thanks to Lars J. Aas.)
739
eb5c0a2a
GH
7402000-11-04 Gary Houston <ghouston@arglist.com>
741
742 * ports.c (scm_port_p): new function, implements "port?" which
743 is mentioned in R5RS.
744 * ports.h: declare scm_port_p.
745
931dd6e1
DH
7462000-11-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
747
748 * backtrace.c (display_expression, display_error_body), fports.c
749 (prinfport), print.c (scm_iprin1): Test for symbols and strings
750 explicitly instead of using SCM_ROSTRINGP.
751
752 * backtrace.c (scm_display_error_message): Don't pass a symbol to
753 scm_simple_format. Prefer high-level output functions.
754
755 (display_error_body): When displaying procedure names, give
756 preference to the name passed as a parameter. Only if none is
757 given extract a name from the stack information.
758
759 * fports.c (scm_fdes_to_port, prinfport), gc.c (scm_gc_mark),
760 ports.c (scm_port_filename, scm_set_port_filename_x): Use
761 SCM_(SET_)?FILENAME.
762
763 * gh_data.c (gh_set_substr, gh_scm2newstr, gh_get_substr,
764 gh_symbol2newstr): Use scm_remember instead of a pair of calls to
765 scm_protect/unprotect_object.
766
767 * goops.c (make_struct_class), objects.c (scm_class_of): Struct
768 table names are symbols.
769
770 * ports.h (SCM_SET_FILENAME): Added.
771
772 * print.c (scm_iprin1): Don't use scm_puts to write symbols or
773 strings in order to treat substrings right. Reposition call to
774 scm_remember after the last use of object's data.
775
776 (scm_simple_format): Treat messages that are substrings right.
777
778 * symbols.h (SCM_ROSTRINGP): Deprecated.
779
66460dfb
DH
7802000-11-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
781
782 * environments.c (obarray_replace, obarray_retrieve,
783 obarray_remove): Don't use '==' to compare SCM objects.
784
785 * posix.c (scm_getgroups): Don't create a redundant string.
786
0f87853a
DH
7872000-11-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
788
789 * symbols.c (scm_sym2vcell, scm_sym2ovcell_soft,
790 scm_intern_symbol, scm_unintern_symbol): Symbol objects already
791 hold their hash values, no need to recompute them.
792
793 (scm_intern_obarray_soft): Speed up search for a matching symbol
794 by comparing the hash values first.
795
a3a32939
DH
7962000-10-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
797
798 * unif.c (scm_make_uve, scm_dimensions_to_uniform_array): Don't
799 allow vectors longer than SCM_LENGTH_MAX. This removes the
800 SCM_HUGE_LENGTH trick, i. e. storing a vector length greater than
801 SCM_LENGTH_MAX at the beginning of the vector's memory. Since not
802 all of guile's code was implemented to be aware of this trick, it
803 is unlikely that it was used anyway. We can implement such a
804 feature more cleanly by using double cells for uniform vector
805 types.
806
807 (scm_shap2ra): Replace SCM_IMP and SCM_NIMP tests by more
808 straightforward predicates.
809
810 (scm_dimensions_to_uniform_array): Require that for dimensions
811 given as lower-bound/upper-bound pairs the upper-bound is never
812 less than the lower bound.
813
a6d9e5ab
DH
8142000-10-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
815
816 * dynl.c (scm_dynamic_link, scm_dynamic_func, scm_dynamic_call,
817 scm_dynamic_args_call), filesys.c (scm_chown, scm_chmod,
818 scm_open_fdes, scm_stat, scm_link, scm_rename, scm_delete_file,
819 scm_mkdir, scm_rmdir, scm_opendir, scm_chdir, scm_symlink,
820 scm_readlink, scm_lstat, scm_copy_file), fports.c (scm_open_file),
821 ioext.c (scm_read_delimited_x, scm_fdopen), load.c
822 (scm_primitive_load, scm_parse_path, scm_search_path,
823 scm_sys_search_load_path, scm_primitive_load_path), net_db.c
824 (scm_inet_aton, scm_gethost, scm_getnet, scm_getproto,
825 scm_getserv), numbers.c (scm_string_to_number), ports.c
826 (scm_truncate_file, scm_sys_make_void_port), posix.c
827 (scm_getpwuid, scm_getgrgid, scm_execl, scm_execlp,
828 environ_list_to_c, scm_execle, scm_utime, scm_access,
829 scm_setlocale, scm_mknod), regex-posix.c (scm_make_regexp),
830 simpos.c (scm_system, scm_getenv), socket.c (scm_fill_sockaddr,
831 scm_send, scm_sendto), stime.c (scm_strftime, scm_strptime),
832 strop.c (scm_i_index, scm_string_null_p, scm_string_to_list),
833 strports.c (scm_mkstrport), symbols.c
834 (scm_string_to_obarray_symbol), vports.c (scm_make_soft_port):
835 Don't accept symbols as input parameters. Use SCM_STRING_LENGTH
836 instead of SCM_ROLENGTH.
837
838 * dynl.c (scm_dynamic_link, scm_dynamic_func), error.c
839 (scm_error_scm), filesys.c (scm_chown, scm_chmod, scm_open_fdes,
840 scm_stat, scm_link, scm_rename, scm_delete_file, scm_mkdir,
841 scm_rmdir, scm_opendir, scm_chdir, scm_symlink, scm_readlink,
842 scm_lstat, scm_copy_file), fports.c (scm_open_file), ioext.c
843 (scm_fdopen), net_db.c (scm_inet_aton, scm_gethost, scm_getnet,
844 scm_getproto, scm_getserv), ports.c (scm_truncate_file,
845 scm_sys_make_void_port), posix.c (scm_getpwuid, scm_getgrgid,
846 scm_execl, scm_execlp, scm_execle, scm_utime, scm_access,
847 scm_setlocale, scm_mknod), regex-posix.c (scm_make_regexp,
848 scm_regexp_exec), simpos.c (scm_system, scm_getenv), stime.c
849 (setzone, scm_strftime, scm_strptime), vports.c
850 (scm_make_soft_port): Use SCM_STRING_COERCE_0TERMINATION_X to
851 make sure the characters of a string are followed by a \0.
852 Further, use SCM_STRING_CHARS instead of SCM_ROCHARS on the
853 resulting string.
854
855 * dynl.c (scm_make_argv_from_stringlist), posix.c
856 (scm_convert_exec_args): Aligned to match each other.
857
858 * dynl.c (scm_coerce_rostring): Removed.
859
860 (scm_dynamic_func): Changed the comment to reflect that the
861 function name has to be a string. Further, hide implementation
862 details from the scheme comment.
863
864 * error (scm_error_scm): Don't accept a symbol as message
865 parameter. Fix substring handling.
866
867 * posix.c (environ_list_to_c): Use memcpy to copy environment
868 strings. Handle substrings which don't have a trailing \0.
869
870 * symbols.h (SCM_LENGTH, SCM_ROLENGTH, SCM_SUBSTRP,
871 SCM_SUBSTR_STR, SCM_SUBSTR_OFFSET, SCM_COERCE_SUBSTR):
872 Deprecated.
873
874 * unif.h (SCM_HUGE_LENGTH): Deprecated.
875
876 * validate.h (SCM_VALIDATE_ROSTRING, SCM_VALIDATE_ROSTRING_COPY,
877 SCM_VALIDATE_NULLORROSTRING_COPY): Deprecated.
878
e9bfab50
DH
8792000-10-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
880
881 * random.c: Include unif.h.
882
883 * strings.h (SCM_STRING_COERCE_0TERMINATION_X): Added. This is
884 intended to replace the macro SCM_COERCE_SUBSTR. Such a macro
885 will be necessary, even after copy-on-write strings will be added
886 to guile, but the current naming is inappropriate.
887
888 * strorder.c (scm_string_equal_p, scm_string_ci_equal_p,
889 scm_string_less_p, scm_string_ci_less_p): Don't accept symbols as
890 input parameters. Further, the functions that test for equality
891 are rewritten to compare from back to front, the others are also a
892 little bit more polished.
893
14f1d9fe
MD
8942000-10-25 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
895
896 This change merges the GOOPS code into Guile. However, GOOPS
897 is still not initialized until someone asks for the module.
898 We need to optimize GOOPS initialization time before initializing
899 it together with the rest of libguile. We also need to add the
900 C API + primitive methods. Then we can start using it to
901 modularize Guile, implement a real exception system etc.
902
903 * goops.c, objects.c, objects.h, eval.c (scm_make_extended_class,
904 scm_make_port_classes, scm_change_object_class,
905 scm_memoize_method): Changed to ordinary functions (was plugin
906 slots).
907
908 * goops.c (wrap_init, scm_wrap_object): Unconditionally use
909 SCM_STRUCT_GC_CHAIN.
910 (scm_goops_version): Removed.
911 (scm_oldfmt): and all uses of it: Removed.
912 (scm_shared_array_root, scm_shared_array_offset,
913 scm_shared_array_increments): Removed.
914 (scm_init_goops): No need to support two arg mutex init.
915 Removed #include "versiondat.h", #include "goops.h".
916
917 * goops.h: Removed various superfluous conditions.
f4553de8
MD
918 Renamed class --> cls, new --> newinst in order to accomodate
919 C++.
14f1d9fe
MD
920
921 * init.c (scm_init_guile_1): Call the goops module registration
922 function.
923 Added #include "libguile/goops.h".
924
925 * Makefile.am (libguile_la_SOURCES): Added goops.c
926 (DOT_X_FILES): Added goops.x
927 (DOT_DOC_FILES): Added goops.doc
928 (modinclude_HEADERS): Added goops.h
929
1b9be268
DH
9302000-10-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
931
932 * gc.c (scm_igc): Remove references to scm_vector_set_length_x.
933
934 (scm_gc_sweep): SCM_CONTREGS is never NULL.
935
936 * gc.c (scm_gc_sweep), vectors.c (scm_make_vector): Don't
937 allocate/free memory for zero length vectors.
938
939 * vectors.[ch] (scm_vector_set_length_x): Deprecated.
940
d1ca2c64
DH
9412000-10-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
942
943 * alist.c (scm_assq_ref): Add a suggestion about how to deal with
944 this function when the API gets reviewed.
945
946 * async.c (SET_ASYNC_GOT_IT): Use SCM_TYP16 instead of doing bit
947 operations directly.
948
949 * dynl.c (scm_coerce_rostring), filesys.c (scm_link,
950 scm_copy_file), fports (scm_open_file), hash.c (scm_hasher),
951 posix.c (scm_getpwuid), print.c (scm_iprin1), simpos.c
952 (scm_system), strings.c (scm_string_ref, scm_substring,
953 scm_string_append), strop.c (scm_string_copy), struct.c
954 (scm_make_struct_layout), symbols.c (scm_gensym, scm_gentemp),
955 symbols.h (SCM_COERCE_SUBSTR): Use SCM_STRING_LENGTH instead of
956 SCM_ROLENGTH if the object is known to be a string or substring.
957
958 * eval.c (scm_lookupcar): Use SCM_ITAG7 instead of doing bit
959 operations directly.
960
961 * filesys.c (scm_dirname, scm_basename): Don't create shared
962 substrings as these are going to disappear from guile.
963
964 * gc.c (scm_gc_sweep): Use SCM_UVECTOR_LENGTH instead of
965 SCM_HUGE_LENGTH. (The SCM_HUGE_LENGTH mechanism does not work
966 correctly anyway.)
967
968 * gc.h (SCM_FREEP, SCM_NFREEP): Deprecated.
969
970 * read.c (scm_flush_ws): Don't compare SCM values directly.
971
972 * root.c (scm_make_root), root.h (scm_root_state): Removed
973 system_transformer and top_level_lookup_closure_var from struct.
974 (Since eval is now R5RS, binary compatibility is not granted
975 anyway.)
976
977 * simpos.c (scm_system): Fix condition.
978
979 * strings.c (scm_string_length, scm_string_ref, scm_substring,
980 scm_string_append), strop.c (scm_string_copy), struct.c
981 (scm_make_struct_layout, scm_make_vtable_vtable), symbols.c
982 (scm_gensym, scm_gentemp): Replace SCM_VALIDATE_STRINGORSUBSTR
983 with SCM_VALIDATE_STRING, since they do the same thing.
984
985 * strings.h (scm_make_shared_substring): Deprecated.
986
987 * tags.h (SCM_ITAG7): Added.
988
989 * validated.h (SCM_VALIDATE_STRINGORSUBSTR): Deprecated.
990
f8fa3e38
MV
9912000-10-20 Marius Vollmer <mvo@zagadka.ping.de>
992
993 * init.c (scm_init_guile_1, invoke_main_func): Call
994 scm_load_startup_files in scm_init_guile_1, not in
995 invoke_main_func.
996
0100535b
MV
9972000-10-18 Marius Vollmer <mvo@zagadka.ping.de>
998
c6ba6ce6 999 * print.c (grow_ref_stack): Pass a INUM to scm_make_vector as the
31535422 1000 size, not a naked int. Thanks to Brad Knotwell!
c6ba6ce6 1001
0100535b
MV
1002 * gc_os_dep.c (GC_noop1, GC_bool, TRUE, FALSE, VOLATILE):
1003 Definitions copied from Boehm collector.
1004
daa6ba18
DH
10052000-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
1006
1007 * list.[ch] (scm_sloppy_memq, scm_sloppy_memv, scm_sloppy_member):
1008 Deprecated.
1009
1010 (scm_memq, scm_memv, scm_member): Inline the sloppy code.
1011
a8a11001
DH
10122000-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
1013
1014 * alloca.c: Fixed include file path. Thanks to Bruce Korb for
1015 the bug report.
1016
66ca9392
MV
10172000-10-11 Marius Vollmer <mvo@zagadka.ping.de>
1018
1019 * gc_os_dep.c: Added real implementation based on code from Boehms
1020 collector. This is not well tested yet.
1021
1022 * gc.h (scm_get_stack_base): Added prototype.
1023 * init.c (scm_get_stack_base): Removed prototype.
1024
b7ead2ae
DH
10252000-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
1026
1027 * random.c (scm_seed_to_random_state): Replace SCM_LENGTH with
1028 the appropriate SCM_<type>_LENGTH macro.
1029
1030 (vector_scale, vector_sum_squares, scm_random_solid_sphere_x,
1031 scm_random_normal_vector_x): Use scm_uniform_vector_length to
1032 determine the length of a vector object generically.
1033
b226e5f6
DH
10342000-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
1035
1036 * ramap.c (scm_array_fill_int, scm_array_index_map_x): Replace
1037 SCM_LENGTH with the appropriate SCM_<type>_LENGTH macro.
1038
1039 (scm_ra_matchp, scm_ramapc, ramap, rafe, scm_array_index_map_x,
1040 raeql_1, raeql): Use scm_uniform_vector_length to determine the
1041 length of a vector object generically.
1042
74014c46
DH
10432000-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
1044
1045 * unif.c (scm_make_uve, scm_uniform_vector_length, scm_array_p,
1046 scm_transpose_array, scm_array_contents, scm_ra2contig,
1047 scm_uniform_array_read_x, scm_uniform_array_write, scm_bit_count,
1048 scm_bit_position, scm_bit_set_star_x, scm_bit_count_star,
1049 scm_bit_invert_x, scm_array_to_list, scm_raprin1): Replace
1050 SCM_LENGTH with the appropriate SCM_<type>_LENGTH macro.
1051
1052 (scm_array_dimensions, scm_make_shared_array, scm_enclose_array,
1053 scm_array_in_bounds_p, scm_uniform_vector_ref, scm_array_set_x,
1054 scm_array_contents, scm_uniform_array_read_x,
1055 scm_uniform_array_write, scm_list_to_uniform_array, rapr1): Use
1056 scm_uniform_vector_length to determine the length of a vector
1057 object generically.
1058
1059 (scm_bit_count, scm_bit_set_star_x, scm_bit_count_star,
1060 scm_bit_invert_x): Eliminated dummy type dispatch.
1061
1062 (scm_ra2contig): Fixed array vector access.
1063
b5c2579a
DH
10642000-10-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
1065
1066 * unif.h (SCM_BITVECTOR_P, SCM_BITVECTOR_BASE): Added.
1067
1068 * eval.c (iqq, SCM_CEVAL, SCM_APPLY, check_map_args, scm_map,
1069 scm_for_each, scm_copy_tree), gc.c (scm_igc, scm_gc_mark,
1070 scm_gc_sweep), gh_data.c (gh_scm2chars), sort.c
1071 (scm_restricted_vector_sort_x, scm_sorted_p, scm_sort_x,
1072 scm_sort, scm_stable_sort_x, scm_stable_sort), vectors.c
1073 (scm_vector_length, scm_vector_ref, scm_vector_set_x,
1074 scm_vector_to_list, scm_vector_fill_x, scm_vector_equal_p,
1075 scm_vector_move_left_x, scm_vector_move_right_x, ): Replace
1076 SCM_LENGTH with the appropriate SCM_<type>_LENGTH macro.
1077
1078 * gc.c (scm_gc_sweep): Use SCM_BITVECTOR_BASE for bitvectors.
1079
1080 * sort.c (scm_restricted_vector_sort_x, scm_sorted_p): Eliminated
1081 dummy type dispatch.
1082
1083 (scm_sort_x, scm_sort, scm_stable_sort_x, scm_stable_sort):
1084 Eliminated redundant NIM test.
1085
9fd38a3d
DH
10862000-10-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
1087
1088 * filesys.c (fill_select_type, retrieve_select_type, scm_select),
1089 gh_data.c (gh_set_substr, gh_scm2chars, gh_scm2shorts,
1090 gh_scm2longs, gh_scm2floats, gh_scm2doubles, gh_symbol2newstr),
1091 stime.c (bdtime2c), symbols.c (scm_sym2vcell, scm_sym2ovcell_soft,
1092 scm_intern_obarray_soft, scm_symbol_to_string, scm_intern_symbol,
1093 scm_unintern_symbol, copy_and_prune_obarray, scm_builtin_bindings,
1094 scm_builtin_weak_bindings), validate.h (SCM_VALIDATE_VECTOR_LEN):
1095 Replace SCM_LENGTH with the appropriate SCM_<type>_LENGTH macro.
1096
1097 * filesys.c (scm_dirname, scm_basename), gh_data.c (gh_scm2newstr,
1098 gh_get_substr), posix.c (scm_putenv), regex-posix.c
1099 (scm_regexp_exec), stime.c (setzone), symbols.c
1100 (scm_string_to_symbol): Don't accept symbols as input parameters
1101 any more.
1102
bfa974f0
DH
11032000-10-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
1104
1105 * continuations.c (scm_make_cont, copy_stack_and_call,
1106 scm_dynthrow), environments.c (obarray_enter, obarray_replace,
1107 obarray_retrieve, obarray_remove, obarray_remove_all,
1108 leaf_environment_fold), fluids.c (grow_fluids, scm_copy_fluids,
1109 scm_fluid_ref, scm_fluid_set_x), hash.c (scm_hasher), hashtab.c
1110 (scm_hash_fn_get_handle, scm_hash_fn_create_handle_x,
1111 scm_hash_fn_remove_x, scm_internal_hash_fold), ioext.c
1112 (scm_read_delimited_x), objects.c (scm_mcache_lookup_cmethod,
1113 scm_make_subclass_object), ports.c (scm_unread_string), socket.c
1114 (scm_recv, scm_recvfrom), stacks.c (scm_make_stack, scm_stack_id,
1115 scm_last_stack_frame), strings.c (scm_string_length,
1116 scm_string_set_x), strop.c (scm_substring_move_x,
1117 scm_substring_fill_x, scm_string_fill_x, scm_string_upcase_x,
1118 scm_string_downcase_x, scm_string_capitalize_x), struct.c
1119 (scm_struct_init, scm_struct_vtable_p, scm_make_struct,
1120 scm_make_vtable_vtable, scm_struct_ref, scm_struct_set_x), weaks.c
1121 (scm_mark_weak_vector_spines, scm_scan_weak_vectors): Replace
1122 SCM_LENGTH with the appropriate SCM_<type>_LENGTH macro.
1123
b17004b8
DH
11242000-10-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
1125
1126 * print.c (make_print_state, scm_iprin1): Replace SCM_LENGTH with
1127 the appropriate SCM_<type>_LENGTH macro.
1128
1129 (grow_ref_stack): Don't call scm_vector_set_length_x to resize
1130 the print stack.
1131
aa3188a7
DH
11322000-10-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
1133
1134 * numbers.c (big2str): Avoid redundant copying.
1135
1136 (scm_bigprint): Use SCM_STRING_LENGTH instead of SCM_LENGTH.
1137
94115ae3
DH
11382000-10-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
1139
1140 * numbers.c (big2str), read.c (scm_grow_tok_buf), strports.c
1141 (st_resize_port): Don't call scm_vector_set_length_x to resize
1142 strings.
1143
1144 * read.c (scm_lreadr, scm_read_token): Use SCM_STRING_LENGTH for
1145 string arguments (instead of SCM_LENGTH).
1146
2d349e67
DH
11472000-10-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
1148
1149 * continuations.h (SCM_CONTINUATION_LENGTH), strings.h
1150 (SCM_STRING_LENGTH), symbols.h (SCM_SYMBOL_LENGTH), unif.h
1151 (SCM_UVECTOR_LENGTH, SCM_BITVECTOR_LENGTH), vectors.h
1152 (SCM_VECTOR_LENGTH): Added as replacements for SCM_LENGTH.
1153
4fd03f43
MV
11542000-10-02 Marius Vollmer <mvo@zagadka.ping.de>
1155
1156 * coop-defs.h (coop_key_create): Don't use the C++ keyword
1157 `destructor' in prototype. Thanks to Martin Baulig!
1158
77cd7f80
ML
11592000-10-02 Michael Livshin <mlivshin@bigfoot.com>
1160
1161 * guile-func-name-check.in: now should not confuse SCO nawk
1162 anymore. thanks to Bruce Korb for the fix!
1163
ed0e0e30
GH
11642000-10-01 Gary Houston <ghouston@arglist.com>
1165
0d26a8bc 1166 * net_db.c: declare inet_aton only if HAVE_INET_ATON is not
ed0e0e30
GH
1167 defined. thanks to Han-Wen Nienhuys.
1168
e655d034
GH
11692000-09-30 Gary Houston <ghouston@arglist.com>
1170
1171 * filesys.c (scm_stat2scm), posix.c (s_scm_mknod): don't use
1172 S_ISSOCK or S_IFSOCK if not defined. thanks to Bruce Korb.
1173
6ec589e2
NJ
11742000-09-29 Neil Jerram <neil@ossau.uklinux.net>
1175
9d29e990
NJ
1176 * Makefile.am (guile-procedures.txt): Insert a new rule such that
1177 the output from guile-snarf.awk is processed by makeinfo to
1178 produce guile-procedures.txt.
1179
1180 * guile-snarf.awk.in: Modify the way we snarf docstrings such that
1181 the output is Texinfo-compliant and suitable for post-processing
1182 with makeinfo. (Trim leading "./" from C file name if
1183 present; reformat procedure prototype line in @deffn format;
1184 improve representation of args to show optional and rest args;
1185 explicitly quote quotation marks where they are used inside an AWK
1186 regexp.)
1187
6ec589e2
NJ
1188 * net_db.c (scm_inet_ntoa): Docstring fix: missing newline
1189 inserted.
1190
1191 * hashtab.c (scm_hashx_create_handle_x, scm_hashx_ref): Insert
1192 spaces between C parameters so that the snarfer doesn't coalesce
1193 them all into a single very long-named parameter.
1194
11952000-09-27 Neil Jerram <neil@ossau.uklinux.net>
1196
1197 * list.c (scm_append): Use @example texinfo markup in docstring.
1198
bbe4e612
DH
11992000-09-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
1200
1201 * strings.c (scm_string, scm_make_string, scm_string_set_x,
1202 scm_string_append), strop.c (scm_string_upcase_x,
1203 scm_string_downcase_x), strports.c (st_resize_port), symbols.c
1204 (scm_sym2vcell, scm_sym2ovcell_soft, scm_intern_obarray_soft,
1205 scm_intern_symbol, scm_unintern_symbol), unif.c (scm_cvref,
1206 scm_uniform_vector_ref, scm_array_set_x, rapr1): Replace calls to
1207 SCM_UCHARS with SCM_STRING_UCHARS or SCM_SYMBOL_UCHARS.
1208
1209 * symbols.h (SCM_UCHARS): Deprecated.
1210
405aaef9
DH
12112000-09-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
1212
1213 * gc.c (scm_gc_sweep): Replace SCM_CHARS by SCM_COMPLEX_MEM.
1214
1215 * numbers.h (SCM_COMPLEX_MEM): Added as a replacement for
1216 SCM_CHARS.
1217
1218 (SCM_COMPLEX_REAL, SCM_COMPLEX_IMAG): Use it.
1219
1220 * ramap.c (scm_array_fill_int, racp, raeql_1): Replace SCM_CHARS
1221 with SCM_STRING_CHARS or SCM_UVECTOR_BASE.
1222
1223 (racp): Fix: Make sure that src and dst types match.
1224
1225 * read.c (scm_grow_tok_buf, scm_lreadr, scm_read_token): Replace
1226 SCM_CHARS with SCM_STRING_CHARS.
1227
1228 * symbols.h (SCM_CHARS): Deprecated.
1229
1230 * unif.c (scm_enclose_array, scm_uniform_vector_ref, scm_cvref,
1231 scm_array_set_x, scm_uniform_array_read_x, rapr1, freera,
1232 scm_uniform_array_write): Replace SCM_CHARS with
1233 SCM_STRING_CHARS, SCM_UVECTOR_BASE or SCM_ARRAY_MEM.
1234
1235 * unif.h (SCM_ARRAY_MEM): Added as a replacement for SCM_CHARS.
1236
1237 (SCM_ARRAY_V, SCM_ARRAY_BASE, SCM_ARRAY_DIMS): Use it.
1238
1239 * validate.h (SCM_COERCE_ROSTRING): Removed.
1240
06ee04b2
DH
12412000-09-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
1242
1243 * gc.c (scm_igc): : Eliminate references to SCM_LENGTH and
1244 SCM_CHARS from comment.
1245
1246 (scm_gc_mark, scm_gc_sweep): Replace SCM_CHARS with
1247 SCM_SYMBOL_CHARS or SCM_CCLO_BASE or SCM_UVECTOR_BASE or
1248 SCM_BDIGITS, and replace SCM_VELTS with SCM_VECTOR_BASE or
1249 SCM_CONTREGS, according to the corresponding types.
1250
1251 (scm_gc_sweep): Simplify sweeping of uniform vectors.
1252
74cc8503
DH
12532000-09-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
1254
1255 * procs.h (SCM_CCLO_LENGTH, SCM_SET_CCLO_LENGTH, SCM_CCLO_BASE,
1256 SCM_SET_CCLO_BASE, SCM_CCLO_REF, SCM_CCLO_SET, SCM_CCLO_SUBR,
1257 SCM_SET_CCLO_SUBR): Added resp. changed such that none of the
1258 macros SCM_CHARS, SCM_SETCHARS, SCM_VELTS and SCM_LENGTH have to
1259 be used with compiled closures any more.
1260
1261 * procs.c (scm_makcclo), gsubr.h (SCM_GSUBR_TYPE, SCM_GSUBR_PROC):
1262 Replace uses of SCM_CHARS, SCM_SETCHARS and SCM_VELTS with regards
1263 to compiled closures.
1264
1265 * gsubr.h (SCM_SET_GSUBR_TYPE, SCM_SET_GSUBR_PROC): Added.
1266
1267 * gsubr.c (scm_make_gsubr): Use them.
1268
9eb364fc
DH
12692000-09-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
1270
1271 * numbers.c (scm_adjbig): Use SCM_BDIGITS instead of SCM_CHARS.
1272
1273 (big2str, scm_bigprint): Use SCM_STRING_CHARS instead of
1274 SCM_CHARS.
1275
1276 * vectors.c (scm_vector_set_length_x): Distinguish between
1277 strings, scheme vectors and uniform vectors, thus getting rid of
1278 references to SCM_CHARS. (The code still needs improvement.)
1279
3db4adfc
DH
12802000-09-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
1281
1282 * eval.c (scm_m_letrec1, SCM_CEVAL, SCM_APPLY): Use
1283 SCM_STRING_U?CHARS or SCM_SYMBOL_U?CHARS instead of SCM_U?CHARS.
1284
1285 * unif.h (SCM_UVECTOR_BASE), vectors.h (SCM_VECTOR_BASE): Added
1286 as replacements for SCM_CHARS and SCM_VELTS.
1287
a002f1a2
DH
12882000-09-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
1289
1290 * continuations.c (scm_make_cont, scm_dynthrow), print.c
1291 (scm_iprin1), stacks.c (scm_make_stack, scm_stack_id,
1292 scm_last_stack_frame): For continuations, use SCM_CONTREGS
1293 instead of SCM_CHARS.
1294
1295 * coop-threads.c (scm_threads_mark_stacks): Eliminate references
1296 to SCM_LENGTH and SCM_CHARS from comments.
1297
1298 * dynl.c (scm_dynamic_link, scm_dynamic_func), symbols.h
1299 (SCM_ROCHARS, SCM_ROUCHARS): Cleanly distinguish between string
1300 and symbol arguments.
1301
1302 * hash.c (scm_hasher), keywords.c (prin_keyword), objects.c
1303 (scm_make_subclass_object), print.c (scm_iprin1), regex-posix.c
1304 (scm_regexp_error_msg), stime.c (bdtime2c, scm_strftime), struct.c
1305 (scm_struct_init, scm_struct_vtable_p, scm_struct_ref,
1306 scm_struct_set_x): Use SCM_STRING_U?CHARS or SCM_SYMBOL_U?CHARS
1307 instead of SCM_U?CHARS.
1308
1309 * strings.h (SCM_STRING_UCHARS): Added as a replacement for
1310 SCM_UCHARS for string arguments.
1311
1312 * strorder.c: Include strings.h and symbols.h.
1313
1314 * symbols.h: Replaced SCM_CHARS in comment.
1315
1316 (SCM_SYMBOL_UCHARS): Added as a replacement for SCM_UCHARS for
1317 symbol arguments.
1318
1319 (SCM_SLOPPY_SUBSTRP): Deprecated.
1320
1321 * tags.h: Fixed comments not to reference SCM_LENGTH or
1322 SCM_CHARS.
1323
1660782e
DH
13242000-09-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
1325
1326 * gc.c (scm_gc_mark, scm_gc_sweep), tags.h: Removed the
1327 scm_tc7_lvector type tag.
1328
f151f912
DH
13292000-09-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
1330
1331 * eval.c (scm_m_define), evalext.c (scm_m_undefine): Removed dead
1332 code.
1333
1334 * gc.c (scm_gc_sweep): Use SCM_STRING_CHARS or SCM_SYMBOL_CHARS
1335 instead of SCM_CHARS.
1336
86c991c2
DH
13372000-09-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
1338
1339 * backtrace.c (display_frame_expr), environments.c
1340 (print_observer, print_leaf_environment, print_eval_environment,
1341 print_import_environment, print_export_environment), gh_data.c
1342 (gh_set_substr, gh_symbol2newstr), keywords.c
1343 (scm_make_keyword_from_dash_symbol), ports.c (scm_drain_input),
1344 posix.c (scm_mknod), print.c (scm_iprin1), regexp-posix.c
1345 (scm_regexp_error_msg), script.c (scm_compile_shell_switches),
1346 simpos.c (scm_getenv), socket.c (scm_recv, scm_recvfrom),
1347 strings.c (scm_makfromstr), strop.c (scm_substring_move_x,
1348 scm_substring_fill_x, scm_string_capitalize_x), symbols.c
1349 (scm_symbol_to_string), unif.c (scm_make_uve, scm_array_p),
1350 validate.h (SCM_VALIDATE_STRING_COPY): Use SCM_STRING_CHARS or
1351 SCM_SYMBOL_CHARS instead of SCM_CHARS.
1352
c1aef037
DH
13532000-09-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
1354
1355 * strings.h (SCM_STRING_CHARS): Added, should be used instead of
1356 SCM_CHARS whenever the argument is known to be a string.
1357
1358 (SCM_SLOPPY_STRINGP): Deprecated.
1359
1360 * symbols.h (SCM_SYMBOL_CHARS): Added, should be used instead of
1361 SCM_CHARS whenever the argument is known to be a symbol.
1362
1bee0e70
NJ
13632000-09-22 Neil Jerram <neil@ossau.uklinux.net>
1364
1365 * struct.c (scm_make_struct): Fix texinfo warning in docstring by
1366 using @pxref rather than @xref.
1367
1368 * root.c (scm_call_with_dynamic_root): Fix texinfo warning in
1369 docstring by using @code for (thunk) rather than @var.
1370
f7b0a8d1 13712000-09-20 Marius Vollmer <mvo@zagadka.ping.de>
216b559a 1372
f7b0a8d1
MV
1373 * numbers.c (scm_istr2flo): Throw an `out of range' error when
1374 exponent is too large instead of returning `#f'. The rationale is
1375 that in this case the string represents a valid number but we
1376 can't deal with it.
216b559a 1377
0f8c9efa
DH
13782000-09-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
1379
1380 * symbols.c (scm_intern_obarray_soft,
1381 scm_sysintern0_no_module_lookup): Make sure that symbol
1382 properties initially form an empty list. Thanks to Keisuke
1383 Nishida for pointing this out.
1384
5a2a5407
DH
13852000-09-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
1386
1387 * throw.c (scm_handle_by_message): Added a FIXME comment.
1388
1389 (scm_ithrow): Removed some redundant tests. When compiling on
1390 gcc, always add the GCSE bug workaround.
1391
57b74422
GH
13922000-09-14 Gary Houston <ghouston@arglist.com>
1393
1394 * print.c (scm_iprin1): write the ascii delete character as #\del
1395 instead of '#\', so it can be read back. like in SCM.
1396
02821239
MD
13972000-09-12 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
1398
1399 * symbols.c (duplicate_string): Don't try to copy the byte after
1400 the string. This might not be `\0' and might even not be
1401 allocated memory.
1402
8e93e199
DH
14032000-09-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
1404
1405 * symbols.c (scm_symbol_p): Eliminate redundant SCM_IMP test.
1406
28b06554
DH
14072000-09-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
1408
1409 This patch unifies the formerly distinct ssymbol and msymbol types
1410 to a common symbol type scm_tc7_symbol. The representation of the
1411 new symbol type uses a double cell with the following layout:
1412 <type/length, chars, raw_hash, prop-pair>, where the car of
1413 prop-pair holds the symbol's function property and the cdr of
1414 prop-pair holds the symbol's other properties. In the long run,
1415 these properties will be removed. Then, the generic property
1416 functions will be uses.
1417
1418 * eval.c (SCM_CEVAL), objects.c (scm_class_of), print.c
1419 (scm_iprin1), tag.c (scm_tag): Use scm_tc7_symbol instead of
1420 scm_tc7_ssymbol, scm_tc7_msymbol or scm_tcs_symbols.
1421
1422 * gc.c (scm_gc_mark): Mark the symbols property pair.
1423
1424 (scm_gc_sweep): There are no symbol slots any more.
1425
1426 * hash.c (scm_hasher): Instead of re-calculating the hash value
1427 of a symbol, use the raw_hash value stored in the symbol itself.
1428
1429 * properties.h: Fix typo.
1430
1431 * strings.[ch] (scm_makstr, scm_makfromstr): The slot parameter
1432 is not used any more.
1433
1434 * symbols.[ch] (scm_strhash): Deprecated, replaced by a macro.
1435
1436 (scm_intern_obarray_soft): Made softness parameter unsigned.
1437
1438 (scm_string_hash): New function with the same functionality as
1439 scm_strhash had before, except that the hash value is not adjusted
1440 to a hash table size. Instead, the 'raw' hash value is returned.
1441
1442 * symbols.c (duplicate_string): New static convenience function.
1443
1444 (scm_sym2vcell, scm_sym2ovcell_soft, scm_intern_obarray_soft):
1445 Renamed local variable from scm_hash to hash.
1446
1447 (scm_intern_obarray_soft): Don't check for a negative softness
1448 any more. When generating symbol cells, use the new layout and
1449 store the raw hash value in the symbol's cell.
1450
1451 (scm_symbol_to_string): Removed unnecessary cast.
1452
1453 (scm_intern_symbol, scm_unintern_symbol): Use scm_string_hash to
1454 determine the hash values.
1455
1456 (msymbolize): Removed.
1457
1458 (scm_symbol_fref, scm_symbol_pref, scm_symbol_fset_x,
1459 scm_symbol_pset_x, scm_symbol_hash): No need to distinguish
1460 between different symbol types any more.
1461
1462 (scm_symbol_hash): Comment fixed.
1463
1464 * symbols.h: Comment about the distinction between ssymbols and
1465 msymbols removed.
1466
1467 (SCM_SYMBOLP, SCM_ROSTRINGP): No need to distinguish between
1468 different symbol types any more.
1469
1470 (SCM_PROP_SLOTS, SCM_SET_PROP_SLOTS): Added.
1471
1472 (SCM_SYMBOL_FUNC, SCM_SET_SYMBOL_FUNC, SCM_SYMBOL_PROPS,
1473 SCM_SET_SYMBOL_PROPS, SCM_SYMBOL_HASH, SCM_SET_SYMBOL_HASH): Use
1474 the new symbol cell layout.
1475
1476 * tags.h (scm_tc7_ssymbol, scm_tc7_msymbol, scm_tcs_symbols):
1477 Deprecated.
1478
302f229e
MD
14792000-09-12 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
1480
1481 * symbols.h (scm_gentemp): Declared.
1482
1483 * symbols.c (scm_gensym): Reimplemented. Now only takes one
1484 optional argument which should be a *string*.
1485 (scm_gentemp): Reimplemented and moved from boot-9.scm.
1486
5bcdfa2e
KN
14872000-09-10 Keisuke Nishida <kxn30@po.cwru.edu>
1488
1489 * modules.c: Use applicable smobs for eval closures instead of
1490 compiled closures. Include "libguile/smob.h".
1491 (f_eval_closure): Removed.
1492 (scm_eval_closure_tag): New variable.
1493 (scm_eval_closure_lookup): Renamed from eval_closure.
1494 This function now takes a smob instead of a compiled closure.
1495 (scm_standard_eval_closure): Create a smob instead of a compiled
1496 closure.
1497 (scm_init_modules): Initialize the eval closure type as a smob.
1498 * modules.h (SCM_EVAL_CLOSURE_P): New macro.
1499 (scm_eval_closure_tag, scm_eval_closure_lookup): Declare.
1500 * symbols.c: Include "libguile/smob.h".
1501 (scm_sym2vcell): Call scm_eval_closure_lookup directly if THUNK
1502 is an eval closure.
1503
370646da
MD
15042000-09-10 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
1505
4c7cb8ba
MD
1506 * Makefile.am (.x.doc): Bugfix: Added $(srcdir) to path in order
1507 to allow for builds in separate tree.
1508
370646da
MD
1509 * symbols.c (scm_gensym): Bugfixed my previous bugfix. (Thanks to
1510 Dale P. Smith.)
1511
3cbe8373
KN
15122000-09-10 Keisuke Nishida <kxn30@po.cwru.edu>
1513
1514 * eval.c (SCM_APPLY): Fixed bugs in the applicable-smob calls.
1515
a2d47b23
DH
15162000-09-07 Dirk Herrmann <D.Herrmann@tu-bs.de>
1517
1518 * environments.c (obarray_enter, obarray_retrieve,
1519 obarray_remove): Make sure the hash value is a valid obarray
1520 index.
1521
1522 (obarray_enter, obarray_remove): Documentation improved.
1523
1524 (obarray_replace): Added.
1525
1526 (leaf_environment_define, leaf_environment_undefine): Cleaned up
1527 and optimized.
1528
a2550d0e
MD
15292000-09-05 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
1530
1531 * symbols.c (scm_gensym): Check that argument is a symbol, not a
370646da 1532 string. (Thanks to Ralf Mattes.)
a2550d0e 1533
f0cb8787
MV
15342000-09-05 Marius Vollmer <mvo@zagadka.ping.de>
1535
1536 * init.c: Include "libguile/properties.h".
1537
1538 * gh_data.c (gh_scm2char): Validate that argument is a character.
1539
4c199a26
DH
15402000-08-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
1541
1542 * environments.h (SCM_IMPORT_ENVIRONMENT_P,
1543 SCM_EXPORT_ENVIRONMENT_P): Before fetching the environment
1544 functions, make sure that we really got an environment.
1545
9e9e264f
MD
15462000-09-03 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
1547
1548 * validate.h (SCM_VALIDATE_NUMBER_DEF_COPY): New macro.
1549
468fbf58
MV
15502000-09-03 Marius Vollmer <mvo@zagadka.ping.de>
1551
1552 * Makefile.am (.x.doc): Pretend to create .doc files from .x files
1553 and give explicit dependencies for .x files that depend on
1554 generated files. This allows parallel builds. Thanks to Matthias
1555 Koeppe!
1556
15572000-08-27 Marius Vollmer <mvo@zagadka.ping.de>
1558
1559 * Makefile.am: Added gc_os_dep.c, properties.c, properties.x,
1560 properties.h and properties.doc in the suitable places.
1561
1562 * init.h (scm_init_guile): New prototype.
1563
1564 * init.c (scm_init_guile, scm_init_guile_1): New interface for
1565 initializing Guile that does return to the caller.
1566 (scm_boot_guile_1): Use scm_init_guile_1 to initialize Guile.
1567 Do not establish a catch-all, this is no longer needed.
1568
1569 * root.h (scm_properties_whash): New `sys_protect', used in
1570 properties.c.
1571
1572 * throw.c (scm_ithrow): Perform catch-all handling here when no
1573 suitable handler has been found. That way, we don't have to rely
1574 on the user establishing a catch-all, which might be difficult for
1575 him if he is using scm_init_guile instead of scm_boot_guile.
1576
11768c04
NJ
15772000-09-03 Neil Jerram <neil@ossau.uklinux.net>
1578
1579 * vectors.c (scm_vector): Docstring: add @deffnx line for
1580 list->vector.
1581
1582 * unif.c (scm_uniform_vector_ref): Docstring: add @deffnx line for
1583 array-ref.
1584 (scm_array_set_x): Docstring: add @deffnx line for
1585 uniform-array-set!.
1586
1587 * symbols.c (scm_symbol_to_string): Docstring: complete an
1588 incomplete Texinfo reference to a node in r4rs.texi.
1589 (scm_symbol_to_string): Escape double quotes correctly within
1590 docstring.
1591
1592 * struct.c (scm_make_struct, scm_make_vtable_vtable): Docstring
1593 fixes: `@dots' changed to `@dots{}'.
1594
1595 * strop.c (scm_substring_move_x): Docstring: add @deffnx lines for
1596 substring-move-left! and substring-move-right!.
1597
1598 * strings.c (scm_string): Docstring: add @deffnx line for
1599 list->string.
1600
1601 * stime.c (scm_strptime): Fix spelling mistake in docstring.
1602 (scm_current_time): Docstring fix: insert missing newline.
1603
1604 * socket.c (scm_recvfrom): Docstring format fix: missing newline
1605 inserted.
1606
1607 * ramap.c (scm_array_copy_x): Docstring: add @deffnx line for
1608 array-copy-in-order!.
1609 (scm_array_map_x): Docstring: add @deffnx line for
1610 array-map-in-order!.
1611
1612 * posix.c (scm_mknod): Docstring format fix: missing newlines
1613 inserted.
1614
1615 * modules.c (scm_interaction_environment): Docstring fix: add
1616 newlines.
1617
1618 * eval.c (scm_cons_source): Added newly written docstring.
1619
eacb9dc2
ML
16202000-09-03 Michael Livshin <mlivshin@bigfoot.com>
1621
1622 the following changes let Guile get rid of the `allocated' cell
1623 state.
1624
1625 * smob.c (scm_smob_prehistory): don't init the "allocated" smob
1626 type.
1627
1628 * tags.h (scm_tc16_allocated): removed.
1629
1630 * gc.h: removed now-obsolete comments about the `allocated' cell
1631 state.
1632 (SCM_NEWCELL): don't change cell type to `allocated'.
1633 (SCM_NEWCELL2): ditto.
1634
1635 * gc.c (scm_mark_locations): mark freecells too, and don't worry
1636 about any possible false positives.
1637 (scm_debug_newcell): don't change cell type to `allocated'.
1638 (scm_debug_newcell2): ditto.
1639 (scm_gc_for_newcell): ditto.
1640 (scm_gc_mark): remove the tc16_allocated case.
1641
69b5f65a
MD
16422000-08-26 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
1643
adf9e959
MD
1644 * gdbint.c (gdb_print): Removed superfluous macro definition.
1645
0745d387
MD
1646 * objects.c (scm_init_objects), print.c (scm_init_print), struct.c
1647 (scm_init_struct): First arg to scm_make_vtable_vtable should be a
1648 string, not a symbol. (`make-vtable-vtable' needs to append this
1649 string to another string and then pass it through
1650 `make-struct-layout'.)
1651
1652 * stacks.c (scm_init_stacks): Pass a string, not a layout object,
1653 to scm_make_vtable_vtable. (Thanks to Dale P. Smith.)
1654
1655 * struct.c (scm_make_struct_layout): Removed reference to
1656 "read-only string" in comment; Check that argument is a string.
1657 (scm_make_vtable_vtable): Check that argument is a string.
1658
69b5f65a
MD
1659 * environments.c (scm_init_environments): All internal includes in
1660 libguile must use the prefix "libguile/" in path names since inly
1661 the top-level source directory is on the include list. (That, in
1662 turn, is because we want to distinguish between system header
1663 files and hedares files internal to libguile.)
1664
1665 * strings.c (scm_make_shared_substring, scm_read_only_string_p):
1666 Deprecated.
1667 (scm_string_length, scm_string_ref, scm_substring,
1668 scm_string_append): Don't accept symbols as arguments (R5RS).
1669
92ccc1f1
NJ
16702000-08-25 Neil Jerram <neil@ossau.uklinux.net>
1671
1672 * ports.c (scm_set_port_column_x): Fix docstring so that it
1673 mentions set-port-line! rather than set-port-column! twice.
1674
1675 * guardians.c (scm_make_guardian): Remove spurious . from doc string.
1676
5d3e2388
DH
16772000-08-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
1678
1679 * Makefile.am: Added all necessary environments.* files.
1680
1681 * init.c: Include environments.h.
1682
1683 (scm_boot_guile_1): Initialize the environments.
1684
1685 * environments.[ch]: Added. Most of the credit for these files
1686 goes to Jost Boekemeier.
1687
28819f62
MD
16882000-08-25 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
1689
167d89cf 1690 * procprop.c: #include "libguile/smob.h"; handle applicable smobs.
28819f62 1691
14fb1c83
KN
16922000-08-24 Keisuke Nishida <kxn30@po.cwru.edu>
1693
1694 * smob.h (scm_smob_descriptor): Added `apply' and `gsubr_type'.
1695 * smob.c (scm_make_smob_type): Initialize `apply' and `gsubr_type'.
1696 (scm_set_smob_apply): New function.
1697 (scm_smob_apply_0, scm_smob_apply_1, scm_smob_apply_2,
1698 scm_smob_apply_3): New functions.
1699 * eval.c (SCM_CEVAL, SCM_APPLY): Added dispatch for applicable smobs.
28819f62 1700 * procs.c (scm_procedure_p): Check applicable smobs.
14fb1c83 1701
665fc4e6
MD
17022000-08-24 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1703
1704 * Makefile.am (BUILT_SOURCES): Experimentally added scmconfig.h
1705 also here. (This is supposed to make sure that scmconfig.h is
1706 built before all sources in order to prevent that everything has
1707 to be rebuilt again. Hope it works---I'm just guessing. :)
1708
1709 * fluids.c (scm_fluid_set_x): Return SCM_UNSPECIFIED.
1710
38525772
MD
17112000-08-23 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1712
1713 * gc.c (scm_gc_mark): Don't use GUILE_DEBUG flag to compile in
1714 extra tests. (GUILE_DEBUG is only supposed to make extra
1715 debugging functions available.)
1716
ca55e62c
ML
17172000-08-21 Michael Livshin <mlivshin@bigfoot.com>
1718
1719 * gc.h (SCM_GC_CARD_N_CELLS): change to be a nice non-confusing
1720 constant.
1721
005b5978
ML
17222000-08-19 Michael Livshin <mlivshin@bigfoot.com>
1723
d8d4d493
ML
1724 * gc.c (scm_gc_sweep): added a `continue' statement that have
1725 fallen through the cracks in the merge. thanks to Shuji Narazaki!
1726
005b5978
ML
1727 * gc.h: removed some stuff that broke compilation for people and
1728 wasn't actually needed anyway.
1729
cdbc7418
NJ
17302000-08-18 Neil Jerram <neil@ossau.uklinux.net>
1731
55892d87
NJ
1732 * filesys.c (scm_fcntl): Docstring fix - missing newlines inserted.
1733
d46e4713
NJ
1734 * net_db.c (scm_gethost, scm_getnet, scm_getproto, scm_sethost,
1735 scm_setnet, setproto, setserv): Argument names changed to match
1736 doc string.
005b5978 1737
d46e4713
NJ
1738 * feature.c (scm_program_arguments): New docstring.
1739
1740 * simpos.c (scm_getenv): Reflow docstring.
1741
cdbc7418
NJ
1742 * eq.c (scm_eq_p, scm_eqv_p, scm_equal_p): Add texinfo markup to
1743 docstrings.
005b5978 1744
cdbc7418
NJ
1745 * chars.c (scm_char*): Docstring fixes - texinfo markup.
1746
17472000-08-18 Neil Jerram <neil@ossau.uklinux.net>
1748
1749 * boolean.c (scm_not, scm_boolean_p): Docstring fixes - add
1750 texinfo markup and remove trailing newlines.
1751
dc16aa36
ML
17522000-08-17 Michael Livshin <mlivshin@bigfoot.com>
1753
1754 this changes the Guile GC to use cards (aka "chunklets").
005b5978 1755 (most of the ideas and some of the code are by Greg Harvey, though
bbe6d8db
ML
1756 the code is probably unrecognizable now. the original chunklet
1757 proposal, way back, is by Dale Jordan).
dc16aa36
ML
1758
1759 * tags.h: (SCM_GCTYPE16, SCM_GCCDR, SCM_GC[8]MARKP,
1760 SCM_SETGC[8]MARK, SCM_CLRGC[8]MARK): moved from here into gc.h.
1761 some (most) of these are probably going to be deprecated.
1762
1763 * gc.h (SCM_MARKEDP): simplified, there are no different mark bit
1764 locations anymore.
1765 (SCM_GC_CARD_*, SCM_C_BVEC_*): lots of new macros to deal with
1766 cards and bvecs (bit-vectors).
1767
1768 * gc.c: (scm_default_init_heap_size_*): defined to take cards into
1769 account, but keeping more or less the same values as previously.
1770 added some simple helper macros.
1771 (CLUSTER_SIZE_IN_BYTES, ALIGNMENT_SLACK): defined to take cards
1772 into account.
1773 (BVEC_*, scm_mark_space_t, current_mark_space, mark_space_ptr,
1774 current_mark_space_offset, mark_space_head, get_bvec,
1775 clear_mark_space): new functions and supporting variables, types
1776 and macros that implement mark space management.
1777 (scm_igc): clear the mark space (all of it) before beginning the
1778 mark phase.
1779 (scm_gc_mark): changed the tests for rogue cells, much simplified
1780 throughout (no different mark bit locations to worry about now).
1781 (scm_mark_locations): don't consider card header cells.
1782 (scm_cellp): ditto.
1783 (scm_gc_sweep): simplified.
1784 (init_heap_seg): changed to take cards into account.
1785
83238bc1
ML
17862000-08-16 Michael Livshin <mlivshin@bigfoot.com>
1787
1788 * stime.c (scm_c_get_internal_run_time): new function, same as
1789 scm_get_internal_run_time but returns a long. it's used by the GC
1790 for timekeeping, since with scm_get_internal_run_time there is a
1791 (extremely theoretical) possibility of consing.
1792 (scm_get_internal_run_time): redefined in terms of
1793 scm_c_get_internal_run_time.
1794
1795 * stime.h: added prototype for scm_c_get_internal_run_time.
1796
1797 * gc.c (scm_gc_stats): add more obscure stats, such as: mark time,
1798 sweep time, total marked cells, total swept cells, and number of
1799 times GC was invoked.
1800 (gc_start_stats): renamed from scm_gc_start, made static, taught
1801 to init the new stats.
1802 (gc_end_stats): renamed from scm_gc_end, made static, taught to
1803 calculate the new stats.
1804 (scm_igc): don't call gc_start_stats unless we are sure that we
1805 are indeed going to collect. also, added some timekeeping between
1806 the mark and sweep phases.
1807 (scm_gc_sweep): count number of cells we sweep as we go.
1808
1809 * gc.h: removed prototypes for scm_gc_{start,end}.
1810
a94da0e0
MD
18112000-08-13 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
1812
1813 * alist.c (scm_assq, scm_assv, scm_assoc): Report argument type
1814 error for the alist rather than the sublist where the type
1815 mismatch is discovered.
1816
2a2a730b
NJ
18172000-08-13 Neil Jerram <neil@ossau.uklinux.net>
1818
1819 * root.c (s_scm_call_with_dynamic_root): Docstring fix - rogue
1820 newline.
83238bc1 1821
f0a7af1a
NJ
18222000-08-12 Neil Jerram <neil@ossau.uklinux.net>
1823
2a2a730b
NJ
1824 * numbers.c (scm_ash): Docstring fix - missing newlines.
1825
1826 * ports.c (scm_port_filename): Docstring fix - missing newline.
1827
1828 * strports.c (scm_eval_string): Docstring fix - missing newline.
1829
ee826bae
NJ
1830 * vports.c (s_scm_make_soft_port): Docstring updated so that
1831 example is correct.
1832
1670bef9
NJ
1833 * strop.c: Docstring fixes - quotation marks and backslashes
1834 needed quoting.
1835
f0a7af1a
NJ
1836 * numbers.c (s_scm_logand): Docstring fix - "@end lisp" inserted.
1837
872e0c72
NJ
18382000-08-11 Neil Jerram <neil@ossau.uklinux.net>
1839
1840 * macros.c: Remove surplus newlines from end of docstrings.
1841
1842 * list.c (scm_list_tail): Add @deffnx line to docstring for
1843 list-cdr-ref.
83238bc1 1844
872e0c72
NJ
1845 * keywords.c: Docstring improvements in conjunction with new
1846 reference manual doc on keywords.
1847
1848 * error.c (scm_error_scm): Fix texinfo syntax error in
1849 docstring. (@code(~S) should be @code{~S}.)
1850
1851 * dynl.c: Remove surplus newlines from end of docstrings.
1852
3a33a9b1
MD
18532000-08-11 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
1854
1855 * eval.c (scm_eval): Backward incompatible change: Now takes an
1856 environment specifier as second arg. `eval' hereby becomes R5RS
1857 compatible.
1858 (scm_i_eval_x, scm_i_eval): New functions (replace
1859 scm_eval_3).
1860 (scm_eval2, scm_eval_3): Deprecated.
1861 (scm_top_level_lookup_closure_var): Deprecated.
1862
1863 * eval.h: #include "struct.h".
1864
1865 * evalext.c (scm_definedp): Have to work before module system is
1866 booted.
1867
1868 * modules.h (SCM_MODULEP, SCM_VALIDATE_MODULE,
1869 SCM_MODULE_OBARRAY, SCM_MODULE_USES, SCM_MODULE_BINDER,
1870 SCM_MODULE_EVAL_CLOSURE): New macros.
1871 (scm_module_index_obarray, scm_module_index_uses,
1872 scm_module_index_binder, scm_module_index_eval_closure): New
1873 constants; #include "validate.h".
83238bc1 1874
3a33a9b1
MD
1875 * modules.c (scm_module_tag, scm_module_system_booted_p): New
1876 globals.
1877 (scm_post_boot_init_modules): Initialize scm_module_tag.
1878 (scm_interaction_environment): New primitive.
1879
1880 * symbols.c (scm_can_use_top_level_lookup_closure_var): Removed.
1881 #include "modules.h".
1882
1883 * strports.c (scm_eval_string): Evaluate in
1884 scm_interaction_environment ().
1885
1886 * script.c (scm_shell): Pass scm_the_root_module () as second arg
1887 to new scm_eval_x.
1888
1889 * load.c (load): Use `scm_selected_module' to compute second arg
1890 to new scm_i_eval_x; Don't call it if module system hasn't booted.
1891 (scm_read_and_eval_x): Deprecated.
1892 #include "modules.h".
1893
1894 * debug.c (scm_local_eval): Use scm_i_eval and scm_i_eval_x.
1895 (scm_start_stack): Use scm_i_eval.
1896
1897 * strports.c: #include "modules.h".
1807c7b8
MD
1898
1899 * print.c (scm_simple_format): Be case-insensitive for ~A and ~S
1900 directives.
1901
1a2f1b90
MD
19022000-08-09 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
1903
1904 The following changes are intended to ensure that struct instances
1905 are freed before their vtables. It's optimized for the most
1906 common case, which is freeing of struct instances.
1907
1908 * gc.c (scm_gc_mark, scm_gc_sweep): Remove vcell = 1 magic.
1909 (scm_structs_to_free): New variable.
1910 (scm_gc_sweep): Hook up structs to free on the scm_structs_to_free
1911 chain.
1912
1913 * struct.h (SCM_STRUCT_GC_CHAIN, SCM_SET_STRUCT_GC_CHAIN): New
1914 macros.
1915 (scm_structs_to_free, scm_struct_prehistory): Declare.
1916
1917 * struct.c (scm_make_struct, scm_make_vtable_vtable): Structs
1918 handles are now double cells; Initialize SCM_STRUCT_GC_CHAIN to
1919 0.
1920 (scm_struct_gc_init, scm_free_structs): New GC C hooks.
1921 (scm_struct_prehistory): Install them.
1922
1923 * init.c (scm_boot_guile_1): Call scm_struct_prehistory.
1924
b054684d
MV
19252000-08-06 Marius Vollmer <mvo@zagadka.ping.de>
1926
1927 * read.c (scm_flush_ws): Include filename in error message when it
1928 is not `#f'.
1929
7ca38734
MV
19302000-08-05 Marius Vollmer <mvo@zagadka.ping.de>
1931
1932 * iselect.c: Include <unistd.h>. Thanks to Bertrand Petit!
1933
b62cc1c2
MD
19342000-08-02 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
1935
89e941f1
MD
1936 * struct.c (scm_make_struct_layout, scm_make_struct,
1937 scm_make_vtable_vtable): Updated documentation.
1938
b62cc1c2
MD
1939 * print.c (scm_simple_format): Bugfix: Coerce port before using
1940 it.
1941
3bc0c6df
GH
19422000-07-31 Gary Houston <ghouston@arglist.com>
1943
cdaf0a20 1944 * net_db.c: declare h_errno only if HAVE_H_ERRNO is not defined
3bc0c6df
GH
1945 (thanks to Richard Kim for the bug report).
1946
3ccd1860
MV
19472000-07-30 Marius Vollmer <mvo@zagadka.ping.de>
1948
1949 * alist.c (scm_assq_remove_x, scm_assv_remove_x,
1950 scm_assoc_remove_x): Use scm_delq1_x instead of scm_delq_x, since
1951 using the latter is pointless.
1952
11102992
DH
19532000-07-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
1954
1955 * gc.c (scm_gc_sweep): Renamed local variable from 'free' to
1956 'free_struct_data' to avoid confusion with stdlib's 'free'.
1957
a75923bb
DH
19582000-07-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
1959
1960 * vectors.c (scm_make_vector): Fix the initialization order of
1961 the vector such that the type cell is initialized last.
1962
f7620510
DH
19632000-07-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
1964
1965 * struct.[ch] (scm_struct_init): Made static. Fixed not to rely
1966 on the struct cell to be fully initialized.
1967
1968 * struct.c (scm_make_struct, scm_make_vtable_vtable): Fix the
1969 initialization order of the struct such that the type cell is
1970 initialized last.
1971
17dd060d
MV
19722000-07-25 Marius Vollmer <mvo@zagadka.ping.de>
1973
1974 * alist.c (scm_assq_remove_x, scm_assv_remove_x,
1975 scm_assoc_remove_x): Remove only the first cell with a matching
1976 key, not all.
1977
b73bde31
MV
19782000-07-24 Marius Vollmer <mvo@zagadka.ping.de>
1979
1980 * stime.c (scm_strftime): Recognize a return value of zero from
1981 strftime as buffer overflow and take care to detect a valid zero
1982 length result regardless. Thanks to David Barts!
1983
e85da7d9
MV
19842000-07-23 Marius Vollmer <mvo@zagadka.ping.de>
1985
1986 * alist.c (scm_assq_remove_x, scm_assv_remove_x,
1987 scm_assoc_remove_x): Remove all cells whose key is eq, eqv, or
1988 equal (respectively) to the argument key, not all cells that are
1989 eq, eqv, or equal to the first cell with the argument key. Thanks
1990 to Neil Jerram!
83238bc1 1991
78a3503e
DH
19922000-07-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
1993
1994 * gc.h (SCM_FREE_CELL_CDR, SCM_SET_FREE_CELL_CDR), hooks.c
1995 (make_hook), modules.c (OBARRAY, USES, BINDER): Pack and unpack
1996 SCM values appropriately.
1997
1998 * modules.c (scm_standard_eval_closure): Don't pass an inum to
1999 scm_makcclo, but rather a long value.
2000
62850ef3
DH
20012000-07-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
2002
2003 read.c (scm_lreadrecparen), srcprop.c (scm_set_source_property_x):
2004 SCM_SETCDR and SCM_WHASHSET macros don't deliver a return value.
2005 Thanks to Han-Wen Nienhuys for the bug report.
2006
cc4feeca
DH
20072000-07-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
2008
2009 * root.[ch] (scm_call_catching_errors): Deprecated.
2010
2011 * root.c (scm_init_root): Initialize the root smob type using the
2012 standard initialization functions.
2013
007e7c35
MV
20142000-07-17 Marius Vollmer <mvo@zagadka.ping.de>
2015
2016 * eval.c (unmemocopy): Don't rely on V being a list of at least
2017 one element. Thanks to Bill Schottstaedt!
2018
9d47a1e6
ML
20192000-07-15 Michael Livshin <mlivshin@bigfoot.com>
2020
2021 * gc.c (scm_done_free): new.
2022 expanded comments about scm_done_malloc.
2023
2024 * gc.h: added prototype for scm_done_free
2025
406c7d90
DH
20262000-07-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
2027
2028 * gc.h (scm_take_stdin): Removed.
2029
2030 * gc.h (SCM_VALIDATE_CELL): Delegate cell checks to function
2031 scm_assert_cell_valid to allow extensions to the checking
2032 functionality without need to recompile everything.
2033
2034 * gc.[ch] (scm_assert_cell_valid, scm_set_debug_cell_accesses_x):
2035 Added as conditionally compiled functions for the case that
2036 SCM_DEBUG_CELL_ACCESSES is enabled.
2037
2038 * gc.c (debug_cells_p): Added to indicate whether compile-time
2039 included cell access debugging is run-time enabled.
2040
2041 * gc.[ch] (scm_gc_running_p): Added to indicate that scm_igc is
2042 being executed. Intended to be used instead of scm_gc_heap_lock
2043 at most places.
2044
2045 * error.c (scm_error), gdbint.c (SCM_GC_P): Use scm_gc_running_p
2046 instead of scm_gc_heap_lock.
2047
2048 * gc.c (scm_igc): Set scm_gc_running_p to true while running.
2049
2050 * gc.c (scm_mark_locations): Don't mark free cells.
2051
2052 * weaks.c (scm_scan_weak_vectors): Use SCM_FREE_CELL_P instead of
2053 SCM_FREEP.
2054
c4da09e2
DH
20552000-07-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
2056
2057 * gc.c (scm_mark_locations): Minimized some variable scopes and
2058 simplified the code a bit.
2059
3f5d82cd
DH
20602000-07-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
2061
2062 * gc.h (SCM_SET_FREE_CELL_TYPE, SCM_SET_FREE_CELL_CDR,
2063 SCM_FREE_CELL_P, SCM_FREE_CELL_CDR): Added since free cells
2064 should not be accessed via SCM_C[AD]R. Further, using dedicated
2065 macros to access free cells allows all other cell accessing macros
2066 to treat acesses to free cells as errors, thus enabling better
2067 error checks for cell accesses. SCM_FREE_CELL_P is supposed to
2068 replace SCM_FREEP some time.
2069
2070 * gc.h (SCM_NEWCELL, SCM_NEWCELL2), gc.c (map_free_list,
2071 free_list_length, scm_check_freelist, scm_debug_newcell,
2072 scm_debug_newcell2, freelist_length, scm_gc_for_newcell,
2073 scm_gc_mark, scm_gc_sweep, init_heap_seg): Only use the dedicated
2074 cell accessors when accessing free cells.
2075
f706a58b
DH
20762000-07-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
2077
2078 * gc.h (SCM_CELL_WORD, SCM_CELL_OBJECT): Treat the referenced
2079 object as const in order to make the compiler warn about code like
2080 SCM_CELL_WORD (x, n) = y. Instead, SCM_SET_CELL_WORD (x, n, y)
2081 should be used.
2082
2083 (SCM_CELL_WORD_LOC, SCM_CARLOC, SCM_CDRLOC): Return the address
2084 as an address to a non-const object, since these macros are used
2085 to allow direct write access to objects.
2086
cbaadf02
DH
20872000-07-07 Dirk Herrmann <D.Herrmann@tu-bs.de>
2088
2089 * hashtab.c (scm_hash_fn_create_handle_x): Signal an error if the
2090 given hash table has no slots.
2091
a6c12a04
DH
20922000-07-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
2093
b6efc951
DH
2094 * gc.c (policy_on_error): Added in order to allow alloc_some_heap
2095 to react to malloc failures in a context dependent way.
2096
2097 (scm_check_freelist): No need to flush streams before abort().
2098
2099 (scm_gc_for_newcell): Try to allocate new memory in three phases:
2100 grow heap if preferred, if still no memory available collect
2101 garbage, if still no memory available grow heap.
2102
2103 (heap_segment_table_size): Added to always reflect the actual
2104 size of the heap segment table, because scm_n_heap_segs may differ
2105 from the heap segment table size.
2106
2107 (alloc_some_heap): In case of malloc failure, react according to
2108 the new policy_on_error parameter (either return to caller or
2109 abort immediately). Further, keep heap_segment_table_size up to
2110 date.
2111
2112 (scm_init_storage): Initialize heap_segment_table_size.
2113
21142000-07-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
2115
2116 * gh.h: Don't include <stdio.h>. Thanks to Han-Wen Nienhuys for
a6c12a04
DH
2117 the hint.
2118
b63a956d
DH
21192000-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
2120
2121 * __scm.h (SCM_OUTOFRANGE, SCM_NALLOC, SCM_HUP_SIGNAL,
2122 SCM_INT_SIGNAL, SCM_FPE_SIGNAL, SCM_BUS_SIGNAL, SCM_SEGV_SIGNAL,
2123 SCM_ALRM_SIGNAL, SCM_GC_SIGNAL, SCM_TICK_SIGNAL, SCM_SIG_ORD,
2124 SCM_ORD_SIG, SCM_NUM_SIGS): Re-introduce these as deprecated
2125 symbols.
2126
2127 * error.c (scm_wta): Re-introduce dispatching for SCM_OUTOFRANGE
2128 and SCM_NALLOC, but as a deprecated feature.
2129
a75a7aff
MD
21302000-06-30 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
2131
38ec519c
MD
2132 * debug.c: Added #include fluids.h.
2133
a75a7aff
MD
2134 * numbers.c (scm_gr_p, scm_leq_p, scm_geq_p): Turned into
2135 primitive generics. (Thanks to Nicolas Neuss.)
2136
c7387918
DH
21372000-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
2138
2139 * gc.c (alloc_some_heap): Use scm_memory_error to indicate a
2140 failed attempt to get additional memory from the system.
2141
2142 (scm_gc_for_newcell): Changed the control structure to make the
2143 behaviour explicit for the case that gc is not able to free any
2144 cells.
2145
685c0d71
DH
21462000-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
2147
2148 * __scm.h (SCM_OUTOFRANGE): Removed.
2149
2150 * error.c (scm_wta): Removed sick dispatch code for range
2151 errors. (More sick dispatches still to be removed.)
2152
2153 * hashtab.c (scm_hash_fn_get_handle, scm_hash_fn_create_handle_x,
2154 scm_hash_fn_remove_x): Eliminate redundant test for if unsigned
2155 value is non-negative. Use scm_out_of_range to signal range
2156 errors.
2157
2158 * hooks.c (make_hook), unif.c (scm_aind): Use scm_out_of_range to
2159 signal range errors.
2160
2161 * list.c (scm_list_ref, scm_list_set_x, scm_list_cdr_set_x): Fix
2162 error reporting (now uses original input parameter to report wrong
2163 type argument errors). Use SCM_OUT_OF_RANGE to report range
2164 errors and SCM_WRONG_TYPE_ARG to report type errors.
2165
2166 * strings.c (scm_substring): Make range checks for negative
2167 values explicit (former behaviour relied on an implicit
2168 conversion from signed to unsigned). Don't use SCM_ASSERT for
2169 range checks.
2170
2171 * unif.c (scm_aind, scm_transpose_array, scm_bit_set_star_x,
2172 scm_bit_count_star): Use scm_out_of_range to signal range
2173 errors.
2174
2175 * unif.c (scm_transpose_array, scm_bit_position), vectors.c
2176 (scm_vector_ref, scm_vector_set_x, scm_vector_move_left_x,
2177 scm_vector_move_right_x): Use SCM_ASSERT_RANGE to check ranges.
2178
fdf25853
DH
21792000-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
2180
2181 * validate.h (SCM_VALIDATE_INUM_MIN_COPY,
2182 SCM_VALIDATE_INUM_MIN_DEF_COPY, SCM_VALIDATE_INUM_RANGE_COPY):
2183 Perform all range checks based on the input value. The former way
2184 of using the value that is assigned to the target variable fails
2185 if the assignment to the target variable itself can change the
2186 value because of type conversion.
2187
2188 (SCM_ASSERT_RANGE): Use scm_out_of_range to signal range errors.
2189
627df128
MD
21902000-06-30 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2191
2192 * gc.c (scm_gc_for_newcell): Behave gracefully also if scm_igc
2193 doesn't yield any new cells. In theory this could happen if all
2194 cells allocated with NEWCELL are either in use or conservatively
2195 marked and all cluster spine cells are conservatively marked.
2196 (Thanks to Dirk.)
2197
2500356c
DH
21982000-06-29 Dirk Herrmann <D.Herrmann@tu-bs.de>
2199
2200 * __scm.h (SCM_NALLOC): Removed.
2201
2202 * error.c (scm_wta): Removed sick dispatch code for memory
2203 errors. (More sick dispatches still to be removed.)
2204
2205 * numbers.c (scm_mkbig, scm_adjbig), ports.c (scm_make_port_type),
2206 random.c (scm_i_copy_rstate, scm_c_make_rstate), smob.c
2207 (scm_make_smob_type), srcprop.c (scm_make_srcprops), vectors.c
2208 (scm_vector_set_length_x): Now using scm_memory_error to signal
2209 memory errors.
2210
9b166f12
DH
22112000-06-29 Dirk Herrmann <D.Herrmann@tu-bs.de>
2212
2213 * __scm.h: Removed some commented code and fixed some comments.
2214
2215 (SCM_HUP_SIGNAL, SCM_INT_SIGNAL, SCM_FPE_SIGNAL, SCM_BUS_SIGNAL,
2216 SCM_SEGV_SIGNAL, SCM_ALRM_SIGNAL, SCM_GC_SIGNAL, SCM_TICK_SIGNAL,
2217 SCM_SIG_ORD, SCM_ORD_SIG, SCM_NUM_SIGS): Removed.
2218
2219 * async.c: Removed some commented code.
2220
acf4331f
DH
22212000-06-29 Dirk Herrmann <D.Herrmann@tu-bs.de>
2222
2223 * gc.c (scm_gc_mark, scm_gc_sweep, scm_must_malloc,
2224 scm_must_realloc, scm_must_free, alloc_some_heap): Use the
2225 appropriate error signalling function.
2226
fc3d7778
DH
22272000-06-29 Dirk Herrmann <D.Herrmann@tu-bs.de>
2228
2229 * root.h (scm_first_type): Removed.
2230
22312000-06-29 Dirk Herrmann <D.Herrmann@tu-bs.de>
0a7a7445
DH
2232
2233 * gc.c (MIN_GC_YIELD): Removed.
2234
150c200b
ML
22352000-06-28 Michael Livshin <mlivshin@bigfoot.com>
2236
2237 * gc.c (scm_gc_for_newcell): don't try to do GC if it's blocked,
2238 allocate instead.
2239
939794ce
DH
22402000-06-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
2241
2242 * async.c (scm_gc_async, scm_gc_vcell, scm_sys_gc_async_thunk):
2243 Moved to gc.c.
2244
2245 (scm_init_async): Moved initialization for scm_gc_async and
2246 scm_gc_vcell to gc.c. Moved initialization of scm_asyncs here
2247 from gc.c.
2248
2249 * async.h (scm_gc_async): Not globally visible any more.
2250
2251 * gc.c (scm_gc_stats): Made callable even from within regions
2252 where gc is blocked.
2253
2254 (scm_gc_end): Eliminate the hardcoding of the marking of the
2255 scm_gc_async from the gc core.
2256
2257 (scm_init_storage): Don't initialize the scm_asyncs list here.
2258 This is now done in asyncs.c.
2259
2260 (scm_gc_vcell): Moved here from async.c.
2261
2262 (gc_async): Renamed from scm_gc_async, moved here from async.c
2263 and made static.
2264
2265 (gc_async_thunk): Renamed from scm_sys_gc_async_thunk and moved
2266 here from async.c.
2267
2268 (mark_gc_async): New hook function for scm_after_gc_c_hook.
2269
2270 (scm_init_gc): Added initialization of scm_gc_vcell and
2271 gc_async. Further, add mark_gc_async to scm_after_gc_c_hook.
2272
2273 * init.c (scm_boot_guile_1): scm_init_gc requires asyncs to be
2274 initialized.
2275
12acbbef
DH
22762000-06-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
2277
2278 * gc.c (scm_igc): Removed commented code that once was intended
2279 to unprotect struct types with no instances.
2280
2281 * root.h (scm_type_obj_list): Removed.
2282
73ea78af
DH
22832000-06-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
2284
2285 * async.c (scm_init_async): Switch to standard way of smob
2286 initialization.
2287
7f40b48a
ML
22882000-06-21 Michael Livshin <mlivshin@bigfoot.com>
2289
2290 * guile-doc-snarf.in: use cut instead of sed, that's much much
83238bc1
ML
2291 faster. also, don't call basename more than needed. and, to gain
2292 a couple of microseconds more, don't call cat needlessly. (thanks
7f40b48a
ML
2293 to Brad Knotwell).
2294
3c6d9d71
DH
22952000-06-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
2296
2297 * guile-snarf.awk.in, guile-snarf.in, snarf.h: Rename SCM__I to
2298 SCM_SNARF_INIT_START, SCM__D to SCM_SNARF_DOC_START, SCM__S to
2299 SCM_SNARF_DOCSTRING_START and SCM__E to SCM_SNARF_DOCSTRING_END.
2300
2b6e0d2b
MD
23012000-06-21 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
2302
2303 * eval.c, eval.h (scm_top_level_lookup_closure_var): Added.
2304 #include "libguile/fluids.h".
2305
2306 * eval.h (SCM_TOP_LEVEL_LOOKUP_CLOSURE): New macro which replaces
2307 SCM_CDR (scm_top_level_lookup_closure_var) everywhere.
2308
2309 * root.h (scm_top_level_lookup_closure_var,
2310 scm_system_transformer): Removed. (It's no sense in having the
2311 *variable* be a "fluid".)
2312
2313 * root.c (mark_root): Removed marking of
2314 s->top_level_lookup_closure_var and s->system_transformer.
2315
2316 * modules.c (scm_selected_module): the_module is now a fluid.
2317
5bc9cbd2
MD
23182000-06-20 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2319
2320 * gc.h, tags.h: Be kind to compilers which must see hash signs in
2321 column 0. (Thanks to Ian Grant.)
2322
2323 * numbers.h: Put #ifdef HAVE_LONG_LONGS around declarations using
2324 the long_long type. (Thanks to Bernard Urban.)
2325
b5074b23
MD
23262000-06-20 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
2327
2328 * gc.c, gc.h (scm_default_init_heap_size_1,
2329 scm_default_min_yield_1, scm_default_init_heap_size_2,
2330 scm_default_min_yield_2, scm_default_max_segment_size): New global
2331 variables. Can be customized by the application before booting
2332 Guile. (We might want to be able to control these parameters
2333 dynamically through the "options interface" in the future, but
2334 note that that is additional functionality. Here we're giving
2335 default values which the environment variables can override.)
2336
2337 * list.c (scm_cons_star): Updated comment.
2338
2339 * smob.h: Changed comments for scm_make_smob_type and
2340 scm_make_smob_type_mfpe, warning that the latter might be
2341 deprecated in a future release.
2342
0a9e521f
MD
23432000-06-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
2344
2345 * list.[ch] (scm_cons_star/cons*): Renamed from
2346 scm_list_star/list*.
2347
2348 * list.[ch] (scm_list_star/list*): Provided as a deprecated alias
2349 for scm_cons_star/cons*.
2350
2351 * gc.c (scm_protect_object): Updated comment.
2352
2353 * numbers.h (SCM_NEWREAL, SCM_NEWCOMPLEX): Removed.
2354
2355 * tags.h (SCM_UNPACK_CAR, SCM_NDOUBLE_CELLP): Removed.
2356
264871aa
MD
23572000-06-19 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
2358
2359 * init.c, init.h (scm_initialized_p): Renamed from `initialized'
2360 and made global.
2361
2362 * gdbint.c (gdb_print): Print warning instead of calling scm_write
2363 if Guile isn't yet initialized.
2364
2365 * print.c (scm_current_pstate, scm_make_print_state): Simplified
2366 tests, using the assumption that Guile has been initialized.
2367
3785f317
GB
2368Sun Jun 18 14:45:21 2000 Greg J. Badros <gjb@cs.washington.edu>
2369
2370 * print.c (s_scm_current_pstate): Do not segfault when the
2371 print_state_pool is unitialized in `current-pstate', and better
2372 verify its state before altering it in scm_make_print_state().
2373
6732de1b
ML
23742000-06-18 Michael Livshin <mlivshin@bigfoot.com>
2375
2376 * scmsigs.c (s_scm_sigaction): guard the SIGIOT case with an
2377 #ifdef -- it's missing on at least one platform. (thanks to
2378 Jan Nieuwenhuizen).
2379
79494f15
DH
23802000-06-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
2381
2382 * list.c (list*): Added documentation from common-list.scm.
2383
6a199940
DH
23842000-06-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
2385
2386 * gc.c (scm_unprotect_object): The reference count is guaranteed
2387 to be a positive number.
2388
3243bcc0
MD
23892000-06-15 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
2390
2391 * eval.c: Updated comment above scm_map.
2392
26c9c3ce
MD
23932000-06-14 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2394
2395 * gc.c (scm_protect_object): Avoid looking up the object handle
2396 twice.
2397 (scm_unprotect_object): Abort if scm_unprotect_object is called on
2398 an unprotected object.
2399
2dd6a83a
ML
24002000-06-14 Michael Livshin <mlivshin@bigfoot.com>
2401
2402 * gc.c (scm_unprotect_object): fix a nasty typo bug (thanks to
2403 Dirk Herrmann).
2404
97ebbbca
MD
24052000-06-14 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
2406
43fbd20f
MD
2407 * socket.c (scm_getsockopt): Changed type for `optlen' from int to
2408 size_t.
2409 (scm_accept, scm_getsockname, scm_getpeername, scm_recvfrom):
2410 Ditto for `tmp_size'.
2411 (scm_addr_buffer_size): Changed type from int to size_t.
2412
2413 * random.c: #include <string.h>. (Needed by memcpy.)
2414
97ebbbca
MD
2415 * guile-snarf.awk.in: Replace the dot_doc_file arg with "-",
2416 indicating stdin, instead of "" and don't reset ARGC. This is a
2417 workaround for `nawk' in AIX 4.3 on RS6000 but, as far as I know,
2418 it is correct, and perhaps even better.
2419
14d72d48
GH
24202000-06-14 Gary Houston <ghouston@arglist.com>
2421
2422 * scmsigs.c (scm_init_scmsigs): if HAVE_SIGINTERRUPT is not
2423 defined, add SA_RESTART to the sigaction flags correctly
2424 (thanks to Dale P. Smith).
2425
d99783cb
MD
24262000-06-13 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2427
010d1e9d
MD
2428 * strings.c: #include <string.h>. (Thanks to Bill Schottstaedt.)
2429
2430 * net_db.c (scm_resolv_error): Only use macro NETDB_INTERNAL if
2431 defined. It isn't on sgi irix 5.3. (Thanks to Bill Schottstaedt.)
2432
d99783cb
MD
2433 * Makefile.am (.c.doc): Pipe output (the .x contents) to /dev/null.
2434
c47e8cc1
MD
24352000-06-13 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
2436
e36a0870
MD
2437 * fports.c (scm_setvbuf): Use `free' instead of `scm_must_free'
2438 since read and write buffers are allocated by `malloc'.
2439
c47e8cc1
MD
2440 * Makefile.am: Removed old test code.
2441
2442 * gh_test_c.c, gh_test_repl.c: Removed.
2443
341f78c9
MD
24442000-06-12 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
2445
a8861fa0
MD
2446 * iselect.c (SCM_NLONGBITS): Add workaround for the Sun 4.2
2447 compiler.
2448
2449 * inet_aton.c (inet_aton): Cast init value for `cp'.
2450
2451 * ramap.c (s_scm_array_fill_x): Cast `ve' properly in case
2452 `scm_tc7_uvect'.
2453
2454 * symbols.c (scm_intern_obarray_soft,
2455 scm_sysintern0_no_module_lookup): Cast `name' to unsigned char ptr
2456 in calls to scm_strhash.
2457
2458 * strports.c (st_resize_port): Substituted SCM_UCHARS for
2459 SCM_CHARS.
2460 (st_write): Cast argument to strncpy to char ptr.
2461 (scm_mkstrport): Substituted SCM_ROUCHARS for SCM_ROCHARS.
2462 (scm_strport_to_string): Cast argument to scm_makfromstr to char
2463 ptr.
2464
2465 * ports.c (scm_ungetc): Cast value to unsigned char ptr before
2466 storing in putback_buf.
2467 (scm_unread_string): Substituted SCM_ROCHARS for SCM_ROUCHARS.
2468
2469 * ioext.c (s_scm_read_line): Cast result of call to
2470 scm_do_read_line to unsigned char ptr.
2471
d230c130
MD
2472 * gdbint.c (SEND_STRING): Cast argument to char pointer.
2473
2474 * fports.c (fport_flush): Declare `ptr' as unsigned char (was
2475 char).
2476
9c8dca4e
MD
2477 * Makefile.am (DOT_DOC_FILES): List doc-files explicitly. (We
2478 shouldn't use Make rules which aren't supported by most Make
2479 programs.)
d230c130
MD
2480 (OMIT_DEPENDENCIES): Defined to "libguile.h ltdl.h". (We don't
2481 want these dependencies recorded, since they would get bogus
2482 relative paths; libguile.h is only used in gh.h and guile.c.)
9c8dca4e
MD
2483 (EXTRA_DOT_X_FILES, EXTRA_DOT_DOC_FILES): New variables.
2484 (guile-procedures.txt): Depend on EXTRA_DOT_DOC_FILES.
2485 (modinclude_HEADERS): Removed kw.h.
2486
69fc343a
MD
2487 * guile-snarf.in: Change regexp "^SCM__I" --> "^ *SCM__I".
2488 (The preprocessor might insert spaces before the identifier.)
2489
341f78c9
MD
2490 * snarf.h (SCM_SNARF_HERE, SCM_SNARF_INIT, SCM_SNARF_DOCS):
2491 Renamed from SCM_HERE, SCM_INIT, SCM_DOCS.
2492
2493 * smob.h (scm_smobfuns): Removed deprecated type.
2494
2495 * smob.c, smob.h (scm_newsmob): Removed deprecated function.
2496 (Replaced by `scm_make_smob_type'.)
2497
2498 * keywords.c (scm_tc16_kw): Removed deprecated type.
2499 (Replaced by scm_tc16_keyword.)
2500
341f78c9
MD
2501 * kw.h: Removed deprecated header file.
2502
2503 * evalext.c (serial-map): Removed deprected alias for scm_map.
2504 (Has been replaced by `map-in-order'.)
2505
2506 * ramap.c (serial-array-copy!, serial-array-map!): Removed
2507 depracted aliases. (Replaced by `array-copy-in-order!' and
2508 `array-map-in-order'.)
2509
4f60fa74
MD
25102000-06-11 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
2511
2512 * gc.h (SCM_VALIDATE_CELL): Rewritten.
2513 (SCM_CELL_WORD, SCM_CELL_OBJECT, SCM_SET_CELL_WORD,
2514 SCM_SET_CELL_OBJECT): Use new version of SCM_VALIDATE_CELL.
2515 (Thanks to Han-Wen Nienhuys.)
2516
adb2c53b
ML
25172000-06-10 Michael Livshin <mlivshin@bigfoot.com>
2518
2519 * guile-doc-snarf.in: don't pipe the CPP output right into sed --
2520 write it to the temp file first and check the CPP return code.
2521 (I introduced this bug earlier, and this probably caused people
2522 with non-GNU C preprocessors to get empty *.x files and not to
2523 have the build fail right away...).
2524
2525 * scmsigs.c (s_scm_sigaction): guard the SIGSYS case with an ifdef
2526 -- at least my libc5-based Linux system doesn't define SIGSYS.
2527
0abbd8f4
MD
25282000-06-08 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
2529
aa169af8
MD
2530 * snarf.h, guile-snarf.awk.in, guile-snarf.in: Replaced snarf
2531 markers with identifiers (SCM__I, SCM__D, SCM__S, SCM__E).
2532 (Thanks to Bernard Urban.)
0abbd8f4 2533
a6596faa
MD
25342000-06-06 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2535
2536 * modules.c (scm_system_module_env_p): Fixed detection of system
2537 modules.
2538
c29ee3e5
MV
25392000-06-06 Marius Vollmer <mvo@zagadka.ping.de>
2540
2541 * scmsigs.c (scm_sigaction): Silently ignore setting handlers for
2542 `program error signals' because they can't currently be handled by
2543 Scheme code.
2544
2d9cdf4e
DH
25452000-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
2546
2547 * procs.h (SCM_SET_SUBRF): Added.
2548
2549 * procs.c (scm_make_subr_opt): Don't assign to SCM_SUBRF, use
2550 SCM_SET_SUBRF instead. Thanks to Bernard Urban for the bug
2551 report.
2552
4b479d98
DH
25532000-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
2554
2555 * gc.h (SCM_CARLOC, SCM_CDRLOC): Don't take the address of a SCM
2556 value.
2557
2558 * sort.c (scm_sorted_p, scm_merge, scm_merge_list_x,
2559 scm_merge_list_step): Don't take the address of SCM_CAR. Use
2560 SCM_CARLOC instead. Thanks to Bernard Urban for the bug report.
2561
9a09deb1
DH
25622000-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
2563
2564 * boolean.h (SCM_TRUE_P): Removed, as people might use it as a
2565 replacement for !SCM_FALSEP.
2566
2567 * backtrace.c (display_error_body), boolean.h (SCM_BOOLP), gc.c
2568 (scm_unhash_name), gh_data.c (gh_module_lookup), load.c
2569 (scm_primitive_load), print.c (scm_simple_format), procs.c
2570 (scm_procedure_documentation), procs.h (SCM_TOP_LEVEL), ramap.c
2571 (scm_array_fill_int), scmsigs.c (scm_sigaction), stacks.c
2572 (narrow_stack, scm_make_stack, scm_stack_id), symbols.c
2573 (scm_string_to_obarray_symbol), throw.c (scm_catch,
2574 scm_lazy_catch, scm_ithrow), unif.c (scm_make_uve, scm_array_p,
2575 scm_array_set_x, scm_bit_set_star_x, scm_bit_count_star),
2576 validate.h (SCM_VALIDATE_BOOL_COPY, SCM_VALIDATE_PROC): Replace
2577 uses of SCM_TRUE_P (x) with SCM_EQ_P (x, SCM_BOOL_T).
2578
2c4fc472
MD
25792000-06-04 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
2580
542bfe1d
MD
2581 * eval.c (scm_badformalsp): New static function.
2582 (SCM_CEVAL): Check arguments for procedure-with-setter closures.
2583 (Thanks to Keisuke Nishida.)
2584
2c4fc472
MD
2585 The major reason for Guile's slow loading speed has been the fact
2586 that a chain of Scheme level procedures has been evaluated for
2587 every top-level symbol lookup during the first pass through the
2588 code.
83238bc1 2589
2c4fc472
MD
2590 The following is a kludge which I suggested four years ago, and
2591 which I've repeatedly suggested since. Personally, I've never
2592 been bothered by Guile's slow loading speed, so I thought I would
2593 let someone else do it...
2594
2595 But since the new environments will be included first in
2596 Guile-1.5, I thought it would make people happy to get the kludge
2597 into 1.4.
83238bc1 2598
2c4fc472
MD
2599 * modules.c: Added #include "libguile/vectors.h";
2600 Added #include "libguile/hashtab.h";
2601 Added #include "libguile/struct.h";
2602 Added #include "libguile/variable.h";
2603 Capture Scheme level `module-make-local-var!' to be used in the
2604 standard eval closure.
2605 (scm_standard_eval_closure): New primitive.
2606
2607 * modules.h (scm_standard_eval_closure): Declare.
2608
2609 * eval.c (scm_lookupcar): Test for !SCM_CONSP (SCM_CAR (env))
2610 instead of SCM_TRUE (scm_procedurep (SCM_CAR (env))).
2611
2612 * symbols.c (scm_sym2vcell): Bypass dispatch in the evaluator for
2613 standard eval closures.
2614
2615 * variable.c: Code layout fixes.
2616
96372e45
MD
26172000-06-03 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2618
2619 * Makefile.am: Added LIBS line to libpath which accidentally
2620 disappeared in the change of 2000-06-01.
2621 (Thanks to Dale P. Smith.)
2622
cc0bb1ef
MD
26232000-06-03 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
2624
6784d5c0
MD
2625 * scmsigs.c (scm_segfault): Removed. (Was probably added by
2626 mistake since it is not mentioned in ChangeLog.)
2627
cc0bb1ef
MD
2628 * gc.h (SCM_VALIDATE_CELL): Cast result to (void) in order to
2629 avoid compiler warnings in gcc. (Does this work for other
2630 compilers?)
2631
f8d4d8e5
MD
26322000-06-03 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2633
4ecf5aa3
MD
2634 * gc.h (SCM_VALIDATE_CELL): Don't "use" the value returned by
2635 abort ().
2636 (SCM_CARLOC, SCM_CDRLOC): Define directly instead of using
2637 SCM_CELL_OBJECT_0 and SCM_CELL_OBJECT_1. It's not correct to take
2638 the address of these expressions since they use SCM_VALIDATE_CELL.
2639 (Thanks to Bernard Urban.)
2640
f8d4d8e5
MD
2641 * dynl.c: Changed #include <ltdl.h> --> #include
2642 "libltdl/ltdl.h". (Thanks to Bill Schottstaedt.)
2643
b6fae158
CB
26442000-06-01 Craig Brozefsky <craig@red-bean.com>
2645
2646 * Makefile.am: libguile_la_LDFLAGS gets -version-info args
2647 from GUILE-VERSION definition of LIBGUILE version. Added to
2648 libpath.h definitions for guileversion and libguileversion which
2649 both get their values from GUILE-VERSION definition.
2650
7272f6d8
DH
26512000-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
2652
2653 * numbers.h (SCM_BIGP): Don't use SCM_SMOB_PREDICATE in header
2654 file: Code using numbers should not be required to include
2655 smob.h.
2656
b2728432
DH
26572000-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
2658
2659 * coop-threads.c.cygnus, coop-threads.h.cygnus, fsu-pthreads.h,
2660 mit-pthreads.c, mit-pthreads.h: Deleted.
2661
2662 * Makefile.am (EXTRA_DIST), scmsigs.c, threads.[ch]: Drop
2663 references to deleted files and fsu/mit thread support in
2664 general.
2665
f8eaf8b9
DH
26662000-05-29 Dirk Herrmann <D.Herrmann@tu-bs.de>
2667
2668 * hooks.c (symbol_name, scm_create_hook): Restored the original
2669 behaviour of scm_create_hook. Changing it was bad as Carl
2670 R. Witty has pointed out.
2671
2672 * gc.c (scm_init_gc): We can still rely on scm_create_hook to
2673 protect the object.
2674
e11f8b42
DH
26752000-05-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
2676
2677 * gc.c (scm_init_gc): Protect scm_after_gc_hook, since this will
2678 soon not be done by scm_create_hook any longer.
2679
2680 * hooks.c (make_hook, print_hook, scm_create_hook,
2681 scm_make_hook_with_name, scm_make_hook), hooks.h (SCM_HOOK_NAME,
2682 SCM_HOOK_PROCEDURES, SCM_SET_HOOK_PROCEDURES,
2683 scm_make_hook_with_name), init.c (scm_boot_guile_1): Hooks no
2684 longer have names. As an intermediate solution, the name
2685 predicate is emulated via object properties, but use of this
2686 feature is deprecated.
2687
2688 * hooks.h (scm_free_hook): Removed, as it is never defined.
2689
47457e8a
DH
26902000-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
2691
894a712b
DH
2692 * numbers.[ch] (SCM_POSFIXABLE, SCM_NEGFIXABLE, SCM_FIXABLE):
2693 Un-deprecated since otherwise user code can't determine whether a
2694 number fits into an inum any longer. The names should be changed
2695 some time, though.
2696
2697 * numbers.c (scm_big2inum): Eliminated use of SCM_UNEGFIXABLE.
2698
2699 * tags.h (SCM_UNPACK_CAR): Deprecated.
2700
27012000-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
2702
2703 * filesys.h (SCM_OPDIRP), fluids.h (SCM_FLUIDP, SCM_FLUID_NUM),
47457e8a
DH
2704 fports.h (SCM_OPFPORTP, SCM_OPINFPORTP, SCM_OPOUTFPORTP), hooks.h
2705 (SCM_HOOK_ARITY), keywords.h (SCM_KEYWORDP, SCM_KEYWORDSYM),
83238bc1 2706 numbers.h (SCM_NUMP, SCM_BIGSIGN, SCM_BDIGITS, SCM_NUMDIGS):
47457e8a
DH
2707 Replace SCM_UNPACK_CAR appropriately. Don't access cells via
2708 SCM_{SET}?C[AD]R unless they are known to be cons cells.
2709
2710 * gc.c (scm_heap_seg_data_t, scm_mark_locations, scm_cellp,
2711 init_heap_seg): Remove unused struct member variable 'valid'.
2712
f9a64404
DH
27132000-05-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
2714
2715 * fports.c (fport_write), ports.c (scm_markstream, scm_port_mode,
2716 scm_print_port_mode), ports.h (SCM_OPPORTP, SCM_OPINPORTP,
2717 SCM_OPOUTPORTP, SCM_INPUT_PORT_P, SCM_OUTPUT_PORT_P, SCM_OPENP),
2718 procs.h (SCM_CLOSCAR), unif.h (SCM_ARRAY_NDIM, SCM_ARRAY_CONTP),
2719 variable.h (SCM_VARIABLEP): Replace SCM_UNPACK_CAR
2720 appropriately.
2721
206d3de3
DH
27222000-05-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
2723
2724 * gc.c (free_list_length), hash.c (scm_hasher), macros.c
2725 (scm_macro_type), objects.c (scm_class_of), options.c
2726 (scm_options), print.c (scm_iprin1), strports.c (st_seek), throw.c
2727 (SCM_LAZY_CATCH_P): Replace SCM_UNPACK_CAR appropriately.
2728
445f675c
DH
27292000-05-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
2730
2731 * eval.c (scm_macroexp, SCM_CEVAL, scm_force), tags.h: Replace
2732 SCM_UNPACK_CAR with SCM_CELL_TYPE or SCM_CELL_WORD_0.
2733
2734 * eval.c (scm_force): Add documentation.
2735
2736 * eval.c (scm_force, scm_cons_source): Don't access cells via
2737 SCM_{SET}?C[AD]R unless they are known to be cons cells.
2738
6ba93e5e
DH
27392000-05-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
2740
2741 * strings.h (SCM_NSTRINGP, SCM_NRWSTRINGP), tags.h
2742 (SCM_NDOUBLE_CELLP), vectors.h (SCM_NVECTORP): Deprecated.
2743
2744 * gc.c (scm_igc), gc.h (SCM_PTR_MASK, SCM_PTR_LT): Removed #ifdef
2745 nosve #endif conditionally compiled code.
2746
fe517a7d
ML
27472000-05-23 Michael Livshin <mlivshin@bigfoot.com>
2748
2749 * gc.c (scm_heap_seg_data_t): fixed comment for the `span' member.
2750
a564e775
ML
27512000-05-22 Michael Livshin <mlivshin@bigfoot.com>
2752
2753 * guile-doc-snarf.in: put the preprocessed file through sed to
cf00e803
ML
2754 trim all lines to 1024 chars. I hope it doesn't break anybody's
2755 sed. we'll see. (note: this is lossy trimming, i.e. the spill
2756 isn't wrapped around but actually chopped off. this seemed to me
2757 safe because the current snarfer doesn't understand multi-line
2758 cookies anyway. in the long term, it would be nice not to depend
2759 on AWK for anything.)
a564e775 2760
83238bc1 2761 * gc.h (SCM_[SET_]CELL_{WORD,OBJECT}, SCM_VALIDATE_CELL): reverted
a564e775
ML
2762 the previous change to this macros, after deciding to torture the
2763 snarfer instead.
2764
686765af
ML
27652000-05-21 Michael Livshin <mlivshin@bigfoot.com>
2766
2767 * gc.h (SCM_[SET_]CELL_{WORD,OBJECT}, SCM_VALIDATE_CELL): brought
cebd4392
ML
2768 the yucky, ugly and nasty conditional compilation back. sorry,
2769 but it was either that or requiring GAWK to build Guile.
2770 (lots of places): removed the code that implemented the old GC
2771 scheme.
686765af
ML
2772
2773 * init.c (scm_boot_guile_1): removed the code conditioned on
2774 !GUILE_NEW_GC_SCHEME.
2775
2776 * __scm.h: (GUILE_NEW_GC_SCHEME): removed.
2777
2778 * gc.c (scm_protect_object, scm_unprotect_object): change the
2779 implementation to more efficient (at least in the time complexity
2780 sense). the calls should now also be thread-safe -- I suspect
2781 that people expect them to be. (thanks to Han-Wen Nienhuys)
cebd4392
ML
2782 (lots of places): removed the code that implemented the old GC
2783 scheme.
686765af
ML
2784
2785 * hashtab.c (scm_hash_fn_create_handle_x): add missing
cebd4392
ML
2786 SCM_REALLOW_INTS before return. I really wonder about the
2787 possible interactions between hashtables, threads & GC. it
83238bc1 2788 doesn't look healthy at all.
686765af 2789
44e47754
DH
27902000-05-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
2791
2792 * unif.c (scm_bit_count): Fixed the parameter checks. Thanks to
2793 Dale P. Smith.
2794
46d53380
DH
27952000-05-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
2796
2797 * __scm.h (SCM_DEBUG_CELL_ACCESSES), gc.h (SCM_): Added as a new
2798 debug option to verify all accesses to cells actually access
2799 objects on the heap.
2800
2801 * gc.h (SCM_VALIDATE_CELL): Added. Only performs validation if
2802 SCM_DEBUG_CELL_ACCESSES is set to 1.
2803
2804 (SCM_CELL_WORD, SCM_CELL_OBJECT, SCM_SET_CELL_WORD,
2805 SCM_SET_CELL_OBJECT): Use SCM_VALIDATE_CELL to check every cell
2806 that is accessed.
2807
1a548472
DH
28082000-05-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
2809
2810 * gh_data.c (gh_scm2chars, gh_scm2shorts, gh_scm2longs,
2811 gh_scm2floats, gh_scm2doubles): Change !SCM_NIMP to SCM_IMP.
2812
2813 * gc.c (scm_cellp): Fixed and simplified.
2814
2815 * throw.c (JBJMPBUF, SETJBJMPBUF, SCM_JBDFRAME, SCM_SETJBDFRAME,
2816 make_jmpbuf, scm_init_throw): Now using double cells to represent
2817 jump buffers when using debug extensions.
2818
2819 (freejb): Removed.
2820
bcee10dd
DH
28212000-05-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
2822
2823 * gh.h gh_data.c gh_funcs.c (gh_new_procedure*, gh_chars2byvect,
2824 gh_shorts2svect, gh_longs2ivect, gh_ulongs2uvect, gh_floats2fvect,
2825 gh_doubles2dvect, gh_doubles2scm, gh_define, gh_lookup,
2826 gh_module_lookup): Accept const pointers as parameters.
2827
2828 * gh.h gh_data.c (gh_int2scmb): Deprecated.
2829
28302000-05-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
af45e3b0
DH
2831
2832 * __scm.h (SCM_DEBUG_REST_ARGUMENT): Renamed from
2833 SCM_DEBUG_REST_ARGUMENTS in order to clarify that we don't test
2834 the actual arguments in the list, but rather the rest argument as
2835 a list of arguments.
2836
2837 * validate.h (SCM_VALIDATE_REST_ARGUMENT): Added.
2838
2839 * async.c (scm_noop), eval.c (scm_map, scm_for_each), list.c
2840 (scm_list_star, scm_append, scm_append_x), ports.c
2841 (scm_close_all_ports_except), ramap.c (scm_array_map_x,
2842 scm_array_for_each), regex-posix.c (scm_make_regexp), stacks.c
2843 (scm_make_stack), strings.c (scm_string_append), struct.c
2844 (scm_make_struct, scm_make_vtable_vtable): Validate rest arguments.
2845
2846 * dynl.c (DYNL_GLOBAL, sysdep_dynl_link, kw_global, sym_global,
2847 scm_dynamic_link, scm_init_dynamic_linking), dynl.h
2848 (scm_dynamic_link): Removed possibility to pass flags to
2849 scm_dynamic_link, as it had no effect anyway.
2850
2851 * filesys.c (scm_fcntl): Made single optional rest argument into
2852 a standard optional argument.
2853
2854 * hooks.c (scm_run_hook): A list of rest arguments is never
2855 SCM_UNBNDP.
2856
2857 * list.c (scm_append, scm_append_x), stacks.c (scm_make_stack),
2858 strings.c (scm_string_append): Don't perform half-hearted checks
2859 to see whether the rest argument forms a proper list any more, use
2860 SCM_VALIDATE_REST_ARGUMENTS instead.
2861
2862 * ports.c (scm_close_all_ports_except): Accept empty list of rest
2863 arguments.
2864
2865 * posix.c (scm_convert_exec_args), print.c (scm_simple_format):
2866 Simplify verification of rest argument.
2867
2868 * stacks.c (scm_make_stack), stacks.h (scm_make_stack), throw.c
2869 (ss_handler, handler_message): Make first mandatory rest argument
83238bc1 2870 of scm_make_stack into a standard mandatory argument.
af45e3b0
DH
2871
2872 * unif.c (scm_transpose_array, scm_enclose_array,
2873 scm_array_in_bounds_p), unif.h (scm_transpose_array,
2874 scm_enclose_array, scm_array_in_bounds_p): Make first mandatory
2875 rest argument into a standard mandatory argument.
2876
c8a54c4b
DH
28772000-05-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
2878
2879 * __scm.h: Added SCM_DEBUG as default debug option. (Thanks to
2880 Keisuke Nishida for the suggestion.) Added debug option
2881 SCM_DEBUG_REST_ARGUMENTS.
2882
2883 * eval.c (scm_map, scm_for_each): Make sure all lists have the
2884 same length. Also, removed redundant parameter checks.
2885
56100716
DH
28862000-05-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
2887
2888 * Makefile.am: Let 'make clean' remove *.x and *.doc files.
2889
2890 * __scm.h: Improved explanation of giving options to make.
2891
2892 * __scm.h (SCM_DEBUG_TYPING_STRICTNESS), tags.h
2893 (SCM_STRICT_TYPING, SCM_DEBUG_TYPING_STRICTNESS): Renamed
2894 SCM_STRICT_TYPING to SCM_DEBUG_TYPING_STRICTNESS and moved the
2895 corresponding declaration and comment to __scm.h.
2896
2897 * _scm.h (errno), gc.h (SCM_CELLPTR, SCM_PTR_LT), numbers.c
2898 (scm_remainder, scm_modulo), numbers.h (SCM_SRS, SCM_MAKINUM,
2899 SCM_INUM): Removed conditionally compiled code for Turbo C.
2900
2901 * gdbint.c (gdb_maybe_valid_type_p): Eliminated call to scm_tag.
2902 That check can be assumed to be redundant except for very rare
2903 conditions that actually indicate broken heap data.
2904
3c9f20f8
DH
29052000-05-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
2906
2907 * numbers.c (scm_logcount, scm_integer_length): Reordered
2908 dispatch sequence.
2909
8536a982
GH
29102000-05-15 Gary Houston <ghouston@arglist.com>
2911
2912 * stime.c (scm_strftime): don't reset TZ if zone is an empty
2913 string. append a "0" to the zone for TZ.
c8a54c4b 2914
78166ad5
DH
29152000-05-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
2916
2917 * numbers.c (scm_logbit_p, scm_bit_extract): Reordered dispatch
2918 sequence.
2919
2920 (scm_bit_extract): Fixed handling of bignums.
2921
f5f2dcff
DH
29222000-05-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
2923
2924 * async.c (scm_sys_gc_async_thunk), chars.h (SCM_ICHRP, SCM_ICHR,
2925 SCM_MAKICHR), continuations.h (SCM_SETJMPBUF), error.c
2926 (scm_sysmissing), error.h (scm_sysmissing), evalext.c
2927 ('serial-map), ioext.c (scm_fseek), ioext.h (scm_fseek),
2928 keywords.c (scm_tc16_kw, scm_init_keywords), ports.h (SCM_CRDY,
2929 SCM_INPORTP, SCM_OUTPORTP), ramap.c ('serial-array-copy!,
2930 'serial-array-map!), smob.c (scm_newsmob), smob.h (scm_smobfuns,
2931 scm_newsmob), tag.c (scm_tag), tag.h (scm_tag), tags.h
2932 (scm_tc16_flo, scm_tc_flo, scm_tc_dblr, scm_tc_dblc): Wrapped
2933 deprecated code between #if (SCM_DEBUG_DEPRECATED == 0) #endif.
2934
2935 * fports.c (scm_fport_buffer_add), ports.c (scm_input_port_p,
2936 scm_output_port_p), print.c (scm_get_print_state), validate.h
2937 (SCM_VALIDATE_CHAR): Replace use of deprecated macros
2938 SCM_INPORTP, SCM_OUTPORTP, SCM_ICHRP by SCM_INPUT_PORT_P,
2939 SCM_OUTPUT_PORT_P, SCM_CHARP, respectively.
2940
07ccd85d
GH
29412000-05-14 Gary Houston <ghouston@arglist.com>
2942
32f1b9fd
GH
2943 * stime.c (scm_strftime): if HAVE_TM_ZONE is not defined, hack the
2944 TZ environment variable so that the %Z format returns the zone
2945 from the input vector instead of the system default.
2946
07ccd85d
GH
2947 from Keisuke Nishida:
2948 * fports.c (scm_setvbuf): minor docstring fix.
2949 * ports.h (scm_generic_fgets): obsolete prototype deleted.
2950
3a9809df
DH
29512000-05-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
2952
2953 * __scm.h: Added new section for debugging options.
2954
2955 (SCM_DEBUG_DEPRECATED): If 1, no deprecated code is included to
2956 help developers to get rid of references to deprecated code.
2957
2958 * numbers.[ch] (SCM_POSFIXABLE, SCM_NEGFIXABLE, SCM_UNEGFIXABLE,
2959 SCM_FIXABLE, SCM_FLOBUFLEN): These macros are no longer provided
2960 as part of the interface and are marked as deprecated in the
2961 header file.
2962
2963 * numbers.c (scm_make_real, scm_make_complex): Inlined the
2964 corresponding macros SCM_NEWREAL and SCM_NEWCOMPLEX,
2965 respectively.
2966
2967 * numbers.h (SCM_NEWREAL, SCM_NEWCOMPLEX, SCM_INEXP, SCM_CPLXP,
2968 SCM_REAL, SCM_IMAG, SCM_REALPART, scm_makdbl, SCM_SINGP,
2969 SCM_NO_BIGDIG, SCM_NUM2DBL, scm_dblproc): Deprecated.
2970
e828cb75
DH
29712000-05-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
2972
2973 * gc.h (scm_cell, SCM_CELL_WORD, SCM_CELL_OBJECT,
2974 SCM_SET_CELL_WORD, SCM_SET_CELL_OBJECT): Scheme cells now consist
2975 of two scm_bits_t values instead of two SCM values, because it is
2976 legal for cell entries to hold values that are not scheme objects.
2977
2978 (SCM_SETAND_CAR, SCM_SETAND_CDR, SCM_SETOR_CAR, SCM_SETOR_CDR):
2979 Use SCM_SETC[AD]R to modify contents of pairs.
2980
5986c47d
DH
29812000-05-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
2982
2983 * numbers.c (IS_INF, isfinite): Added FIXME comment.
2984
2985 (scm_abs, scm_magnitude): Make these two independent of each
2986 other. scm_abs now reports an error if given a complex argument.
2987
2988 (scm_istr2flo, scm_integer_p). Use SCM_REAL_VALUE instead of
2989 SCM_REALPART if the object is known to be real.
2990
2991 (scm_init_numbers): No need to use SCM_NEWREAL macro for speed
2992 here.
2993
2994 * numbers.h (SCM_SINGP): Set to 0 instead of SCM_BOOL_F.
2995
eb42e2f0
DH
29962000-05-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
2997
2998 * eq.c (scm_eqv_p): Separate handling of real and complex
2999 values. Remove #ifdef SCM_BIGDIG #endif test.
3000
3001 * eval.c (SCM_CEVAL, SCM_APPLY), gh_data.c (gh_scm2floats,
3002 gh_scm2doubles), hash.c (scm_hasher), ramap.c (scm_array_fill_int,
3003 ramap_rp, scm_array_map_x), random.c (vector_scale,
3004 vector_sum_squares), unif.c (scm_make_uve, scm_array_p,
3005 scm_array_set_x): Use SCM_REAL_VALUE instead of SCM_REALPART if
3006 the object is known to be real. Use SCM_COMPLEXP instead of
3007 deprecated SCM_CPLXP. Use SCM_INEXACTP instead of deprecated
3008 SCM_INEXP.
3009
7235ee58
DH
30102000-05-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
3011
3012 * numbers.c: No need to include unif.h.
3013
3014 (IS_INF): Returned to old test for now: x == x + 1 will not work
3015 for large numbers due to rounding errors.
3016 Thanks to Kalle Olavi Niemitalo.
3017
bb628794
DH
30182000-05-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
3019
3020 * numbers.c (scm_divbigdig): Removed outdated comment.
3021
3022 (scm_number_to_string, scm_string_to_number, scm_number_p,
3023 scm_real_p, scm_integer_p, scm_inexact_p, scm_gr_p, scm_leq_p,
3024 scm_geq_p, scm_make_rectangular, scm_make_polar,
3025 scm_inexact_to_exact): Added comments.
3026
3027 (add1, scm_init_numbers): Removed add1.
3028
98cb6e75
DH
30292000-05-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
3030
3031 * numbers.c (IS_INF): The new test is x == x + 1. The old test
3032 x == x/2 did not work for zero values. Thanks to Han-Wen Nienhuys
3033 and Ivan Toshkov.
3034
3035 (scm_number_to_string, scm_sum, scm_difference, scm_two_doubles,
3036 scm_num2long, scm_num2long_long, scm_num2ulong): Reordered
3037 dispatch sequence.
3038
c45c2b6b
MV
30392000-05-09 Marius Vollmer <mvo@zagadka.ping.de>
3040
3041 * scmsigs.c (take_signal): Execute SCM_ASYNC_TICK for SIGSEGV,
3042 SIGILL and SIGBUS signals. These signals are not continuable and
3043 must be handled for real right away.
3044
c2ff8ab0
DH
30452000-05-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
3046
3047 * numbers.c (scm_zero_p, scm_positive_p, scm_negative_p,
3048 scm_real_part, scm_imag_part, scm_magnitude,
3049 scm_inexact_to_exact): Reordered dispatch sequence.
3050
1a450153
DH
30512000-05-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
3052
3053 * feature.c: No need to include "libguile/smob.h"
3054
3055 (scm_loc_features, features, scm_add_feature, scm_init_feature):
3056 Removed variable 'scm_loc_features' as a pointer to the SCM value
3057 holding the features list. Using variable 'features' instead,
3058 which holds the interned pair. Thus, SCM_SETCDR can be used
3059 instead of pointer trickery.
3060
665aeda3
DH
30612000-05-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
3062
3063 * alist.c (scm_acons): Use SCM{_SET}?_CELL_OBJECT as long as a
3064 cell is not known to be a valid pair.
3065
ab66ae47
DH
30662000-05-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
3067
3068 * eval.c (ASRTSYNTAX, scm_m_body, scm_m_letrec1): Removed
3069 ASRTSYNTAX. Using SCM_ASSYNT instead.
3070
3071 (scm_m_body): Don't create a redundant cons cell.
3072
3073 (scm_m_do): Removed redundant test 'bodycheck'.
3074
3075 (bodycheck): Removed.
3076
3077 * stacks.c (stack_depth, read_frame, read_frames): Removed
3078 redundant calculation of size, minimized some variable scopes.
3079
4983cbe4
DH
30802000-05-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
3081
3082 * pairs.c (scm_cons, scm_cons2): Use SCM{_SET}?_CELL_OBJECT as
3083 long as a cell is not known to be a valid pair.
3084
3085 (scm_pair_p): Eliminated redundant SCM_IMP test.
3086
44d3cb0d
DH
30872000-05-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
3088
3089 * eval.c (scm_m_body, scm_macroexp, unmemocopy, scm_eval_args,
3090 scm_deval_args): Eliminated redundant SCM_IMP tests.
3091
3092 * hashtab.c (scm_ihashx, scm_sloppy_assx, scm_delx_x), weaks.c
3093 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table,
3094 scm_make_doubly_weak_hash_table): Fixed critical sections.
3095 Thanks to Keisuke Nishida.
3096
9a00c9fc
DH
30972000-05-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
3098
3099 * numbers.c (scm_logand, scm_logior, scm_logxor, scm_logtest):
3100 Fixed some goto-related initialization bugs (introduced by me).
3101
b82c6ce0
DH
31022000-05-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
3103
3104 * numbers.h (SCM_INUM0): Uses SCM_MAKINUM instead of SCM_PACK.
3105
3106 * dynl.c (dynl_obj, DYNL_OBJ, get_dynl_obj): Removed.
3107
3108 (DYNL_FILENAME, DYNL_HANDLE): Use SCM_CELL... macros instead of
3109 pointer trickery.
3110
3111 (SET_DYNL_HANDLE): Added.
3112
3113 (scm_dynamic_object_p): Simplified.
3114
3115 (scm_dynamic_unlink, scm_dynamic_func): Changed comment. Deliver
3116 better error message when accessing unlinked dynamic objects.
3117 Eliminated call to get_dynl_obj.
3118
106428b3
MV
31192000-05-03 Marius Vollmer <mvo@zagadka.ping.de>
3120
7eea5296 3121 * scmsigs.c (orig_handlers) [!HAVE_SIGACTION]: Fix declaration to
106428b3
MV
3122 be an array of function pointers instead of being a pointer to an
3123 array returning function. Thanks to Kalle Olavi Niemitalo!
3124
f4c627b3
DH
31252000-05-03 Dirk Herrmann <D.Herrmann@tu-bs.de>
3126
3127 * numbers.c (scm_divbigbig, scm_divbigint), numbers.h
3128 (scm_divbigbig, scm_divbigint): Don't return zero any more to
3129 indicate that a division has a remainder, return SCM_UNDEFINED
3130 instead. It is improbable that anyone actually used these
3131 functions outside of numbers.c. For this reason and due to the
3132 change in behaviour the functions are static now. Thus, if
3133 surprisingly there are users of these functions they will at least
3134 get alarmed.
3135
3136 * numbers.c: Removed #ifdef SCM_BIGDIG #endif in those functions,
3137 that already have a clean dispatch order. Note: SCM_BIGDIG is
3138 always defined.
3139
3140 * numbers.c (scm_inexact_p): Simplified.
3141
3142 * numbers.c (scm_num_eq_p, scm_less_p, scm_max, scm_min,
3143 scm_product, scm_num2dbl, scm_angle): Reordered dispatch
3144 sequence, thereby fixing some comparisons of SCM values with
3145 integer constants.
3146
3147 * numbers.c (scm_divide): Division by zero of inums leads to an
3148 error now. (Formerly, an infinite number was returned.)
3149
3150 Respect the fact, that scm_divbigbig does now return SCM_UNDEFINED
3151 if a division has a remainder.
3152
3a6e6616
GH
31532000-05-02 Gary Houston <ghouston@arglist.com>
3154
3155 * Makefile.am (INCLUDES): add ${INCLTDL} (thanks to Tim Mooney).
3156
f8de44c1
DH
31572000-05-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
3158
3159 * numbers.c (scm_logtest, scm_division): Reordered dispatch
3160 sequence, thereby fixing some comparisons of SCM values with
3161 integer constants.
3162
3163 * numbers.h (scm_makdbl): Mark as deprecated at the point of
3164 declaration.
3165
3166 * eval.c (SCM_CEVAL, SCM_APPLY), gh_data.c (gh_double2scm,
3167 gh_doubles2scm), numbers.c (scm_istr2flo, scm_max, scm_min,
3168 scm_sum, scm_difference, scm_product, scm_divide, scm_sys_expt,
3169 scm_sys_atan2, scm_make_rectangular, scm_make_polar,
3170 scm_real_part, scm_imag_part, scm_magnitude, scm_angle,
3171 scm_long2num, scm_long_long2num, scm_ulong2num), ramap.c
3172 (ramap_rp, scm_array_map_x), random.c (scm_random,
3173 scm_random_uniform, scm_random_normal_vector_x, scm_random_exp),
3174 struct.c (scm_struct_ref), unif.c (scm_array_to_list): Replace
3175 call to scm_makdbl with a call to scm_make_real or
3176 scm_make_complex, depending on whether the imaginary part is known
3177 to be zero.
3178
7f5fa419
GH
31792000-05-01 Gary Houston <ghouston@arglist.com>
3180
0607c109
GH
3181 * scmsigs.c: fix the definition of orig_handlers for the case
3182 that HAVE_SIGACTION is not defined (thanks to
3183 Kalle Olavi Niemitalo).
3184
7f5fa419
GH
3185 * Makefile.am: remove include_HEADERS (was libguile.h)
3186 libguile.h: moved to top level directory.
3187
09fb7599
DH
31882000-04-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
3189
3190 * numbers.c (SCM_SWAP): Moved to the top of the file to allow for
3191 a wider use.
3192
3193 * numbers.c (scm_modulo, scm_gcd, scm_lcm, scm_logand, scm_logior,
3194 scm_logxor): Reordered dispatch sequence, thereby fixing some
3195 comparisons of SCM values with integer constants.
3196
3197 * number.c (scm_logtest): Removed some redundant SCM_{N}?IMP
83238bc1 3198 tests.
09fb7599 3199
89a7e495
DH
32002000-04-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
3201
3202 * numbers.c (scm_quotient, scm_remainder): Removed code that was
3203 conditionally compiled based on BADIVSGNS. BADIVSGNS does not
3204 occur anywhere else throughout guile.
3205
3206 * numbers.c (scm_quotient): Fixed parameter number in error
3207 message.
3208
3209 * numbers.c (scm_remainder): Reordered dispatch sequence.
3210
a4fbabb3
GH
32112000-04-25 Gary Houston <ghouston@arglist.com>
3212
3213 * posix.c (scm_execlp): docstring fix (thanks to Martin
3214 Grabmueller).
3215
09e4d064
DH
32162000-04-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
3217
3218 * eval.c (undef_object): Made into a local static variable
3219 (suggested by Jost Boekemeier).
3220
e59bb516
DH
32212000-04-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
3222
3223 * pairs.c (cxrs, scm_init_pairs): Simplify initialization of
3224 c[ad]+r functions.
3225
3226 * procs.c (scm_init_iprocs), procs.h (scm_subr, scm_iproc,
3227 scm_dsubr, scm_init_iprocs): Removed.
3228
3229 * procs.h (SCM_SUBRF, SCM_DSUBRF): Access the cell words
3230 directly instead of casting a cell to a C struct.
3231
820920e6
MD
32322000-04-22 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
3233
3234 Better modularization of GC extensions through new C level GC
3235 hooks:
83238bc1 3236
820920e6
MD
3237 * weaks.c (scm_weaks_prehistory): New function: Add
3238 scm_weak_vector_gc_init to scm_before_mark_c_hook; Add
3239 scm_mark_weak_vector_spines to scm_before_sweep_c_hook.
3240 (scm_scan_weak_vectors): New function; added to
3241 scm_after_sweep_c_hook.
3242
3243 * weaks.h (scm_weak_vectors, scm_weaks_prehistory): Added
3244 declarations.
3245
3246 * guardians.h (scm_guardian_gc_init, scm_guardian_zombify): Are
3247 now static.
3248
3249 * guardians.c (scm_guardian_gc_init): Turned into a hook function
3250 and added to scm_before_mark_c_hook.
3251 (scm_guardian_zombify): Turned into a hook function and added to
3252 scm_before_sweep_c_hook.
3253
3254 * async.c (scm_sys_gc_async_thunk): Run after-gc-hook.
3255 Added #include "libguile/gc.h".
3256
3257 * gc.h: Added #include "libguile/hooks.h".
3258
3259 * gc.c: Removed #include "libguile/guardians.h".
3260 (scm_before_gc_c_hook, scm_before_mark_c_hook,
3261 scm_before_sweep_c_hook, scm_after_sweep_c_hook,
3262 scm_after_gc_c_hook): New C level hooks.
3263 (scm_after_gc_hook): New Scheme level hook.
3264 (scm_gc_sweep): Moved scanning of weak vectors to weaks.c.
3265 (scm_igc): Moved initialization of scm_weak_vectors and the call
3266 to scm_guardian_gc_init to respective module.
3267 (scm_mark_weak_vector_spines): Moved to weaks.c;
3268 Call to scm_guardian_zombify moved to guardians.c;
3269 Run scm_before_gc_c_hook, scm_before_sweep_c_hook,
3270 scm_after_gc_c_hook at appropriate places.
3271 (scm_init_gc): Initialize scm_after_gc_hook.
3272
3273 * hooks.c, hooks.h (scm_make_hook_with_name): Removed deprecated
3274 function.
3275
3276 * init.c (scm_boot_guile_1): Added `scm_init_hooks'.
3277
3278 * Makefile.am: Added hooks.c, hooks.h, hooks.x.
3279
3280 * feature.c, feature.h: Broke out hook code into separate files.
3281
3282 * hooks.c, hooks.h: New files.
9764c29b 3283
a0599745
MD
3284 * *.*: Change includes so that they always use the "prefixes"
3285 libguile/, qt/, guile-readline/, or libltdl/.
3286 (Thanks to Tim Mooney.)
3287
3288 * Makefile.am (INCLUDES): Removed THREAD_CPPFLAGS and INCLTDL.
3289 (DEFS): Added. automake adds -I options to DEFS, and we don't
3290 want that.
3291 Removed all -I options except for the root source directory and
3292 the root build directory.
3293
f4b0c568
MD
3294 * numbers.c (scm_odd_p, scm_even_p): Use SCM_WRONG_TYPE_ARG
3295 instead of SCM_ASSERT (0, ...). (Some compilers will complain
3296 about control reaching end of function otherwise, and, besides,
3297 the new code is not less clear.)
3298
9764c29b 3299 * gc.c (scm_must_malloc, scm_must_realloc, scm_must_free): Added
83238bc1 3300 calls to malloc debugging functions.
9764c29b
MD
3301
3302 * init.c (scm_boot_guile_1): Added calls to debug-malloc init
3303 functions.
3304
3305 * Makefile.am: Added debug-malloc.c, debug-malloc.h,
3306 debug-malloc.x.
3307
3308 * debug-malloc.c, debug-malloc.h: New files.
3309
4219f20d
DH
33102000-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
3311
3312 * numbers.c (scm_exact_p, scm_odd_p, scm_even_p): Added
3313 documentation strings.
3314
3315 * numbers.c (scm_exact_p, scm_odd_p, scm_even_p, scm_abs,
3316 scm_quotient): Reordered dispatch sequence to first handle
3317 immediates, second handle bignums and finally handle generic
3318 functions respectively signal wrong type arguments. Hopefully
3319 this will allow for easier separation when goops is integrated.
3320
195e6201
DH
33212000-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
3322
3323 * gc.c (which_seg): Use SCM2PTR to convert a non immediate SCM
3324 variable into a pointer to a heap cell.
3325
3326 * gc.c (scm_mark_locations, scm_cellp, init_heap_seg,
3327 scm_unhash_name): Remove redundant cast to SCM_CELLPTR.
3328
9e882eec
DH
33292000-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
3330
3331 * print.c (scm_iprin1): Don't assign zero to SCM values, use
3332 SCM_UNDEFINED instead.
3333
3334 * weaks.c (scm_make_weak_vector): Fix assignment of zero to a
3335 vector element. (Still to be improved)
3336
3201d763
DH
33372000-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
3338
3339 * eval.c (undef_cell): Removed, replaced by:
3340
3341 (undef_object): Added to replace undef_cell.
3342
3343 (scm_lookupcar, scm_lookupcar1): Use undef_object.
3344
3345 * eval.c (scm_lookupcar, scm_lookupcar1, scm_m_atfop,
3346 scm_m_atbind, CHECK_EQVISH, SCM_CEVAL), procs.h (SCM_SETCODE):
3347 Don't perform arithmetic operations with SCM values.
3348
3349 * eval.c (scm_lookupcar, scm_lookupcar1, scm_m_atfop,
3350 scm_m_atbind, scm_eval_args, scm_deval_args, SCM_CEVAL): Use
3351 symbolic names for the tc3 type codes.
3352
3353 * eval.c (scm_m_define, SCM_CEVAL, SCM_APPLY): Remove redundant
3354 cast to SCM.
3355
3356 * eval.c (scm_eval_args, scm_deval_args, SCM_CEVAL): Made the
3357 access of the struct vcell element explicit.
3358
f7c38587
MD
33592000-04-19 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
3360
3361 * struct.c (scm_struct_free_light, scm_struct_free_standard,
3362 scm_struct_free_entity): Use `scm_must_free' instead of `free'.
3363
3364 * procs.c (scm_make_subr_opt): Tell scm_must_realloc that we're
3365 realloc:ing scm_subr_table ("what" instead of "who").
3366
3367 * numbers.c (scm_adjbig): Ditto.
3368
e8293eb6
GB
3369Tue Apr 18 08:22:41 2000 Greg J. Badros <gjb@cs.washington.edu>
3370
83238bc1
ML
3371 * validate.h: Do not cast to (unsigned) in SCM_VALIDATE_INUM_RANGE
3372 when testing high-end of the range. Mikael Djurfeldt noticed this
e8293eb6
GB
3373 anomaly -- thanks Mikael!
3374
baa702c8
DH
33752000-04-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
3376
3377 * unif.c (l2ra): Don't eliminate the call to scm_array_set_x
3378 itself, as was done in the previous 'patch'. (Thanks to Radey
3379 Shouman)
3380
fee7ef83
DH
33812000-04-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
3382
3383 * options.c (scm_options), read.c (recsexpr): Remove redundant
3384 SCM_IMP test.
3385
3386 * print.c (scm_iprin1): Made the access of the struct vcell
3387 element explicit.
3388
3389 * print.h (SCM_PRINT_CLOSURE): Added call to SCM_PACK.
3390
3391 * ramap.c (scm_ra_eqp, ra_compare), unif.c
3392 (scm_uniform_vector_ref, scm_cvref, rapr1): Separated accesses to
3393 unsigned long and signed long arrays and clarified the way the
3394 access is performed.
3395
3396 * ramap.c (scm_array_map_x, raeql), read.c (scm_lreadr), stacks.c
3397 (narrow_stack), unif.c (scm_cvref, scm_uniform_array_read_x,
3398 scm_raprin1): Use SCM_EQ_P to compare SCM values.
3399
3400 * strings.c (scm_makstr): Treat the msymbol slots as a field of
3401 scm_bits_t values.
3402
3403 * struct.h (SCM_SET_VTABLE_DESTRUCTOR): Treat the struct data as
3404 a field of scm_bits_t values.
3405
3406 * unif.c (l2ra): Don't test result of scm_array_set_x against
3407 zero: It is always SCM_UNSPECIFIED.
3408
9d0633a8
MD
34092000-04-18 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3410
3411 * script.c (scm_compile_shell_switches): Also enable
3412 record-positions when given the --debug option. (Thanks to Diego
3413 Dainese.)
3414
230d095f
DH
34152000-04-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
3416
3417 * print.c (ENTER_NESTED_DATA, print_circref, scm_iprlist):
3418 Compare SCM's with SCM_EQ_P.
3419
3420 * print.c (scm_make_print_state), srcprop.c
3421 (scm_source_properties): Use valid scheme object to initialize
3422 SCM variable.
3423
3424 * print.c (scm_iprin1): Remove redundant calls to SCM_UNPACK.
3425
c8045e8d
DH
34262000-04-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
3427
3428 * struct.c (scm_alloc_struct, scm_struct_free_0,
3429 scm_struct_free_light, scm_struct_free_standard,
3430 scm_struct_free_entity, scm_make_struct, scm_make_vtable_vtable),
3431 struct.h (scm_struct_free_t, scm_alloc_struct, scm_struct_free_0,
3432 scm_struct_free_light, scm_struct_free_standard,
3433 scm_struct_free_entity): Struct data regions (and thus also
3434 vtable data regions) are now C arrays of scm_bits_t elements.
3435
3436 * gc.c (scm_gc_mark, scm_gc_sweep, scm_unhash_name): Made the
3437 mixup of glocs and structs explicit.
3438
3439 * gc.c (scm_unprotect_object): Compare SCM's with SCM_EQ_P.
3440
b0c54567
DH
34412000-04-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
3442
3443 * eval.c (scm_unmemocar): Use macros to test for gloc cell.
3444 Minimize scope of variable 'ir'.
3445
3446 * eval.h (SCM_IFRAME, SCM_IDIST), weaks.h (SCM_IS_WHVEC_ANY):
3447 Added missing call to SCM_UNPACK.
3448
b9c90f11
MD
34492000-04-17 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
3450
7aac9824 3451 * validate.h (SCM_VALIDATE_INUM_RANGE_COPY,
2891588b 3452 SCM_VALIDATE_NUMBER_COPY): New macros.
b9c90f11 3453
9ae58e2d
MD
34542000-04-16 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3455
3456 * script.c (scm_compile_shell_switches): Added --debug option.
3457
49e12eb3
MD
34582000-04-16 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
3459
3460 * vectors.c (scm_vector_set_x): Return SCM_UNSPECIFIED (as
3461 specified by R5RS).
3462
7c1e0b12
MD
34632000-04-15 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
3464
3465 * ports.h (SCM_INPUT_PORT_P, SCM_OUTPUT_PORT_P): New macros.
3466 (SCM_INPORTP, SCM_OUTPORTP): Marked as deprecated.
3467
3468 * validate.h (SCM_VALIDATE_INPUT_PORT, SCM_VALIDATE_OUTPUT_PORT):
3469 New macros.
3470 Cleanup of code layout.
3471
3472 * ports.c, ports.h (close-input-port, close-output-port): New R5RS
3473 procedures.
3474
01c8a3dd
DH
34752000-04-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
3476
3477 * continuations.c (scm_make_cont, scm_dynthrow): Completely
3478 separated implementations for defined (CHEAP_CONTINUATIONS) and
3479 !defined (CHEAP_CONTINUATIONS). Also, now using memcpy for stack
3480 copying.
3481
3482 * continuations.c (grow_stack): Renamed from grow_throw.
3483
3484 * continuations.c (copy_stack_and_call): New static function.
3485
3486 * continuations.c (scm_dynthrow): Simplified and made static.
3487
3488 * continuations.h (scm_dynthrow): Made static.
3489
553f4414
MD
34902000-04-13 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
3491
3492 * unif.c, unif.h (shared-array-root, shared-array-offset,
3493 shared-array-increments): New primitives.
3494
cf551a2b
DH
34952000-04-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
3496
3497 * gc.c (scm_gc_sweep): Simplify the computation of freed memory
3498 size for msymbols.
3499
3500 * symbols.h (SCM_SLOTS, SCM_SYMBOL_FUNC, SCM_SYMBOL_PROPS,
3501 SCM_SYMBOL_HASH): The msymbol slots are now a field of scm_bits_t
3502 values.
3503
3504 * symbols.h (SCM_SET_SYMBOL_FUNC, SCM_SET_SYMBOL_PROPS): New
3505 macros.
3506
3507 symbols.c (scm_intern_obarray_soft, msymbolize, scm_symbol_fset_x,
3508 scm_symbol_pset_x): Use them.
3509
83238bc1 3510 * symbols.c (scm_symbol_hash): Unpack to access SCM raw data.
cf551a2b 3511
12a8b769
DH
35122000-04-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
3513
3514 * ports.c (scm_port_print): The port data is read as raw data.
3515
3516 * ports.h (SCM_TC2PTOBNUM, SCM_PTOBNUM): Fix SCM/scm_bits_t
3517 mismatch.
3518
d8c40b9f
DH
35192000-04-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
3520
3521 * eval.c (SCM_CEVAL), objects.c (scm_mcache_lookup_cmethod,
3522 scm_make_subclass_object), objects.h (SCM_CLASS_FLAGS,
3523 SCM_ENTITY_PROCEDURE, SCM_ENTITY_SETTER), struct.c
3524 (scm_struct_init, scm_struct_vtable_p, scm_make_struct,
3525 scm_struct_ref, scm_struct_set_x), struct.h (SCM_STRUCT_DATA):
3526 The struct data is now an array of scm_bits_t variables.
3527
3528 * objects.h (SCM_SET_ENTITY_PROCEDURE): New macro.
3529
cf551a2b 3530 objects.c (scm_set_object_procedure_x): Use it.
d8c40b9f
DH
3531
3532 * struct.c (scm_struct_init): Unused variable 'data' removed.
3533
3534 (scm_struct_vtable_p): Redundant SCM_IMP tests removed.
3535
1c3e63f0
DH
35362000-04-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
3537
3538 * objects.h (SCM_OBJ_CLASS_FLAGS, SCM_OBJ_CLASS_REDEF), struct.h
3539 (SCM_STRUCT_VTABLE_DATA, SCM_STRUCT_LAYOUT, SCM_STRUCT_VTABLE,
3540 SCM_STRUCT_PRINTER): The struct vtable data is now an array of
3541 scm_bits_t variables.
3542
3543 * struct.h (SCM_SET_STRUCT_LAYOUT): New macro.
3544
cf551a2b 3545 struct.c (scm_make_vtable_vtable): Use it.
1c3e63f0 3546
bc66755e
DH
35472000-04-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
3548
3549 * symbols.c (scm_sym2vcell, scm_sym2ovcell_soft, scm_sym2ovcell,
3550 scm_intern_obarray_soft, scm_sysintern0,
3551 scm_string_to_obarray_symbol, scm_intern_symbol,
3552 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned_p,
3553 scm_symbol_bound_p, scm_symbol_set_x): Don't use C operators to
3554 compare SCM values.
3555
828865c3
DH
35562000-04-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
3557
3558 * numbers.c (scm_quotient, scm_modulo): Reordered to handle the
3559 case of immediate numbers parameters first. Also, only use
3560 decoded numbers for numerical comparison.
83238bc1 3561
1cf49a85
MD
35622000-04-10 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
3563
3564 * objects.h: Don't redeclare scm_call_generic_0 and
3565 scm_apply_generic. (Thanks to Tal Tversky.)
3566
dba97178
DH
35672000-04-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
3568
3569 * hash.c (scm_hasher): Use symbolic names for the tc3 constants.
3570 Unpack SCM value to use it as a switch parameter. Don't cast SCM
3571 values to int values.
3572
3da01fa3
MD
35732000-04-10 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3574
3575 * coop.c (mother): Handled EINTR (the wait has been interrupted by
3576 a signal).
3577
451e591c
DH
35782000-04-07 Dirk Herrmann <D.Herrmann@tu-bs.de>
3579
3580 * __scm.h (SCM_WTA_DISPATCH_[012n]): To test whether a SCM value
3581 contains a raw zero value it has to be unpacked.
3582
3583 * debug.c (with_traps_inner, scm_with_traps): Passing SCM values
3584 via void * requires unpacking / packing.
3585
3586 * stacks.h (SCM_STACKP): Remove unnecessary SCM_NIMP test and use
3587 SCM_EQ_P to compare SCM values.
3588
3589 * stacks.h (SCM_FRAME_VOID_P, SCM_FRAME_REAL_P, SCM_FRAME_PROC_P,
3590 SCM_FRAME_EVAL_ARGS_P, SCM_FRAME_OVERFLOW_P): Remove unnecessary
3591 call to SCM_UNPACK.
3592
3593 * tags.h (SCM_NECONSP): Define in terms of SCM_ECONSP
3594
3595 * tags.h (SCM_ECONSP): Clarify the test for glocs. This is still
3596 quite ugly.
3597
e94e3f21
ML
35982000-04-05 Michael Livshin <mlivshin@bigfoot.com>
3599
3600 * async.[ch]: unexpose low-level async access macros (thanks to
3601 Dirk Herrmann).
3602
3603 * validate.h: move async validation macros to async.c (nobody else
3604 needs them anyway), and rename them.
3605
843e4e9d
ML
36062000-04-04 Michael Livshin <mlivshin@bigfoot.com>
3607
3608 * async.h: kill the scm_async_t struct. having a heap cell
3609 pretending to be a C struct is not helthy, and is not needed here
3610 anyway, as asyncs happily fit in one heap cell.
3611
3612 * async.c: reflect the fact that asyncs are now represented by
3613 single heap cell each.
3614
873c35ee
GH
36152000-04-04 Gary Houston <ghouston@arglist.com>
3616
3617 * error.c (scm_syserror): save errno before doing anything else,
3618 since it's used in two expressions and may get mutated (thanks to
3619 Dirk Herrmann).
3620
4260a7fc
DH
36212000-04-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
3622
3623 * debug.c (scm_procedure_source, scm_procedure_environment),
3624 gsubr.c (scm_make_gsubr_with_generic, scm_gsubr_apply), procs.c
3625 (scm_procedure, scm_setter): Return valid scheme value as dummy.
3626
3627 * filesys.c (scm_readdir, scm_rewinddir, scm_closedir,
3628 scm_dir_print, scm_dir_free), numbers.h (SCM_COMPLEX_REAL,
3629 SCM_COMPLEX_IMAG), regex-posix.h (SCM_RGX), throw.c (JBJMPBUF,
3630 SETJBJMPBUF, JBJMPBUF, SETJBJMPBUF, freejb, print_lazy_catch,
3631 scm_ithrow), unif.c (scm_uniform_vector_ref, scm_cvref,
3632 scm_array_set_x, rapr1), unif.h (SCM_ARRAY_V, SCM_ARRAY_BASE),
3633 vectors.h (SCM_VELTS, SCM_VELTS_AS_STACKITEMS, SCM_SETVELTS): Use
3634 SCM_{SET_}?CELL_WORD* to access cell entries with raw data.
3635
3636 * filesys.c (scm_closedir), numbers.c (scm_addbig), numbers.h
3637 (SCM_SETNUMDIGS), throw.c (JBACTIVE, SCM_JBDFRAME,
3638 SCM_SETJBDFRAME): Read and modify data bits in cell entry #0 using
3639 SCM_{SET_}?CELL_WORD_0.
3640
3641 * filesys.c (fill_select_type, retrieve_select_type, scm_select),
3642 numbers.c (scm_gcd, scm_lcm, scm_integer_expt, scm_zero_p,
3643 scm_product, scm_divide), posix.c (scm_getgrgid), ramap.c
3644 (scm_array_fill_int, racp), throw.c (scm_catch, scm_lazy_catch,
3645 scm_ithrow), unif.c (scm_make_uve, scm_array_p,
3646 scm_transpose_array, scm_array_set_x, scm_bit_set_star_x,
3647 scm_bit_count_star, l2ra), variable.c (prin_var,
3648 scm_make_variable, scm_make_undefined_variable,
3649 scm_builtin_variable), vectors.c (scm_vector_set_length_x),
3650 vports.c (sf_flush, sf_close): Don't use C operators to compare
3651 SCM values.
3652
3653 * numbers.c (scm_odd_p, scm_even_p), variable.c (prin_var): Must
3654 unpack SCM values to access their raw contents.
3655
3656 * numbers.c (big2str): Eliminate unnecessary casts to SCM.
3657
3658 * numbers.h (SCM_NEWREAL), regex-posix.h (SCM_RGXP), vports.c
3659 (scm_make_soft_port): Use SCM_{SET_}?CELL_TYPE to access the cell
3660 type information.
3661
3662 * throw.c (printjb): Eliminated unnecessary unpack.
3663
3664 * variable.c (make_vcell_variable): Smob data is of type
3665 scm_bits_t.
3666
5b15c3b4
MD
36672000-04-04 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3668
3669 * print.c: Removed promise to rewrite printer code before next
3670 release. :)
3671
395c8567
MD
36722000-04-03 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
3673
3674 * iselect.c (add_fd_sets): Insert empty statement after label.
3675 (Thanks to Tim Mooney.)
3676
50fecba9
ML
36772000-04-03 Michael Livshin <mlivshin@bigfoot.com>
3678
3679 * guardians.c (scm_guardian_zombify): mark all zombies in a
3680 separate loop after processing all the currently known live
3681 guardians, so as to not introduce order dependencies (thanks to
f6e2fd8b 3682 Gary Houston). note that the order problems are still there if
843e4e9d 3683 some guardians are themselves zombies, but that's a sick case that
f6e2fd8b
ML
3684 I'm not going to worry about.
3685 also, make another outer loop to process zombified
50fecba9
ML
3686 guardians (which are uncovered while marking zombies).
3687
54778cd3
DH
36882000-04-03 Dirk Herrmann <D.Herrmann@tu-bs.de>
3689
3690 * evalext.c (scm_definedp, scm_m_undefine), gc.c
3691 (scm_mark_weak_vector_spines, scm_gc_sweep), hashtab.c
3692 (scm_hashq_ref, scm_hashv_ref, scm_hash_ref, scm_hashx_ref),
3693 keywords.c (scm_make_keyword_from_dash_symbol), lang.c
3694 (scm_nil_eq), lang.h (SCM_NILP, SCM_NIL2EOL), load.c
3695 (scm_primitive_load), modules.c (scm_module_full_name), objects.c
3696 (scm_class_of, scm_mcache_lookup_cmethod, scm_make_class_object),
3697 ports.c (scm_close_all_ports_except), ports.h (SCM_EOF_OBJECT_P),
3698 print.c (scm_iprin1, scm_prin1, scm_iprlist, scm_simple_format),
3699 print.h (SCM_PRINT_STATE_P), procprop.c (scm_i_procedure_arity,
3700 scm_stand_in_scm_proc, scm_procedure_property,
3701 scm_set_procedure_property_x), procs.c
3702 (scm_procedure_documentation), read.c (scm_lreadr, scm_lreadparen,
3703 scm_lreadrecparen, scm_read_hash_extend), script.c
3704 (scm_compile_shell_switches), srcprop.c (scm_source_property,
3705 scm_set_source_property_x), srcprop.h (SCM_WHASHFOUNDP), stacks.c
3706 (read_frame, NEXT_FRAME, read_frames, narrow_stack,
3707 scm_make_stack, scm_stack_id), strop.c (scm_i_index,
3708 scm_string_index, scm_string_rindex), struct.c (scm_struct_init),
3709 validate.h (SCM_VALIDATE_BOOL_COPY, SCM_VALIDATE_INUM_DEF,
3710 SCM_VALIDATE_INUM_DEF_COPY, SCM_VALIDATE_PROC,
3711 SCM_VALIDATE_ARRAY): Don't use C operators to compare SCM values.
3712
3713 * feature.c (make_hook), keywords.c
3714 (scm_make_keyword_from_dash_symbol), macros.c (scm_makacro,
3715 scm_makmacro, scm_makmmacro), print.c (scm_iprin1,
3716 scm_printer_apply, scm_port_with_print_state): Smob data is of type
3717 scm_bits_t.
3718
3719 * feature.c (print_hook), gc.c (scm_object_address), hash.c
3720 (scm_ihashq, scm_ihashv), print.c (scm_iprin1, scm_ipruk), smob.c
843e4e9d 3721 (freeprint), struct.c (scm_print_struct): Must unpack
54778cd3
DH
3722 SCM values to access their raw contents.
3723
3724 * fluids.c (apply_thunk, scm_with_fluids), hashtab.c (fold_proc,
3725 scm_hash_fold), load.c (load, scm_primitive_load): Passing SCM
3726 values via void * requires unpacking / packing.
3727
3728 * fports.c (scm_fport_buffer_add, scm_setvbuf), procs.h
3729 (SCM_SUBRNUM, SCM_SET_SUBRNUM), srcprop.h (SRCPROPBRK, SRCBRKP):
3730 Read and modify data bits in cell entry #0 using
3731 SCM_{SET_}?CELL_WORD_0.
3732
3733 * fports.c (scm_fdes_to_port), gc.c (scm_gc_for_newcell,
3734 scm_gc_sweep, init_heap_seg), init.c (start_stack), ports.c
3735 (scm_void_port), procs.c (scm_make_subr_opt,
3736 scm_make_procedure_with_setter), root.c (scm_internal_cwdr),
3737 smob.c (scm_make_smob), strports.c (scm_mkstrport): Use
3738 SCM_SET_CELL_TYPE to write the cell type information.
3739
3740 * gc.c (scm_gc_mark): Use SCM_CELL_OBJECT* to access SCM values
3741 from cells that are no scheme pairs.
3742
3743 * gc.c (scm_gc_sweep), mallocs.c (prinmalloc), mallocs.h
3744 (SCM_MALLOCDATA, SCM_SETMALLOCDATA), print.c (scm_ipruk), random.h
3745 (SCM_RSTATE), root.h (SCM_ROOT_STATE), smob.c (scm_smob_free),
3746 srcprop.c (freesrcprops), srcprop.h (SRCPROPPOS, SRCPROPFNAME,
3747 SRCPROPCOPY, SRCPROPPLIST), struct.c (scm_make_struct,
3748 scm_make_vtable_vtable): Use SCM_{SET_}?CELL_WORD* to access cell
3749 entries with raw data.
3750
3751 * gc.c (scm_init_storage), sort.c (applyless), strop.c
3752 (scm_string_to_list): Eliminate unnecessary casts to SCM.
3753
3754 * mallocs.c (scm_malloc_obj): Store result of malloc as raw
3755 data.
3756
3757 * ports.c (scm_close_all_ports_except): Duplicate documentation
3758 text removed.
3759
3760 * print.c (scm_iprin1): Use SCM_ITAG3.
3761
3762 * procs.h (SCM_SET_SUBRNUM): Fix shift direction.
3763
3764 * snarf.h (SCM_GPROC, SCM_GPROC1, SCM_SYMBOL, SCM_GLOBAL_SYMBOL,
3765 SCM_KEYWORD, SCM_GLOBAL_KEYWORD, SCM_VCELL, SCM_GLOBAL_VCELL,
3766 SCM_VCELL_INIT, SCM_GLOBAL_VCELL_INIT): Don't initialize globals
3767 and static variables at their point of declaration, but rather in
3768 the init function.
3769
3770 * tags.h (SCM_PACK): Automatically cast to scm_bits_t.
3771
abeed821
GH
37722000-04-02 Gary Houston <ghouston@arglist.com>
3773
3774 * guardians.c (TCONC_IN, scm_make_guardian): set the CDR of the
3775 empty tconc pair to SCM_EOL instead of SCM_BOOL_F, avoiding the
3776 use of an improper list (which breaks g_print. g_print isn't
3777 used).
3778 guardians.c: Added more comments and modified the make-guardian
3779 docstring. Reordered a few procedures.
3780
cf498326
DH
37812000-04-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
3782
3783 * eval.c (scm_lookupcar1, scm_lookupcar, scm_m_case, scm_m_cond,
3784 scm_m_lambda, iqq, scm_m_define, scm_m_expand_body, unmemocopy,
3785 SCM_CEVAL), procs.h (SCM_TOP_LEVEL): Don't use C operators to
3786 compare SCM values.
3787
3788 (scm_makprom): Smob data is of type scm_bits_t.
3789
cffcab30
DH
37902000-03-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
3791
3792 * backtrace.c (display_error_body), debug.c (scm_procedure_source,
3793 scm_reverse_lookup), dynl.c (scm_dynamic_link): Don't use C
3794 operators to compare SCM values.
3795
3796 * debug.c (scm_make_debugobj), debug.h (SCM_DEBUGOBJ_FRAME,
3797 SCM_SET_DEBUGOBJ_FRAME): Update SCM_{SET_}?DEBUGOBJ_FRAME to
3798 access raw cell data with SCM_{SET_}?CELL_WORD_1.
3799
3800 * debug.c (scm_make_debugobj): Don't use SCM_SETCAR to set types.
3801
3802 * debug.c (scm_make_memoized), dynl.c (scm_dynamic_link): Smob
3803 data is of type scm_bits_t.
3804
7fa93bf8
DH
38052000-03-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
3806
3807 * gdbint.c (gdb_maybe_valid_type_p), guardians.c (TCONC_EMPTYP,
3808 scm_guardian_zombify): Use SCM_EQ_P to compare SCM values.
3809
3810 * guardians.c (GUARDIAN): Use SCM_CELL_WORD_1 for raw data.
3811
74a16888
DH
38122000-03-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
3813
3814 * ports.h (scm_port): Change type of stream member to scm_bits_t.
3815
3816 * gdbint.c (unmark_port, remark_port), ports.c (scm_markstream),
3817 strports.c (st_resize_port, scm_mkstrport), vports (sf_flush,
3818 sf_write, sf_fill_input, sf_close, scm_make_soft_port): Since
3819 streams are now of type scm_bits_t, SCM streams have to be
3820 unpacked/packed.
3821
3822 * ports.h (SCM_SETPTAB_ENTRY, SCM_SETSTREAM): Cast input to
3823 scm_bits_t.
3824
b6cc0ef6
MD
38252000-03-31 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
3826
6a878357
MD
3827 * coop-defs.h (struct coop_t): Added `sto'-field again because of
3828 binary compatibility---let's remove it next time we alter some
3829 major structure.
3830
b6cc0ef6
MD
3831 * coop.c (coop_quitting_p, coop_cond_create, coop_mutex_create,
3832 coop_mother, coop_child): New variables.
3833 (mother): New function.
3834 (coop_create): New thread spawning mechanism which uses a "mother
3835 thread". The "dummy" pthreads aren't healthy enough to give birth
3836 to new threads since Linux threads thinks they are asleep.
3837
3838 * coop-defs.h (struct coop_t): Removed dummy_mutex.
3839
3840 * coop-defs.h, coop-threads.c (struct coop_t): Eliminate
3841 `sto'-field when GUILE_PTHREAD_COMPAT is enabled.
3842
843524cc
DH
38432000-03-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
3844
3845 * arbiters.c (scm_make_arbiter), async.c (scm_async), dynwind.c
3846 (scm_internal_dynamic_wind): Smob data is always of type
3847 scm_bits_t.
3848
3849 * arbiters.c (SCM_ARB_LOCKED, SCM_LOCK_ARB, SCM_UNLOCK_ARB):
3850 Access the locking information in cell entry 0 with
3851 SCM_{SET_}?CELL_WORD_0 instead of SCM_*CAR.
3852
3853 * async.c (scm_run_asyncs): Use SCM_NULLP to test for the empty
3854 list.
3855
3856 * dynwind.c (scm_dowinds): Use SCM_EQ_P to compare SCM values.
3857
3858 * ports.h (SCM_PTAB_ENTRY, SCM_SETPTAB_ENTRY): Access the ptab
3859 entry data using SCM_{SET_}?CELL_WORD_1 instead of SCM_{SET}?CDR.
3860
fbd485ba
DH
38612000-03-29 Dirk Herrmann <D.Herrmann@tu-bs.de>
3862
3863 * alist.c (scm_sloppy_assq, scm_assq), eq.c (scm_eq_p, scm_eqv_p,
3864 scm_equal_p), list.c (scm_ilength, scm_last_pair, scm_reverse,
3865 scm_sloppy_memq, scm_delq_x, scm_delq1_x), tags.h (SCM_UNBNDP):
3866 Don't use C operators == and != to compare SCM values, use
3867 SCM_EQ_P instead.
3868
3869 * boolean.c (scm_boolean_p): Use SCM_BOOLP to determine whether a
3870 SCM value is equal to #t or #f.
3871
3872 * eq.c (scm_eqv_p, scm_equal_p): Don't use SCM_CAR to access the
3873 cell type entry of non immediate objects of unknown type. Use
3874 SCM_CELL_TYPE instead.
3875
3876 * gh_data.c (gh_scm2bool, gh_module_lookup), list.c
3877 (scm_sloppy_memv, scm_sloppy_member, scm_delv_x, scm_delete_x,
3878 scm_delv1_x, scm_delete1_x), scmsigs.c (scm_sigaction): Use
3879 SCM_FALSEP and SCM_TRUE_P to compare SCM values against #f and
3880 #t.
3881
3882 * list.c (scm_listify): Use SCM_UNBNDP to test for an unbound
3883 scheme value.
3884
64e3bf6c
MD
38852000-03-29 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
3886
0208baa0
MD
3887 * coop-threads.c (scm_call_with_new_thread, scm_spawn_thread,
3888 scm_make_mutex, scm_make_condition_variable): Cast data to
3889 scm_bits_t in SCM_SET_CELL_WORD and SCM_NEWSMOB macros.
3890
64e3bf6c
MD
3891 * coop.c (coop_create): Set `specific' field, not `data' to NULL.
3892
94113249
DH
38932000-03-29 Dirk Herrmann <D.Herrmann@tu-bs.de>
3894
3895 * smob.h (SCM_NEWSMOB, SCM_NEWSMOB2, SCM_NEWSMOB3, SCM_SMOB_DATA,
3896 SCM_SET_SMOB_DATA, SCM_TC2SMOBNUM, SCM_SMOBNUM): To access smob
3897 data, use SCM_{SET_}?CELL_TYPE or SCM_{SET_}?WORD_[1-3].
3898
3899 Note that this implies that smob data has always to be passed as
3900 values of type scm_bits_t.
3901
1978b33e
MD
39022000-03-29 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
3903
3904 * threads.c (scm_init_threads): Pass 0 size to scm_make_smob_type
3905 for scm_tc16_thread. As the current COOP threads are written, GC
3906 is not supposed to manage storage for threads.
3907
3908 * error.c (scm_error): Don't try to throw an error if
3909 scm_gc_heap_lock is true.
3910
3911 * coop.c (coop_finish): New function. Called at exit.
3912 (coop_aborthelp): Free thread structures when threads die.
3913 Finished LinuxThreads compatibility support => COOP threads now
3914 mesh with LinuxThreads.
843e4e9d 3915
1978b33e
MD
3916 * coop-threads.c (scm_call_with_new_thread, scm_spawn_thread):
3917 Changed SETCDR --> SET_CELL_WORD_1.
3918
3919 * coop-threads.c (scheme_launch_thread): Set word 1 of handle to 0
3920 when thread dies.
3921
dd039d6d
DH
39222000-03-29 Dirk Herrmann <D.Herrmann@tu-bs.de>
3923
3924 * boolean.h (SCM_TRUE_P): New macro.
3925
3926 * boolean.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP), pairs.h
3927 (SCM_NULLP, SCM_NNULLP): Use SCM_EQ_P to compare SCM values.
3928
8b3bda20
DH
39292000-03-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
3930
3931 * continuations.h (SCM_CONTREGS, SCM_SET_CONTREGS): New macros to
3932 access continuation data.
3933
3934 (SCM_SETJMPBUF): Deprecated. Use SCM_SET_CONTREGS instead.
3935
3936 (SCM_JMPBUF, SCM_DYNENV, SCM_THROW_VALUE, SCM_BASE, SCM_SEQ,
3937 SCM_DFRAME): Use SCM_CONTREGS instead of SCM_CHARS to access
3938 continuation data.
3939
843e4e9d 3940 * continuations.c (scm_make_cont), init.c (start_stack),
8b3bda20
DH
3941 root.c (scm_internal_cwdr): Use SCM_SET_CONTREGS instead of
3942 SCM_SETJMPBUF.
3943
3210f49a
DH
39442000-03-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
3945
3946 * symbols.h (SCM_LENGTH, SCM_SETLENGTH): Access the length field
3947 of strings and symbols by using SCM_{SET_}?CELL_WORD_0.
3948
3949 (SCM_CHARS, SCM_UCHARS, SCM_SETCHARS): Use SCM_{SET_}?CELL_WORD_1
3950 to access the char * field of strings and symbols.
3951
2d67e390
DH
39522000-03-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
3953
3954 * gc.h (SCM_NEWCELL, SCM_NEWCELL2): Use SCM_SET_CELL_TYPE to set
3955 the type entry of a new cell. Added a comment about things to
3956 remember when updating the list of free cells.
3957
3958 (SCM_FREEP, SCM_MARKEDP): Use SCM_CELL_TYPE to access the type
3959 entry of a cell.
3960
76a369d9
DH
39612000-03-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
3962
3963 * pairs.h (SCM_CAR, SCM_CDR, SCM_SETCAR, SCM_SETCDR): Use
3964 SCM_CELL_OBJECT and SCM_SET_CELL_OBJECT. This change implies that
3965 with strict type checking enabled these macros will only work if
3966 given valid SCM parameters.
3967
3210f49a 3968 (SCM_GCCDR): Moved to tags.h.
76a369d9
DH
3969
3970 * tags.h (SCM_GCCDR): Moved here from pairs.h.
3971
2549a709
DH
39722000-03-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
3973
3974 * tags.h (SCM2PTR, PTR2SCM): Moved to gc.h.
3975
3976 * pairs.h (scm_cell, SCM_CELLPTR, SCM_CELL_WORD*, SCM_CELL_OBJECT*,
3977 SCM_SET_CELL_WORD*, SCM_SET_CELL_OBJECT*, SCM_CELL_TYPE,
3978 SCM_SET_CELL_TYPE, SCM_PTR_LT, SCM_PTR_MASK, SCM_PTR_GT,
3979 SCM_PTR_LE, SCM_PTR_GE, SCM_CELL_WORD_LOC, SCM_NEWCELL,
3980 SCM_NEWCELL2): Moved to gc.h.
3981
3982 (SCM_CARLOC, SCM_CDRLOC, SCM_SETAND_CAR, SCM_SETAND_CDR,
3983 SCM_SETOR_CAR, SCM_SETOR_CDR): Moved to gc.h. These names should
3984 be changed, though, since the macros are not only pair related.
3985
3986 (SCMPTR): Deleted.
3987
3988 * gc.h (SCM2PTR, PTR2SCM, scm_cell, SCM_CELLPTR, SCM_CELL_WORD*,
3989 SCM_CELL_OBJECT*, SCM_SET_CELL_WORD*, SCM_SET_CELL_OBJECT*,
3990 SCM_CELL_TYPE, SCM_SET_CELL_TYPE, SCM_PTR_LT, SCM_PTR_MASK,
3991 SCM_PTR_GT, SCM_PTR_LE, SCM_PTR_GE, SCM_CELL_WORD_LOC,
3992 SCM_NEWCELL, SCM_NEWCELL2, SCM_CARLOC, SCM_CDRLOC, SCM_SETAND_CAR,
3993 SCM_SETAND_CDR, SCM_SETOR_CAR, SCM_SETOR_CDR): Moved here from
3994 tags.h and pairs.h.
3995
8d3356e7
DH
39962000-03-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
3997
3998 * tags.h (SCM_STRICT_TYPING): New macro that, if defined,
3999 activates strict compile time type checking for variables of
4000 type SCM.
4001 (SCM, SCM_PACK, SCM_UNPACK): Define according to whether
4002 SCM_STRICT_TYPING or SCM_VOIDP_TEST are defined.
4003 (SCM_EQ_P): Defined as a macro equivalent for eq?.
4004
96f6f4ae
DH
40052000-03-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
4006
4007 * tags.h (SCM_POINTERS_MUNGED): Removed.
4008
4009 * gc.c (scm_gc_sweep, init_heap_seg): Removed use of
4010 SCM_POINTERS_MUNGED, thus fixing some illegal casts to SCM.
4011
0cbaaf0b
DH
40122000-03-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
4013
4014 * pairs.h (SCM_CELL_OBJECT, SCM_CELL_OBJECT_[0-3],
4015 SCM_SET_CELL_OBJECT, SCM_SET_CELL_OBJECT_[0-3], SCM_CELL_TYPE,
4016 SCM_SET_CELL_TYPE): Added a set of low level macros for accessing
4017 cell entries.
4018 (SCM_CELL_WORD_[0-3]): Renamed from the SCM_CELL_WORD[0-3].
4019
4020 * procs.h, procs.c: Instead of SCM_{SET_}?CELL_WORD[12], use the
4021 newly introduced SCM_{SET_}?CELL_OBJECT_[12] macros.
4022
7284d584
MD
40232000-03-23 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4024
4025 * tags.h: Disabled definition of SCM_VOIDP_TEST.
4026
4027 Defining SCM as void * introduces problems which haven't been
4028 handled yet. Developers who work with these issues can enable it
4029 in their working copies.
4030
4031 Disabling this definition exposes a set of newly introduced and
4032 older misuses of types which causes warning messages during
4033 compilation. We'll fix this successively.
4034
4035 * gc.c (scm_mark_locations): Changed * (SCM **) X --> * (SCM *) X
4036 in order to obtain a value of type SCM.
4037 (scm_cellp): Updated with new changes to scm_mark_locations.
4038
4039 * continuations.h (SCM_SETJMPBUF): Cast second arg into SCM.
4040
2f9055ea
MD
4041 * continuations.c (scm_make_cont): Removed cast of size_t into
4042 long.
4043
7284d584
MD
4044 * symbols.h (SCM_SETCHARS): Cast second arg into SCM.
4045
f81e080b
DH
40462000-03-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
4047
4048 * numbers.h (SCM_SETNUMDIGS): Use SCM_BIGSIZEFIELD macro for
4049 shifting, not constant. Thanks to Dale P. Smith.
4050
4051 * numbers.c (scm_sum, scm_difference): Don't test a SCM value
4052 for being less than zero. Decode it to a C value first. Again,
4053 thank you Dale.
4054
1ff2fa6e
DH
40552000-03-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
4056
4057 * numbers.h, ramap.c, struct.h, vectors.h: Don't use SCM2PTR for
4058 non scheme values. If raw data is stored in SCM variables, it has
4059 to be accessed using SCM_UNPACK until a better solution is found.
4060
3920465b
MD
40612000-03-22 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4062
6f29dc6d
MD
4063 * tags.h (SCM_ECONSP, SCM_NECONSP): More corrections of
4064 pointer-arithmetic induced by the SCM_PACK/UNPACK change.
4065
4066 * print.c (scm_iprin1): SCM_PACK/UNPACK corrections.
4067
4068 * gc.c (scm_gc_sweep): SCM_PACK/UNPACK corrections.
4069
4070 * eval.c (SCM_CEVAL, scm_unmemocar): SCM_PACK/UNPACK corrections.
4071
4072 * dynwind.c (scm_swap_bindings): SCM_PACK/UNPACK corrections.
4073
3920465b
MD
4074 * async.c, __scm.h: Removed lots of the old async click logic. It
4075 is possible to reinsert it by defining GUILE_OLD_ASYNC_CLICK in
4076 __scm.h. Let's try this out and dump the old code after the
4077 threads reorganization.
4078 (set-tick-rate, set-switch-rate): Conditionally removed.
4079
90cca6f9
MD
40802000-03-21 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4081
4082 * gc.c (scm_gc_mark): Bugfix 1: The recent SCM_PACK/UNPACK change
4083 made SCM values into pointers. This turned an arithmetic
4084 computation of the address of the vcell into a pointer-arithmetic
4085 one, thereby screwing up marking of structs.
4086 Bugfix 2: Removed incompletely introduced loop variable `j' used
4087 when protecting the tail array of a struct.
4088
8246bf3e
DH
40892000-03-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
4090
4091 * struct.h (SCM_STRUCT_DATA): Don't cast SCM values to pointers.
4092
95c9e176
DH
40932000-03-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
4094
4095 * symbols.h, symbols.c (scm_strhash): Declare the string
4096 parameter as constant, since it is not modified.
4097
4098 * symbols.c (scm_intern_obarray_soft,
4099 scm_sysintern0_no_module_lookup): Can now pass constant strings
4100 to scm_strhash without need for casting.
4101
7352d0b2
DH
41022000-03-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
4103
4104 * vectors.h (SCM_VELTS, SCM_VELTS_AS_STACKITEMS): Don't cast SCM
4105 values to pointers. Use SCM2PTR instead.
4106
b00c8cdc 41072000-03-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
9b139b4e
DH
4108
4109 * async.c (scm_set_tick_rate, scm_set_switch_rate): Don't unpack
4110 results of SCM_INUM.
4111
df2d5178
MD
41122000-03-21 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
4113
bd54e664
MD
4114 * init.c (scm_boot_guile_1): Renamed GUILE_GC_TRIGGER_1 -->
4115 GUILE_MIN_YIELD_1, GUILE_GC_TRIGGER_2 --> GUILE_MIN_YIELD_2.
4116 GUILE_MIN_YIELD_X now take *positive* fractions of heap size.
4117
4118 * gc.c, gc.h (SCM_MIN_YIELD_1, SCM_MIN_YIELD_2,
4119 min_yield_fraction, min_yield, adjust_min_yield): Renamed from
4120 SCM_GC_TRIGGER_1, SCM_GC_TRIGGER_2, gc_trigger_fraction,
4121 gc_trigger, adjust_gc_trigger.
4122
df2d5178
MD
4123 * gc.c (alloc_some_heap): Further improvement of minimal heap size
4124 prediction.
4125 (SCM_MAX): New macro.
4126 (scm_freelist_t): New field: collected_1. Previous amount of
4127 collected cells.
4128 (gc_sweep_freelist_finish): Trigger based on two last values of
4129 freelist->collected to avoid unnecessary allocation due to
4130 temporary peaks.
bd54e664
MD
4131 (SCM_INIT_HEAP_SIZE_1, SCM_GC_TRIGGER_1, SCM_GC_TRIGGER_2):
4132 Adjusted to 45000 cells, 40% and 40%. Gives quick startup
4133 without extra heap allocation.
df2d5178 4134
f2961ccd
DH
41352000-03-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
4136
4137 * numbers.h (SCM_MAKINUM): The parameter to SCM_MAKINUM should
4138 already be a C value. No need to unpack it.
4139
3210f49a 4140 * numbers.c (scm_long_long2num): Cast the parameter to scm_bits_t
f2961ccd
DH
4141 if we know it fits into an inum.
4142
4143 * ramap.c (ramap_rp): An scm_tc7_[ui]vect object does point to a
4144 field of long values. In contrast, SCM_VELTS accesses a field of
4145 SCM values.
4146
7b4cc831
MD
41472000-03-20 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4148
f1d316dd
MD
4149 * gc.c (scm_gc_stats): Inserted explanation of local_scm_mtrigger
4150 etc.
80770ddc
MD
4151 (scm_gc_yield_1): New variable: Holds previous yield. Used to
4152 make better judgements.
f1083dd7
MD
4153 (gc_sweep_freelist_finish): Inserted explanation of use of
4154 gc_trigger.
f1d316dd
MD
4155
4156 * print.h, stacks.h, options.c, options.h: Changed C++
4157 commentaries to C.
7b4cc831 4158
7a710745
DH
41592000-03-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
4160
4161 * tags.h (SCM2PTR, PTR2SCM): Use SCM_PACK / SCM_UNPACK correctly.
4162
4163 * numbers.h (SCM_INUMP, SCM_MAKINUM, SCM_INUM0, SCM_COMPLEX_REAL,
4164 SCM_COMPLEX_IMAG, SCM_NUMP, SCM_BDIGITS): Use SCM_PACK /
4165 SCM_UNPACK / SCM2PTR correctly.
4166
1ef20c80
MD
41672000-03-20 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4168
4169 * gc.c (adjust_gc_trigger): Improved documentation.
4170 (alloc_some_heap): Since gc_trigger is used against
4171 freelist->collected, this is the value which should be used to
4172 predict minimum growth.
4173
b464b970
DH
41742000-03-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
4175
4176 * eval.h: Fix mixup of packed/unpacked SCM values. (Thanks
4177 Thien-Thi Nguyen for the patch.)
4178
3ab9f56e
DH
41792000-03-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
4180
4181 * numbers.c (scm_ash): Fixed typing problems with the second
4182 parameter and added some documentation. (Thanks Thien-Thi Nguyen
4183 for indicating the problem.)
4184
05bc3265
MD
41852000-03-19 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4186
78a4915a
MD
4187 * gc.c, gc.h (scm_gc_yield): New variable.
4188 (adjust_gc_trigger): Use scm_gc_yield.
4189 (alloc_some_heap): Use scm_gc_yield instead of
4190 scm_gc_cells_collected.
4191
05bc3265
MD
4192 * coop-threads.c: Addd #include "root.h", #include "strings.h".
4193
4194 * debug.c: Added #include "root.h". (Thanks to Thien-Thi Nguyen.)
4195
4196 * gc.c (scm_gc_for_newcell, adjust_gc_trigger): Improved GC
4197 trigger adjustmeant: Take yield (freed cells) for all freelists
4198 into account.
4199 (SCM_INIT_HEAP_SIZE_1, SCM_GC_TRIGGER_1, SCM_GC_TRIGGER_2): Tuned
4200 to 50000 cell heap with 45% trigger.
4201 (scm_gc_cells_collected): Reintroduced.
4202 (SCM_HEAP_SIZE): New macro.
4203 (scm_gc_sweep): Reintroduced correct computation of
4204 scm_cells_allocated.
4205 (scm_freelist_t): Corrected commentary for field `cluster_size':
4206 Clustersize counts objects, not cells; New member
4207 `clusters_allocated'.
4208
89e00824
ML
42092000-03-19 Michael Livshin <mlivshin@bigfoot.com>
4210
4211 * *.[hc]: add Emacs magic at the end of file, to ensure GNU
4212 indentation style.
4213
afcfc5bb
MD
42142000-03-19 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
4215
4216 * threads.h: Added #include "libguile/throw.h". (Thanks to
4217 Thien-Thi Nguyen.)
4218
a00c95d9
ML
42192000-03-18 Michael Livshin <mlivshin@bigfoot.com>
4220
50fecba9
ML
4221 * tags.h: (SCM_DOUBLE_CELLP, SCM_NDOUBLE_CELLP): new macros (bad
4222 names, anyone got any better ones?)
a00c95d9
ML
4223
4224 * gc.h: (typedef struct scm_freelist_t) remove from here.
4225
50fecba9 4226 * gc.c: (CELL_UP, CELL_DN) made these macros take additional
a00c95d9
ML
4227 parameter (the span).
4228 (CLUSTER_SIZE_IN_BYTES, ALIGNMENT_SLACK) new macros.
50fecba9 4229 (typedef struct scm_freelist_t) moved here from gc.h, it had no
a00c95d9
ML
4230 business being externally visible.
4231 (typedef struct scm_heap_seg_data_t) renamed from
4232 scm_heap_seg_data, to be style-compliant.
4233 (scm_mark_locations) if the possible pointer points to a
50fecba9
ML
4234 double-cell, check that it's properly aligned.
4235 (init_heap_seg) align double-cells properly, work with the
4236 assumption that the segment size divides cleanly by cluster size.
a00c95d9
ML
4237 (round_to_cluster_size) new function.
4238 (alloc_some_heap, make_initial_segment) use round_to_cluster_size
4239 to satisfy the new init_heap_seg invariant.
4240
28b3236d
DH
42412000-03-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
4242
4243 * _scm.h: Don't include async.h everywhere...
4244
4245 * eq.c eval.c iselect.c: ... only include it here.
4246
ba11fd4c
DH
42472000-03-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
4248
4249 * _scm.h: Don't include root.h everywhere...
4250
4251 * async.c continuations.c eq.c eval.c evalext.c feature.c gc.c
4252 gdbint.c gsubr.c ioext.c keywords.c lang.c load.c macros.c
4253 numbers.c objprop.c ports.c print.c procprop.c ramap.c read.c
4254 srcprop.c stackchk.c stacks.c strports.c symbols.c unif.c
4255 variable.c vectors.c vports.c: ... only include it here.
4256
7ab3fdd5
DH
42572000-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
4258
4259 * _scm.h: Don't include strings.h everywhere...
4260
4261 * backtrace.c dynl.c error.c feature.c filesys.c fports.c gc.c
4262 gdbint.c ioext.c load.c net_db.c numbers.c objects.c options.c
4263 ports.c posix.c print.c procs.c random.c read.c regex-posix.c
4264 simpos.c socket.c stacks.c stime.c strop.c strports.c struct.c
4265 symbols.c unif.c vectors.c version.c vports.c: ... only include it
4266 here.
4267
f04d8caf
DH
42682000-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
4269
4270 * _scm.h: Don't include ports.h everywhere...
4271
4272 * arbiters.c backtrace.c debug.c dynl.c dynwind.c eval.c feature.c
4273 fluids.c gc.c gdbint.c guardians.c hash.c keywords.c mallocs.c
4274 numbers.c objects.c print.c read.c root.c smob.c srcprop.c
4275 stackchk.c strports.c struct.c throw.c variable.c: ... only
4276 include it here.
4277
003d1fd0
DH
42782000-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
4279
4280 * _scm.h: Don't include vectors.h everywhere...
4281
4282 * eq.c eval.c filesys.c gc.c gsubr.c guardians.c hash.c hashtab.c
4283 keywords.c net_db.c numbers.c objects.c posix.c print.c procprop.c
4284 procs.c ramap.c random.c read.c scmsigs.c socket.c sort.c stime.c
4285 strports.c symbols.c unif.c vports.c weaks.c: ... only include it
4286 here.
4287
0fa27efa
DH
42882000-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
4289
4290 * genio.h: removed. (Only content was '/* delete me */'.)
4291
4292 * Makefile.am arbiters.c backtrace.c debug.c dynl.c dynwind.c
4293 error.c filesys.c fluids.c gc.c gsubr.c guardians.c keywords.c
4294 libguile.h mallocs.c numbers.c print.c random.c read.c root.c
4295 srcprop.c stackchk.c struct.c threads.c throw.c variable.c:
4296 Removed reference to genio.h
4297
148f31de
MD
42982000-03-17 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
4299
4300 * gc.c, gc.h: Cleanup of the change of 2000-03-15.
4301 Cluster sizes are now independent of GC trigger values.
4302 GUILE_GC_TRIGGER_n can now specify a relative trigger value:
4303 A negative integer gives fraction of total heap size in percent.
1eb489a2 4304 (SCM_GC_TRIGGER_1, SCM_GC_TRIGGER_2): Default values set to -40.
148f31de
MD
4305
4306 * init.c (scm_boot_guile_1): Introduced new variable
4307 GUILE_MAX_SEGMENT_SIZE; New environment variable names:
4308 GUILE_INIT_SEGMENT_SIZE_1, GUILE_GC_TRIGGER_1,
4309 GUILE_INIT_SEGMENT_SIZE_2, GUILE_GC_TRIGGER_2
4310
6d0f81dd 43112000-03-16 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
a00c95d9 4312
6d0f81dd
MD
4313 * __scm.h (GC_FREE_SEGMENTS): Disable this until we have made
4314 freeing of segment work with the new GC scheme. (Thanks to
bc2c8d98
MD
4315 Michael Livshin.) Oops, also happened to make GUILE_NEW_GC_SCHEME
4316 the default, but I'll let this change stay in CVS Guile since this
4317 code is not expected to contain serious bugs.
a00c95d9 4318
17351a6f 43192000-03-16 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
c5133dc9 4320
6c7c449e
MD
4321 * gc.c, gc.h (scm_map_free_list): Define also if GUILE_DEBUG is
4322 defined.
5a551542
MD
4323 (scm_free_list_length): New procedure (GUILE_DEBUG).
4324 Fixed a small but serious bug introduced by the previous change.
4325
17351a6f
MD
4326 * gc.c (scm_gc_sweep): Moved variable n_objects to inner sweep
4327 loop and declare as register.
6c7c449e 4328
c5133dc9
MD
4329 * gc.c (scm_gc_sweep): Sigh... forgot to clear private freelists
4330 after GC.
4331
3820581c
GB
4332Wed Mar 15 08:27:04 2000 Greg J. Badros <gjb@cs.washington.edu>
4333
4334 * fluids.c: Docstring patch from Keisuke Nishida. Some
4335 reindentation, too, and a couple formals renamed. Should
4336 fluid-set! return UNSPECIFIED instead of a value?
4337
4338Wed Mar 15 08:24:58 2000 Greg J. Badros <gjb@cs.washington.edu>
4339
4340 * Makefile.am: Separate out DOT_X_FILES and DOT_DOC_FILES, and
a00c95d9 4341 generate the latter from the concrete listing of the former. Then
3820581c
GB
4342 make guile-procedures.txt depend on DOT_DOC_FILES instead of
4343 *.doc, so that rebuilding it works.
4344
dd6390bf
GB
4345Wed Mar 15 08:12:14 2000 Greg J. Badros <gjb@cs.washington.edu>
4346
4347 * libguile.h: Include libguile/validate.h. Thanks Keisuke Nishida!
4348
4349 * guile-snarf.awk.in: Replace docstring line-ending \n" and \n\n"
4350 with nothing and \n, respectively. Thanks Keisuke Nishida for
4351 noticing this problem.
4352
4fdb0ae2
MD
43532000-03-15 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4354
4355 * __scm.h (GUILE_NEW_GC_SCHEME): Define this if you want to test a
4356 new way of allocating heap. It makes Guile fast, but still
4357 contains bugs.
4358
4359 * gc.c, gc.h, pairs.h, init.c: Implementation of a new way of
4360 allocating heap. The basic idea is to trigger GC every Nth
4361 allocated cell and grow heap when free list runs out. The scheme
4362 has been extended so that GC isn't triggered until all remaining
4363 cells are used. The implementation is also prepared for
4364 development in the direction of POSIX threads.
4365
4366 * gc.c (SCM_EXPHEAP): In order to grow by a factor of 1.5,
4367 SCM_EXPHEAP should return half of the heap size.
4368
3d8d1283
MD
43692000-03-14 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
4370
5f4edb86
MD
4371 The following change to init.c is only enabled if Guile was
4372 configured with --enable-guile-debug.
a00c95d9 4373
5f4edb86
MD
4374 * init.c (scm_i_getenv_int): New function.
4375 (scm_boot_guile_1): Use the environment variables
4376 GUILE_INIT_HEAP_SIZE, GUILE_INIT_HEAP_SIZE2 to select heap size if
4377 they exist. (This may be replaced by a Scheme level mechanism in
4378 the future.)
4379
3d8d1283 4380 * objprop.c (s_scm_set_object_property_x): Use scm_assq instead of
90e77861 4381 scm_assoc. (Thanks to Keisuke Nishida.)
3d8d1283 4382
b0e37c83
MD
43832000-03-14 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4384
4385 * eval.c, lang.c, lang.h (scm_lisp_nil, scm_lisp_t): Renamed from
2b260c0f 4386 scm_nil, scm_t. (Thanks to Keisuke Nishida.)
b0e37c83 4387
16d35552
MD
43882000-03-14 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
4389
5ebf0091
MD
4390 * init.c (scm_boot_guile_1): Use same initial segment size for
4391 1-word and 2-word segments. Having the smaller size causes Guile
4392 to GC too often. Obviously something needs to be done to allow
4393 for a smaller 2-word segment without this to happen. (The amount
4394 of heap for each type should be automatically adapted to the
4395 application somehow.)
4396
31ed4cff
MD
4397 [Almost all of these changes should be documented in the NEWS
4398 file.]
4399
cf2c7413
MD
4400 * gc.h (scm_freelist_t): New type.
4401
4402 * pairs.h (SCM_NEWCELL, SCM_NEWCELL2): Use new style freelists.
4403
4404 * gc.c (SCM_INIT_HEAP_SIZE): Changed from 32768 --> 40000 so that
4405 all of Guile basics fits into one segment and there suitable room
4406 for work.
4407 (SCM_EXPHEAP): Now takes an argument. Grow by a factor of 1.5
4408 instead of 2.
4409 (scm_freelist, scm_freelist2): Now of type scm_freelist_t.
4410 Freelists now contains information about object span, cells
4411 collected and amount of cells in heap segments belonging to the
4412 list.
4413 (scm_heap_size, scm_gc_cells_collected): Removed.
4414
4415 * init.c (scm_boot_guile_1): Make 2-word segment 8K (512 cells).
4416
16d35552
MD
4417 * Makefile.am (libguile_la_LDFLAGS): Bumped library version
4418 number.
4419
cf2c7413 4420 * __scm.h eq.c, eval.c, gc.c, gc.h, gh_data, hash.c, numbers.c,
16d35552
MD
4421 numbers.h, objects.c, ramap.c, random.c, unif.c, unif.h: Extensive
4422 rewrite of handling of real and complex numbers.
4423 (SCM_FLOATS, SCM_SINGLES): These #ifdef conditionals have been
4424 removed along with the support for floats. (Float vectors are
4425 still supported.)
4426
4427 * tags.h (scm_tcs_bignums): Removed.
4428 (scm_tc16_bigpos, scm_tc16_bigneg): Replaced by scm_tc16_big.
4429 Use SCM_BIGSIGN(x) to test for sign!
4430 (scm_tc16_big): The new bignum type.
4431 (SCM_REAL_PART, SCM_IMAG_PART): Removed.
4432
4433 * numbers.h (SCM_BIGSIGN): Sign moved to bit 16.
4434 (scm_makdbl): Deprecated.
4435 (SCM_NEWREAL, SCM_NEWCOMPLEX): New macros.
4436 (SCM_SINGP): Deprecated.
4437 (SCM_FLO): Removed.
4438 (SCM_INEXP, SCM_CPLXP): Deprecated.
4439 (SCM_INEXACTP, SCM_COMPLEXP): New macros.
4440 (SCM_COMPLEX_REAL, SCM_COMPLEX_IMAG): Renamed from
4441 SCM_REAL, SCM_IMAG (and now only valid for complex numbers).
4442 (SCM_REAL, SCM_IMAG): New, *deprecated*, selectors which work both
4443 for doubles and complex numbers.
4444 (SCM_REAL_VALUE): New selector for doubles.
4445 (scm_double_t, scm_complex_t): New types.
4446 (scm_dbl): Removed.
4447
4448 * numbers.c (scm_floprint, scm_floequal): Removed.
4449 (scm_print_real, scm_print_complex, scm_real_equalp,
4450 scm_complex_equalp): New functions.
4451
4452 * unif.c (scm_makflo): Removed.
4453
4454 * smob.h (SCM_SMOB_PREDICATE): New macro.
4455 (SCM_NEWSMOB2, SCM_RETURN_NEWSMOB2, SCM_NEWSMOB3,
4456 SCM_RETURN_NEWSMOB3): New macros.
4457
44581999-11-21 Michael Livshin <mlivshin@bigfoot.com>
4459
4460 The following changes implement primitive support for double cells
4461 (i.e. four-word cells) and change the representation of some
4462 things to multi-cells instead of cons+malloc. (Applied and
4463 modified by mdj.)
4464
4465 * pairs.h (SCM_NEWCELL2): double-cell variants of SCM_NEWCELL.
4466 (SCM_CELL_WORD, SCM_CELL_WORDLOC, SCM_SET_CELL_WORD): primitive
4467 multi-cell access macros (used by the ones below).
4468 (SCM_CELL_WORD[0-3], SCM_SET_CELL_WORD[0-3]): multi-cell access
4469 macros.
4470
4471 * gc.c (scm_freelist2): multi-cell freelists.
4472 (inner_map_free_list): map_free_list, parameterized on ncells.
4473 "nn cells in segment mm" was misleading for ncells > 1; changed to
4474 "objects". still print cells too, though.
4475 (scm_map_free_list): rewritten using inner_map_free_list.
4476 (scm_check_freelist): get freelist as parameter, since now we have
4477 more than one.
4478 (scm_debug_newcell2): multi-cell variants of
4479 scm_debug_newcell.
4480 (scm_gc_for_newcell): take ncells and freelist pointer as
4481 parameters.
4482 (scm_gc_mark): add case for tc7_pws (procedures with setters are
4483 now double cells).
4484 (scm_gc_sweep): don't free the float data, since it's not malloced
4485 anymore.
4486 (init_heap_seg): didn't understand what n_new_objects stood for,
4487 so changed to n_new_cells.
4488 (make_initial_segment): new function, makes an initial segment
4489 according to given ncells.
4490 (scm_init_storage): call make_initial_segment, for ncells={1,2,3}.
4491
4492 * numbers.c (scm_makdbl): no malloc'ing needed, so the
4493 {DEFER,ALLOW}_INTS thing removed.
4494
4495 * numbers.h (struct scm_dbl): changed to represent a double cell,
4496 with the number in the second half.
16d35552
MD
4497
4498 * dynwind.c: changed the wind-guards representation to double
4499 cell.
4500
4501 * procs.c, procs.h: changed the procedure-with-setter representation
4502 to double cell.
4503
4504 * async.c, async.h: made async representation a double cell.
4505
16d35552 4506 * dynl.c: made dynamic_obj representation a double cell.
a00c95d9 4507
b70ecbd0
GH
45082000-03-13 Gary Houston <ghouston@arglist.com>
4509
4510 * ports.c (flush_void_port): renamed to flush_port_default.
4511 (end_input_void_port): renamed to end_input_default.
4512
4513 * init.c (scm_standard_stream_to_port): create a void port instead
4514 of opening /dev/null if the standard file descriptors are bad.
4515 advantages: no portability problems, doesn't waste a file descriptor,
4516 simplifies the code (thanks to Marius for the idea).
4517
4518 * vports.c (s_scm_make_soft_port): call scm_port_non_buffer.
4519
4520 * void ports: make reading from a void port give EOF instead of
4521 segv:
4522 * ports.c (s_scm_sys_make_void_port): modified docstring.
4523 (fill_input_void_port): new proc.
4524 (scm_init_ports): set up fill_input_void_port.
4525 * ports.c (scm_port_non_buffer): new proc.
4526 (scm_void_port): call scm_port_non_buffer.
4527
4528 * fports.c (scm_setvbuf): docstring: remove the fcntl documentation
4529 which was incorrectly appended.
4530
fdc7ea2d
MD
45312000-03-13 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4532
4533 * guile-doc-snarf.in: Don't use absolute path for `sed'. (Note
4534 that we can't use autoconf for this. Autoconf itself relies on
26fba922 4535 the existence of `sed' somewhere on your path.) (Thanks to Dirk
fdc7ea2d 4536 Herrman.)
a00c95d9 4537
68933ba3
MD
45382000-03-13 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
4539
b44a555a
MD
4540 * Makefile.am (libguile_la_SOURCES): Moved iselect.c here from
4541 EXTRA_libguile_la_SOURCES.
4542
4543 * iselect.h: Always declare scm_internal_select.
4544
4545 * iselect.c (scm_internal_select): Added SCM_ASYNC_TICK at the
4546 end. Also let scm_internal_select be a real function also when
4547 not using threads.
4548
68933ba3
MD
4549 * __scm.h (SCM_TICK): Oops! Forgot to put SCM_ASYNC_TICK here...
4550
c7f6ea11
MD
45512000-03-13 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4552
4553 * __scm.h (SCM_ALLOW_INTS, SCM_REALLOW_INTS): Removed call to
4554 SCM_ASYNC_TICK. (This is a preparation for POSIX threads support,
4555 and kind of an experiment: Will this cause problems?)
4556
62dbc244
GB
4557Sun Mar 12 13:26:30 2000 Greg J. Badros <gjb@cs.washington.edu>
4558
4559 * Makefile.am: Added *.doc to DISTCLEANFILES.
4560
4f2f645d
GH
45612000-03-12 Gary Houston <ghouston@arglist.com>
4562
4563 * fports.c (scm_fdes_to_port): call fcntl F_GETFL to test that
4564 the fdes is valid before doing anything else. check that
4565 the file descriptor supports the modes required.
4566 (scm_fport_buffer_add): don't throw an error if fstat doesn't
4567 work: just use the default buffer size.
4568
4569 * throw.c: change an outdated comment about scm_internal_catch
4570 BODY: it doesn't take a jumpbuf arg.
4571
4572 * init.c (scm_standard_stream_to_port): install a handler in case
4573 scm_fdes_to_port throws an error. don't check here whether the
4574 file descriptor is valid, since scm_fdes_to_port will do that.
4575 set the revealed count depending on whether the port got the
4576 standard file descriptor.
4577 (stream_body_data): new type.
4578 (stream_body, stream_handler): new procs.
4579
7f782a0a
MD
45802000-03-12 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
4581
67673f75
MD
4582 * stacks.c, stacks.h, struct.c, tags.h, unif.c (scm_bits_t):
4583 Renamed from SCMWORD.
4584
4585 * tags.h (SCM_NCELLP): Removed (SCMWORD).
4586
f1267706 4587 * arbiters.c (SCM_ARB_LOCKED): Use SCM_UNPACK_CAR.
67673f75 4588
74a426ae
MD
4589 * async.c, boolean.h, debug.c, dynl.c, dynwind.c, eval.c, eval.h,
4590 feature.h, filesys.h, fluids.h, fports.c, fports.h, gc.c, gc.h,
4591 hash.c, keywords.h, macros.c, numbers.c, numbers.h, objects.c,
4592 objects.h, options.c, pairs.h, ports.c, ports.h, print.c,
4593 procs.h, ramap.c, read.c, smob.c, smob.h, srcprop.h, stacks.c,
4594 stacks.h, strports.c, struct.c, struct.h, tag.c, tags.h,
4595 throw.c, unif.c, unif.h, variable.h, vectors.h, weaks.c,
f1267706 4596 weaks.h (SCM_PACK, SCM_UNPACK, SCM_UNPACK_CAR): Renamed from
74a426ae
MD
4597 SCM_ASSCM, SCM_ASWORD, SCM_CARW).
4598
7f782a0a
MD
4599 * numbers.h (SCM_SRS, SCM_INUM): Corrected SCM_ASSCM/ASWORD fixes.
4600
4601 * alist.c, eval.c, net_db.c, posix.c, print.c, snarf.h, struct.c,
4602 tags.h: Fixed copyright notices.
4603
4604 * struct.c, coop-threads.c: SCM_ASSCM/ASWORD fixes.
0cd87628 4605
7f782a0a 46062000-03-12 Marius Vollmer <mvo@zagadka.ping.de>
a00c95d9 4607
0cd87628
MV
4608 * init.c (scm_standard_stream_to_port): Check whether the file
4609 descriptor is valid and substitute "/dev/null" when not.
a00c95d9 4610
f3b5e185
MD
46112000-03-12 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
4612
4613 * coop-defs.h (struct timespec): Conditionally defined.
4614
4615 * coop.c (coop_condition_variable_timed_wait_mutex): Use ETIMEDOUT
4616 instead of ETIME.
38eca29b
MD
4617
4618 * readline.c (match_paren): Bugfix: First arg to select is not
4619 number of descriptors but the number of the highest descriptor +
4620 1.
4621
4622 This is a preliminary attempt at a cleanup of the threads support
4623 code. It moves things to better places, makes arguments more
4624 consistent with the POSIX API (which is used in GNOME's glib), and
4625 adds new functionality.
a00c95d9 4626
38eca29b
MD
4627 * readline.c (scm_init_readline): Added new arg to scm_init_mutex.
4628
4629 * coop-defs.h (scm_mutex_trylock): New macro: alias for
4630 coop_mutex_trylock.
4631 (scm_cond_init): Changed definition to
4632 coop_new_condition_variable_init.
a00c95d9 4633
38eca29b
MD
4634 * coop.c: #include <errno.h>
4635 (coop_timeout_qinsert): Moved here from iselect.c
4636 (coop_new_mutex_init, coop_new_condition_variable_init): New
4637 functions. The strange names are temporary. Use scm_mutex_init
4638 and scm_cond_init instead.
4639 (coop_mutex_trylock): New function. Uses errno.h:EBUSY. errno.h
4640 is ANSI C, but should we check for individual error codes in
4641 configure.in?
4642 (coop_condition_variable_timed_wait_mutex): New function.
4643 (coop_key_create, coop_setspecific, coop_getspecific,
7f782a0a 4644 coop_key_delete): New functions.
38eca29b
MD
4645
4646 * iselect.c (coop_timout_qinsert): Moved to coop.c
4647
32e1616c
MD
46482000-03-11 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
4649
4650 * pairs.h (SCM_SETAND_CAR, SCM_SETAND_CDR, SCM_SETOR_CAR,
4651 SCM_SETOR_CDR): Corrected SCM_ASSCM/WORD fixes.
4652
4653 * tags.h (SCM_VOIDP_TEST): Renamed from VOIDP_TEST.
4654 Layout cleanups.
4655
4656 * objects.h (SCM_CLASS_FLAGS, SCM_OBJ_CLASS_FLAGS,
4657 SCM_SET_CLASS_INSTANCE_SIZE), struct.h (SCM_STRUCT_VTABLE_DATA),
4658 proc.h (SCM_CLOSCAR): SCM_ASSCM/WORD fixes.
4659
4660 * eval.c (scm_lookupcar1): Inserted SCM_ASWORD in expressions
4661 dealing with ilocs.
4662
d5c39069
GB
46632000-03-11 Dale P. Smith <dpsm@en.com>, applied by Greg J. Badros, <gjb@cs.washington.edu>
4664
4665 * numbers.c (scm_copy_big_dec, scm_copy_smaller, scm_big_ior,
4666 scm_big_xor, scm_big_and, scm_big_test): Added new lowlevel bignum
4667 logical functions from SCM.
4668
4669 (logand, logior, logxor, logtest, logbit?): Extended scheme
4670 logical functions to use bignums from SCM.
4671
4672 (lognot): Removed call to `SCM_VALIDATE_INUM' that prevented
4673 lognot from using bignums.
4674
3e892913
GB
4675Thu Mar 9 11:33:25 2000 Greg J. Badros <gjb@cs.washington.edu>
4676
a00c95d9 4677 * vectors.h (SCM_VELTS_AS_STACKITEMS): Added this macro to help in
3e892913
GB
4678 eliminating some warnings.
4679
4680 * unif.c, strports.c, print.c, options.c: Fix some warnings on
4681 mis-use of SCM/long
4682
4683 * gc.c, gc.h: Added scm_return_first_int(), and added comment re:
4684 what the scm_return_first* functions do.
4685
7ac030d6
GB
46862000-03-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>, applied by Greg J. Badros, <gjb@cs.washington.edu>
4687
4688 * libguile/*.[ch]: make a distinction between SCM as a generic
4689 name for a Scheme object (now a void*), and SCM as 32 bit word for
4690 storing tags and immediates (now a long int). Introduced
4691 SCM_ASWORD and SCM_ASSCM for conversion. Fixed various dubious
4692 code in the process: arbiter.c (use macros), unif.c (scm_array_p),
a00c95d9 4693
f635d2d4
GB
4694Wed Mar 8 10:15:59 2000 Greg J. Badros <gjb@cs.washington.edu>
4695
4696 * numbers.c: Use SCM_VALIDATE_LONG_COPY, and longs, not ints, in
4697 various logXXX primitives. Thanks Eric Moore!
4698
9eaa7fb6
GB
4699Tue Mar 7 08:05:22 2000 Greg J. Badros <gjb@cs.washington.edu>
4700
4701 * run-test, remaining-docs-needed: Added these scripts. The
4702 second one is only temporary until the docstring additions are
4703 complete. run-test may best live on, but is here mostly for
4704 convenience and awareness for now.
4705
4706 * hash.c: Docs, minor cleanup patch from Dirk Herrman.
4707
49673698
GB
4708Thu Mar 2 16:06:58 2000 Greg J. Badros <gjb@cs.washington.edu>
4709
4710 * error.h, error.c: Added `scm_wrong_type_arg_msg' to support
4711 displaying the expected type. Use SCM_LISTn in a couple places
4712 instead of scm_cons-ing by hand.
4713
4714 * __scm.h: Added SCM_ASSERT_TYPE macro.
4715
4716 * validate.h, scm_validate.h: Added the former, as a renamed
4717 version of the latter with SCM_ASSERT_TYPE used in
4718 SCM_MAKE_VALIDATE (instead of just SCM_ASSERT)
4719
4720 * Makefile.am: Rename scm_validate.h to validate.h.
4721
4722 * *.c, *.h: Include validate.h, not scm_validate.h (old name's
4723 prefix was superfluous).
4724
417bdef8
GB
4725Thu Mar 2 15:33:12 2000 Greg J. Badros <gjb@cs.washington.edu>
4726
4727 * hashtab.c: Improved documentation for lots of functions. Added
4728 handwritten docs for `hash-fold'.
4729
4730Thu Mar 2 15:13:25 2000 Greg J. Badros <gjb@cs.washington.edu>
4731
4732 * list.c: Added hand-written docs for `del{q,v,ete}1!'.
4733
26a760c6
GB
4734Thu Mar 2 12:38:30 2000 Greg J. Badros <gjb@cs.washington.edu>
4735
a00c95d9 4736 * list.c: Moved append docs to append! Thanks Dirk Hermann. Also,
26a760c6
GB
4737 added append docs from R4RS.
4738
4739 * strings.c: Docstring typo fix, + eliminate unneeded IMP tests.
4740 Thanks Dirk Hermann!
4741
4742 * chars.h: Provide SCM_CHARP, SCM_CHAR, SCM_MAKE_CHAR and
4743 deprecate SCM_ICHRP, SCM_ICHR, SCM_MAKICHR. Thanks Dirk Hermann!
a00c95d9 4744
26a760c6
GB
4745 * *.h, *.c: Use SCM_CHARP, SCM_CHAR, SCM_MAKE_CHAR throughout.
4746 Drop use of SCM_P for function prototypes... assume an ANSI C
4747 compiler. Thanks Dirk Hermann!
4748
898942f8
GB
4749Sat Feb 19 12:20:12 2000 Greg J. Badros <gjb@cs.washington.edu>
4750
4751 * ports.c: Made `set-port-column!' and `set-port-line!' each
4752 return SCM_UNSPECIFIED instead of a (not-scheme-object) integer
4753 that caused a seg fault. Also fixed `set-port-column!'s
4754 docstring. Thanks Han-Wen Nienhuys for finding the bug!
4755
84a3df2c
GB
4756Sun Feb 13 19:11:42 2000 Greg J. Badros <gjb@cs.washington.edu>
4757
4758 * arbiters.c, eq.c, gc.c, guardians.c, list.c, ports.c, print.c,
a00c95d9 4759 regex-posix.c, scmsigs.c, stime.c, strings.c, variable.c, stime.c,
84a3df2c
GB
4760 strings.c, variable.c: Added lots of documentation, cleaned up
4761 some existing documentation. Occasionally changed formal params
4762 to match docs. Also folded an #ifdef into the inners of a
4763 primitive instead of having two copies of the primitive
4764 (`get-internal-real-time', from stime.c)
4765
4766Sun Feb 13 18:12:19 2000 Greg J. Badros <gjb@cs.washington.edu>
4767
4768 * ports.c: Added docs for primitives missing them. Written by
4769 hand.
4770
3f557de6
GB
4771Sun Feb 13 09:40:36 2000 Greg J. Badros <gjb@cs.washington.edu>
4772
4773 * guile-doc-snarf.in: Use ${AWK} -f guile-func-name-check, not
4774 just execing guile-func-name-check. Thanks Michael Livshin!
4775
ddcccdb3
GB
4776Thu Feb 10 11:43:23 2000 Greg J. Badros <gjb@cs.washington.edu>
4777
4778 * guile-snarf.awk.in: Tweak to work with Sun/HP awk, removed some
4779 dead code. Patch from Michael Livshin.
4780
4781 * guile-doc-snarf.in: Tweak to work with Sun/HP sh. Patch from
4782 Michael Livshin.
4783
720e8692
GH
47842000-02-09 Gary Houston <ghouston@arglist.com>
4785
4786 * init.c (scm_init_standard_ports): when stdout is a tty, make the
4787 current-output-port unbuffered by default. this is less confusing
4788 for interactive use. it was line-buffered because of a
4789 performance problem with unbuffered ports, but I think it will be
4790 OK now.
4791
43ff3170
GH
47922000-02-08 Gary Houston <ghouston@arglist.com>
4793
4794 * __scm.h: don't define long_long or ulong_long if HAVE_LONG_LONGS
4795 is not defined.
4796
4797 * stime.c (scm_localtime, scm_mktime): if neither HAVE_TM_ZONE nor
4798 HAVE_TZNAME are defined, use an empty string instead of giving two
4799 spurious compile-time errors.
4800
4ba47302
GB
4801Tue Feb 8 13:57:46 2000 Greg J. Badros <gjb@cs.washington.edu>
4802
4803 * ports.c: Doc patches from Richard Kim. Pasted from MIT Scheme.
4804 Thanks Richard!
4805
09a617f7
GB
4806Mon Feb 7 09:07:31 2000 Greg J. Badros <gjb@cs.washington.edu>
4807
4808 * macros.c: Doc patches from Richard Kim. Pasted from scm.texi.
4809
9dbcf010
GB
4810Sun Feb 6 20:26:21 2000 Greg J. Badros <gjb@cs.washington.edu>
4811
4812 * pairs.c: Doc patches from Richard Kim. Pasted from MIT Scheme
4813 (which is GNU GPL'd).
4814
bd9e24b3
GH
48152000-01-31 Gary Houston <ghouston@arglist.com>
4816
4817 * strings.h: don't use SCM_P. don't include <string.h>.
4818 * error.c, gh_data.c, ports.c, script.c, strop.c: include <string.h>.
a00c95d9 4819
bd9e24b3
GH
4820 * strings.c (scm_string_ref): make the 2nd argument compulsory.
4821 previously it defaulted to zero for no good reason that I can see.
4822 use a local variable for SCM_INUM (k). replace
4823 SCM_VALIDATE_INUM_DEF with SCM_VALIDATE_INUM_COPY.
4824
4825 (scm_makfromstr): cosmetic changes.
4826
4827 (scm_string): Accept only chars in the list, not strings, for
4828 conformance to R5RS (particularly for list->string, which is
4829 supposed to be the inverse of string->list.) remove
4830 SCM_DEFER_INTS/SCM_ALLOW_INTS, which is unnecessary since
4831 scm_makstr handles the cell allocation. when reporting wrong-type
4832 arg, don't report the position as 1.
4833
4834 * posix.c (scm_init_posix): intern PIPE_BUF if it's defined.
4835
28d77376
GH
48362000-01-29 Gary Houston <ghouston@arglist.com>
4837
ae1b098b
GH
4838 * posix.c (scm_pipe): rewrote the docstring.
4839
28d77376
GH
4840 * filesys.c (scm_select, retrieve_select_type, get_element,
4841 fill_select_type, set_element): modified so that Scheme
4842 "select" tests port buffers for the ability to provide input
4843 or accept output. Previously only the underlying file descriptors
4844 were checked. Rewrote the docstring.
a00c95d9 4845
7f1497ce
GB
4846Thu Jan 27 10:14:25 2000 Greg J. Badros <gjb@cs.washington.edu>
4847
4848 * vectors.c, symbols.c, strorder.c: Documentation cut and pasted
4849 from Gregg Reynolds. Thanks Gregg!
4850
2288ff9b
GB
4851Thu Jan 27 09:59:38 2000 Greg J. Badros <gjb@cs.washington.edu>
4852
4853 * strop.c (scm_i_index): Obfuscated commented-out SCM_DEFINE by
4854 adding "x" prefix to the line so that guile-func-name-check
4855 doesn't complain unnecessarily.
4856
349af6dd
GB
4857Wed Jan 26 17:33:52 2000 Greg J. Badros <gjb@cs.washington.edu>
4858
4859 * throw.c: Factor out an #ifdef/#else/#endif choice more finely
4860 for maintainability.
4861
4862 * strop.c: Documentation added by Gregg A. Reynolds. Pasted in
4863 from qdocs, RnRs.
4864
a28eb127
GB
4865Wed Jan 26 10:02:11 2000 Greg J. Badros <gjb@cs.washington.edu>
4866
a00c95d9 4867 * tag.c: Added doc for `tag', but mark as deprecated since Mikael
a28eb127
GB
4868 suggests removing tag.c altogether (and using a new `class-of'
4869 instead).
4870
4871 * strings.c: Added documentation from Gregg A. Reynolds. Edited
4872 a bit by me to use FOO instead of @var{foo} and to have the
a00c95d9 4873 summary come before preconditions on input. Also dropped trailing
a28eb127
GB
4874 (rnrs) note.
4875
4876 * gsubr.c: Do not use SCM_DEFINE for `gsubr-apply'. Register the
4877 function with scm_make_subr_opt w/ last arg of 0 so it is not
4878 visible at the Scheme level. Mikael says that this is the right
4879 thing because the first arg to the proc is the guts of a compiled
4880 closure and shouldn't be exposed to the Scheme level.
4881
ac2259fc
GB
4882Tue Jan 25 17:15:47 2000 Greg J. Badros <gjb@cs.washington.edu>
4883
4884 * sort.c: typo in comment fixed.
4885
4886 * keywords.c: Added documentation.
4887
4888 * guardians.c: Added documentation (could be better).
4889
4890 * gc.c: Added docs for gc-set-debug-check-freelist.
4891
4892 * eq.c: Added docs for eq?, eqv? equal? abridged from R4RS.
4893
4894 * boolean.c: Added docs for `not', `boolean?' (by hand).
a00c95d9 4895
d928e0b4
GB
4896Tue Jan 25 13:28:56 2000 Greg J. Badros <gjb@cs.washington.edu>
4897
4898 * random.c: Added documentation, from SLIB page:
4899 http://angela.ctrl-c.liu.se/~calle/scheme/slib_toc.html
4900
4901Mon Jan 24 17:50:20 2000 Greg J. Badros <gjb@cs.washington.edu>
4902
4903 * variable.c, version.c: Added documentation, written by hand
4904 since I could not find anything already written that was
4905 relevant.
4906
d831b039
GH
49072000-01-23 Gary Houston <ghouston@arglist.com>
4908
a00c95d9 4909 * filesys.c (scm_chown): omit port/fdes support if HAVE_FCHOWN is
d831b039
GH
4910 not defined (thanks to Richard Y. Kim).
4911
88ec97ad
GB
4912Thu Jan 20 13:00:38 2000 Greg J. Badros <gjb@cs.washington.edu>
4913
4914 * Makefile.in: Removed, this is auto-generated.
4915
078e9092
GB
4916Thu Jan 20 11:33:47 2000 Dirk Hermann <dirk@ida.ing.tu-bs.de> --applied 01/20/00 gjb
4917
4918 * list.c: Put some variable initialization code at the point of
4919 declaration; Added a comment for list*; Formatting changes.
4920
4921 * load.c: use SCM_NNULLP to make sure the end of a list is not
4922 reached yet.
4923
e7a96050
MD
49242000-01-18 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4925
a177af34
MD
4926 * backtrace.c (scm_display_error_message): Bugfix: Don't use
4927 result of scm_list_p as C boolean.
4928 (scm_display_error_message, scm_set_print_params_x): Use new
4929 validation macros. (Thanks to Dirk Herrmann.)
4930
d06bcb02
MD
4931 * net_db.c (scm_resolv_error): Cast result from hstrerror.
4932
4933 * strports.c (st_end_input): Inserted parenthesis to get operator
4934 grouping correct.
4935
4936 * list.h (scm_init_list): Removed SCM_P around prototypes.
4937
4938 * fports.c, list.c, numbers.c, ports.c, stime.c, symbols.c,
4939 filesys.c, posix.c: Converted docstrings to ANSI C format and
e7a96050
MD
4940 escaped " occurring inside string literals.
4941
682eefe9
MD
4942Tue Jan 18 13:21:08 2000 Mikael Djurfeldt <mdj@r11n07-s.pdc.kth.se>
4943
4944 * posix.c (scm_mknod): Escape " occuring inside docstring.
4945
56cfe22b
MD
49462000-01-18 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
4947
4948 * alist.c, chars.c, debug.c, dynl.c, dynwind.c, error.c, eval.c,
4949 evalext.c, filesys.c, gc.c, hash.c, hashtab.c, ioext.c,
4950 keywords.c, list.c, load.c, macros.c, net_db.c, numbers.c,
4951 objprop.c, ports.c, posix.c, print.c, procprop.c, procs.c,
4952 ramap.c, regex-posix.c, root.c, scmsigs.c, simpos.c, socket.c,
4953 stacks.c, stime.c, strings.c, strop.c, strports.c, struct.c,
4954 symbols.c, throw.c, unif.c, vectors.c, version.c, vports.c,
4955 weaks.c: Converted docstrings to ANSI C format.
a00c95d9 4956
56cfe22b
MD
4957 * filesys.c (scm_chmod), simpos.c (scm_system), version
4958 (scm_version), vports (scm_make_soft_port): Escape " occuring
4959 inside docstring.
4960
fcb1720f
GB
4961Mon Jan 17 11:41:22 2000 Greg J. Badros <gjb@cs.washington.edu>
4962
4963 * scm_validate.h: Added SCM_VALIDATE_ULONG_COPY,
4964 SCM_VALIDATE_LONG_COPY
4965
4966 * numbers.c: Use SCM_VALIDATE_ULONG_COPY, instead of
4967 SCM_VALIDATE_INUM_COPY to let bigger numbers be used. Rename a
4968 couple of formal arguments (and fix their uses) to make arguments
4969 match the documentation.
4970
b9af3d0e
MS
49712000-01-14 <mstachow@alum.mit.edu>
4972
4973 * Makefile.am: Augment path when running guile-doc-snarf so
4974 guile-func-name-check is found.
4975
153511a7
GB
4976Fri Jan 14 09:34:55 2000 Greg J. Badros <gjb@cs.washington.edu>
4977
4978 * scm_validate.h (SCM_NUM2LONG_DEF): Fix this macro to just use
4979 def, not SCM_MAKINUM(def); thanks Janis Bzerins!
4980
59d5245f
GB
4981Wed Jan 12 00:06:53 2000 Greg J. Badros <gjb@cs.washington.edu>
4982
4983 * net_db.c (s_scm_inet_makeaddr): Use SCM_NUM2ULONG since that's
4984 the way guile-1.3.4 worked, but #if 0 out the version using
4985 SCM_VALIDATE_INUM_COPY for stricter testing.
4986
95aec69f
GB
4987Tue Jan 11 18:24:18 2000 Greg J. Badros <gjb@cs.washington.edu>
4988
4989 * guile-doc-snarf.in: Use new $fullfilename for running
4990 guile-func-name-check, and put "$fullfilename" and "$filename" in
4991 quotes at uses to make sure re-splitting on whitespace does not
a00c95d9 4992 occur (so filenames w/ embedded whitespace would work okay, though
95aec69f
GB
4993 I sure hope we never have to deal with that! :-) ). Thanks to
4994 Mikael for pointing out the source_dir != build_dir was broken.
4995
b7ac2837
GB
4996Tue Jan 11 17:42:40 2000 Greg J. Badros <gjb@cs.washington.edu>
4997
4998 * scm_validate.h: Added SCM_NUM2LONG_DEF macro. Make
4999 SCM_OUT_OF_RANGE use SCM_MAKINUM, not scm_long2num. Added
5000 SCM_COERCE_ROSTRING macro. Added SCM_VALIDATE_NONEMPTYLIST
5001 macro. Fix SCM_VALIDATE_STRINGORSUBSTR macro to not use SLOPPY
5002 variants.
5003
5004 * ports.c (scm_port_closed_p): Validate that the arg is a PORT,
5005 then return whether it's an open port (was validating that it was
5006 an open port -- this was a bug I introduced back in December, but
5007 my careful reading of diffs caught it).
5008
5009 * numbers.c: Recombine the two conditional-compilation paths for
5010 all the log* primitives -- they were split based on #ifndef
5011 scm_long2num; factored out a SCM_LOGOP_RETURN macro, and fixed
5012 some bugs and inconsistencies in the two sets of implementations.
5013 (scm_lognot) Fixed *atrocious* re-use of a SCM as an integer!
5014
5015 * ioext.c: Use SCM_ASSERT_RANGE in a couple places, and
5016 SCM_VALIDATE_INUM_COPY once where it should've been used.
5017
5018 * fluids.c (scm_internal_with_fluids): Use
5019 SCM_VALIDATE_LIST_COPYLEN.
5020
5021 * filesys.c: Use SCM_NUM2LONG instead of SCM_VALIDATE_INUM_COPY;
5022 this is questionable as it relaxes type safety, but other changes
5023 were useful and all SCM_NUM2LONG's should probably be
5024 revisited. Use SCM_OUT_OF_RANGE, SCM_WRONG_TYPE_ARG.
5025
5026 * evalext.c: line-break change on 1 line.
5027
5028 * eval.c (nconc2last): Takes a non-empty list as its first
5029 argument, not just a list.
5030
5031 * dynl.c: Use new SCM_COERCE_ROSTRING macro.
5032
5033Tue Jan 11 15:44:23 2000 Greg J. Badros <gjb@cs.washington.edu>
5034
5035 * dynl.c, feature.c, filesys.c, fports.c, list.c, load.c,
5036 net_db.c, sort.c, stacks.c, unif.c: Use SCM_WTA, SCM_MISC_ERROR
5037 where possible.
5038
5039 * symbols.c (scm_sysintern0): Fixed the function name in a
5040 scm_misc_error invocation.
5041
5042 * print.c (scm_simple_format): Do not need SCM_COERCE_SUBSTR, and
5043 use scm_return_first to ward off latent GC bug that Mikael caught.
5044
5045 * async.c: Use SCM_VALIDATE_ASYNC_COPY one place where it wasn't
5046 used before but should've been.
5047
d61f6b02
MD
50482000-01-12 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
5049
5050 * snarf.h (SCM_PROC1): Replaced SCM (*) (...) with
5051 SCM_FUNC_CAST_ARBITRARY_ARGS.
5052
88423ab1
GB
5053Tue Jan 11 13:44:07 2000 Greg J. Badros <gjb@cs.washington.edu>
5054
5055 * guile-func-name-check.in: Added this script to statically check
5056 #define FUNC_NAME, #undef FUNC_NAME in the source.
5057
5058 * sort.c, posix.c: Fix #undef FUNC_NAME lines to not have trailing
5059 redundant comment, semicolon; caught by new guile-func-name-check
5060 script.
5061
5062 * debug.c: Fix mistaken #define FUNC_NAME for scm_make_iloc.
5063 Caught by new guile-func-name-check-script.
5064
5065 * Makefile.am: Added guile-func-name-check to bin_SCRIPTS
5066
5067 * ramap.c: Fix #if 0'd out code to be syntactically acceptable to
5068 guile-func-name-check.
5069
a00c95d9 5070 * guile-doc-snarf.in: Run guile-func-name-check on the file before
88423ab1
GB
5071 doing the snarf.
5072
7f15e635
GB
5073Tue Jan 11 11:31:10 2000 Greg J. Badros <gjb@cs.washington.edu>
5074
5075 * fports.c, ports.c, ports.h, strports.c, vports.c: Make write
5076 port function take const void*, not void*.
5077
bf121b59
GB
5078Tue Jan 11 11:18:07 2000 Greg J. Badros <gjb@cs.washington.edu>
5079
5080 * scm_validate.h, chars.c, ports.c, print.c, read.c, strings.c,
5081 strop.c: Use SCM_VALIDATE_ICHR, SCM_VALIDATE_ICHR_COPY instead of
5082 SCM_VALIDATE_CHAR, SCM_VALIDATE_CHAR_COPY. Change made for
5083 consistency with the other macros dealing with immediate
5084 characters. (Similar to INT -> INUM change a week or so ago).
5085
7965d98f
GB
5086Tue Jan 11 10:41:46 2000 Greg J. Badros <gjb@cs.washington.edu>
5087
5088 * dynl.c, error.c, eval.c, feature.c, filesys.c, fports.c, list.c, load.c,
5089 net_db.c, read.c, socket.c: Update error messages to use ~A for
5090 %s, ~S for %S to work with new `simple-format' format and be
5091 standardized better.
5092
5093 * print.h, print.c (scm_simple_format): Added `simple-format'
5094 primitive. It's the old scm_display_error, with ARGS now a rest
a00c95d9 5095 parameter, and the destination first instead of last (and a couple
7965d98f
GB
5096 new capabilities inspired by `format' -- #t as destination means
5097 current-output-port, #f means return the formatted text as a
5098 string.
5099
5100 * gh.h, gh_data.c, ports.h, ports.c: Added some missing const specifications.
5101
5102 * backtrace.c (scm_display_error_message): Rewrote to use
5103 scm_simple_format() procedure.
5104
5105 * __scm.h: Added commented-out #define of GUILE_DEBUG_FREELIST
5106
f73d2411
MV
51072000-01-09 Marius Vollmer <mvo@zagadka.ping.de>
5108
5109 Finally applied the libltdl patch from Thomas Tanner, with slight
5110 modifications.
5111
5112 * DYNAMIC-LINKING: Removed because it is obsolete.
5113 * dynl.c: Use ANSI prototypes.
5114 (sysdep_dynl_link): Use lt_dlopenext instead of lt_dlopen.
5115 * scmconfig.h.in: Do not change, as it is automatically generated.
a00c95d9 5116
f73d2411
MV
5117 1999-07-25 Thomas Tanner <tanner@ffii.org>
5118
5119 * dynl-dl.c, dynl-dld.c, dynl-shl.c, dynl-vms.c: deleted
5120 (obsolete)
5121 * Makefile.am: likewise, add INCLTDL (libltdl headers) to
5122 INCLUDES, set dlpreopened files in LDFLAGS, link libguile
5123 against libltdl
5124 * dynl.c: use libltdl if DYNAMIC_LINKING is enabled,
5125 * guile.c: register preloaded modules
5126 * scmconfig.h.in: remove obsolete symbols
5127
38c1d3c4
GH
51282000-01-09 Gary Houston <ghouston@arglist.com>
5129
5130 * These changes should make it unnecessary to call tzset from
5131 Scheme after modifying the TZ environment variable, even if the
5132 system date facilities cache the value.
5133 * stime.c (setzone, scm_localtime): added comments.
5134 (tzset): don't define a noop tzset macro if HAVE_TZSET not defined.
5135 (setzone): don't call tzset.
5136 (restorezone): call tzset only if HAVE_TZSET is defined.
5137 (scm_tzset): don't define if HAVE_TZSET not defined. Change the
5138 doc string to indicate that this procedure isn't likely to do
5139 anything useful.
5140 (scm_localtime, scm_strftime, scm_mktime): call tzset if
5141 LOCALTIME_CACHE is defined.
5142
9359d657
MD
51432000-01-09 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
5144
5145 * posix.c (scm_sync): Return SCM_UNSPECIFIED.
5146
f25f761d
GH
51472000-01-09 Gary Houston <ghouston@arglist.com>
5148
5149 * eval.c: define scm_unbound_variable_key ('unbound-variable).
5150 scm_lookupcar1: throw an error with key 'unbound-variable instead
5151 of 'misc-error when an unbound variable is encountered.
5152
a00c95d9 5153 * filesys.c (scm_mkdir, scm_rmdir, scm_getcwd, scm_select,
f25f761d
GH
5154 scm_symlink, scm_readlink, scm_lstat),
5155 posix.c (scm_setpgid, scm_setsid, scm_ctermid, scm_tcgetpgrp,
5156 scm_tcsetpgrp, scm_uname, scm_setlocale, scm_mknod, scm_nice,
5157 scm_sync),
a00c95d9 5158 simpos.c (scm_system),
f25f761d
GH
5159 stime.c (scm_times, scm_strptime):
5160 move the HAVE_XXX feature tests out of the procedure bodies.
5161 don't use SCM_SYSMISSING.
5162 scm_validate.h (SCM_SYSMISSING): removed.
5163 error.h, error.c (scm_sysmissing): comment that this is deprecated.
5164 see ChangeLog entry for 1999-12-28.
5165
a4dd2611
GB
5166Sat Jan 8 19:52:04 2000 Greg J. Badros <gjb@cs.washington.edu>
5167
5168 * scm_validate.h (SCM_VALIDATE_BOOL_COPY): Fix typo.
5169
5170Sat Jan 8 17:06:46 2000 Greg J. Badros <gjb@cs.washington.edu>
5171
5172 * backtrace.c: Fix spelling typo in a comment.
5173
5174 * snarf.h: Use new SCM_DOCS macro to encapsulate the non SCM_INIT
5175 text. Reformatted some of the expansions.
5176
5ac36451
GB
5177Fri Jan 7 15:50:46 2000 Greg J. Badros <gjb@cs.washington.edu>
5178
5179 * scm_validate.h (SCM_OUT_OF_RANGE): Use scm_out_of_range_pos to
5180 report the position of the argument.
5181
a00c95d9 5182 * error.h, error.c (scm_out_of_range_pos): Added this function to
5ac36451 5183 take extra "pos" argument, the position number of the errant
a00c95d9 5184 argument.
5ac36451
GB
5185
5186 * debug.c: Use SCM_OUT_OF_RANGE instead of scm_out_of_range.
5187
5188 * snarf.h: Use SCM_HERE and SCM_INIT as names, not SCM_NOTSNARF
5189 and SCM_SNARFING. Also put the %%% in the SCM_INIT since Mikael
5190 prefers that and I'm reasonably indifferent.
5191
5192Fri Jan 7 15:03:32 2000 Greg J. Badros <gjb@cs.washington.edu>
5193
5194 * snarf.h: Factor out differences between C++ and non-C++ into
5195 SCM_FUNC_CAST_ARBITRARY_ARGS macro. Modify all the snarf macro
5196 definitions to use SCM_NOTSNARF and SCM_SNARFING macros (like
5197 Mikael's macros, below, but changed names and SCM_SNARFING no
5198 longer expands to include %%% -- that must appear in the argument
5199 so that the token appears at the call-site as a reminder).
5200
088bb1d4
MD
52012000-01-07 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
5202
5203 * snarf.h (SCM_INSITU, SCM_INIT): New snarf macros for use in user
5204 snarf macro definitions.
5205
636480e6
MD
52062000-01-06 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
5207
5208 * chars.c (scm_integer_to_char): Use Greg's nice
5209 SCM_VALIDATE_INUM_RANGE macro for argument checking for closer
5210 adherence to R5RS.
5211
7c5628e2
GB
5212Thu Jan 6 11:48:49 2000 Greg J. Badros <gjb@cs.washington.edu>
5213
5214 * *.c, snarf.h: Replace GUILE_PROC1 with SCM_DEFINE1 throughout.
5215
2cc0f8cb
GB
5216Thu Jan 6 11:22:53 2000 Greg J. Badros <gjb@cs.washington.edu>
5217
5218 * Makefile.am (ETAGS_ARGS): Switch to SCM_DEFINE, SCM_DEFINE1
5219 instead of GUILE_PROC.
5220
5221Thu Jan 6 11:21:49 2000 Greg J. Badros <gjb@cs.washington.edu>
5222
a00c95d9 5223 * alist.c: Do not report mismatch errors on some uses of `tmp' (do
2cc0f8cb
GB
5224 this by using SCM_ARG2 instead of `2' in the SCM_VALIDATE_CONS
5225 macro call.
5226
9179dcdd
GB
5227Thu Jan 6 09:54:33 2000 Dirk Herrmann <dirk@ida.ing.tu-bs.de> --gjb applied
5228
5229 * scm_validate.h: Remove some redundant NIMP tests.
5230
5231 * alist.c: minimize scope of the tmp variables, and initialize
5232 them when declared. The strange SCM_NIMP tests are replaced by
5233 SCM_CONSP tests that more closely reflect the intended semantics.
5234 However, we don't get a performance penalty here, because the
5235 SCM_CONSP test was performed by the ALISTCELL test anyway. * The
5236 extremely ugly use of ASRTGO macros was removed: The calls to
5237 ASRTGO were not encapsulated by "#ifndef SCM_RECKLESS", but got a
5238 label parameter that only exists when SCM_RECKLESS is not defined.
5239 This works, because ASRTGO itself is defined in a way that it only
5240 makes use of the label parameter if SCM_RECKLESS is not defined
5241 (shudder!). Does guile make at all use of the possibility to
5242 define SCM_RECKLESS? * Codesize is likely to be reduced, since
5243 instead of two calls to SCM_ASSERT performed by the ALISTCELL test
5244 we now only get one test.
5245
5246 * list.c: Use SCM_NNULLP, not SCM_NIMP as appropriate. Also use
5247 SCM_NULLP instead of SCM_IMP. Drop use of "register" keyword on
5248 some variables in `list?'. Fix `reverse' and `reverse!'
5249 primitives to handle improper lists better.
5250
15b33280
GB
5251Wed Jan 5 11:24:53 2000 Greg J. Badros <gjb@cs.washington.edu>
5252
5253 * *.[ch]: Whitespace changes -- added space after SCM_VALIDATE_*
5254 macros and SCM_DEFINE macros to match GNU coding standards.
5255
ca8cd130
GB
5256Wed Jan 5 11:04:24 2000 Greg J. Badros <gjb@cs.washington.edu>
5257
5258 * *.[ch]: Replace GUILE_PROC w/ SCM_DEFINE.
5259
fb764465
GB
5260Wed Jan 5 10:59:06 2000 Greg J. Badros <gjb@cs.washington.edu>
5261
5262 * *.[ch]: Replace SCM_VALIDATE_INT w/ SCM_VALIDATE_INUM for
5263 better consistency with the names of other SCM_VALIDATE_ macros
5264 and better conformance to guile naming policy.
5265
5266Wed Jan 5 10:50:39 2000 Greg J. Badros <gjb@cs.washington.edu>
5267
5268 * ports.c (s_scm_close_all_ports_except): Use SCM_ARG1 in a
5269 SCM_VALIDATE instead of 1 to avoid a check on the argument (since
5270 it's not the actual name of the formal).
1e484823
GB
5271
5272 * guile-snarf.awk.in: Do argument/number mismatch checking and
5273 print warnings in an Emacs compile-mode parseable format.
5274
5275 * struct.c: Use SCM_ASSERT_RANGE instead of SCM_ASSERT w/
5276 SCM_OUTOFRANGE as 3rd argument.
5277
5278 * random.c: Fix argument/number mismatch (that I introduced :-( ).
5279
5280 * __scm.h: Do not #define SCM_ARG* when snarfing;
5281 lets us distinguish between 1 and SCM_ARG1 when snarfing as only
5282 the former (using the number) requires the argument to match the
5283 formal in the current argument snarfing check.
5284
5285 * snarf.h: Give new definition of SCM_ASSERT when in
a00c95d9 5286 snarfing mode to output a lexically-identifiable sequence that the
1e484823
GB
5287 guile-snarf.awk script uses to verify argument/position matching.
5288
5289 * ramap.c: Remove extraneous #undef FUNC_NAME.
5290
53fc4636
GB
5291Wed Jan 5 08:36:38 2000 Greg J. Badros <gjb@cs.washington.edu>
5292
5293 * guile-doc-snarf.awk.in: Removed -- guile-snarf.awk.in is the
a00c95d9 5294 current version of the same functionality; it writes the .x output
53fc4636
GB
5295 to stdout instead of directly into the file.
5296
5297Wed Jan 5 08:15:04 2000 Greg J. Badros <gjb@cs.washington.edu>
5298
5299 * unif.c, symbols.c, strings.c, stacks.c, random.c, print.c,
5300 posix.c: Eliminated a bunch of SCM_NIMP(..)s that are now
5301 redundant with the safer macros. Patch from Dirk Hermann applied
5302 by hand. Thanks Dirk!
5303
5304 * scm_validate.h: Added SCM_VALIDATE_VECTOR_OR_DVECTOR for some
5305 uses in random.c.
5306
5307 * ramap.c: whitespace change.
5308
3b5345d9
GB
5309Tue Jan 4 14:21:35 2000 Greg J. Badros <gjb@cs.washington.edu>
5310
5311 * options.c, objects.c, keywords.c, gc.c: Some redundant SCM_NIMP
5312 removals from Dirk Hermann.
5313
5314 * alist.c: Rename formals to match the parameter names in the
5315 documentation, updates to documentation. Thanks Dirk Hermann!
5316
169aec65
MD
53172000-01-04 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
5318
db62436e
MD
5319 * eval.c (SCM_CEVAL): Reverse order of
5320 scm_stack_checking_enabled_p and SCM_STACK_OVERFLOW_P
5321 (Thanks to Brad Knotwell.)
169aec65 5322
da43d822
GB
5323Mon Jan 3 08:30:02 2000 Greg Harvey <Greg.Harvey@thezone.net> (applied --01/03/00 gjb)
5324
5325 * gc.c (scm_debug_newcell): Added SCM_SETCAR of the newly
a00c95d9 5326 allocated cell.
da43d822
GB
5327
5328 * pairs.h: Added a comment about the need for the SCM_SETCAR in
5329 SCM_NEWCELL macro.
5330
5331Mon Jan 3 08:25:19 2000 Greg J. Badros <gjb@cs.washington.edu>
5332
5333 * dynl-vms.c, debug.c, coop-threads.c, backtrace.c, eval.c: More
5334 SCM_NIMP tests that were redundant are now eliminated. Patches
5335 from Dirk Hermann applied by hand.
5336
339999c7 5337The ChangeLog continues in the file: "ChangeLog-1996-1999"