See ChangeLog from 2005-03-02.
[bpt/guile.git] / libguile / ChangeLog
1 2005-03-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2
3 Big merge from the mvo-thread-cleanup branch. The main changes
4 are:
5
6 - The dynamic roots functionality has been split into dynamic
7 states and continuations barriers. Fluids have been
8 reimplemented and can now be garbage collected.
9
10 - Initialization of Guile now works in a multi-thread friendly
11 manner. Threads can freely enter and leave guile mode.
12
13 - Blocking on mutexes or condition variables or while selecting
14 can now be reliably interrupted via system asyncs.
15
16 - The low-level threading interface has been removed.
17
18 - Signals are delivered via a pipe to a dedicated 'signal delivery
19 thread'.
20
21 - SCM_DEFER_INTS, SCM_ALLOW_INTS etc have been deprecated.
22
23 * throw.c (scm_handle_by_message): Exit only the current thread,
24 not the whole process.
25 (scm_handle_by_message_noexit): Exit when catching 'quit.
26
27 * scmsigs.c (take_signal, signal_delivery_thread,
28 start_signal_delivery_thread, ensure_signal_delivery_thread,
29 install_handler): Reimplemented signal delivery as explained in
30 the comments.
31
32 * pthreads-threads.h (scm_i_pthread_t, scm_i_pthread_self,
33 scm_i_pthread_create, scm_i_pthread_detach, scm_i_pthread_exit,
34 scm_i_sched_yield, scm_i_pthread_sigmask,
35 SCM_I_PTHREAD_MUTEX_INITIALIZER,
36 SCM_I_PTHREAD_RECURSIVE_MUTEX_INITIALIZER, scm_i_pthread_mutex_t ,
37 scm_i_pthread_mutex_init, scm_i_pthread_mutex_destroy,
38 scm_i_pthread_mutex_trylock, scm_i_pthread_mutex_lock,
39 scm_i_pthread_mutex_unlock, SCM_I_PTHREAD_COND_INITIALIZER,
40 scm_i_pthread_cond_t, scm_i_pthread_cond_init,
41 scm_i_pthread_cond_destroy, scm_i_pthread_cond_signal,
42 scm_i_pthread_cond_broadcast, scm_i_pthread_cond_wait,
43 scm_i_pthread_cond_timedwait, scm_i_pthread_once_t,
44 SCM_I_PTHREAD_ONCE_INIT, scm_i_pthread_once, scm_i_pthread_key_t ,
45 scm_i_pthread_key_create, scm_i_pthread_setspecific,
46 scm_i_pthread_getspecific, scm_i_scm_pthread_mutex_lock,
47 scm_i_frame_pthread_mutex_lock, scm_i_scm_pthread_cond_wait,
48 scm_i_scm_pthread_cond_timedwait): Provide the obvious mapping
49 when using pthreads.
50 * null-threads.c, null-threads.h: Provide dummy definitions for
51 the above symbols when not using pthreads.
52
53 * modules.h, modules.c (scm_frame_current_module): New.
54
55 * load.c (scm_primitive_load): Use scm_i_frame_current_load_port
56 instead of scm_internal_dynamic_wind.
57
58 * init.h, init.c (restart_stack, start_stack): Removed.
59 (scm_boot_guile, invoke_main_func): Simply use scm_with_guile.
60 (scm_boot_guile_1): Removed.
61 (scm_i_init_mutex): New.
62 (really_cleanup_for_exit, cleanup_for_exit): New.
63 (scm_init_guile_1, scm_i_init_guile): Renamed former to latter.
64 Moved around some init funcs. Call
65 scm_init_threads_default_dynamic_state. Register cleanup_for_exit
66 with atexit.
67
68 * hashtab.c (scm_hash_fn_create_handle_x, scm_hash_fn_remove_x):
69 Use "!scm_is_eq" instead of "!=".
70
71 * ge-scmconfig.c, gen-scmconfig.h.in (SCM_I_GSC_USE_COOP_THREADS,
72 SCM_USE_COOP_THREADS): Removed.
73
74 * gc.c (scm_igc): Take care that scm_gc_running_p is properly
75 maintained. Unlock scm_i_sweep_mutex before running
76 scm_after_gc_c_hook.
77 (scm_permanent_object): Allocate outside of critical section.
78 (cleanup): Removed.
79
80 * fluids.h, fluids.c: Reimplemented completely.
81 (SCM_FLUID_NUM, SCM_FAST_FLUID_REF,
82 SCM_FAST_FLUID_SET): Reimplemented as functions.
83 (scm_is_fluid): New.
84 (scm_i_make_initial_fluids, scm_i_copy_fluids): Removed.
85 (scm_make_dynamic_state, scm_dynamic_state_p,
86 scm_is_dynamic_state, scm_current_dynamic_state,
87 scm_set_current_dynamic_state, scm_frame_current_dynamic_state,
88 scm_c_with_dynamic_state, scm_with_dynamic_state,
89 scm_i_make_initial_dynamic_state, scm_fluids_prehistory): New.
90
91 * feature.c (progargs_fluid): New.
92 (scm_program_arguments, scm_set_program_arguments): Use it instead
93 of scm_progargs.
94 (scm_init_feature): Allocate it. Also, only add "threads" feature
95 when SCM_USE_PTHREAD_THREADS is true.
96
97 * eval.c (scm_makprom): Use scm_make_recursive_mutex instead of
98 scm_make_rec_mutex, with all the consequences.
99 (scm_eval_x, scm_eval): Use scm_frame_begin etc instead of
100 scm_internal_dynamic_wind. Handle dynamic states as second
101 argument.
102
103 * threads.h, threads.c (scm_internal_select): Renamed to
104 scm_std_select and discouraged old name.
105 (scm_thread_sleep, scm_thread_usleep): Likewise, as scm_std_sleep
106 and scm_std_usleep.
107 (scm_tc16_fair_mutex, scm_tc16_fair_condvar, SCM_MUTEXP,
108 SCM_FAIR_MUTEX_P, SCM_MUTEX_DATA, SCM_CONDVARP,
109 SCM_FAIR_CONDVAR_P, SCM_CONDVAR_DATA, SCM_THREADP,
110 SCM_THREAD_DATA): Removed.
111 (SCM_I_IS_THREAD, SCM_I_THREAD_DATA): New.
112 (scm_i_thread): New.
113 (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR):
114 Use scm_assert_smob_type.
115 (scm_c_scm2thread, scm_thread_join, scm_thread_detach,
116 scm_thread_self, scm_thread_yield, scm_mutex_init,
117 scm_mutex_destroy, scm_mutex_trylock, scm_mutex_unlock,
118 scm_rec_mutex_init, scm_rec_mutex_destroy, scm_make_rec_mutex,
119 scm_rec_mutex_free, scm_rec_mutex_lock, scm_rec_mutex_trylock,
120 scm_cond_init, scm_cond_destroy, scm_cond_wait,
121 scm_cond_timedwait, scm_cond_signal, scm_cond_broadcast,
122 scm_key_create, scm_key_delete, scm_setspecific, scm_getspecific,
123 scm_thread_select): Removed. Replaced with scm_i_pthread
124 functions as appropriate.
125 (scm_in_guile, scm_outside_guile): Removed.
126 (scm_t_guile_ticket, scm_leave_guile, scm_enter_guile): Return and
127 take a ticket.
128 (scm_with_guile, scm_without_guile, scm_i_with_guile_and_parent):
129 New.
130 (scm_i_frame_single_threaded): New.
131 (scm_init_threads_default_dynamic_state): New.
132 (scm_i_create_thread): Removed.
133 (scm_make_fair_mutex, scm_make_fair_condition_variable): Removed.
134 (scm_make_recursive_mutex): New.
135 (scm_frame_critical_section): New.
136 (SCM_CURRENT_THREAD, SCM_I_CURRENT_THREAD): Renamed former to
137 latter, changed all uses.
138 (scm_i_dynwinds, scm_i_setdynwinds, scm_i_last_debug_frame,
139 scm_i_set_last_debug_frame): New, use them instead of scm_root
140 stuff.
141 (SCM_THREAD_LOCAL_DATA, SCM_SET_THREAD_LOCAL_DATA,
142 scm_i_root_state_key,m scm_i_set_thread_data): Removed.
143 (scm_pthread_mutex_lock, scm_frame_pthread_mutex_lock,
144 scm_pthread_cond_wait, scm_pthread_cond_timedwait).
145 (remqueue): Allow the removal of already removed cells. Indicate
146 whether a real removal has happened.
147 (scm_thread): Removed, replaced with scm_i_thread.
148 (make_thread, init_thread_creatant): Removed.
149 (cur_thread): Removed.
150 (block_self, unblock_from_queue): New.
151 (block, timed_block, unblock): Removed.
152 (guilify_self_1, guilify_self_2, do_thread_exit,
153 init_thread_key_once, init_thread_key,
154 scm_i_init_thread_for_guile, get_thread_stack_base,
155 scm_init_guile): New initialisation method.
156 (scm_call_with_new_thread, scm_spawn_thread): Use it to simplify
157 thread creation.
158 (fair_mutex, fat_mutex, etc, fair_condvar, fat_condvar): Renamed
159 "fair" to fat and implemented new semantics, including reliable
160 interruption.
161 (all_threads): Now a pointer to a scm_i_thread, not a SCM.
162 (scm_threads_mark_stacks): Explicitly mark handle.
163 (scm_std_select): Allow interruption by also selecting on the
164 sleep_pipe.
165 (scm_i_thread_put_to_sleep): Handle recursive requests for
166 single-threadedness.
167 (scm_threads_prehistory, scm_init_threads): Put current thread
168 into guile mode via guileify_self_1 and guileify_self_2,
169 respectively.
170
171 * fluid.h (SCM_FLUIDP): Deprecated.
172
173 * coop-threads.c: Removed.
174
175 * continuations.h, continuations.c (scm_with_continuation_barrier,
176 scm_c_with_continuation_barrier, scm_i_with_continuation_barrier):
177 New.
178
179 * async.h, async.c (scm_i_setup_sleep, scm_i_reset_sleep): New.
180 (async_mutex): New.
181 (scm_async_click): Protected with async_mutex. Do not deal with
182 signal_asyncs, which are gone. Set cdr of handled async cell to
183 #f.
184 (scm_i_queue_async_cell): Protected with async_mutex. Interrupt
185 current sleep.
186 (scm_system_async_mark_for_thread): Do not use scm_current_thread
187 since that might not work during early initialization.
188
189 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS, SCM_REDEFER_INTS,
190 SCM_REALLOW_INTS): Deprecated by moving into deprecated.h and
191 deprecated.c. Replaced all uses with SCM_CRITICAL_SECTION_START
192 and SCM_CRITICAL_SECTION_END.
193 (SCM_ENTER_A_SECTION, SCM_EXIT_A_SECTION): Removed. Replaced with
194 SCM_CRITICAL_SECTION_START/END.
195
196 * Makefile.am (modinclude_HEADER): Removed threads-plugin.h.
197 (libguile_la_SOURCES): Added null-threads.c
198 (EXTRA_libguile_la_SOURCES): Removed pthread-threads.c and
199 threads-plugin.c.
200 * pthread-threads.c, threads-plugin.c, threads-plugin.h: Removed.
201
202 * root.h, root.c (scm_tc16_root, SCM_ROOTP, SCM_ROOT_STATE,
203 scm_root_state, scm_stack_base, scm_save_regs_gc_mark,
204 scm_errjmp_bad, scm_rootcont, scm_dynwinds, scm_progargs,
205 scm_last_debug_frame, scm_exitval, scm_cur_inp, scm_outp,
206 scm_cur_err, scm_cur_loadp, scm_root, scm_set_root,
207 scm_make_root): Removed or deprecated. Replaced with references
208 to the current thread, dynamic state, continuation barrier, or
209 some fluid, as appropriate.
210 (root_mark, root_print): Removed.
211 (scm_internal_cwdr): Reimplemented guts with
212 scm_frame_current_dynamic_state and
213 scm_i_with_continuation_barrier.
214 (scm_dynamic_root): Return current continuation barrier.
215
216
217 2005-02-28 Marius Vollmer <mvo@zagadka.de>
218
219 * socket.c (scm_setsockopt): Handle IP_ADD_MEMBERSHIP and
220 IP_DROP_MEMBERSHIP options. Also, reorganized the code a bit for
221 cleanliness.
222 (scm_init_socket): Define IP_ADD_MEMBERSHIP and
223 IP_DROP_MEMBERSHIP.
224 Thanks to Greg Troxel!
225
226 2005-02-27 Mikael Djurfeldt <djurfeldt@nada.kth.se>
227
228 * gh.h: Bugfix: Include <libguile.h> outside of the extern "C"
229 block.
230
231 2005-02-25 Marius Vollmer <mvo@zagadka.de>
232
233 * hashtab.c (scm_i_rehash): Remove elements from old bucket vector
234 so that no two weak alist vectors share a spine.
235 (scm_hash_fn_create_handle_x): Deal with a possible rehashing
236 during GC before inserting the new alist cell.
237
238 2005-02-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
239
240 * hashtab.c (scm_i_rehash): Cope with the case that a GC modifies
241 the hashtable.
242 (scm_hash_fn_create_handle_x): Likewise.
243 * vectors.h (SCM_I_SET_WVECT_TYPE): New, for use in scm_i_rehash.
244
245 2005-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
246
247 * unif.c (prototype_to_type): Bugfix: Don't compare prototype to
248 the prototypical examples mentioned in the old reference manual.
249 Instead keep the old semantics of dispatching on type. (Yes, this
250 is extremely ugly, but the whole point of keeping the deprecated
251 interface is not to break old code.)
252
253 2005-02-08 Mikael Djurfeldt <djurfeldt@nada.kth.se>
254
255 * deprecated.h (SCM_ARRAY_DIMS): Rename scm_i_attay_dims -->
256 scm_i_array_dims.
257
258 2005-01-28 Kevin Ryde <user42@zip.com.au>
259
260 * numbers.c (scm_ash): Rewrite using shifts, much faster than
261 integer-expt and multiply/divide. Inexacts and fractions no longer
262 supported (they happened to work before for left shifts, but not
263 right). Don't really need inexacts and fractions, since ash is
264 documented as a "bitwise operation", and all the rest of those only
265 take exact integers.
266
267 2005-01-27 Han-Wen Nienhuys <hanwen@xs4all.nl>
268
269 * gc-card.c (scm_i_card_statistics): map structs, closures and
270 subrs to one tag.
271
272 * gc.c (s_scm_gc_live_object_stats): return alist, not hashtable.
273 (tag_table_to_type_alist): ignore unknown types.
274
275 * gc-segment.c (scm_i_all_segments_statistics): new function.
276 (scm_i_heap_segment_statistics): new function
277
278 * gc.c (s_scm_gc_live_object_stats): new GUILE callable: return
279 statistics on the number of live objects of each type.
280
281 * gc-card.c (scm_i_tag_name): new function.
282 (scm_i_card_statistics): new function.
283
284 2005-01-24 Kevin Ryde <user42@zip.com.au>
285
286 * posix.c (scm_setlocale): Force errno=EINVAL for an error, since
287 POSIX and C99 don't document errno being set. Reported by Bruno
288 Haible.
289 (scm_flock): Update docstring from manual.
290
291 * random.c (scm_i_init_rstate): Compare w to -1 not 0xffffffffUL, now
292 that it's an scm_t_int32. Otherwise gcc 3.4 says it's always false on
293 a 64-bit system.
294
295 * scmsigs.c (scm_sigaction_for_thread): Use scm_to_long for
296 sa_handler, needs to be a long on 64-bit systems where int is only 32
297 bits.
298
299 2005-01-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
300
301 * environments.c (obarray_enter, obarray_replace): Call
302 SCM_HASHTABLE_INCREMENT when adding a new entry.
303
304 * objects.c: Include goops.h for the scm_class_of prototype.
305
306 * hashtab.c (hashtable_size, HASHTABLE_SIZE_N): Restrict hashtable
307 sizes to be smaller than the maximum lengths of vectors.
308
309 2005-01-18 Marius Vollmer <marius.vollmer@uni-dortmund.de>
310
311 * ports.c, smob.c: Include "libguile/goops.h".
312
313 * objects.h, objects.c, goops.c, goops.h (scm_class_boolean,
314 scm_class_char, scm_class_pair, scm_class_procedure,
315 scm_class_string, scm_class_symbol,
316 scm_class_procedure_with_setter, scm_class_primitive_generic,
317 scm_class_vector, scm_class_null, scm_class_real,
318 scm_class_complex, scm_class_integer, scm_class_fraction,
319 scm_class_unknown, scm_port_class, scm_smob_class,
320 scm_no_applicable_method, scm_class_of): Moved from objects to
321 goops since they are only useable once goops has been loaded.
322 (scm_classes_initialized): Removed.
323 (scm_class_of): Do not check it.
324 (create_standard_classes): Do not set it.
325
326 2005-01-17 Marius Vollmer <marius.vollmer@uni-dortmund.de>
327
328 * objects.h, objects.c (scm_classes_initialized): New.
329 (scm_class_of): Signal error when scm_classes_initialized is zero.
330 * goops.c (create_standard_classes): Set scm_classes_initialized
331 to one.
332
333 * random.c (scm_random_solid_sphere_x): Use
334 scm_c_generalized_vector_length instead of
335 scm_uniform_vector_length.
336
337 2005-01-16 Marius Vollmer <mvo@zagadka.de>
338
339 * script.c (scm_compile_shell_switches): Removed debugging output.
340
341 2005-01-15 Kevin Ryde <user42@zip.com.au>
342
343 * numbers.c (scm_logtest, scm_logbit_p, scm_integer_expt): Update
344 docstrings from manual.
345 * random.c (scm_random_solid_sphere_x): Update docstring from manual.
346
347 2005-01-14 Marius Vollmer <marius.vollmer@uni-dortmund.de>
348
349 * random.c: Don't check for definedness of SCM_HAVE_T_INT64, check
350 its value.
351
352 Implement u64 and s64 uniform numeric vectors with bignums when
353 scm_t_uint64 and scm_t_int64 are not available.
354
355 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_take_u64vector,
356 scm_array_handle_u64_elements,
357 scm_array_handle_u64_writable_elements, scm_u64vector_elements,
358 scm_u64vector_writable_elements): Do not define when scm_t_uint64
359 is not available.
360 (scm_take_s64vector, scm_array_handle_s64_elements,
361 scm_array_handle_s64_writable_elements, scm_s64vector_elements,
362 scm_s64vector_writable_elements): Likewise for scm_t_int64.
363 (uvec_sizes, uvec_print, uvec_equalp): Use SCM bignums when
364 scm_t_int64/scm_t_uint64 are not available.
365 (uvec_mark): New, to mark the bignums.
366 (alloc_uvec): Initialize bignums.
367 (uvec_fast_ref): Return bignums directly.
368 (scm_uint64_min, scm_uint64_max, scm_int64_min, scm_int64_max,
369 assert_exact_integer): New.
370 (uvec_fast_set): Use them to validate the bignums.
371 (scm_init_srfi_4): Set mark function of smob when needed.
372 Initialize scm_uint64_min, scm_uint64_max, scm_int64_min,
373 scm_int64_max.
374
375 Recognize 1.4 -e syntax.
376
377 * script.c (sym_at, sym_atat, sym_main, all_symbols): New.
378 (scm_compile_shell_switches): Use them to recognize and convert
379 1.4 "-e" syntax.
380
381 2005-01-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
382
383 * deprecated.h, deprecated.c, strings.h, strings.c: Turn all
384 deprecated features that once were macros but are now functions
385 back into macros.
386
387 2005-01-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
388
389 * eval.c, debug.h (SCM_WARN_DEPRECATED): New debug option.
390 * deprecation.c (scm_issue_deprecation_warning,
391 scm_c_issue_deprecation_warning_fmt): Use it.
392 (mode): Removed.
393 (print_summary): New.
394 (scm_init_deprecation): Initialize SCM_WARN_DEPRECATED instead of
395 mode.
396
397 Deprecated SCM_ARRAY* macros.
398
399 * unif.h, unif.c, ramap.c, vectors.c, srfi-4.c, srfi-4.i.c
400 (SCM_ARRAYP, SCM_I_ARRAYP): Renamed former to latter internal
401 version. Changed all uses.
402 (scm_tc16_array, scm_i_tc16_array,
403 scm_tc16_enclosed_array, scm_i_tc16_enclosed_array,
404 SCM_ARRAY_FLAG_CONTIGUOUS, SCM_I_ARRAY_FLAG_CONTIGUOUS,
405 SCM_ENCLOSE_ARRAYP, SCM_I_ENCLOSE_ARRAYP,
406 SCM_ARRAY_NDIM, SCM_I_ARRAY_NDIM,
407 SCM_ARRAY_CONTP, SCM_I_ARRAY_CONTP,
408 SCM_ARRAY_MEM, SCM_I_ARRAY_MEM,
409 SCM_ARRAY_V, SCM_I_ARRAY_V,
410 SCM_ARRAY_BASE, SCM_I_ARRAY_BASE,
411 SCM_ARRAY_DIMS, SCM_I_ARRAY_DIMS,
412 scm_t_array, scm_i_t_array): Likewise.
413 (SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG):
414 Moved from unif.h to unif.c.
415 (scm_c_array_rank): New.
416 (scm_array_rank): Reimplement using it.
417
418 * deprecated.h, deprecated.c (SCM_ARRAYP, SCM_ARRAY_NDIM,
419 SCM_ARRAY_CONTP, SCM_ARRAY_MEM, SCM_ARRAY_V, SCM_ARRAY_BASE,
420 SCM_ARRAY_DIMS, scm_t_array): New deprecated versions.
421
422 2005-01-11 Marius Vollmer <mvo@zagadka.de>
423
424 * ramap.c: Replace uses of scm_make_ra with scm_i_make_ra.
425 (GVREF, GVSET): New abbreviations. Use them everywhere instead of
426 scm_c_generalized_vector_ref and scm_cvref, and
427 scm_c_generalized_vector_set_x, respectively.
428 (RVREF, IVDEP, BINARY_ELTS_CODE, BINARY_PAIR_ELTS_CODE,
429 UNARY_ELTS_CODE, UNARY_PAIR_ELTS_CODE): Removed since unused.
430
431 * unif.h, unif.c (indices_to_pos, scm_array_handle_pos): Renamed
432 former to latter and made public. Changed all uses.
433 (scm_i_make_ra): Made public, changed tag param to enclosed flag.
434 (scm_make_ra): Deprecated, changed all uses to scm_i_make_ra.
435 (scm_i_shap2ra): New internal version of scm_shap2ra.
436 (scm_shap2ra): Deprecated, changed all uses to scm_i_shap2ra.
437 (scm_i_ra_set_contp): New internal version of scm_ra_set_contp.
438 (scm_ra_set_contp): Deprecated, changed all uses to
439 scm_i_ra_set_contp.
440 (scm_cvref, scm_aind, scm_raprin1): Deprecated.
441
442 2005-01-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
443
444 * eval.c (scm_eval): Added example to docstring. Thanks to Issac
445 Trotts!
446
447 * unif.c (scm_list_to_typed_array): Allow the specification of the
448 upper bound as well. This is needed for empty arrays.
449 (l2ra): Give needed number of elements in error message.
450 (scm_i_print_array): Print length information for arrays that need
451 it.
452 (scm_i_read_array): Parse it.
453
454 * deprecated.h, deprecated.c (SCM_CHARS, SCM_UCHARS, SCM_LENGTH,
455 scm_i_object_chars, scm_i_object_length): Brought back from the
456 dead.
457
458 2005-01-10 Marius Vollmer <mvo@zagadka.de>
459
460 * ramap.c: Replaced single-index uses of scm_array_set_x with
461 scm_c_generalized_vector_set_x.
462
463 * unif.c (scm_array_rank, scm_array_dimensions,
464 scm_shared_array_offset, scm_shared_array_increments,
465 scm_array_ref, scm_array_set_x): Use scm_t_array_handle operations
466 to simplify code and make it more general.
467 (scm_shared_array_root): Work with all kinds of arrays, including
468 naked vectors.
469 (indices_to_pos): New.
470 (scm_make_shared_array): Use it instead of scm_aind; use handle
471 for oldra.
472
473 2005-01-10 Kevin Ryde <user42@zip.com.au>
474
475 * posix.c (scm_mkstemp): Update docstring from manual.
476
477 * stime.c (scm_mktime): Missing default errno=EINVAL from prev change.
478
479 2005-01-09 Marius Vollmer <mvo@zagadka.de>
480
481 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_i_uniform_vector_ref_proc,
482 scm_i_uniform_vector_set_proc): New.
483 (u8ref, u8set, s8ref, s8set, etc): New.
484 (uvec_reffers, uvec_setters): New.
485 (uvec_to_list): Use generic scm_array_handle_ref instead of
486 uvec_fast_ref since scm_array_handle_ref should be faster now.
487 (coerce_to_uvec, scm_c_uniform_vector_ref,
488 scm_c_uniform_vector_set_x): Likewise.
489
490 * unif.h, unif.c, inline.h (scm_i_t_array_ref, scm_i_t_array_set):
491 New.
492 (scm_t_array_handle): Added ref, set, elements and
493 writable_elements for fast inline operation of
494 scm_array_handle_ref and scm_array_handle_set.
495 (scm_array_handle_ref, scm_array_handle_set): Moved to inline.h
496 and replaced with inline code that simply calls the ref/set
497 members of the handle.
498 (enclosed_ref, vector_ref, string_ref, bitvector_ref, memoize_ref,
499 enclosed_set, vector_set, string_set, bitvector_set, memoize_set):
500 New.
501 (scm_array_handle_get): Initialize ref/set fields to memoize_ref
502 and memoize_set.
503 (scm_bitvector_fill_x, scm_bitvector_to_list, scm_bit_count,
504 scm_bit_position, scm_bit_set_star_x, scm_bit_count_star,
505 scm_bit_invert_x): Correctly multiply index with increment in the
506 general case.
507
508 * unif.c (scm_array_handle_set): Correctly execute only one
509 alternative. D'Oh!
510 (scm_list_to_typed_array, l2ra): Use scm_t_array_handle to fill
511 the array; this covers all cases with much simpler code.
512
513 * srfi-4.c (scm_uniform_element_size): Deprecated implementation
514 as well.
515
516 2005-01-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
517
518 * srfi-4.c (uvec_type): New.
519 (uvec_to_list, uvec_ref, uvec_set_x, scm_c_uniform_vector_ref,
520 scm_c_uniform_vector_x): Use it to get concrete type.
521
522 * unif.h (scm_t_array_dim): Changed type of members to ssize_t, to
523 fit the docs.
524
525 * unif.c (ra2l): Handle zero rank arrays.
526 (scm_i_print_array): Print zero rank arrays specially.
527 (tag_to_type): Return #t for an empty tag, not the empty symbol.
528 (scm_i_read_array): Allow zero rank arrays.
529
530 2005-01-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
531
532 * hashtab.h, hashtab.c (SCM_HASHTAB_BUCKET_LOC): Removed.
533 (scan_weak_hashtables): Rewrote its use with SCM_HASHTAB_BUCKET
534 and SCM_SET_HASHTAB_BUCKET.
535
536 * print.h, print.c (scm_print_state, SCM_PRINT_STATE_LAYOUT):
537 Removed ref_stack field.
538 (PSTATE_STACK_REF, PSTATE_STACK_SET): New, for accessing the stack
539 of a print state. Use them everywhere instead of ref_stack.
540
541 * srfi-4.h (scm_uniform_element_size): Deprecated for real.
542
543 * srfi-4.c: Include deprecation.h.
544
545 * vectors.h, vectors.c, unif.h, unif.c, deprecated.h,
546 deprecated.c, eq.c
547 (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR): Removed.
548 (scm_vector_elements, scm_vector_writable_elements,
549 scm_generalized_vector_get_handle): Moved to vectors.[hc] from
550 unif.[hc].
551 (SCM_SIMPLE_VECTOR_LOC): Removed.
552 (SCM_VECTOR_MAX_LENGTH, SCM_VECTOR_LENGTH, SCM_VELTS,
553 SCM_WRITABLE_VELTS, SCM_VECTOR_REF, SCM_VECTOR_SET,
554 scm_vector_equal_p): Moved from vectors.[hc] to deprecated.[hc].
555 (scm_vector_equal_p, scm_i_vector_equal_p): Renamed former to
556 latter. Changed use in eq.c.
557
558 2005-01-07 Marius Vollmer <mvo@zagadka.de>
559
560 Make the uniform vector routines also deal with one dimensional
561 arrays.
562
563 * srfi-4.c (SCM_IS_UVEC): New, use it instead of
564 SCM_SMOB_PREDICATE in this file.
565 (is_uvec): Also recognize one-dimensional uniform numeric arrays
566 of the right type.
567 (scm_is_uniform_vector): Likewise.
568 (uvec_fast_ref): Made BASE param const.
569 (uvec_writable_elements, uvec_elements): New.
570 (uvec_to_list, uvec_ref, uvec_set_x, uvec_length,
571 scm_c_uniform_vector_length, scm_c_uniform_vector_ref,
572 scm_c_uniform_set_x): Use them to also deal with one-dimensional
573 arrays.
574 (scm_uniform_vector_ref, scm_uniform_vector_set_x): Deprecate old
575 argument convention.
576 (scm_uniform_vector_to_list): Let uvec_to_list do all the
577 checking.
578 (scm_uniform_vector_length): Use uvec_length.
579
580 2005-01-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
581
582 * srfi-4.h, srfi-4.c (scm_c_uniform_vector_element_size,
583 scm_c_uniform_vector_size): Removed.
584 (scm_array_handle_uniform_element_size): New.
585
586
587 * unif.h (scm_array_handle_ref, scm_array_handle_set): Changed
588 type of POS parameter to be signed, positions can be negative.
589 (scm_array_handle_release): New, changed all uses of
590 scm_t_array_handle to properly call it.
591 (scm_vector_get_handle, scm_generalized_vector_get_handle):
592 Renamed former to latter, changed all uses.
593
594 2005-01-05 Marius Vollmer <mvo@zagadka.de>
595
596 Updated bitvector routines to also use scm_t_array_handles.
597
598 * unif.h (scm_bitvector_elements,
599 scm_bitvector_writable_elements): Use a scm_t_array_handle and
600 deliver offset, length and increment to caller. Changed all uses.
601 (scm_bitvector_release_elements,
602 scm_frame_bitvector_release_elements,
603 scm_bitvector_release_writable_elements,
604 scm_frame_bitvector_release_writable_elements): Removed.
605 (scm_array_handle_bit_elements,
606 scm_array_handle_bit_writable_elements,
607 scm_array_handle_bit_elements_offset): New.
608 (scm_make_typed_array): The special value for non-initialized
609 arrays is now SCM_UNSPECIFIED. The old special value SCM_BOOL_F
610 was a valid value to fill bitvectors with, so it can't really be
611 specialed out.
612
613 2005-01-04 Kevin Ryde <user42@zip.com.au>
614
615 * stime.c (scm_strftime): Free t.tm_zone produced by bdtime2c.
616 Reported by Bill Schottstaedt.
617
618 2005-01-02 Marius Vollmer <mvo@zagadka.de>
619
620 * sort.c (quicksort): Added INC parameter for non-contigous
621 vectors.
622 (quicksort1): New, for contigous vectors. Both functions are
623 generated from the same code by including "quicksort.i.c".
624 (scm_restricted_vector_sort_x): Call one of quicksort and
625 quicksort1, depending on increment of vector.
626 (scm_sort): Simply call scm_sort_x on a copy of the list or
627 vector.
628 (scm_merge_vector_x, scm_merge_vector_step): Changed indices to
629 size_t, added inc parameter.
630 (scm_stable_sort_x): Allocate temporary storage as Scheme vector
631 so that it doesn't leak.
632 (scm_stable_sort): Simply call scm_stable_sort_x on a copy of the
633 list or vector.
634
635 * ramap.c (scm_array_map_x): Do not try to convert fill value
636 before filling, any necessary conversion is done while storing.
637
638 * gc-card.c (scm_i_sweep_card): Call scm_i_vector_free instead of
639 doing it inline.
640
641 * hashtab.c, hashtab.h (SCM_HASHTABLE_BUCKETS): Removed.
642 (SCM_HASHTABLE_BUCKET, SCM_HASHTABLE_BUCKET_LOC): New. Replaced
643 all uses of SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET.
644
645 * tags.h, weaks.c, vports.c, hashtab.c, convert.c, sort.c,
646 convert.c, convert.h, convert.i.c, deprecated.c, environments.c,
647 eval.c, filesys.c, fluids.c, gc-mark.c, gh.h, gh_data.c, goops.c,
648 hash.c, init.c, libguile_la-arrays.loT, modules.c, net_db.c,
649 objects.c, ports.c, posix.c, print.c, random.c, read.c,
650 regex-posix.c, scmsigs.c, socket.c, stime.c, symbols.c: Use new
651 vector elements API or simple vector API, as appropriate. Removed
652 SCM_HAVE_ARRAYS ifdefery. Replaced all uses of
653 SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET.
654
655 * srfi-4.h, srfi-4.c,
656 srfi-4.i.c (scm_array_handle_uniform_elements,
657 scm_array_handle_uniform_writable_elements,
658 scm_uniform_vector_elements,
659 scm_uniform_vector_writable_elements):
660 (scm_<foo>vector_elements, scm_<foo>vector_writable_elements): Use
661 scm_t_array_handle, deliver length and increment.
662 (scm_array_handle_<foo>_elements,
663 scm_array_handle_<foo>_writable_elements): New.
664
665 * gen-scmconfig.h.in (SCM_I_GSC_HAVE_ARRAYS): Removed.
666 * gen-scmconfig.c: Hard code SCM_HAVE_ARRAYS to "1".
667
668 * unif.h, unif.c (scm_t_array_handle, scm_array_get_handle,
669 scm_array_handle_rank, scm_array_handle_dims, scm_array_handle_ref
670 scm_array_handle_set, scm_array_handle_elements
671 scm_array_handle_writable_elements, scm_vector_get_handle): New.
672 (scm_make_uve, scm_array_prototype, scm_list_to_uniform_array,
673 scm_dimensions_to_uniform_array): Deprecated for real.
674 (scm_array_p, scm_i_array_p): Use latter for SCM_DEFINE since
675 snarfing wont allow a mismatch between C and Scheme arglists.
676 (scm_make_shared_array, scm_enclose_array): Correctly use
677 scm_c_generalized_vector_length instead of
678 scm_uniform_vector_length.
679
680 * validate.h (SCM_VALIDATE_VECTOR,
681 SCM_VALIDATE_VECTOR_OR_DVECTOR): use scm_is_simple_vector instead
682 of SCM_VECTORP.
683
684 * weaks.h, weaks.c: Use new internal weak vector API from
685 vectors.h.
686
687 * Makefile.am (libguile_la_SOURCES, DOT_X_FILES, DOT_DOC_FILES,
688 EXTRA_libguile_la_SOURCES): Changed ramap.c and unif.c from being
689 'extra' to being regular sources.
690 (noinst_HEADERS): Added quicksort.i.c.
691 * quicksort.i.c: New file.
692
693 * vectors.h, vector.c (SCM_VECTORP, SCM_VECTOR_LENGTH, SCM_VELTS,
694 SCM_WRITABLE_VELTS, SCM_VECTOR_REF, SCM_VECTOR_SET): Deprecated
695 and reimplemented. Replaced all uses with scm_vector_elements,
696 scm_vector_writable_elements, or SCM_SIMPLE_VECTOR_*, as
697 appropriate.
698 (scm_is_simple_vector, SCM_SIMPLE_VECTOR_LENGTH,
699 SCM_SIMPLE_VECTOR_REF, SCM_SIMPLE_VECTOR_SET,
700 SCM_SIMPLE_VECTOR_LOC): New.
701 (SCM_VECTOR_BASE, SCM_SET_VECTOR_BASE, SCM_VECTOR_MAX_LENGTH,
702 SCM_MAKE_VECTOR_TAG, SCM_SET_VECTOR_LENGTH,
703 SCM_VELTS_AS_STACKITEMS, SCM_SETVELTS, SCM_GC_WRITABLE_VELTS):
704 Removed.
705 (scm_vector_copy): New.
706 (scm_vector_elements, scm_vector_writable_elements): Use
707 scm_t_array_handle, deliver length and increment. Moved to
708 unif.h. Changed all uses.
709 (scm_vector_release_elements,
710 scm_vector_release_writable_elements,
711 (scm_frame_vector_release_elements,
712 scm_frame_vector_release_writable_elements): Removed.
713 (SCM_I_IS_VECTOR, SCM_I_VECTOR_ELTS, SCM_I_VECTOR_WELTS,
714 SCM_I_VECTOR_LENGTH, scm_i_vector_free): New internal API.
715 (SCM_I_WVECTP SCM_I_WVECT_LENGTH SCM_I_WVECT_VELTS
716 SCM_I_WVECT_GC_WVELTS SCM_I_WVECT_TYPE SCM_I_WVECT_GC_CHAIN
717 SCM_I_SET_WVECT_GC_CHAIN, scm_i_allocate_weak_vector): New, for
718 weak vectors.
719
720 2004-12-29 Marius Vollmer <mvo@zagadka.de>
721
722 No longer use creators to specify the type of an array. Creators
723 expose the fact that arrays are wrapped around vectors, but that
724 might change.
725
726 * srfi-4.h (scm_i_proc_make_u8vector, scm_i_proc_make_s8vector,
727 scm_i_proc_make_u16vector, scm_i_proc_make_s16vector,
728 scm_i_proc_make_u32vector, scm_i_proc_make_s32vector,
729 scm_i_proc_make_u64vector, scm_i_proc_make_s64vector,
730 scm_i_proc_make_f32vector, scm_i_proc_make_f64vector,
731 scm_i_proc_make_c32vector, scm_i_proc_make_c64vector,
732 uvec_proc_vars): Removed.
733 (scm_i_generalized_vector_creator): Removed.
734 (scm_i_generalized_vector_type): New.
735
736 * unif.h, unif.c (scm_typed_array_p, scm_make_array,
737 scm_make_typed_array, scm_array_type, scm_list_to_array,
738 scm_list_to_typed_array, scm_is_array, scm_is_typed_array): New.
739 (scm_array_creator): Removed.
740 (scm_array_p): Deprecated second PROT argument.
741 (scm_dimensions_to_uniform_array, scm_list_to_uniform_array):
742 Deprecated, reimplemented in terms of scm_make_typed_array and
743 scm_list_to_typed_array.
744 (scm_i_proc_make_vector, scm_i_proc_make_string,
745 scm_i_proc_make_bitvector): Removed.
746 (type_creator_table, init_type_creator_table, type_to_creator,
747 make_typed_vector): New.
748 (scm_i_convert_old_prototype): Removed.
749 (prototype_to_type): New.
750 (scm_make_uve): Deprecated, reimplemented using make_typed_vector.
751 (scm_array_dimensions): Use scm_list_1 instead of scm_cons for
752 minor added clarity.
753 (scm_make_shared_array, scm_ra2contig): Use make_typed_vector
754 instead of scm_make_uve.
755 (tag_creator_table, scm_i_tag_to_creator): Removed.
756 (tag_to_type): New.
757 (scm_i_read_array): Use scm_list_to_typed_array instead of
758 scm_list_to_uniform_array.
759
760 2004-12-27 Marius Vollmer <mvo@zagadka.de>
761
762 * unif.h, unif.c (scm_bitvector_elements): Made return value "const".
763 (scm_bitvector_writable_elements): New.
764 (scm_bitvector_release, scm_bitvector_release_elements):
765 Renamed former to latter. Added explicit call to
766 scm_remember_upto_here_1.
767 (scm_frame_bitvector_release,
768 scm_frame_bitvector_release_elements): Renamed former to latter.
769 (scm_bitvector_release_writable_elements,
770 scm_bitvector_release_writable_elements): New.
771 Changed all uses as required by the changes above.
772
773 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_uniform_vector_elements,
774 scm_u8vector_elements, etc): Made return value "const".
775 (scm_uniform_vector_writable_elements,
776 scm_u8vector_writable_elements, etc): New.
777 (scm_uniform_vector_release, scm_uniform_vector_release_elements):
778 Renamed former to latter. Added explicit call to
779 scm_remember_upto_here_1.
780 (scm_frame_uniform_vector_release,
781 scm_frame_uniform_vector_release_elements): Renamed former to latter.
782 (scm_uniform_vector_release_writable_elements,
783 scm_frame_uniform_vector_release_writable_elements): New. Takes
784 crown of longest identifier yet.
785 Changed all uses as required by the changes above.
786
787 * vectors.h, vectors.c (scm_c_vector_set_x): Make return type
788 void.
789 (scm_is_vector, scm_vector_p, scm_vector_length,
790 scm_c_vector_length, scm_vector_ref, scm_c_vector_ref,
791 scm_vector_set_x, scm_c_vector_set_x, scm_vector_to_list,
792 scm_vector_move_left_x, scm_vector_move_right_x,
793 scm_vector_fill_x): handle one-dimensional arrays.
794 (scm_vector_elements, scm_vector_release_elements,
795 scm_vector_frame_release_elements, scm_vector_writable_elements,
796 scm_vector_release_writable_elements,
797 scm_vector_frame_release_writable_elements): New.
798 (scm_list_to_vector, scm_vector_to_list, scm_vector_fill,
799 scm_vector_move_left_x, scm_vector_move_right_x): Use them.
800
801 * ramap.c (scm_ramapc, scm_raeql): Use
802 scm_c_generalized_vector_length instead of
803 scm_uniform_vector_length.
804 (scm_ramap, rafe): Use scm_c_vector_ref instead of SCM_VELTS. use
805 scm_c_generalized_vector_ref instead of scm_uniform_vector_ref.
806
807 2004-12-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
808
809 * continuations.h, continuations.c (scm_t_contregs): New 'offset'
810 member for relocating debug frames.
811 (scm_make_continuation): Set it.
812
813 * stacks.c (read_frame, read_frames, scm_make_stack,
814 scm_last_stack_frame, scm_stack_id): Use the new 'offset' member
815 of continuations instead of calculating the offset ourselves.
816 Relocate 'vect' member of scm_t_debug_frame.
817
818 2004-12-16 Kevin Ryde <user42@zip.com.au>
819
820 * ramap.c (scm_array_map_x): Check for at least one source argument.
821
822 2004-12-14 Kevin Ryde <user42@zip.com.au>
823
824 * srfi-13.c (string-any, string-every): Use a scheme wrapper around
825 the C code so for the final call to the predicate procedure is a tail
826 call, per SRFI-13 spec.
827
828 2004-12-10 Kevin Ryde <user42@zip.com.au>
829
830 * eq.c (scm_eq_p, scm_eqv_p, scm_equal_p): Update docstrings from
831 recent revision to the reference manual.
832
833 * numbers.c (scm_modulo): Amend fixme comment about negative divisor
834 with "%", C99 says it's well-defined.
835
836 * socket.c (scm_from_ipv6): Just use mpz_import. Don't bother trying
837 to fit scm_from_ulong_long, since that uses mpz_import anyway. Don't
838 bother trying to fit scm_from_ulong, not really worth the trouble if
839 addresses are more than 4 bytes usually.
840
841 2004-11-30 Kevin Ryde <user42@zip.com.au>
842
843 * gc_os_dep.c (NetBSD): Test __m68k__ and __arm__ as well as m68k and
844 arm32. Reported by Greg Troxel.
845
846 2004-11-14 mvo <mvo@zagadka.de>
847
848 * unif.c, unif.h (scm_i_cvref): Made non-static for ramap.c.
849
850 * Makefile.am (INCLUDES): It is "@LTDLINCL@", not "@LTDLINC@".
851
852 2004-11-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
853
854 Enclosed arrays are now their own smob. This has been done to
855 make the code more explicit about them and to prepare for the time
856 when generalized vectors include arbitrary one-dimensional
857 arrays. (Uptonow, enclosed arrays have been recognized by their
858 use of an array as their storage 'vector'. When all generalized
859 vectors are allowed as storage, including one-dimensional arrays,
860 this will no longer work.)
861
862 * unif.h, unif.c: (scm_tc16_enclosed_array, SCM_ENCLOSED_ARRAYP):
863 New.
864 (exactly_one_third, singp): Removed.
865 (scm_array_p, scm_array_dimensions, scm_shared_array_root,
866 scm_shared_array_offset, scm_shared_array_increments): Handle
867 enclosed arrays explicitely.
868 (scm_array_rank): Likewise. Also, do not return zero for
869 non-arrays, signal an error instead since arrays with rank zero do
870 exist.
871 (scm_i_make_ra): New, for specifying the tag of the new array.
872 (scm_make_enclosed_array): Use it.
873 (scm_make_ra): Reimplemented in terms of scm_i_make_ra.
874 (scm_make_shared_array): Use scm_c_generalized_vector_length
875 instead of scm_uniform_vector_length.
876 (scm_array_in_bounds_p): Rewritten to be much cleaner.
877 (scm_i_cvref): New, doing the job of scm_cvref.
878 (scm_cvref): Use scm_i_cvref.
879 (scm_array_ref): Do not accept non-arrays when no indices are
880 given. Use scm_i_cvref to do the actual access.
881 ("uniform-array-set1"): Do not register.
882 (scm_array_set_x, scm_uniform_array_read_x,
883 scm_uniform_array_write): Handle enclosed arrays explicitly.
884 (ra2l): Use scm_i_cvref instead of scm_uniform_vector_ref to also
885 handle enclosed arrays.
886 (scm_array_to_list): Handle enclosed arrays explicitly.
887 (rapr1): Removed.
888 (scm_i_print_array_dimension): Use scm_i_cvref to also handle
889 enclosed arrays.
890 (scm_i_print_enclosed_array): New.
891 (tag_proto_table, tag_creator_table): Renamed former to latter.
892 Added "a" and "b" for strings and bitvectors, resp.
893 (scm_i_tag_to_prototype, scm_i_tag_to_creator): Renamed former to
894 latter. Tag "a" is in the table now, no need to handle it as a
895 legacy tag.
896 (scm_raprin1): Just call scm_iprin1.
897 (scm_array_creator, scm_array_prototype): Handle enclosed arrays
898 explicitly.
899 (scm_init_unif): Initialize scm_tc16_enclosed_array smob.
900 Use scm_i_print_array as printer for scm_tc16_array.
901
902 2004-11-10 Marius Vollmer <mvo@zagadka.de>
903
904 * ramap.c (cind): Changed second arg to be pointer to long instead
905 of uniform vector.
906 (scm_ramapc): Allocate index vector with scm_malloc and not as
907 uniform vector. Wrap it in a frame so that it gets properly freed.
908 (scm_array_index_map_x): Likewise.
909
910 * unif.c: Changed all uses of scm_array_prototype to
911 scm_array_creator. (scm_i_get_old_prototype): Signal error when no
912 prototype is known.
913 (scm_uniform_array_read_x, scm_uniform_array_write): Reimplemented
914 in terms of scm_uniform_vector_read_x and
915 scm_uniform_vector_write, respectively. Strings and
916 bitvector support has been dropped.
917
918 * srfi-4.h, srfi-4.c: Do not include <libguile.h>, include the
919 needed files directly. Include config.h, <unistd.h> and <io.h>
920 when available.
921 (scm_uniform_vector_read_x, scm_uniform_vector_write): New.
922
923 2004-11-09 Marius Vollmer <mvo@zagadka.de>
924
925 * gh_data.c (gh_uniform_vector_length): Properly use
926 scm_c_uniform_vector_length instead of scm_uniform_vector_length.
927
928 2004-11-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
929
930 * srfi-4.h (scm_c_uniform_vector_ref, scm_c_uniform_vector_set_x):
931 New.
932 (scm_i_uniform_vector_creator): Removed.
933 (scm_i_generalized_vector_creator): New.
934 (scm_uniform_vector_length, scm_uniform_element_size): Do not
935 handle generalized vectors, only uniform numeric vectors.
936 (alloc_uvec): Do length check here...
937 (make_uvec): ...but not here.
938 (coerce_to_uvec): Use new generalized vector functions to handle
939 all kinds of vectors in one go.
940
941 * tags.h (scm_tc7_bvect): Renamed to scm_tc7_unused7, renaming the
942 remaining scm_tc7_unused tags to get a neatly ordered list.
943
944 * eq.c, evalext.c, gc-card.c, gc-mark.c, objects.c, print.c: Do no
945 longer handle scm_tc7_bvect bitvectors.
946
947 * ramap.c: Use the new generalized vector functions to handle all
948 vector like things.
949
950 * vectors.h, vectors.c (scm_is_vector, scm_c_vector_length,
951 scm_c_vector_ref, scm_c_vector_set_x, scm_generalized_vector_p,
952 scm_generalized_vector_length, scm_generalized_vector_ref,
953 scm_generalized_vector_set_x, scm_generalized_vector_to_list,
954 scm_is_generalized_vector, scm_c_generalized_vector_length,
955 scm_c_generalized_vector_ref, scm_c_generalized_vector_set_x):
956 New.
957
958 * unif.h, unif.c (scm_bitvector_p, scm_bitvector,
959 scm_make_bitvector, scm_bitvector_length, scm_bitvector_ref,
960 scm_bitvector_set_x, scm_list_to_bitvector, scm_bitvector_to_list,
961 scm_bitvector_fill_x, scm_is_bitvector, scm_c_make_bitvector,
962 scm_c_bitvector_length, scm_c_bitvector_ref,
963 scm_c_bitvector_set_x, scm_bitvector_elements,
964 scm_bitvector_release, scm_frame_bitvector_release,
965 scm_tc16_bitvector, bitvector_free, bitvector_print,
966 bitvector_equalp, count_ones, find_first_one): New.
967 (scm_bit_count, scm_bit_position, scm_bit_set_star_x,
968 scm_bit_count_star, scm_bit_invert_x, scm_istr2bve): Rewritten
969 using the new C API for bitvectors and maybe count_ones or
970 find_first_one, as appropriate.
971 (SCM_I_MAX_LENGTH, SCM_BITVECTOR_P, SCM_BITVECTOR_BASE,
972 SCM_SET_BITVECTOR_BASE, SCM_BITVECTOR_MAX_LENGTH,
973 SCM_BITVECTOR_LENGTH, SCM_MAKE_BITVECTOR_TAG,
974 SCM_SET_BITVECTOR_LENGTH): Removed. Replaced all uses with the
975 new functions from above.
976 (scm_i_proc_make_vector, scm_i_proc_make_string,
977 scm_i_proc_make_bitvector): Made non-static for use in
978 scm_i_generalized_vector_creator.
979 (scm_make_u1vector): Removed, replaced by scm_make_bitvector.
980 (scm_make_uve): Validate that the created object is a generalized
981 vector.
982 (scm_i_legacy_tag): Removed.
983 (scm_i_print_array): Do it here.
984 (scm_raprin1): Only print enclosed arrays.
985
986 * Makefile.am (DOT_DOC_FILES): Added srfi-4.doc.
987
988 2004-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
989
990 * srfi-4.c (make_uvec): Use SCM_I_SIZE_MAX instead of SIZE_MAX for
991 added portability.
992
993 * chars.c (scm_charnames, scm_charnums): Added "sp" as an alias
994 for "space". Thanks to Bruce Korb!
995
996 * rw.c (scm_read_string_x_partial): Bugfix, apply offset to dest
997 only after dest has been set. Thanks to Hyper Division!
998
999 * gh_data.c (gh_uniform_vector_length): Use
1000 scm_uniform_vector_length instead of SCM_UVECTOR_LENGTH.
1001
1002 2004-11-03 Marius Vollmer <mvo@zagadka.de>
1003
1004 * unif.h (SCM_UVECTOR_BASE, SCM_SET_UVECTOR_BASE,
1005 SCM_UVECTOR_MAXLENGTH, SCM_UVECTOR_LENGTH, SCM_MAKE_UVECTOR_TAG,
1006 SCM_SET_UVECTOR_LENGTH): Removed.
1007
1008 2004-11-02 Marius Vollmer <mvo@zagadka.de>
1009
1010 Mac OS X and OpenBSD compatibility patches from Andreas Vögele.
1011 Thanks!
1012
1013 * backtrace.c (scm_display_backtrace_with_highlights): Join the
1014 first and the second line of the SCM_DEFINE macro call, since old
1015 preprocessors cannot handle definitions that are split into two
1016 lines.
1017
1018 * inline.h (scm_cell, scm_double_cell): Don't use C99 variable
1019 declarations.
1020
1021 * pairs.c (scm_i_chase_pairs): Replace scm_t_bits with
1022 scm_t_uint32 to fix the mismatch between the function declaration
1023 and definition.
1024
1025 * sort.c (quicksort): Don't use C99 variable declarations.
1026
1027 * srfi-4.c (uvec_fast_ref): Avoid a compiler warning by returning
1028 SCM_BOOL_F if no type matches.
1029
1030 * threads.c (thread_print): Cast a pointer to size_t when printing
1031 with scm_uintprint.
1032
1033 * unif.c (scm_i_tag_to_prototype): Make sure that "instead" gets
1034 defined.
1035 (scm_array_prototype): Deprecated.
1036
1037 2004-11-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1038
1039 * srfi-4.h, srfi-4.c (scm_frame_uniform_vector_release): New.
1040 * unif.c (scm_bit_set_star_x, scm_bit_count_star_x): Use it to get
1041 more efficient access to the u32vector.
1042
1043 * tags.h (scm_tc7_llvect, scm_tc7_uvect, scm_tc7_fvect,
1044 scm_tc7_dvect, scm_tc7_cvect, scm_tc7_svect, scm_tc7_byvect,
1045 scm_tc7_ivect): Renamed to scm_tc7_unused_1 to scm_tc7_unused_8.
1046
1047 * validate.h (SCM_VALIDATE_VECTOR_OR_DVECTOR): Accept f64vectors
1048 instead of the old-style dvectors.
1049
1050 * gh_data.c: Use new-style uniform arrays in place of old-style
1051 ones.
1052
1053 * eq.c, evalext.c, gc-card.c, gc-mark.c, objects.c, print.c,
1054 ramap.c, unif.c: Do no longer handle old-style uniform vectors.
1055
1056 * unif.c (scm_bit_set_star_x, scm_bit_count_star_x): Use u32vectors
1057 instead of old-sytle uvectors.
1058
1059 * convert.c, convert.i.c: Rewritten completely, using
1060 scm_any_to_u8vector, etc and other new-style uniform vector
1061 functions.
1062
1063 * random.c (scm_random_solid_sphere_x,
1064 scm_random_hollow_sphere_x): Do not validate vector argument, this
1065 is already done elsewhere.
1066
1067 * srfi-4.h, srfi-4.i.c, srfi-4.c (coerce_to_uvec,
1068 scm_any_to_u8vector, etc): New.
1069 (scm_uniform_element_size, scm_uniform_vector_length): Do no
1070 longer handle old-style uniform vectors.
1071
1072 * read.c (scm_lreadr): Bugfix: include the last bit in the
1073 bit vector.
1074
1075 2004-10-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1076
1077 * unif.h, unif.c (scm_array_creator): New.
1078 (scm_i_get_old_prototype): New.
1079 (scm_array_prototype): use it to return old-style prototype, never
1080 return creators.
1081 (scm_make_uve): Use scm_call_1 instead of scm_call_2 with a second
1082 arg of SCM_UNDEFINED. The latter is wrong.
1083
1084 * unif.h, unif.c (scm_make_u1vector): New, but only temporary.
1085 (make_uve): Removed.
1086 (scm_i_proc_make_vector, scm_i_proc_make_string,
1087 scm_i_proc_make_u1vector): New.
1088 (scm_init_unif): Initialize them.
1089 (scm_i_convert_old_prototype): New.
1090 (scm_make_uve): Use it to get the creator procedure. Removed all
1091 old code that created old-style uniform vectors.
1092 (scm_array_p): Handle generic vectors.
1093 (scm_dimensions_to_uniform_array): Do not fill new array with
1094 prototype when that is a procedure.
1095 (scm_list_to_uniform_array): Also accept a list of lower bounds as
1096 the NDIM argument.
1097 (scm_i_print_array): Print rank for shared or non-zero-origin
1098 vectors.
1099 (tag_proto_table, scm_i_tag_to_prototype, scm_i_read_array): New.
1100 (scm_raprin1): Do not call scm_i_array_print for enclosed arrays,
1101 which I do not understand yet.
1102 (scm_array_prototype): Explicitely handle generic vectors.
1103
1104 * numbers.c, number.h (scm_i_print_complex, icmplx2str): New.
1105 (iflo2str): Use icmplx2str for complex numbers.
1106
1107 * srfi-4.c, srfi-4.h (scm_i_read_homogenous_vector,
1108 scm_i_uniform_vector_prototype): Removed.
1109 (scm_i_uniform_vector_creator): New.
1110 (SCM_UVEC_C32, scm_c32vector, scm_make_c32vector, etc,
1111 SCM_UVEC_C64, scm_c64vector, scm_make_c64vector, etc): New.
1112 Updated all tables and generic functions to support them.
1113 (scm_i_proc_make_u8vector, scm_i_proc_make_s8vector, etc): New.
1114 (scm_init_srfi_4): Initialize them.
1115
1116 * srfi-4.i.c (scm_take_u8vector, etc): use uvec_sizes instead of
1117 sizeof(CTYPE) as explained in the comment.
1118
1119 * read.c (scm_lreadr): Call scm_i_read_array for all characters
1120 following '#' that can start an array. Explicitely disambiguate
1121 'i' and 'e' between introducing numbers and uniform vectors. Do
1122 not call scm_i_read_homogenous_vector, since that is also handled
1123 by scm_i_read_array now.
1124
1125 2004-10-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1126
1127 First cut at integrating uniform vectors from srfi-4 with the rest
1128 of Guile. This change replaces scm_tc7_byvect with a s8 uniform
1129 vector. The plan is to gradually replace one type after the other
1130 until none is left and then to consider general cleanups and
1131 optimizations.
1132
1133 * srfi-4.h, srfi-4.i.c (scm_u8vector_elements, etc): New.
1134
1135 * srfi-4.h, srfi-4.c (scm_uniform_vector_p,
1136 scm_uniform_vector_ref, scm_uniform_vector_set_x,
1137 scm_uniform_vector_to_list, scm_is_uniform_vector,
1138 scm_c_uniform_vector_lengths, scm_c_uniform_vector_size,
1139 scm_uniform_vector_elements, scm_uniform_vector_element_size,
1140 scm_uniform_vector_release): New.
1141 (scm_i_uniform_vector_prototype, scm_i_uniform_vector_tag): New.
1142 (scm_uniform_element_size, scm_uniform_vector_length): Moved here
1143 from unif.h, unif.c and extended to handle both the old and new
1144 uniform vectors.
1145
1146 * tags.h (scm_tc7_byvect): Commented out.
1147
1148 * unif.h, unif.c (scm_uniform_vector_ref, scm_array_ref): Renamed
1149 the former to the latter.
1150 (scm_uniform_vector_length, scm_uniform_element_size): Moved to
1151 srfi-4.h, srfi-4.c.
1152 (scm_make_uve): Call scm_make_s8vector for #\nul prototype.
1153 (scm_array_p, scm_array_rank, scm_array_dimensions,
1154 scm_transpose_array, scm_enclose_array, scm_array_ref, scm_cvref,
1155 scm_array_set_x, scm_array_contents, scm_uniform_array_read_x,
1156 scm_array_to_list, scm_array_prototype): Handle srfi-4 uniform
1157 vectors. Removed code for scm_tc7_byvect.
1158 (scm_dimensions_to_uniform_array): Fill array with 0 when
1159 prototype is #\nul.
1160 (scm_i_print_array_dimension, scm_i_legacy_tag,
1161 scm_i_print_array): New.
1162 (scm_raprin1): Call scm_i_print_array for arrays. Removed code
1163 for scm_tc7_byvect.
1164
1165 * ramap.c (scm_ra_matchp, scm_array_fill_int, racp,
1166 scm_array_index_map_x, raeql_1, scm_array_equal_p): Handle srfi-4
1167 uniform vectors. Removed code for scm_tc7_byvect
1168
1169 * print.c (iprin1): Removed code for scm_tc7_byvect.
1170 * objects.c (scm_class_of): Likewise.
1171 * gc-mark.c (scm_gc_mark_dependencies): Likewise.
1172 * gc-card.c (scm_i_sweep_card): Likewise.
1173 * evalext.c (scm_self_evaluating_p): Likewise.
1174 * eq.c (scm_equal_p): Likewise.
1175
1176 * gh_data.c (gh_chars2byvect): Reimplemented with
1177 scm_make_s8vector.
1178 (gh_scm2chars): Handle s8vectors, removed code for scm_tc7_byvect.
1179
1180 * srfi-4.c (take_uvec): New.
1181 (alloc_uvec): Use it.
1182 * srfi-4.h, srfi-4.i.c (scm_take_u8vector, etc): New.
1183
1184 * random.c (vector_scale, vector_scale_x): Renamed former to the
1185 latter, since it modifies its argument.
1186 (vector_scale_x, vector_sum_squares, scm_random_normal_vector_x):
1187 Do not use scm_universal_vector_length for non-uniform vectors.
1188 Use scm_f64vector_elements to access innards of uniform vectors.
1189
1190 * convert.i.c: Convert srfi-4 style uniform vectors when
1191 requested.
1192 * convert.c (scm_c_scm2chars, scm_c_chars2scm,
1193 scm_c_chars2byvect): Use a s8vector instead of a scm_tc7_byvect.
1194
1195 2004-10-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1196
1197 * numbers.h, numbers.c (scm_i_print_double): New.
1198
1199 * srfi-4.c, srfi-4.h, srfi-4.i.c: New files, initially from
1200 ../srfi/ but heavily modified.
1201 * Makefile.am: Add them in all the right places.
1202 * init.c (scm_init_guile_1): Call scm_init_srfi_4.
1203 * read.c (scm_lreadr): Call scm_i_read_homogenous_vector for '#f',
1204 '#u', and '#s'.
1205
1206 * read.h, read.c (scm_i_input_error): Renamed from scm_input_error
1207 and made non-static. Changed all uses.
1208
1209 2004-10-22 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1210
1211 * variable.c, threads.c, struct.c, stackchk.c, smob.c, root.c,
1212 print.c, ports.c, mallocs.c, hooks.c, hashtab.c, fports.c,
1213 guardians.c, filesys.c, coop-pthreads.c, continuations.c: Use
1214 scm_uintprint to print unsigned integers, raw heap words, and
1215 adresses, using a cast to scm_t_bits to turn pointers into
1216 integers.
1217
1218 * unif.c: Include "libguile/print.h".
1219
1220 * numbers.h, numbers.c (SCM_T_INTBUFLEN): Increased to cover
1221 scm_t_intmax values.
1222 (scm_uint2str): New, for scm_t_uintmax.
1223 (scm_iint2str): Argument type changed to scm_t_intmax,
1224 reimplemented in terms of scm_uint2str.
1225
1226 * print.c, print.h (scm_uintprint): New, for printing
1227 scm_t_uintmax values.
1228 (scm_intprint): Argument type changed to scm_t_intmax.
1229
1230 * sort.c (quicksort, scm_merge, scm_merge_list_x,
1231 scm_merge_list_step, scm_merge_vector_step): Inserted SCM_TICKs at
1232 strategic places so that the loops can be interrupted.
1233
1234 * Makefile.am (INCLUDES): Use @LTDLINC@ instead of
1235 "-I$(top_srcdir)/libguile-ltdl".
1236 (libguile_la_LIBADD): Use @LIBLTDL@ instead of
1237 "../libguile-ltdl/libguile-ltdl.a".
1238
1239 * guile.c, dynl.c: Switched to using libltdl directly. Replaced
1240 all references to scm_lt_* with just lt_*. Include <ltdl.h>
1241 instead of <libguile-ltdl.h>.
1242
1243 2004-10-20 Marius Vollmer <mvo@zagadka.de>
1244
1245 * sort.c (quicksort): Copy pivot out of the array while
1246 constructing the partitions; it could get overwritten otherwise.
1247 Because of the ultimate insertion sort, this bug did not cause
1248 quicksort to fail, it just put all the burdon on the insertion
1249 sort and was thus very slow. Thanks to Rolan Orre for reporting
1250 the slowness!
1251
1252 2004-10-19 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1253
1254 * numbers.c (scm_i_range_error): New.
1255 * conv-integer.i.c, conv-uinteger.i.c: Use it instead of
1256 scm_out_of_range.
1257
1258 * sort.c (scm_restricted_vector_sort_x): Validate startpos <=
1259 endpos. State inclusiveness/exclusiveness of bounds in docstring.
1260
1261 * unif.c (scm_array_p): When no prototype is given, explicitely
1262 test for allowable types, do not simply return true. Thanks to
1263 Roland Orre for reporting this!
1264
1265 * private-gc.h (SCM_DEFAULT_MAX_SEGMENT_SIZE): Increase to 20 Mib.
1266
1267 * gc-segment.c (scm_i_get_new_heap_segment): Limit size of new
1268 segment to scm_max_segment_size.
1269
1270 2004-10-08 Han-Wen Nienhuys <hanwen@xs4all.nl>
1271
1272 * gc.c (scm_igc): put scm_gc_running-- before running hooks.
1273
1274 * inline.h (scm_double_cell): abort if GC running.
1275 (scm_cell): idem.
1276
1277 2004-10-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1278
1279 * error.c (scm_wrong_type_arg): Do not talk about "argument" for
1280 pos == 0.
1281
1282 Keywords no longer store a 'dash symbol'. Instead, they store a
1283 symbol with their real name.
1284
1285 * keywords.h, keywords.c, deprecated.h, deprecated.c
1286 (SCM_KEYWORDP, SCM_KEYWORDSYM): Deprecated and implemented in
1287 terms of scm_is_keyword and scm_keyword_dash_symbol.
1288
1289 * keywords.h, keywords.c, discouraged.h, discouraged.c
1290 (scm_make_keyword_from_dash_symbol, scm_keyword_dash_symbol,
1291 scm_c_make_keyword): Discouraged.
1292
1293 * keywords.h, keywords.c (scm_symbol_to_keyword,
1294 scm_keyword_to_symbol): Implemented in C.
1295 (scm_is_keyword, scm_from_locale_keyword,
1296 scm_from_locale_keywordn): New.
1297
1298 * goops.c: Replaced SCM_KEYWORDP with scm_is_keyword.
1299
1300 * snarf.h (SCM_KEYWORD, SCM_GLOBAL_KEYWORD): Use
1301 scm_from_locale_keyword instead of scm_c_make_keyword.
1302
1303 * keywords.c (scm_symbol_to_keyword): Use SCM_ASSERT_TYPE for a
1304 better error message.
1305
1306 * deprecated.c: Include discouraged.h and keywords.h.
1307
1308 * read.c (scm_lreadr): Simply do (symbol->keyword (read)) after
1309 reading '#:' or ':'. See NEWS for consequences.
1310
1311 2004-09-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1312
1313 * read.c (scm_lreadr): Revert change from 2004-09-22: string
1314 literals are now read-write again (until SCM_STRING_CHARS is
1315 removed).
1316
1317 * strings.c (SCM_STRING_CHARS): Explicitely reject read-only
1318 strings with an error message that blames SCM_STRING_CHARS.
1319
1320 * options.c (change_option_setting): Use scm_car instead of
1321 explicit type check plus SCM_CAR.
1322
1323 * print.h, print.c (SCM_PRINT_HIGHLIGHT_PREFIX,
1324 SCM_PRINT_HIGHLIGHT_SUFFIX): New printer options.
1325 (scm_iprin1): Use them instead of the previoulsy hardcoded
1326 strings.
1327 (scm_init_print): Initialize them.
1328
1329 * backtrace.c (display_frame_expr): Do not remove control
1330 characters from the final string. Print it directly using
1331 scm_display.
1332
1333 * ramap.c (scm_array_equal_p): Include scm_tc7_svect in switch.
1334 Thanks to Roland Orre!
1335
1336 2004-09-29 Kevin Ryde <user42@zip.com.au>
1337
1338 * regex-posix.c (scm_regexp_exec): Correction to last change, should
1339 be whole original string in match struct, not offsetted substring.
1340
1341 2004-09-24 Han-Wen Nienhuys <hanwen@xs4all.nl>
1342
1343 * gc.c (scm_gc_unprotect_object): abort if called during GC.
1344
1345 2004-09-24 Marius Vollmer <mvo@zagadka.de>
1346
1347 * Makefile.am (EXTRA_DIST): Added gettext.h.
1348
1349 * smob.c, smob.h (scm_assert_smob_type): New.
1350
1351 * Makefile.am (guile_CFLAGS, guile_LDFLAGS, libguile_la_CFLAGS):
1352 Include GUILE_CFLAGS.
1353 (libguile_la_LIBADD): Removed THREAD_LIBS_LOCAL, which is unused
1354 now.
1355 (libpath.h): Put GUILE_CFLAGS in the build-info.
1356
1357 2004-09-23 Marius Vollmer <mvo@zagadka.de>
1358
1359 * print.h (scm_print_state): Added highlight_objects.
1360 * print.c (make_print_state, scm_free_print_state): Initialize it
1361 to SCM_EOL.
1362 (scm_iprin1): Wrap output in '{...}' when object is contained in
1363 highlight_objects.
1364
1365 * backtrace.h, backtrace.c (scm_display_backtrace_with_highlights,
1366 scm_backtrace_with_highlights): New. Set highlight_objects of
1367 printstate.
1368
1369 * error.c (scm_error_scm): Document new meaning of data/rest
1370 argument for out-of-range and wrong-type-arg errors.
1371 (scm_out_of_range, scm_out_of_range_pos, scm_wrong_type_arg,
1372 scm_wrong_type_arg_msg): Pass bad_value in rest argument of
1373 exception so that it gets highlighted in the backtrace.
1374 Don't talk about "argument" when not giving a position.
1375
1376 * throw.c (handler_message): The rest argument is the fourth
1377 argument, not everything after the third. Call
1378 scm_display_backtrace_with_highlights, passing the rest argument
1379 when appropriate.
1380
1381 2004-09-22 Marius Vollmer <mvo@zagadka.de>
1382
1383 From Jan Nieuwenhuizen <janneke@gnu.org> and Bruno Haible
1384 <bruno@clisp.org>:
1385
1386 * i18n.c: Handle --disable-nls (thanks Bruno).
1387
1388 * posix.c (scm_init_posix): Add LC_PAPER, LC_NAME, LC_ADDRESS,
1389 LC_TELEPHONE, LC_MEASUREMENT, LC_IDENTIFICATION.
1390
1391 * i18n.c (scm_i_to_lc_category): New name and export. Support all
1392 LC categories.
1393 * posix.c (scm_setlocale): Use it.
1394
1395 * i18n.h, i18n.c (scm_textdomain, scm_bindtextdomain,
1396 scm_bind_textdomain_codeset): Make wrappers similar to C function
1397 they wrap.
1398
1399 * i18n.h: New file.
1400 * i18n.c: New file.
1401 * gettext.h: New file, taken from GNU gettext.
1402 * init.c: Include libguile/i18n.h.
1403 (scm_init_guile_1): Add call to scm_init_i18n().
1404 * Makefile.am (libguile_la_SOURCES): Add i18n.c.
1405 (DOT_X_FILES): Add i18n.x.
1406 (DOT_DOC_FILES): Add i18n.doc.
1407 (libguile_la_LDFLAGS): Add @LTLIBINTL@.
1408 (modinclude_HEADERS): Add i18n.h.
1409
1410 2004-09-22 Marius Vollmer <mvo@zagadka.de>
1411
1412 * gh_list.c: Replaced SCM_CAR, etc with scm_car, etc.
1413
1414 * discouraged.h, tags.h (SCM_CONSP, SCM_NCONSP): Moved to
1415 discouraged.h. Replaced all uses with scm_is_pair.
1416 (SCM_I_CONSP): New name for SCM_CONSP.
1417
1418 * pairs.h, pairs.c (scm_is_pair, scm_is_null, scm_car, scm_cdr,
1419 scm_i_chase_pairs, SCM_I_A_PAT, SCM_I_D_PAT, etc, scm_caar,
1420 scm_cadr, etc): New.
1421 (SCM_NULLP, SCM_NNULLP): Moved to discouraged.h. Replaced all
1422 uses with scm_is_null.
1423
1424 * eval.c (scm_eval, scm_apply, call_cxr_1): Use scm_i_chase_pairs
1425 instead of explicit code.
1426
1427 2004-09-22 Marius Vollmer <mvo@zagadka.de>
1428
1429 * srfi-13.c (scm_string_contains, scm_string_contains_ci):
1430 Reworded logic a bit so that #f is returned immediately when s1 is
1431 too short to contain s2.
1432
1433 * regex-posix.c (scm_regexp_exec): Convert string to
1434 zero-terminated locale string before matching against it.
1435
1436 * strings.h, strings.c (scm_substring_read_only,
1437 scm_c_substring_read_only, scm_i_substring_read_only): New.
1438 (RO_STRING_TAG, IS_RO_STRING): New.
1439 (scm_i_string_writable_chars): Bail on read-only strings.
1440
1441 * read.c (scm_lreadr): use scm_c_substring_read_only for string
1442 literals, thus making them read-only as specified by R5RS.
1443
1444 2004-09-22 Marius Vollmer <mvo@zagadka.de>
1445
1446 * eq.c (scm_equal_p): Allow smobs with different flags to be equal
1447 by testing for smobs before insisting on equal SCM_CELL_TYPES.
1448
1449 2004-09-21 Marius Vollmer <mvo@zagadka.de>
1450
1451 * numbers.h, numbers.c: Include <gmp.h> in numbers.h, not in
1452 numbers.c.
1453 (scm_to_mpz, scm_from_mpz): New.
1454 Thanks to Andreas Vögele!
1455
1456 * read.c (skip_scsh_block_comment): Recognize "!#" everywhere, not
1457 just on a line of its own.
1458
1459 * srfi-13.c (scm_string_any, scm_string_every,
1460 scm_string_tabulate, string_upcase_x, string_down_case_x,
1461 string_titlecase_x, string_reverse_x, scm_string_tokenize): Use
1462 size_t instead of int for indices into strings. Make sure that no
1463 over- or underflow occurs. Thanks to Andreas Vögele!
1464 (scm_xsubstring, scm_string_xcopy_x): Use ints for 'extended'
1465 indices, which can also be negative.
1466
1467 2004-09-20 Marius Vollmer <mvo@zagadka.de>
1468
1469 * gc-mark.c (SCM_MARK_BACKING_STORE): Removed, it was unused.
1470
1471 * threads.c (scm_threads_mark_stacks): Call
1472 SCM_MARK_BACKING_STORE. Also, do not use stack_len local, it was
1473 only used once.
1474
1475 2004-09-13 Jan Nieuwenhuizen <janneke@gnu.org>
1476
1477 * srfi-13.c (scm_string_contains, scm_string_contains_ci):
1478 Bugfix: when subtracting unsigned values, make sure that result
1479 does not wrap.
1480
1481 2004-09-09 Kevin Ryde <user42@zip.com.au>
1482
1483 * filesys.c, stime.c (_POSIX_C_SOURCE): Use this only on hpux, it
1484 causes too many problems elsewhere (glibc, freebsd, mingw). Reported
1485 by Andreas Vögele.
1486
1487 2004-09-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1488
1489 * Makefile.am (EXTRA_libguile_la_SOURCES): Removed "alloca.c".
1490
1491 * eq.c (real_eqv): Pretend that all NaNs are equal.
1492
1493 * numbers.c (scm_integer_expt): Do not accept inexact integers.
1494
1495 2004-09-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1496
1497 * srfi-13.c (scm_string_trim_right, scm_string_xcopy_x): Correctly
1498 use size_t for some locals instead of int.
1499
1500 * read.c (scm_flush_ws): Detect "#!"-style comments here.
1501 (scm_lreadr): Abort on seeing "#!", which should no longer happen.
1502 (skip_scsh_block_comment): Use scm_input_error instead of
1503 scm_misc_error in case of EOF.
1504
1505 2004-09-07 Kevin Ryde <user42@zip.com.au>
1506
1507 * numbers.c (scm_integer_expt): Reject exponent +/-inf.
1508 Bug report by Bill Schottstaedt.
1509
1510 * ports.c (scm_getc, scm_lfwrite): Recognise \a \b and \r for port
1511 column.
1512 * ports.h (SCM_ZEROCOL, SCM_DECCOL): New macros.
1513
1514 * posix.c (scm_access): Update docstring per manual.
1515
1516 * posix.c (scm_nice): Correction to error detection. Reported by
1517 Matthias Koeppe.
1518
1519 * stime.c (scm_current_time, scm_gettimeofday, scm_strptime): Don't
1520 throw error before unlocking mutex with SCM_ALLOW_INTS.
1521
1522 2004-09-06 Kevin Ryde <user42@zip.com.au>
1523
1524 * stime.h (SCM_TIME_UNITS_PER_SECOND): Use sysconf(_SC_CLK_TCK) when
1525 available. This also gets around CLK_TCK being absent when
1526 _GNU_SOURCE and _POSIX_C_SOURCE are defined in stime.c.
1527
1528 2004-09-03 Stefan Jahn <stefan@lkcc.org>
1529
1530 * threads.c (scm_threads_mark_stacks): Fixed local variable
1531 definitions.
1532
1533 * strings.c (scm_i_substring_copy, scm_string_append): Fixed
1534 local variable definitions.
1535
1536 * stime.c (_POSIX_C_SOURCE): Do not define this item on
1537 MinGW32 because it conflicts with its pthread headers.
1538 (scm_mktime): Consider the HAVE_STRUCT_TM_TM_ZONE define.
1539 (scm_strftime): Using scm_from_locale_string() instead of
1540 scm_makfrom0str().
1541
1542 * posix.c (scm_putenv): Fixed typo in the !HAVE_UNSETENV
1543 part.
1544
1545 * numbers.c (scm_init_numbers): Removed check_sanity() call
1546 inside GUILE_DEBUG. The function has been removed somewhen...
1547
1548 * filesys.c (_POSIX_C_SOURCE): Do not define this item on
1549 MinGW32 because it conflicts with its pthread headers.
1550
1551 2004-08-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1552
1553 * strings.c (SCM_STRINGP): Accept all strings.
1554 (SCM_STRING_CHARS): Reject shared substrings here.
1555
1556 * script.c (scm_compile_shell_switches): Added 2003 and 2004 to
1557 the Copyright years.
1558
1559 2004-08-27 Kevin Ryde <user42@zip.com.au>
1560
1561 * socket.c (scm_fill_sockaddr): Use HAVE_STRUCT_SOCKADDR_SIN_LEN and
1562 HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN for sockaddr fields, SIN_LEN and
1563 SIN_LEN6 are not defined on all systems. Reported by Michael Tuexen.
1564
1565 2004-08-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1566
1567 * strings.h, strings.c (scm_i_make_symbol): Added FLAGS parameter.
1568 * symbols.h, symbols.c (SCM_I_F_SYMBOL_UNINTERNED,
1569 scm_i_symbol_is_interned, scm_i_mem2symbol,
1570 scm_i_mem2uninternedsymbol): Use it to store uninternedness flag.
1571
1572 2004-08-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1573
1574 * srfi-13.c: First cut at thread-safeness and proper use of
1575 scm_i_string_chars et al. Copious scm_remember_upto_heres have
1576 been inserted. Made sure that no internal string pointer is used
1577 across a SCM_TICK or a possible GC.
1578
1579 * script.c (scm_compile_shell_switches): Use
1580 scm_from_locale_string instead of scm_makfrom0str.
1581
1582 * srfi-13.c (scm_string_rindex): Export to Scheme, as it has
1583 always been.
1584
1585 2004-08-25 Marius Vollmer <mvo@zagadka.de>
1586
1587 Moved SRFI-13 and SRFI-14 into the core, taking over the role of
1588 strop.c.
1589
1590 * srfi-13.c, srfi-13.h, srfi-14.c, srfi-14.h: New files.
1591 * strop.h, strop.c: Removed, they are now empty.
1592 * Makefile.am: Updated for new and removed files.
1593
1594 * symbols.h, symbols.c (scm_string_ci_to_symbol): Moved here, next
1595 to scm_string_to_symbol.
1596
1597 * chars.c (scm_char_alphabetic_p, scm_char_numeric_p,
1598 scm_char_whitespace_p, scm_upper_case_p, scm_lower_case_p,
1599 scm_char_is_both_p): Use scm_char_set_contains_p with the proper
1600 charset instead of libc functions.
1601
1602 * strorder.c (scm_string_equal_p, scm_string_ci_equal_p,
1603 scm_string_less_p, scm_string_leq_p, scm_string_gr_p,
1604 scm_string_geq_p, scm_string_ci_less_p, scm_string_ci_leq_p,
1605 scm_string_ci_gr_p, scm_string_ci_geq_p): Use scm_string_eq, etc
1606 instead of explicit code.
1607
1608 * deprecated.c, load.c, posix.c, unif.c, symbols.c: Include
1609 "srfi-13.h" instead of "strop.h".
1610
1611 * init.c (scm_init_guile_1): Call scm_init_srfi_13 and
1612 scm_init_srfi_14. Do not call scm_init_strop.
1613
1614 2004-08-24 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1615
1616 * numbers.c (scm_inf_p): Synced docstring back from manual.
1617
1618 2004-08-22 Marius Vollmer <mvo@zagadka.de>
1619
1620 * strings.c (get_str_buf_start): New helper function.
1621 (scm_i_substring, scm_i_substring_copy, scm_i_substring_shared,
1622 scm_i_string_char, scm_i_string_writable_chars): Use it.
1623 (scm_i_substring_copy): Make START argument optional for C
1624 callers, for upcoming SRFI-13 integration.
1625
1626 2004-08-21 Marius Vollmer <mvo@zagadka.de>
1627
1628 From Richard Todd, Thanks!
1629
1630 * script.c (scm_compile_shell_switches): added '-L' switch to add
1631 to the %load-path.
1632
1633 2004-08-21 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
1634
1635 * eval.c (unmemoize_exprs): When dropping internal body markers
1636 from the output during unmemoization, also drop those that are not
1637 immediately at the beginning of a body.
1638
1639 2004-08-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1640
1641 * eval.c (scm_lookupcar1): Report "Variable used before given a
1642 value" insetad of an "Unbound" one for variables that are found
1643 but still contain SCM_UNDEFINED.
1644
1645 * posix.c (scm_mkstemp): Correction to the correction, mkstemp
1646 expects a null-terminated string in the locale encoding, but
1647 scm_i_string_writable_chars doesn't give that. Fixed by letting
1648 mkstemp modify a locale version of the tmpl argument and copying
1649 the result back into tmpl.
1650
1651 * strop.c (scm_substring_move_x): Store into str2, not str1.
1652
1653 2004-08-20 Kevin Ryde <user42@zip.com.au>
1654
1655 * posix.c (scm_mkstemp): Correction to new locale_string stuff, need
1656 to modify the input string.
1657
1658 2004-08-19 Marius Vollmer <mvo@zagadka.de>
1659
1660 * deprecated.c (SCM_SYMBOL_CHARS): Cast away const in return.
1661 (SCM_SYMBOL_LENGTH): It's scm_i_symbol_length, not
1662 scm_c_symbol_length.
1663
1664 2004-08-19 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1665
1666 New string implementation, with copy-on-write strings and
1667 mutation-sharing substrings, and a new internal string API.
1668 Symbols can now share memory with strings.
1669
1670 * tags.h (scm_tc7_stringbuf): New tag.
1671
1672 * strings.h, strings.c: (scm_i_string_chars, scm_i_string_length,
1673 scm_i_string_writable_chars, scm_i_string_stop_writing): New, to
1674 replace SCM_I_STRING_CHARS and SCM_I_STRING_LENGTH. Updated all
1675 uses.
1676 (scm_i_make_string, scm_c_make_string): New, to replace
1677 scm_allocate_string. Updated all uses.
1678 (SCM_STRINGP, SCM_STRING_CHARS, SCM_STRING_UCHARS,
1679 SCM_STRING_LENGTH): Deprecated.
1680 (scm_allocate_string, scm_take_str, scm_take0str, scm_mem2string,
1681 scm_str2string, scm_makfrom0str, scm_makfrom0str_opt):
1682 Discouraged. Replaced all uses with scm_from_locale_string or
1683 similar, as appropriate.
1684 (scm_c_string_length, scm_c_string_ref, scm_c_string_set_x,
1685 scm_c_substring, scm_c_substring_shared, scm_c_substring_copy,
1686 scm_substring_shared, scm_substring_copy): New.
1687
1688 * symbols.c, symbols.h (SCM_SYMBOLP, SCM_SYMBOL_FUNC,
1689 SCM_SET_SYMBOL_FUNC, SCM_SYMBOL_PROPS, SCM_SET_SYMBOL_PROPS,
1690 SCM_SYMBOL_HASH, SCM_SYMBOL_INTERNED_P, scm_mem2symbol,
1691 scm_str2symbol, scm_mem2uninterned_symbol): Discouraged.
1692 (SCM_SYMBOL_LENGTH, SCM_SYMBOL_CHARS, scm_c_symbol2str):
1693 Deprecated.
1694 (SCM_MAKE_SYMBOL_TAG, SCM_SET_SYMBOL_LENGTH, SCM_SET_SYMBOL_CHARS,
1695 SCM_PROP_SLOTS, SCM_SET_PROP_SLOTS): Removed.
1696 (scm_is_symbol, scm_from_locale_symbol, scm_from_locale_symboln):
1697 New, to replace scm_str2symbol and scm_mem2symbol, respectively.
1698 Updated all uses.
1699 (scm_gensym): Generate only the number suffix in the buffer, just
1700 string-append the prefix.
1701
1702 * error.c (scm_memory_error): Do not try to throw, just abort.
1703 Throwing will not work anyway.
1704
1705 * gh.h, gh-data.c (gh_set_substr): Made src const.
1706
1707 * ports.c (scm_i_mode_bits_n): New, for counted strings.
1708 (scm_mode_bits): Use it.
1709 (scm_c_port_for_each): Blocking GC does not seem to work, allocate
1710 a vector normally and fill that instead of consing a list with a
1711 blocked GC.
1712
1713 * read.c (scm_i_casei_streq): New, for counted strings.
1714
1715 * threads.c (gc_section_count): Removed, thread-sleeping can not
1716 be nested.
1717 (scm_i_thread_put_to_sleep): Call scm_i_leave_guile before locking
1718 admin mutex so that we can be put to sleep by other threads while
1719 blocking on that mutex. Lock all the heap mutex of all threads,
1720 including ourselves.
1721 (scm_i_thread_wake_up): Unlock all threads, including ourselves,
1722 call scm_i_enter_guile.
1723 (scm_thread_mark_stacks): Expect all threads to be suspended.
1724
1725 * gc.h, gc.c (scm_i_gc_admin_mutex): New, to protect
1726 scm_gc_mallocated, for now.
1727 (scm_init_storage): Initialize it.
1728 * gc-malloc.c (descrease_mtrigger, increase_mtrigger): Use it.
1729
1730 * gc-mark.c (scm_gc_mark_dependencies): Call scm_i_string_mark,
1731 scm_i_stringbuf_mark and scm_i_symbol_mark, as appropriate.
1732 * gc-card.c (scm_i_sweep_card): Call scm_i_string_free,
1733 scm_i_stringbuf_free and scm_i_symbol_free, as appropriate.
1734
1735 * strop.c (scm_string_copy): Use scm_c_substring to get a
1736 copy-on-write string.
1737
1738 2004-08-18 Kevin Ryde <user42@zip.com.au>
1739
1740 * arbiters.c (FETCH_STORE): New macro.
1741 (SCM_LOCK_VAL, SCM_UNLOCK_VAL): New constants.
1742 (SCM_LOCK_ARB, SCM_UNLOCK_ARB): Remove, effectively absorbed into
1743 scm_try_arbiter and scm_release_arbiter.
1744 (scm_try_arbiter, scm_release_arbiter): Use FETCH_STORE to get xchg
1745 for speed on i386, otherwise using mutex.
1746
1747 * eq.c (scm_equal_p): Remove real==fraction and fraction==real, they
1748 must be #f according to R5RS. (equal? follows eqv?, and for eqv? an
1749 exact and inexact is #f.)
1750
1751 * fports.c (fport_print): Use scm_ttyname instead of ttyname directly,
1752 to get thread safety of scm_ttyname.
1753
1754 * ports.c (ttyname): Remove prototype, unused.
1755
1756 * socket.c (scm_init_socket): Add SOCK_SEQPACKET and SOCK_RDM.
1757 Reported by Michael Tuexen.
1758
1759 2004-08-13 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1760
1761 * load.c (scm_init_load_path): Do not pass NULL to
1762 scm_to_locale_string, which would happen when GUILE_LOAD_PATH is
1763 not set. Thanks to Bill Schottstaedt.
1764
1765 2004-08-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1766
1767 * socket.c (scm_inet_aton, scm_inet_pton): Convert SCM strings to
1768 locale strings instead of accessing their internals.
1769 (scm_recv, scm_send, scm_recvfrom, scm_sendto): Use
1770 SCM_I_STRING_CHARS and SCM_I_STRING_LENGTH instead of
1771 SCM_STRING_CHARS and SCM_STRING_LENGTH.
1772
1773 * simpos.c (scm_system): Convert SCM strings to locale strings
1774 instead of accessing their internals.
1775
1776 * script.c (scm_compile_shell_switches): Convert version to locale
1777 string before printing it.
1778
1779 * rdelim.c (scm_read_delimited_x): Avoid
1780 SCM_VALIDATE_SUBSTRING_SPEC_COPY and use scm_from_size_t instead
1781 of scm_from_long for the returned number of read characters.
1782
1783 * ioext.c (scm_fdopen): Use scm_i_fdes_to_port together with
1784 scm_i_mode_bits to avoid accessing internals of SCM string from C.
1785
1786 * filesys.c (STRING_SYSCALL, STRING2_SYSCALL): New helper macros.
1787 Use them instead of SCM_SYSCALL when one or two strings need to be
1788 converted into locale strings.
1789 (my_rename): New, gathers platform dependent code for renaming.
1790 (scm_rename): Use it.
1791 (scm_readlink, scm_copy_file): Convert SCM strings to locale
1792 strings instead of accessing their internals.
1793 (scm_basename, scm_dirname): Use SCM_I_STRING_CHARS and
1794 SCM_I_STRING_LENGTH instead of SCM_STRING_CHARS and
1795 SCM_STRING_LENGTH.
1796
1797 * extensions.c (load_extension): Convert lib and init to locale
1798 strings instead of accessing the internals directly.
1799 (scm_c_load_extension): Use scm_from_locale_string instead of
1800 scm_makfrom0str.
1801
1802 * fports.h, fports.c (scm_i_fdes_to_port): New, like
1803 scm_fdes_to_port, but take mode bits directly instead of as a C
1804 string.
1805 (scm_i_fdes_to_port): Implement using above.
1806 (scm_open_file): Use scm_i_fdes_to_port together with
1807 scm_i_mode_bits to avoid accessing internals of SCM string from C.
1808 * vports.c (scm_make_soft_port): Use scm_i_fdes_to_port together
1809 with scm_i_mode_bits to avoid accessing internals of SCM string
1810 from C.
1811
1812 * ports.h (scm_i_mode_bits): New, same as scm_mode_bits but with a
1813 SCM string as argument.
1814
1815 * ports.c (scm_i_void_port): New, like scm_void_port but take mode
1816 bits directly instead of C string.
1817 (scm_void_port): Implement using above.
1818 (scm_sys_make_void_port): Use scm_i_void_port together with
1819 scm_i_mode_bits to avoid accessing internals of SCM string.
1820
1821 * strings.h, strings.c (scm_i_get_substring_spec): New.
1822
1823 * socket.c, rw.c, deprecated.h, validate.h
1824 (SCM_VALIDATE_STRING_COPY): Deprecated. Replaced all uses with
1825 SCM_VALIDATE_STRING plus SCM_I_STRING_CHARS or
1826 scm_to_locale_string, etc.
1827 (SCM_VALIDATE_SUBSTRING_SPEC_COPY): Deprecated. Replaced as
1828 above, plus scm_i_get_substring_spec.
1829
1830 * regex-posix.c, read.c, random.c, ramap.c, print.c, numbers.c,
1831 hash.c, gc.c, gc-card.c, convert.i.c, backtrace.c, strop.c,
1832 strorder.c, strports.c, struct.c, symbols.c, unif.c, ports.c: Use
1833 SCM_I_STRING_CHARS, SCM_I_STRING_UCHARS, and SCM_I_STRING_LENGTH
1834 instead of SCM_STRING_CHARS, SCM_STRING_UCHARS, and
1835 SCM_STRING_LENGTH, respectively. Also, replaced scm_return_first
1836 with more explicit scm_remember_upto_here_1, etc, or introduced
1837 them in the first place.
1838
1839 * posix.c (WITH_STRING): New helper macro. Use it where one
1840 locale string is needed for a short piece of code.
1841 (STRING_SYSCALL): New helper macro. Use it instead of SCM_SYSCALL
1842 when one locale string is needed.
1843 (scm_mkstemp): Convert tmpl to a locale string.
1844 (scm_putenv): Rewritten to use only C strings.
1845 (scm_setlocale, scm_crpt): Convert argument strings to locale
1846 strings.
1847
1848 2004-08-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1849
1850 * load.c (scm_primitive_load_path): Do not check for absolute
1851 filenames when scm_sys_search_load_path returns false, which will
1852 return absolute filenames unchanged.
1853
1854 2004-08-11 Marius Vollmer <mvo@zagadka.de>
1855
1856 * gc.c, procprop.c (scm_init_storage, scm_stand_in_procs,
1857 scm_stand_in_proc): Use a hastable for scm_stand_in_procs instead
1858 of an alist. Thanks to Matthias Koeppe!
1859
1860 2004-08-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1861
1862 * strings.h, deprecated.h (SCM_STRING_COERCE_0TERMINATION_X):
1863 Moved from string.h to deprecated.h.
1864
1865 * deprecated.c, deprecated.h (SCM_CHARS, SCM_LENGTH): Removed.
1866
1867 * strings.h, strings.c (SCM_MAKE_STRING_TAG): Renamed to
1868 SCM_I_MAKE_STRING_TAG, changed all uses.
1869 (SCM_STRING_CHARS, SCM_STRING_UCHARS, SCM_STRING_LENGTH): Renamed
1870 to SCM_I_STRING_CHARS, SCM_I_STRING_UCHARS, and SCM_I_LENGTH
1871 respectively. For a short time, the old names are still there as
1872 aliases. Not all uses have been changed yet, but the ones in
1873 strings.c have.
1874 (SCM_STRING_MAX_LEN): Do not hardcode to 24 bits, compute from
1875 SCM_T_BITS_MAX.
1876 (scm_is_string, scm_from_locale_string, scm_from_locale_stringn,
1877 scm_take_locale_string, scm_take_locale_stringn,
1878 scm_to_locale_string, scm_to_locale_stringn,
1879 scm_to_locale_stringbuf): New.
1880 (scm_c_string2str, scm_c_substring2str): Deprecated by moving to
1881 deprecated.[hc]. Implemented in terms of the new functions above.
1882 (scm_take_str, scm_take0str, scm_mem2string, scm_str2string,
1883 scm_makfrom0str): Reimplemented in terms of the new functions from
1884 above. They will be discouraged shortly.
1885 (scm_substring): Do not use scm_mem2string.
1886 (scm_i_allocate_string_pointers, scm_i_free_string_pointers): New,
1887 to replace similar code from posix.c, simpos.c, and dynl.c.
1888 (scm_string_append): Use memcpy instead of explicit loop. Do not
1889 use register keyword. Use plain 'char' instead of 'unsigned
1890 char'.
1891
1892 * strports.c (scm_mkstrport): Use SCM_I_STRING_UCHARS instead of
1893 SCM_STRING_UCHARS. Use SCM_I_STRINGP instead of SCM_STRINGP.
1894
1895 * strop.c (scm_i_index): Replaced SCM_STRINGP, SCM_STRING_CHARS,
1896 and SCM_STRING_LENGTH with SCM_I_STRINGP, SCM_I_STRING_CHARS, and
1897 SCM_I_STRING_LENGTH, respectively. Pass string object directly,
1898 not as a pointer. Use scm_remember_upto_here_1 to protect it.
1899
1900 * read.c (scm_input_error): Use a SCM value for 'fn', not a C
1901 string. This avoids a conversion round-trip.
1902
1903 * gh_data.c: Replaced SCM_STRINGP, SCM_STRING_CHARS, and
1904 SCM_STRING_LENGTH with SCM_I_STRINGP, SCM_I_STRING_CHARS, and
1905 SCM_I_STRING_LENGTH, respectively.
1906 (gh_scm2newstr): Implement in terms of scm_to_locale_string.
1907
1908 * environments.c: Instead calling scm_puts on the SCM_STRING_CHARS
1909 of a string, call scm_display on the string itself.
1910
1911 * dynwind.c, dynwind.h (scm_frame_free): New.
1912
1913 * stime.c, socket.c, simpos.c, procs.c, posix.c, ports.c,
1914 net_db.c, fports.c, filesys.c, eval.c, deprecation.c, dynl.c:
1915 Replaced uses of SCM_STRING_CHARS with proper uses of
1916 scm_to_locale_string. Replaced SCM_STRINGP with scm_is_string.
1917 Replaced scm_mem2string with scm_from_locale_string.
1918
1919 * simpos.c, posix.c (allocate_string_pointers, environ_list_to_c):
1920 Removed, replaced all uses with scm_i_allocate_string_pointers.
1921
1922 * load.h, load.c (scm_internal_parse_path): Removed.
1923 (scm_parse_path): Use scm_string_split to do the work.
1924 (scm_init_load_path): Use scm_parse_path instead of
1925 scm_internal_parse_path.
1926 (scm_search_path): Rewritten string handling part of the code in
1927 terms of scm_to_locale_stringbuf and so that it is thread safe.
1928
1929 * error.c (scm_error_scm): Throw directly instead of calling
1930 scm_error, this avoids the back and forth conversion of SUBR and
1931 MESSAGE and also plugs a memory leak.
1932 (scm_error): Call scm_error_scm.
1933
1934 * backtrace.c: Replaced SCM_STRINGP with scm_is_string.
1935 (display_header): Print FNAME when it is true, not
1936 merely when it is a string.
1937
1938 * strings.h (SCM_SET_STRING_LENGTH, SCM_SET_STRING_CHARS): Removed
1939 unceremoniously. They were unused by Guile itself, and external
1940 use should stop immediately.
1941
1942
1943 2004-08-10 Marius Vollmer <mvo@zagadka.de>
1944
1945 * numbers.h, number.c, deprecated.h, deprecated.c (scm_round,
1946 scm_truncate): Renamed to scm_c_round and scm_c_truncate;
1947 deprecated versions installed in deprecated.h and deprecated.c.
1948 Changed all uses.
1949
1950 2004-08-06 Rob Browning <rlb@defaultvalue.org>
1951
1952 * net_db.c (scm_resolv_error): don't cause an exception while
1953 trying to throw an exception -- call scm_misc_error with correct
1954 arguments. The previous arguments needed a format escape that
1955 wasn't in any of the format strings.
1956
1957 2004-08-06 Kevin Ryde <user42@zip.com.au>
1958
1959 * ramap.c (scm_array_fill_x): For byvect char fill, force signed char
1960 so as not to depend on signedness of plain char. For byvect range
1961 check, throw out-of-range rather than wrong-type-arg.
1962
1963 * unif.c (scm_uniform_vector_ref, scm_array_set_x): For byvect, force
1964 signed byte range checks by using scm_to_schar and scm_from_schar,
1965 don't want to depend on signedness of C char.
1966
1967 2004-08-05 Kevin Ryde <user42@zip.com.au>
1968
1969 * arbiters.c (scm_try_arbiter): Use scm_i_misc_mutex instead of
1970 SCM_DEFER_INTS.
1971 (scm_release_arbiter): Use scm_i_misc_mutex so return value can be
1972 guaranteed if multiple threads compete to unlock.
1973 Update docstrings per doc/ref/api-scheduling.texi.
1974
1975 * filesys.c (scm_copy_file): Use fstat on the input fd rather than
1976 stat on the filename, to be certain a file rename can't mean we get
1977 info on one filesystem object but open another. This fstat usage is
1978 similar to Emacs copy-file.
1979
1980 * posix.c (scm_setgroups): Enhance docstring, per doc/ref/posix.texi.
1981
1982 * simpos.c (scm_system_star): Change scm_from_long to scm_from_int on
1983 SIGINT and SIGQUIT, since those values are ints.
1984
1985 2004-08-03 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1986
1987 * num2integral.i.c, num2float.i.c: Removed.
1988 * Makefile.am (noinst_HEADERS): Updated.
1989
1990 * numbers.h. numbers.c (scm_make_ratio): Renamed to
1991 scm_i_make_ratio and made static, replaced uses with scm_divide.
1992 (scm_complex_p): New, export as "complex?" to Scheme.
1993 (scm_number_p): Export as "number?" to Scheme.
1994 (scm_is_complex, scm_is_number): New.
1995 (scm_c_make_rectangular, scm_c_make_polar): New.
1996 (scm_make_rectangular, scm_make_polar): Use above.
1997 (scm_c_real_part, scm_c_imag_part, scm_c_magnitude, scm_c_angle):
1998 New.
1999 (scm_make_complex): Discouraged by moving to discouraged.h and
2000 discouraged.c. Replaced all uses with scm_c_make_rectangular.
2001
2002 * discouraged.h, discouraged.c, numbers.c, numbers.h
2003 (scm_is_rational): New.
2004 (scm_i_short2big, scm_i_int2big, scm_i_uint2big, scm_i_size2big,
2005 scm_i_ptrdiff2big, scm_i_long_long2big, scm_i_ulong_long2big):
2006 Removed prototypes.
2007 (scm_make_real, scm_num2dbl, scm_float2num, scm_double2num):
2008 Discouraged by moving to discouraged.h and discouraged.c.
2009 Replaced all uses with scm_from_double.
2010 (scm_num2float, scm_num2double): Discouraged by moving prototype
2011 to discouraged.h and rewriting in terms of scm_to_double.
2012 Replaced all uses with scm_to_double.
2013 (scm_to_double): Do not implement in terms of scm_num2dbl, use
2014 explicit code.
2015 (scm_from_double): Do not implement in terms of scm_make_real, use
2016 explicit code.
2017
2018 2004-08-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2019
2020 * init.c (scm_init_guile_1): Call scm_i_init_discouraged.
2021
2022 * gen-scmconfig.h.in (SCM_I_GSC_ENABLE_DISCOURAGED): New.
2023 * gen-scmconfig.c (SCM_ENABLE_DISCOURAGED): Emit based on above.
2024
2025 * eval.c (SCM_EVALIM, SCM_EVALIM2, SCM_XEVAL, SCM_XEVALCAR):
2026 Renamed to SCM_I_* in order to avoid collisions with the versions
2027 defined in deprecated.h.
2028
2029 * discouraged.h, discouraged.c: New files.
2030
2031 * deprecated.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_EQ_P,
2032 SCM_NEGATE_BOOL, SCM_BOOL, SCM_BOOT_NOT): Promoted from being
2033 deprecated to being discouraged by moving to discouraged.h.
2034
2035 * numbers.h, numbers.c, discouraged.h, discouraged.c
2036 (scm_short2num, scm_ushort2num, scm_int2num, scm_uint2num,
2037 scm_long2num, scm_ulong2num, scm_size2num, scm_ptrdiff2num,
2038 scm_num2short, scm_num2ushort, scm_num2int, scm_num2uint,
2039 scm_num2long, scm_num2ulong, scm_num2size, scm_num2ptrdiff,
2040 scm_long_long2num, scm_ulong_long2num, scm_num2long_long,
2041 scm_num2ulong_long): Discouraged by moving to discouraged.h and
2042 discouraged.c and reimplementing in terms of scm_from_* and
2043 scm_to_*. Changed all uses to the new scm_from_* and scm_to_*
2044 functions.
2045
2046 * numbers.h, numbers.c: Removed GUILE_DEBUG code.
2047 (scm_i_short2big, scm_i_ushort2big, scm_i_int2big, scm_i_uint2big,
2048 scm_i_size2big, scm_i_ptrdiff2big): Removed.
2049 (scm_i_long2big, scm_i_ulong2big): New, explicit definitions.
2050 * conv-integer.i.c, conv-uinteger.i.c: Use them instead of
2051 explicit code.
2052
2053 2004-08-02 Kevin Ryde <user42@zip.com.au>
2054
2055 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Add comments about past
2056 and current usage and migration.
2057
2058 2004-07-31 Kevin Ryde <user42@zip.com.au>
2059
2060 * error.c (scm_strerror): Use scm_i_misc_mutex around strerror since
2061 it's not thread safe.
2062 (scm_syserror): Use scm_strerror rather than SCM_I_STRERROR, to take
2063 advantage of this.
2064 * fports.c (scm_open_file): Use scm_strerror likewise.
2065 * filesys.c (scm_stat, scm_lstat): Ditto.
2066
2067 * filesys.c (scm_copy_file): Avoid fd leak when destination file
2068 cannot be opened.
2069
2070 * symbols.c (scm_gensym): Use scm_i_misc_mutex around gensym_counter
2071 update, for thread safety.
2072 (gensym_counter): Move into scm_gensym which is its only user.
2073 (scm_init_symbols): No need to explicitly initialize gensym_counter.
2074
2075 2004-07-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2076
2077 * numbers.h (scm_to_schar, scm_to_uchar, scm_to_char,
2078 scm_to_short, scm_to_ushort, scm_to_int, scm_to_uint, scm_to_long,
2079 scm_to_ulong, scm_to_long_long, scm_to_ulong_long, scm_to_intmax,
2080 scm_to_uintmax, scm_to_size_t, scm_to_ssize_t scm_from_schar,
2081 scm_from_uchar, scm_from_char, scm_from_short, scm_from_ushort,
2082 scm_from_int, scm_from_uint, scm_from_long, scm_from_ulong,
2083 scm_from_long_long, scm_from_ulong_long, scm_from_intmax,
2084 scm_from_uintmax, scm_from_size_t, scm_from_ssize_t): No longer
2085 defined in terms of scm_to_signed_integer, etc, but in terms of
2086 scm_to_int8, etc.
2087
2088 * gen-scmconfig.c (SCM_SIZEOF_INTMAX, SCM_SIZEOF_SIZE_T): New.
2089
2090 * gen-scmconfig.h.in: Removed SCM_I_GSC_*_LIMITS macros, they are
2091 no longer used.
2092
2093 * __scm.h (SCM_I_UTYPE_MAX, SCM_I_TYPE_MAX, SCM_I_TYPE_MIN,
2094 SCM_I_SIZE_MAX, SCM_I_SSIZE_MIN, SCM_I_SSIZE_MAX): New.
2095
2096 * __scm.h, gen-scmconfig.c (SCM_I_LLONG_MAX, SCM_I_LLONG_MIN,
2097 SCM_I_ULLONG_MAX, SCM_T_INT8_MIN, SCM_T_INT8_MAX, SCM_T_UINT8_MAX,
2098 SCM_T_INT16_MIN, SCM_T_INT16_MAX, SCM_T_UINT16_MAX,
2099 SCM_T_INT32_MIN, SCM_T_INT32_MAX, SCM_T_UINT32_MAX,
2100 SCM_T_INT64_MIN, SCM_T_INT64_MAX, SCM_T_UINT64_MAX,
2101 SCM_T_INTMAX_MIN, SCM_T_INTMAX_MAX, SCM_T_UINTMAX_MAX): Moved
2102 definition into __scm.h, using new SCM_I_TYPE_MIN, etc.
2103
2104 * conv-integer.i.c, conv-uinteger.i.c: New files, used to generate
2105 the functions below.
2106
2107 * Makefile.am (noinst_HEADERS): Added conv-integer.i.c and
2108 conv-uinteger.i.c.
2109
2110 * numbers.c, numbers.h (scm_to_int8, scm_to_uint8, scm_to_int16,
2111 scm_to_uint16, scm_to_int32, scm_to_uint32, scm_to_int64,
2112 scm_to_uint64, scm_from_int8, scm_from_uint8, scm_from_int16,
2113 scm_from_uint16, scm_from_int32, scm_from_uint32, scm_from_int64,
2114 scm_from_uint64): Turned from macros into proper functions.
2115 (scm_to_signed_integer, scm_to_unsigned_integer,
2116 scm_from_signed_integer, scm_from_unsigned_integer): Generate via
2117 conv-integer.i.c and conv-uinteger.i.c, as well.
2118
2119 * number.h (scm_to_ssize_t, scm_to_size_t): Use the new
2120 SCM_I_SSIZE_MIN, SCM_I_SSIZE_MAX, and SCM_I_SIZE_MAX macros for
2121 the limits. Those are always defined.
2122
2123 2004-07-29 Kevin Ryde <user42@zip.com.au>
2124
2125 * posix.c (scm_ttyname): Use scm_i_misc_mutex for thread safety.
2126
2127 2004-07-28 Kevin Ryde <user42@zip.com.au>
2128
2129 * posix.c (scm_ctermid): Use an L_ctermid buf on the stack, for thread
2130 safety.
2131
2132 * unif.c (scm_array_set_x): For svect, use scm_num2short for
2133 consistency with other vector types and to get arg and func name into
2134 error message.
2135
2136 2004-07-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2137
2138 * deprecated.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_BOOL):
2139 Reimplement using scm_is_false, scm_is_true, scm_is_bool, and
2140 scm_from_bool, respectively.
2141 (SCM_NINUMP): Added.
2142
2143 * tags.h, deprecated.h (SCM_EQ_P): Deprecated by moving it into
2144 deprecated.h. Replaced all uses with scm_is_eq.
2145
2146 2004-07-24 Kevin Ryde <user42@zip.com.au>
2147
2148 * threads.c, threads.h (scm_i_misc_mutex): New SCM_GLOBAL_MUTEX.
2149 * posix.c (scm_crypt): Use it to protect static data in crypt().
2150
2151 2004-07-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2152
2153 * deprecated.h, deprecated.c, numbers.h (SCM_INUMP, SCM_NINUMP,
2154 SCM_INUM): Deprecated by renaming them to SCM_I_INUMP,
2155 SCM_I_NINUMP and SCM_I_INUM, respectively and adding deprecated
2156 versions to deprecated.h and deprecated.c. Changed all uses to
2157 either use the SCM_I_ variants or scm_is_*, scm_to_*, or
2158 scm_from_*, as appropriate.
2159
2160 * dynwind.c (scm_i_dowinds): Removed unused code that would call
2161 the unexisting scm_cross_dynwind_binding_scope for inums on the
2162 windlist.
2163
2164 2004-07-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2165
2166 * socket.c (ipv6_net_to_num, scm_from_ipv6): Renamed
2167 ipv6_net_to_num to scm_from_ipv6, for converting from an IPv6
2168 byte-wise address to a SCM integer. Changed all uses.
2169 (ipv6_num_to_net, scm_to_ipv6): Renamed ipv6_num_to_net to
2170 scm_to_ipv6 and added type and range checking, for converting from
2171 an IPv& byte-wise address to a SCM integer. Changed all uses.
2172 (bignum_in_ipv6_range_p, VALIDATE_INET6): Removed, their function
2173 is now done by scm_to_ipv6.
2174
2175 * numbers.c (scm_to_signed_integer, scm_to_unsigned_integer): dot
2176 not accept inexact integers.
2177
2178 * validate.h, deprecated.h (SCM_VALIDATE_INUM,
2179 SCM_VALIDATE_INUM_COPY, SCM_VALIDATE_BIGINT,
2180 SCM_VALIDATE_INUM_MIN, SCM_VALIDATE_INUM_MIN_COPY,
2181 SCM_VALIDATE_INUM_MIN_DEF_COPY,SCM_VALIDATE_INUM_DEF,
2182 SCM_VALIDATE_INUM_DEF_COPY, SCM_VALIDATE_INUM_RANGE,
2183 SCM_VALIDATE_INUM_RANGE_COPY): Deprecated because they make the
2184 fixnum/bignum distinction visible. Changed all uses to
2185 scm_to_size_t or similar.
2186
2187 2004-07-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2188
2189 * cpp_cnvt.awk: Use scm_from_int instead of SCM_MAKINUM.
2190
2191 2004-07-10 Kevin Ryde <user42@zip.com.au>
2192
2193 * hash.c (scm_hashq, scm_hashv, scm_hash): Restrict to size>=1 rather
2194 than size>=0, since 0<=hash<size cannot be satisfied for size==0, and
2195 such a size causes divide-by-zeros in scm_hasher.
2196
2197 * regex-posix.c (scm_make_regexp): Free rx on error, to avoid memory
2198 leak.
2199
2200 2004-07-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2201
2202 * numbers.c (scm_is_signed_integer, scm_is_unsigned_integer):
2203 Rewritten using the same logic as scm_to_signed_integer and
2204 scm_to_unsigned_integer, respectively, which is better(tm). Also,
2205 use CHAR_BIT instead of hardcoding 8.
2206 (LLONG_MIN, LLONG_MAX, ULLONG_MAX): Removed and used
2207 SCM_I_LLONG_MIN etc. instead.
2208
2209 * numbers.h (SCM_MAKINUM, SCM_I_MAKINUM): Renamed SCM_MAKINUM to
2210 SCM_I_MAKINUM and changed all uses.
2211 * deprecated.h, deprecated.c (SCM_MAKINUM): Newly deprecated.
2212
2213 * gen-scmconfig.c (SCM_I_LLONG_MIN, SCM_I_LLONG_MAX,
2214 SCM_I_ULLONG_MAX): Instead of hard-coding the numbers, compute
2215 them by assuming twos-complement.
2216
2217 2004-07-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2218
2219 * gen-scmconfig.h.in: Added all the new SCM_I_GSC_*_LIMITS that
2220 configure now produces.
2221 * gen-scmconfig.c: Use them to output SCM_T_INT8_MIN, etc
2222 definitions, giving the limits of the integer types defined by
2223 Guile. Also, output a hard coded SCM_I_LLONG_MIN, etc since
2224 LLONG_MIN or LONG_LONG_MIN is hard to get at.
2225
2226 * numbers.h (scm_to_short, scm_to_ushort): It's SHRT_MIN, etc, not
2227 SHORT_MIN.
2228 (scm_to_size_t): Use SIZE_MAX instead of cooking our own.
2229 (scm_to_long_long, scm_to_ulong_long, scm_to_int8, scm_to_uint8,
2230 scm_to_int16, scm_to_uint16, scm_to_int32, scm_to_uint32,
2231 scm_to_int64, scm_to_uint64, scm_to_intmax, scm_to_uintmax,
2232 scm_from_long_long, scm_from_ulong_long, scm_from_int8,
2233 scm_from_uint8, scm_from_int16, scm_from_uint16, scm_from_int32,
2234 scm_from_uint32, scm_from_int64, scm_from_uint64, scm_from_intmax,
2235 scm_from_uintmax): New.
2236
2237 2004-07-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2238
2239 * tags.h (scm_is_eq): New.
2240
2241 * deprecated.h, boolean.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOL,
2242 SCM_NEGATE_BOOL, SCM_BOOLP): Deprecated by moving into
2243 "deprecated.h". Replaced all uses with scm_is_false, scm_is_true,
2244 scm_from_bool, and scm_is_bool, respectively.
2245
2246 * boolean.h (scm_is_bool): Fix bug in prototype.
2247 (scm_from_bool): The argument is "x" not "f", stupid.
2248
2249 * boolean.c (scm_is_bool): Fix typo.
2250
2251 * numbers.h, numbers.c (scm_is_integer, scm_is_signed_integer,
2252 scm_is_unsigned_integer, scm_to_signed_integer,
2253 scm_to_unsigned_integer, scm_to_schar, scm_to_uchar, scm_to_char,
2254 scm_to_short, scm_to_ushort, scm_to_long, scm_to_ulong,
2255 scm_to_size_t, scm_to_ssize_t, scm_from_schar, scm_from_uchar,
2256 scm_from_char, scm_from_short, scm_from_ushort, scm_from_int,
2257 scm_from_uint, scm_from_long, scm_from_ulong, scm_from_size_t,
2258 scm_from_ssize_t, scm_is_real, scm_to_double, scm_from_double):
2259 New.
2260
2261 2004-07-05 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2262
2263 * boolean.h, boolean.c (scm_is_true, scm_is_false, scm_from_bool,
2264 scm_to_bool): New.
2265
2266 2004-06-27 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2267
2268 * backtrace.c (display_expression, display_frame): Call
2269 scm_i_unmemoize_expr for unmemoizing a memoized object holding a
2270 single memoized expression.
2271
2272 * debug.c (memoized_print): Don't try to unmemoize the memoized
2273 object, since we can't know whether it holds a single expression
2274 or a body.
2275
2276 (scm_mem_to_proc): Removed check for lambda expression, since it
2277 was moot anyway. Whoever uses these functions for debugging
2278 purposes should know what they do: Creating invalid memoized code
2279 will cause crashes, independent of whether this check is present
2280 or not.
2281
2282 (scm_proc_to_mem): Take the closure's code as it is and don't
2283 append a SCM_IM_LAMBDA isym. To allow easier debugging, the
2284 memoized code should not be modified.
2285
2286 * debug.[ch] (scm_unmemoize, scm_i_unmemoize_expr): Removed
2287 scm_unmemoize from public use, but made scm_i_unmemoize_expr
2288 available as a guile internal function instead. However,
2289 scm_i_unmemoize_expr will only work on memoized objects that hold
2290 a single memoized expression. It won't work with bodies.
2291
2292 * debug.c (scm_procedure_source), macros.c (macro_print), print.c
2293 (scm_iprin1): Call scm_i_unmemocopy_body for unmemoizing a body,
2294 i. e. a list of expressions.
2295
2296 * eval.c (unmemoize_exprs): Drop internal body markers from the
2297 output during unmemoization.
2298
2299 * eval.[ch] (scm_unmemocopy, scm_i_unmemocopy_expr,
2300 scm_i_unmemocopy_body): Removed scm_unmemocopy from public use,
2301 but made scm_i_unmemocopy_expr and scm_i_unmemocopy_body available
2302 as guile internal functions instead. scm_i_unmemoize_expr will
2303 only work on a single memoized expression, while
2304 scm_i_unmemocopy_body will only work on bodies.
2305
2306 2004-06-21 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2307
2308 * eval.c (unmemoize_exprs): Handle semi-memoized code.
2309
2310 (scm_cons_source, scm_primitive_eval): Prefer higher level
2311 predicate SCM_FALSEP over SCM_IMP.
2312
2313 2004-06-15 Rob Browning <rlb@defaultvalue.org>
2314
2315 * script.c (scm_shell_usage): minor phrasing change.
2316
2317 * gc_os_dep.c: update ifdefery for macosx.
2318 (scm_get_stack_base): separate result initialization from
2319 declaration to slience warnings with macosx and hp-ux using gcc
2320 3.3. Thanks to Andreas Vögele.
2321
2322 2004-06-13 Han-Wen Nienhuys <hanwen@xs4all.nl>
2323
2324 * eval.c (unmemoize_exprs): use SCM_CONSP for the loop condition.
2325
2326 2004-06-06 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2327
2328 * list.[ch] (scm_i_finite_list_copy): New internal function to
2329 copy lists that are known to be finite (though not necessarily
2330 proper).
2331
2332 * debug.c (scm_procedure_source): Don't have scm_unmemocopy treat
2333 a closure's argument list like an expression of a body.
2334
2335 * eval.c (unmemoize_expression, unmemoize_exprs, unmemoize_and,
2336 unmemoize_begin, unmemoize_case, unmemoize_cond, unmemoize_delay,
2337 unmemoize_do, unmemoize_if, unmemoize_lambda, unmemoize_let,
2338 unmemoize_letrec, unmemoize_letstar, unmemoize_or,
2339 unmemoize_set_x, unmemoize_apply, unmemoize_atcall_cc,
2340 unmemoize_at_call_with_values, unmemoize_future, sym_atslot_ref,
2341 unmemoize_atslot_ref, sym_atslot_set_x, unmemoize_atslot_set_x,
2342 unmemoize_builtin_macro): New static functions and symbols.
2343
2344 (scm_unmemocopy): Rewritten in terms of the above. scm_unmemocopy
2345 now has a slightly different meaning: The memoized form that is
2346 receives as its argument is now interpreted as a sequence of
2347 expressions from a body.
2348
2349 (unmemocar, scm_unmemocar): Since the whole functionality of
2350 unmemocar and scm_unmemocar is not needed any more, scm_unmemocar
2351 has its old content back and is deprecated, while unmemocar has
2352 been removed.
2353
2354 (SCM_BIT7): Removed.
2355
2356 (CEVAL): For unmemoizing a single expression, call
2357 unmemoize_expression instead of scm_unmemocopy, which now expects
2358 a sequence of body expressions. Eliminated unnecessary empty
2359 environment frame when executing let* forms. Eliminated
2360 unmemoization step from evaluator.
2361
2362 2004-06-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2363
2364 * eval.c (scm_macroexp, macroexp): Renamed scm_macroexp to
2365 macroexp and made static. Added new version of scm_macroexp that
2366 emits a deprecation warning and then calls macroexp.
2367 (scm_m_undefine): Issue deprecation warning.
2368
2369 2004-05-30 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2370
2371 * eval.c (lookup_global_symbol, literal_p, try_macro_lookup):
2372 Modified to make set! work on symbols that represent syntactic
2373 keywords.
2374
2375 2004-05-26 Han-Wen Nienhuys <hanwen@xs4all.nl>
2376
2377 * gc.h (SCM_CELL_OBJECT_LOC): use SCM_GC_CELL_OBJECT to prevent
2378 compound expression as lvalue errors.
2379
2380 2004-05-24 Marius Vollmer <mvo@zagadka.de>
2381
2382 * dynwind.c (winder_mark): Use SCM_PACK to correctly convert the
2383 WINDER_DATA to a SCM.
2384
2385 2004-05-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2386
2387 * goops.c (compute_getters_n_setters, create_standard_classes,
2388 scm_add_slot): Compute closures by calling scm_i_eval_x on a
2389 lambda expression rather than creating them with scm_closure.
2390
2391 2004-05-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2392
2393 * eval.c (s_macro_keyword, scm_m_set_x): Remove checking for
2394 misplaced syntactic keywords. This will not work unless guile's
2395 defmacro feature is deprecated.
2396
2397 (scm_m_case): Fixed a bug that caused the list of labels to grow
2398 with every case form.
2399
2400 2004-05-19 Kevin Ryde <user42@zip.com.au>
2401
2402 * numbers.c (scm_round_number): For inum and big, just return x. For
2403 real, use scm_round for 2^54-1 etc problems covered there.
2404
2405 * numbers.c (trunc): Remove #define to scm_truncate when the C library
2406 doesn't provide trunc. This was for when `truncate' was done as a
2407 scm_tc7_dsubr, no longer required.
2408
2409 * threads.c (scm_threads_mark_stacks) [SCM_STACK_GROWS_UP]: Correction
2410 to stack marking call, two parameters and no cast on t->base.
2411
2412 2004-05-18 Marius Vollmer <mvo@zagadka.de>
2413
2414 * hashtab.c (rehash_after_gc): Bug fix: properly link the
2415 processed hashtables back into the weak_hashtables list. Thanks
2416 to Bill Schottstaedt!
2417
2418 2004-05-16 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2419
2420 * eval.c (unmemoize_quote): New static function.
2421
2422 (scm_m_quote, scm_m_atslot_ref, SCM_CEVAL): Changed the byte code
2423 representation of 'quote' and '@slot-ref' to an improper list.
2424 This reduces execution time, the number of cells used to hold the
2425 memoized code, and thus also reduces garbage collection time.
2426
2427 (scm_unmemocopy): Use unmemoize_quote for quote expressions.
2428
2429 (SCM_CEVAL): Changed macro handling to also work with macros that
2430 return improper lists. Added an assertion, that the code returned
2431 by a macro transformer will not lead to cycles in the memoized
2432 code.
2433
2434 2004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2435
2436 No functional change, just rearrangements of functions within the
2437 file.
2438
2439 * eval.c (scm_ilookup, scm_unbound_variable_key,
2440 error_unbound_variable, scm_lookupcar1, scm_lookupcar): Moved to
2441 the definitions used for execution, since that's where they will
2442 belong to later.
2443
2444 2004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2445
2446 * numbers.h (SCM_SLOPPY_FRACTIONP): Removed. It was not used
2447 throughout guile, has not been part of an official release yet,
2448 and the concept of sloppy predicates has never been a good idea.
2449
2450 (SCM_FRACTION_NUMERATOR, SCM_FRACTION_DENOMINATOR,
2451 SCM_FRACTION_SET_NUMERATOR, SCM_FRACTION_SET_DENOMINATOR):
2452 Simplified.
2453
2454 2004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2455
2456 * throw.c (SETJBJMPBUF, SCM_SETJBDFRAME): Add cast to scm_t_bits
2457 to make explicit what happens.
2458
2459 2004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2460
2461 * dynl.c (SET_DYNL_HANDLE): Add cast to scm_t_bits to make
2462 explicit what happens.
2463
2464 * guardians.c (TCONC_IN): Use SCM_SET_CELL_OBJECT_x rather than
2465 SCM_SET_CELL_WORD_x when writing scheme objets to cell elements.
2466
2467 2004-05-11 Marius Vollmer <mvo@zagadka.de>
2468
2469 * scmsigs.c (scm_sigaction_for_thread): Validate that the handler
2470 is indeed a procedure when it isn't a number.
2471
2472 2004-05-10 Marius Vollmer <mvo@zagadka.de>
2473
2474 Convert floating point numbers into strings with an arbitrary
2475 radix. Thanks to Richard Todd!
2476
2477 * numbers.c (FLOBUFLEN): Increase so that radix 2 strings will
2478 fit.
2479 (fx): Removed.
2480 (scm_dblprec, fx_per_radix, init_dblprec, init_fx_radix,
2481 number_chars): New, to support variable radices.
2482 (idbl2str): Use above instead of the old base-10 only tables.
2483 (iflo2str): Pass on new RADIX argument to idbl2str.
2484 (scm_number_to_string): Pass radix to iflo2str.
2485 (scm_print_real, scm_print_complex): Explicitly pass radix 10 to
2486 iflo2str.
2487 (scm_init_numbers): Call init_dblprec and init_fx_radix for all
2488 possible radices.
2489
2490 2004-05-10 Kevin Ryde <user42@zip.com.au>
2491
2492 * numbers.c (scm_logbit_p): Correction to test above the end of an
2493 inum. Reported by Jan Konecny.
2494
2495 2004-05-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2496
2497 * gc.h (scm_t_cell): Fields are now of type SCM instead of
2498 scm_t_bits. Updated all users.
2499 (SCM_GC_CARD_SIZE_MASK): Use SCM_GC_SIZEOF_CARD instead of
2500 duplicating the code.
2501 (SCM_CELL_OBJECT_LOC): New.
2502 (SCM_CARLOC, SCM_CDRLOC): Use it instead of SCM_CELL_WORD_LOC.
2503 (SCM_CELL_WORD_LOC): Moved to "deprecated.h".
2504
2505 * smob.h (SCM_SMOB_DATA_2, SCM_SMOB_DATA_3, SCM_SMOB_FLAGS,
2506 SCM_SET_SMOB_DATA_2, SCM_SET_SMOB_DATA_3, SCM_SET_SMOB_FLAGS,
2507 SCM_SMOB_OBJECT, SCM_SMOB_OBJECT_2, SCM_SMOB_OBJECT_3,
2508 SCM_SET_SMOB_OBJECT, SCM_SET_SMOB_OBJECT_2, SCM_SET_SMOB_OBJECT_3,
2509 SCM_SMOB_OBJECT_LOC, SCM_SMOB_OBJECT_2_LOC,
2510 SCM_SMOB_OBJECT_3_LOC): New.
2511 * smob.c (scm_i_set_smob_flags): New function.
2512
2513 * dynl.c, dynwind.c, eval.h, fluids.h, futures.h, hashtab.h,
2514 hooks.h, keywords.h, macros.h, macros.c, mallocs.c, mallocs.h,
2515 random.h, regex-posix.h, root.h, srcprop.h, srcprop.c, threads.h:
2516 Use SCM_SMOB_* instead of SCM_CELL_* as appropriate. Use
2517 SCM_SMOB_FLAGS and SCM_SET_SMOB_FLAGS instead of accessing the
2518 zeroth word directly. Use SCM_SMOB_PREDICATE as appropriate.
2519
2520 * numbers.h (SCM_I_BIG_MPZ): Use SCM_CELL_OBJECT_LOC instead of
2521 taking the address of SCM_CELL_WORD_1, the latter being no longer
2522 an lvalue.
2523
2524 * variable.h (SCM_VARIABLE_LOC): Use SCM_CELL_OBJECT_LOC instead
2525 of casting SCM_CELL_WORD_LOC.
2526
2527 2004-05-02 Kevin Ryde <user42@zip.com.au>
2528
2529 * eval.c (scm_macroexp): Add prototype, since it's not in eval.h under
2530 --disable-deprecated. Reported by Andreas Vögele.
2531
2532 * filesys.c (_POSIX_C_SOURCE): Define to 199506L to get readdir_r (in
2533 particular on HP-UX). Reported by Andreas Vögele.
2534
2535 * list.c (varargs.h): Remove, leave just stdarg.h which is all the
2536 code has support for. Fixes building with AIX cc, which is ansi but
2537 doesn't define __STDC__. Reported by Keith Crane.
2538 (var_start): Remove macro, this variation no longer required.
2539 (scm_list_n): Use va_start directly.
2540
2541 2004-05-01 Kevin Ryde <user42@zip.com.au>
2542
2543 * continuations.c (scm_dynthrow): Use >= instead of SCM_PTR_GE which
2544 is now gone. Reported by Andreas Vögele.
2545
2546 2004-04-28 Kevin Ryde <user42@zip.com.au>
2547
2548 * backtrace.c (display_frame_expr), numbers.c (XDIGIT2UINT,
2549 mem2uinteger, mem2decimal_from_point, mem2ureal): Cast char to int for
2550 ctype.h tests, to avoid warnings from gcc on HP-UX about char as array
2551 subscript. Reported by Andreas Vögele.
2552 Also cast through unsigned char to avoid passing negatives to those
2553 macros if input contains 8-bit values.
2554
2555 * num2integral.i.c (NUM2INTEGRAL): Under non-BIGMPZ_FITSP case,
2556 corrections to range check for signed numbers. Remove
2557 scm_remember_upto_here_1(num) from these checks, since num is used
2558 subsequently anyway.
2559
2560 * num2integral.i.c (NUM2INTEGRAL): Test BIGMPZ_FITSP with "!= 0" to
2561 avoid warning from gcc 3.4. Reported by Hyperdivision.
2562
2563 * numbers.c (scm_bit_extract): Use min instead of MIN.
2564 (MIN): Remove, this conflicts with similar macro defined by limits.h
2565 on HP-UX. Reported by Andreas Vögele.
2566
2567 * stime.c (_POSIX_C_SOURCE): Define to 199506L to get gmtime_r (in
2568 particular on HP-UX). Reported by Andreas Vögele.
2569
2570 * threads.c (scm_threads_mark_stacks): Correction sizet -> size_t.
2571 Reported by Andreas Vögele.
2572
2573 * threads-plugin.h (SCM_MUTEX_MAXSIZE): Increase to 25*sizeof(long),
2574 for the benefit of hpux11 where pthread_mutex_t is 88 bytes. Reported
2575 by Andreas Vögele.
2576
2577 2004-04-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2578
2579 * eval.c (s_macro_keyword): New static identifier.
2580
2581 (scm_m_define): Change order to first create binding and
2582 evaluating the expression afterwards.
2583
2584 (scm_m_set_x): Memoize complete set! expression. Only leave
2585 symbols if no binding exists at memoization time. Throw error if
2586 assigning to a syntactic keyword.
2587
2588 (lazy_memoize_variable): New function.
2589
2590 (CEVAL): When execution set!, perform lazy memoization if
2591 unmemoized symbol is detected.
2592
2593 * modules.c (module_variable): Return variables with unbound
2594 value.
2595
2596 * tags.h: Fix comment.
2597
2598 2004-04-25 Kevin Ryde <user42@zip.com.au>
2599
2600 * chars.c (scm_char_upcase, scm_char_downcase, scm_c_upcase,
2601 scm_c_downcase): Use ctype.h toupper and tolower. This will be useful
2602 in 8-bit locales, and ensures consistency with char-upper-case? and
2603 char-lower-case? which already use ctype.h.
2604 (scm_c_upcase_table, scm_c_downcase_table, scm_lowers, scm_uppers):
2605 Remove.
2606 * chars.c, chars.h, init.c (scm_tables_prehistory): Remove.
2607
2608 * socket.c (VALIDATE_INET6): Correction to bignum_in_ipv6_range_p
2609 call. Reported by Hyperdivision.
2610
2611 * threads.c (scm_yield): Correction, actually call scm_thread_yield.
2612 Reported by Hyperdivision.
2613
2614 * unif.c (s_scm_make_uve): Remove unused local variable. Reported by
2615 Hyperdivision.
2616
2617 2004-04-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2618
2619 Hide the implementation of ilocs and isyms in eval.c.
2620
2621 * deprecated.h (SCM_IFRINC, SCM_ICDR, SCM_IFRAME, SCM_IDIST,
2622 SCM_ICDRP), eval.c (SCM_IFRINC, SCM_ICDR, SCM_IFRAME, SCM_IDIST,
2623 SCM_ICDRP), eval.h (SCM_ICDR, SCM_IFRINC, SCM_IFRAME, SCM_IDIST,
2624 SCM_ICDRP): Deprecated and added to deprecated.h. Moved from
2625 eval.h to eval.c.
2626
2627 * deprecated.c (scm_isymnames), deprecated.h (scm_isymnames,
2628 SCM_ISYMNUM, SCM_ISYMCHARS), eval.c (SCM_ISYMNUM, isymnames,
2629 scm_unmemocopy, CEVAL), print.c (scm_isymnames), tags.h
2630 (SCM_ISYMNUM, scm_isymnames, SCM_ISYMCHARS): Deprecated
2631 scm_isymnames, SCM_ISYMNUM and SCM_ISYMCHARS and added to
2632 deprecated.[hc]. Moved scm_isymnames from print.c to eval.c and
2633 renamed to isymnames. Moved SCM_ISYMNUM from tags.h to eval.c and
2634 renamed to ISYMNUM.
2635
2636 * eval.c (scm_i_print_iloc, scm_i_print_isym), eval.h
2637 (scm_i_print_iloc, scm_i_print_isym), print.c (scm_iprin1):
2638 Extracted printing of ilocs and isyms to guile internal functions
2639 scm_i_print_iloc, scm_i_print_isym of eval.c.
2640
2641 2004-04-22 Kevin Ryde <user42@zip.com.au>
2642
2643 * numbers.c (scm_bit_extract): Use SCM_SRS for signed right shift.
2644
2645 * numbers.c (scm_round): Test for x already an integer, to avoid bad
2646 rounding in x+0.5 when x is a big value already an integer. In
2647 certain hardware rounding cases x+0.5 can give an adjacent integer,
2648 leading to that as the result, when we really just wanted x itself.
2649
2650 2004-04-19 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2651
2652 * eval.c (scm_unmemocopy): Fixed unmemoization of let*.
2653
2654 (deval_args, CEVAL): Minor improvements: Reduced variable scopes,
2655 added const qualifiers, cast intentionally unused expressions to
2656 void for emphasis, improved comment.
2657
2658 2004-04-18 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2659
2660 * tags.h (scm_tags, scm_tc8_tags, scm_tc9_flag, scm_tc8_flag,
2661 scm_tc8_isym): Renamed scm_tags to scm_tc8_tags. Renamed
2662 scm_tc9_flag to scm_tc8_flag. Introduced new identifier
2663 scm_tc8_isym. Defined tc8-tags relative to scm_tc3_imm24.
2664 Defined the tc8-tag for flags to be 0x04, which will mean that
2665 SCM_BOOL_F will also have the value 0x04 instead of 0x013c. Due
2666 to the reduced number of bits and the simpler bit pattern for
2667 SCM_BOOL_F, certain machines may be able to use more efficient
2668 processor instructions to deal with SCM_BOOL_F.
2669
2670 (SCM_ITAG9, SCM_MAKE_ITAG9, SCM_ITAG9_DATA): Removed. These have
2671 never been defined in a released version, thus no need to
2672 deprecate them.
2673
2674 (SCM_IFLAGP, SCM_MAKIFLAG, SCM_IFLAGNUM): Flags now use tc8
2675 instead of tc9 tags.
2676
2677 (SCM_ISYMP, SCM_MAKISYM, SCM_ISYMNUM): Isyms now use tc8 instead
2678 of tc9 tags.
2679
2680 (SCM_MAKSPCSYM): Removed. It is almost impossible that user code
2681 could have used this definition.
2682
2683 (SCM_IM_AND, SCM_IM_BEGIN, SCM_IM_CASE, SCM_IM_COND, SCM_IM_DO,
2684 SCM_IM_IF, SCM_IM_LAMBDA, SCM_IM_LET, SCM_IM_LETSTAR,
2685 SCM_IM_LETREC, SCM_IM_OR, SCM_IM_QUOTE, SCM_IM_SET_X): Now encoded
2686 as isyms, as special isyms don't exist any more.
2687
2688 2004-04-18 Kevin Ryde <user42@zip.com.au>
2689
2690 * filesys.c (scm_readdir): Use readdir_r when available, for thread
2691 safety.
2692
2693 * numbers.c (scm_max, scm_min): For big/real, use SCM_SWAP rather than
2694 explicit swapping code.
2695
2696 2004-04-15 Kevin Ryde <user42@zip.com.au>
2697
2698 * cpp_sig_symbols.in: Add SIGSYS.
2699
2700 * list.c (scm_append_x): Use iterative style, to avoid non-tail
2701 recursion.
2702
2703 * numbers.c (scm_max, scm_min): For inum/frac, frac/inum, big/frac,
2704 frac/big and frac/frac, use scm_less_p for exact comparison.
2705
2706 * numbers.c (scm_gcd): For inum/big, use mpz_gcd_ui by sharing code
2707 with big/inum.
2708
2709 * numbers.c (xisinf): Add a comment about solaris 7 lacking isinf.
2710
2711 2004-04-06 Han-Wen Nienhuys <hanwen@xs4all.nl>
2712
2713 * inline.h (scm_cell): use SCM_GC_CELL_WORD for checking tag.
2714
2715 * chars.h (scm_init_chars): change scm_{upcase,downcase} to
2716 scm_c_{up,down}case.
2717 (SCM_MAKE_CHAR): add (unsigned char) cast. This prevents havoc
2718 when hi-bit ASCII is subjected to SCM_MAKE_CHAR().
2719
2720 2004-04-06 Kevin Ryde <user42@zip.com.au>
2721
2722 * numbers.c (scm_ash): Remove stray "}" in docstring.
2723
2724 * numbers.c (scm_make_ratio): For inum/bignum integer detection, use
2725 x==SCM_MOST_NEGATIVE_FIXNUM explicitly, for clarity and to avoid
2726 calling mpz_cmp_ui in most cases.
2727
2728 * numbers.c (scm_quotient, scm_remainder): In inum/big, use mpz_cmp_ui
2729 for big == abs(most-negative-fixnum) special case.
2730 (abs_most_negative_fixnum): Remove, no longer used.
2731
2732 * scmsigs.c (scm_sigaction_for_thread): Correction to signum range
2733 test, avoids SCM_VECTOR_REF outside bounds of signal_handlers on
2734 calling (sigaction NSIG).
2735
2736 * simpos.c (scm_system_star): Fix execargv memory leak, merge parent
2737 and fork error cases to do this.
2738
2739 2004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2740
2741 * eval.c (CEVAL): Don't distinguish between short and long
2742 instructions when dispatching - just always dispatch on the
2743 instruction code, which is common for short and long instructions.
2744 Further, removed unnecessary goto statements and added comment.
2745
2746 2004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2747
2748 * eval.c (scm_unmemocopy): Don't distinguish between short and
2749 long instructions when dispatching - just always dispatch on the
2750 instruction code, which is common for short and long instructions.
2751 Further, removed unnecessary goto statements, fixed indentation
2752 and replaced SCM_IMP predicates by SCM_NULLP.
2753
2754 2004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2755
2756 * eval.c (scm_lookupcar1, CEVAL): Use SCM_ILOCP instead of
2757 comparison with SCM_ILOC00. In CEVAL, eliminate goto-label
2758 'checkmacro'.
2759
2760 2004-03-31 Kevin Ryde <user42@zip.com.au>
2761
2762 * simpos.c: Include <signal.h> for SIG_IGN and friends.
2763
2764 2004-03-29 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2765
2766 Introduce scm_debug_mode_p as a replacement for scm_debug_mode and
2767 SCM_DEBUGGINGP:
2768
2769 * debug.h (scm_debug_mode_p, scm_debug_mode, SCM_DEBUGGINGP),
2770 eval.c (scm_debug_mode_p): Deprecated scm_debug_mode and
2771 SCM_DEBUGGINGP. Provided scm_debug_mode_p instead, to have one
2772 single interface that also matches the naming conventions.
2773 Probably scm_debug_mode_p should be part of the private interface
2774 anyway.
2775
2776 * debug.h (scm_debug_mode_p), backtrace.c (display_error_body),
2777 eval.c (SCM_APPLY, scm_trampoline_0, scm_trampoline_1,
2778 scm_trampoline_2): Change uses of scm_debug_mode or SCM_DEBUGGINGP
2779 to scm_debug_mode_p.
2780
2781
2782 Deprecate direct access to scm_ceval, scm_deval and scm_ceval_ptr:
2783
2784 * eval.h (scm_ceval, scm_deval, scm_ceval_ptr), debug.h
2785 (scm_ceval_ptr): Deprecated. Moved declaration of scm_ceval_ptr
2786 from debug.h to eval.h.
2787
2788 * debug.h (SCM_RESET_DEBUG_MODE): Don't access scm_ceval_ptr any
2789 more, just leave it with setting scm_debug_mode_p, which is
2790 equivalent for practical purposes.
2791
2792 * deprecated.h (SCM_XEVAL, SCM_XEVALCAR): Call scm_i_eval_x
2793 instead of *scm_ceval_ptr. Leave all evaluating to scm_i_eval_x.
2794
2795 * gdbint.c (gdb_eval): Call scm_i_eval_x instead of scm_ceval.
2796
2797 * eval.c (ceval, deval, scm_ceval, scm_deval): Made scm_ceval
2798 static and renamed it to ceval throughout. Provide a new exported
2799 but deprecated function scm_ceval as a wrapper for backwards
2800 compatibility. The same is done for the deval/scm_deval pair of
2801 functions.
2802
2803 * eval.c (CEVAL, SCM_CEVAL): Renamed SCM_CEVAL to CEVAL
2804 throughout. Defined CEVAL to ceval or deval, based on compilation
2805 phase.
2806
2807 * eval.c (SCM_XEVAL, SCM_XEVALCAR): Dispatch on scm_debug_mode_p
2808 to ceval and deval instead of calling *scm_ceval_ptr.
2809
2810 * eval.c (dispatching_eval): New deprecated static function.
2811
2812 * eval.c (scm_ceval_ptr): Initialized to dispatching_eval in order
2813 to emulate its old behaviour as closely as possible.
2814
2815
2816 Change the evaluator such that only expressions for which pair? is
2817 true are passed to CEVAL, and such that all other expressions are
2818 evaluated outside of CEVAL:
2819
2820 * eval.c (EVAL): New, provided in analogy to EVALCAR. Evaluate an
2821 expression that is assumed to be memoized already. All but
2822 expressions of the form '(<form> <form> ...)' are evaluated inline
2823 without calling an evaluator.
2824
2825 * eval.c (SCM_XEVAL, SCM_XEVALCAR, EVALCAR): Evaluate all but
2826 expressions of the form '(<form> <form> ...)' inline without
2827 calling an evaluator.
2828
2829 * eval.c (scm_i_eval_x, scm_i_eval, scm_ceval, scm_deval): Handle
2830 the special case of unmemoized symbols passed on the top level.
2831
2832 * eval.c (CEVAL): Change calls to CEVAL to EVAL, except where it
2833 is known that the expression passed to CEVAL is of the form
2834 '(<form> <form> ...)'. Remove handling of the tc7-objects, since
2835 now it is known that the input expression of CEVAL is a pair.
2836
2837 2004-03-29 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2838
2839 * eval.c (is_self_quoting_p): New static function.
2840
2841 (scm_m_quote): Use is_self_quoting_p.
2842
2843 (copy_tree): Corrected typo in comment.
2844
2845 2004-03-28 Han-Wen Nienhuys <hanwen@xs4all.nl>
2846
2847 * eval.c (s_scm_copy_tree): idem.
2848
2849 * list.c (s_scm_filter): remove "pointer" from doc string.
2850
2851 * gc.h (SCM_GC_CELL_TYPE): SCM_GC_CELL_TYPE uses SCM_GC_CELL_OBJECT.
2852
2853 * goops.h (SCM_NUMBER_OF_SLOTS): don't SCM_UNPACK the result.
2854
2855 * backtrace.c ("display_backtrace_body"): SCM_PACK before SCM_EQ_P
2856 (display_frame): idem.
2857 (display_backtrace_file_and_line): idem.
2858
2859 * tags.h (SCM_UNPACK): stricter typechecking on SCM_UNPACK
2860 arguments.
2861
2862 2004-03-26 Kevin Ryde <user42@zip.com.au>
2863
2864 * filesys.c (scm_getcwd, scm_readlink): Avoid memory leak on errors.
2865
2866 * numbers.c (scm_modulo): For inum/big and big/big, remove test of
2867 big==0 since that never occurs.
2868
2869 * numbers.c, numbers.h (scm_modulo_expt): Renamed from
2870 scm_modular_expt, matching scheme level name `modulo-expt'.
2871
2872 * numbers.c (scm_modular_expt): Return a negative remainder for a
2873 negative divisor, the same as `modulo' does.
2874
2875 2004-03-26 Eric Hanchrow <offby1@blarg.net>
2876
2877 * numbers.c, numbers.h (scm_modular_expt): New function.
2878
2879 2004-03-25 Kevin Ryde <user42@zip.com.au>
2880
2881 * numbers.c (scm_min, scm_max): Correction to big/real and real/big,
2882 return inexact as required by r5rs.
2883
2884 2004-03-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2885
2886 * eval.c: Separated some definitions relevant for execution from
2887 the memoization part of the file.
2888
2889 (copy_tree): New static function
2890
2891 (scm_copy_tree): Rewritten to fix two kinds or bugs: First, cyclic
2892 structures are detected now and will lead to an exception instead
2893 of forcing guile to run in an endless loop, using up all the
2894 system's memory. Second, arrays in the cdr of an improper list
2895 are now copied. See the new test cases in eval.test.
2896
2897 2004-03-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2898
2899 * posix.c (scm_gethostname): Make sure len is initialised before
2900 it is used. Restructured to (hopefully) represent possible
2901 configurations more clearly in the code. Added unwind handler.
2902
2903 2004-03-23 Kevin Ryde <user42@zip.com.au>
2904
2905 * posix.c (scm_gethostname): Use sysconf(_SC_HOST_NAME_MAX) and/or
2906 MAXHOSTNAMELEN when available.
2907
2908 2004-03-21 Marius Vollmer <mvo@zagadka.de>
2909
2910 * read.c (skip_scsh_block_comment): Also recognize '\r' as a line
2911 terminator. Rewritten the logic as a state machine, I must have
2912 been doing too much VHDL lately...
2913
2914 * eval.c (scm_ceval, scm_deval): Explicitely evaluate ports to
2915 themselves. Thanks to Han-Wen Nienhuys!
2916
2917 * list.c: Changed docstrings so that they no longer talk about
2918 returning 'pointers' to something.
2919
2920 2004-03-20 Han-Wen Nienhuys <hanwen@xs4all.nl>
2921
2922 * gc.c: remove set_debug_cell_accesses! when
2923 SCM_DEBUG_CELL_ACCESSES is not defined. Scheme source code should
2924 use (if (defined? 'set-debug-cell-accesses!) .. ) to switch on
2925 debugging conditionally.
2926
2927 2004-03-21 Kevin Ryde <user42@zip.com.au>
2928
2929 * stime.c (scm_gmtime): Use gmtime_r when available, for thread safety.
2930
2931 2004-03-20 Kevin Ryde <user42@zip.com.au>
2932
2933 * posix.c (scm_gethostname): Preserve errno across free() call.
2934
2935 2004-03-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
2936
2937 * gc-card.c (sweep_card): use SCM_GC_SET_CELL_WORD for setting
2938 free cells.
2939
2940 2004-03-14 Kevin Ryde <user42@zip.com.au>
2941
2942 * stime.c: Define _GNU_SOURCE for strptime prototype from glibc.
2943 (strptime): Use HAVE_DECL_STRPTIME for when to give own prototype.
2944
2945 2004-03-07 Kevin Ryde <user42@zip.com.au>
2946
2947 * stime.c (scm_gmtime): Return bd_time->tm_zone when available, rather
2948 than "GMT" always.
2949 (filltime): Make zname parameter "const".
2950
2951 2004-03-03 Mikael Djurfeldt <mdj@chunk.mit.edu>
2952
2953 * threads.c, threads.h (scm_c_scm2thread): New function.
2954
2955 2004-02-29 Kevin Ryde <user42@zip.com.au>
2956
2957 * numbers.c (guile_ieee_init): Use C99 INFINITY and NAN when
2958 available. Test HAVE_DINFINITY and HAVE_DQNAN for those globals, in
2959 particular don't assume "defined (__alpha__) && ! defined (linux)"
2960 means OSF. Remove "SCO" code, which was not really SCO specific and
2961 which John W. Eaton advises should be long past being needed.
2962
2963 * posix.c (scm_execl, scm_execlp, scm_execle): Avoid memory leak under
2964 error throw.
2965
2966 2004-02-24 Kevin Ryde <user42@zip.com.au>
2967
2968 * posix.c (scm_cuserid): Use a private result buffer, for thread safe.
2969
2970 2004-02-22 Kevin Ryde <user42@zip.com.au>
2971
2972 * numbers.c (scm_max, scm_min): For one arg, dispatch to generic for
2973 complex, same as for two args. (Handle only inum, big, real, frac).
2974
2975 2004-02-21 Kevin Ryde <user42@zip.com.au>
2976
2977 * posix.c (scm_crypt): Use new HAVE_CRYPT.
2978 (<crypt.h>): Remove HAVE_LIBCRYPT condition.
2979 Reported by Andreas Voegele.
2980
2981 2004-02-20 Neil Jerram <neil@ossau.uklinux.net>
2982
2983 * list.c (scm_list_n): Add #if SCM_DEBUG_CELL_ACCESSES_P around
2984 validation.
2985
2986 * read.c (scm_lreadparen): Removed.
2987 (scm_lreadparen1): Renamed scm_i_lreadparen.
2988
2989 2004-02-20 Han-Wen Nienhuys <hanwen@xs4all.nl>
2990
2991 * list.c (scm_list_n): validate non-immediate arguments;
2992 this will catch forgotten a SCM_UNDEFINED.
2993
2994 2004-02-18 Marius Vollmer <mvo@zagadka.de>
2995
2996 * gc.h (scm_gc_cells_collected): Removed duplicated declaration.
2997 Thanks to Bill Schottstaedt!
2998
2999 * socket.h (scm_gethost): Removed prototype it is already in
3000 "net_db.h". Thanks to Bill Schottstaedt!
3001
3002 2004-02-18 Kevin Ryde <user42@zip.com.au>
3003
3004 * num2integral.i.c (INTEGRAL2BIG): WORDS_BIGENDIAN not right for word
3005 order parameter to mpz_import, in fact with just one word there's no
3006 order to worry about at all.
3007
3008 * numbers.c (scm_num_eq_p): For real==frac, complex==frac, frac==real
3009 and frac==complex, make an exact comparison rather than converting
3010 with fraction2double.
3011
3012 * posix.c, putenv.c, stime.c (environ): Use _NSGetEnviron in Darwin
3013 shared library, since environ is not directly available there.
3014
3015 * script.c (scm_shell_usage): Print to stdout for --help, per GNU
3016 standard.
3017
3018 * stime.c (scm_localtime, scm_gmtime, scm_mktime): Provide a default
3019 errno EINVAL in case localtime and gmtime don't set it.
3020 (scm_mktime, scm_strptime): Forcibly use errno EINVAL for our
3021 SCM_SYSERROR, since mktime and strptime generally don't set errno.
3022
3023 2004-02-16 Kevin Ryde <kevin@swox.se>
3024
3025 * gc-malloc.c (scm_done_malloc, scm_done_free): Allow negative sizes,
3026 which were permitted in the past for these.
3027
3028 * num2float.i.c (NUM2FLOAT): Expand isfinite to !xisinf, as per
3029 previous change to numbers.c.
3030
3031 * script.c (scm_shell_usage): Print bug-guile email address, as per
3032 GNU standard. Reported by Han-Wen Nienhuys.
3033
3034 2004-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
3035
3036 * unif.c (scm_make_uve): Removed local variable and simplified
3037 code in order to avoid compiler used uninitialized warnings.
3038
3039 * hashtab.c, hashtab.h (scm_hash_map_to_list): Renamed from
3040 scm_hash_map.
3041 (scm_hash_fold): Use scm_call_3 directly in the call to
3042 scm_internal_hash_fold instead of going via fold_proc (which is
3043 now removed).
3044 (scm_hash_for_each): Use a trampoline +
3045 scm_internal_hash_for_each_handle.
3046 (scm_internal_hash_for_each_handle, scm_hash_for_each_handle): New
3047 functions.
3048
3049 2004-02-12 Kevin Ryde <user42@zip.com.au>
3050
3051 * ports.c (scm_port_line): In docstring, note first line is 0.
3052 (scm_set_port_line_x): In docstring, note first line is 0.
3053 (scm_port_column): In docstring, there's no default to current input
3054 port, and remove shared port-line @defun.
3055 (scm_set_port_column_x): In docstring, there's no default to current
3056 input port, note first column is 0, remove shared set-port-line!
3057 @defun.
3058
3059 * ramap.c (scm_array_fill_x): For fvect and dvect, use scm_num2dbl to
3060 convert args the same way that array-set! does.
3061
3062 * unif.c (scm_make_uve, scm_array_p): Allow fraction 1/3 as prototype
3063 for dvect.
3064 (scm_array_p): Add missing "break"s in switch, fix llvect test look
3065 for "l" not "s", fix dvect to be false for singp(prot) since such a
3066 value is for fvect.
3067 (scm_array_prototype): Return 1/3 for dvect, rather than 0.33..33.
3068 (exactly_one_third): New variable.
3069 (scm_init_unif): Initialize it.
3070
3071 2004-02-10 Neil Jerram <neil@ossau.uklinux.net>
3072
3073 * read.c (scm_read_opts): Change `escaped-parens' to
3074 `elisp-strings'.
3075
3076 2004-02-08 Neil Jerram <neil@ossau.uklinux.net>
3077
3078 * read.c (scm_read_opts): New opts `elisp-vectors' and
3079 `escaped-parens'.
3080 (s_vector): New.
3081 (scm_lreadr): Use scm_lreadparen1 instead of scm_lreadparen. Make
3082 handling of elisp vector syntax dependent on SCM_ENABLE_ELISP and
3083 `elisp-vectors' option instead of SCM_ELISP_READ_EXTENSIONS.
3084 Allow "\(" and "\)" in strings when SCM_ENABLE_ELISP defined and
3085 `escaped-parens' option set.
3086 (scm_read_token): If elisp vector syntax active, disallow [ and ]
3087 in tokens.
3088 (scm_lreadparen): Rewrite as interface to scm_lreadparen1.
3089 (scm_lreadparen1): New.
3090
3091 * read.h: Remove conditionally compiled last arg to
3092 scm_lreadparen.
3093 (SCM_ELISP_VECTORS_P, SCM_ESCAPED_PARENS_P): New.
3094
3095 2004-01-23 Han-Wen Nienhuys <hanwen@xs4all.nl>
3096
3097 * eval.c (m_expand_body): remove stray variable new_body.
3098
3099 2004-01-22 Marius Vollmer <mvo@zagadka.de>
3100
3101 * eval.c (m_expand_body): Rewrite the expression in place (by
3102 overwriting FORMS) also when a letrec is constructed, not only
3103 when no definitions are found. Do not return rewritten expression
3104 to emphasize the in-place rewriting. Changed all users.
3105
3106 2004-01-19 Han-Wen Nienhuys <hanwen@xs4all.nl>
3107
3108 * gc.c: add protected_object_count, a number that is dumped from
3109 gc_stats()
3110
3111 2004-01-11 Marius Vollmer <mvo@zagadka.de>
3112
3113 * dynwind.h, dynwind.c (scm_frame_unwind,
3114 scm_frame_unwind_handler): Renamed and changed all uses.
3115 (scm_frame_rewind, scm_frame_rewind_handler): Likewise.
3116
3117 2004-01-11 Kevin Ryde <user42@zip.com.au>
3118
3119 * unif.c (scm_bit_count, scm_bit_position, s_scm_bit_set_star_x,
3120 s_scm_bit_count_star, s_scm_bit_invert_x): Clarify docstrings, as per
3121 changes made to scheme-compound.texi.
3122
3123 2004-01-10 Marius Vollmer <mvo@zagadka.de>
3124
3125 * print.c (scm_print_symbol_name): Handle #{`foo}#, #{,foo}#,
3126 #{.}#, and all numeric strings specially. Thanks to Paul Jarc!
3127
3128 * guile-snarf.in: Use mkdir to create a unique temporary directory
3129 that we can safely use. Thanks to Stefan Nordhausen!
3130
3131 2004-01-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3132
3133 * dynwind.h, dynwind.c (scm_i_dowinds): Removed 'explicit'
3134 argument since it is always zero now. Changed all callers.
3135 Removed code for handling fluids.
3136
3137 * fluids.c (scm_c_with_fluids): Use frames instead of adding to
3138 the wind chain explicitely. Use scm_c_with_fluid for the common
3139 case of only one fluid.
3140 (scm_with_fluid): New.
3141 (scm_c_with_fluid): Use frames instead of scm_c_with_fluids.
3142
3143 * fluids.h, fluids.c (scm_frame_fluid): New.
3144 (scm_with_fluid): New.
3145 (scm_i_swap_fluids, scm_i_swap_fluids_reverse): Removed.
3146
3147 * dynwind.c (scm_frame_end): Do not use scm_i_dowinds. Instead,
3148 do the unwinding directly. It is simple enough.
3149
3150 * dynwind.h, dynwind.c: Did the following renamings:
3151 scm_begin_frame -> scm_frame_begin,
3152 scm_end_frame -> scm_frame_end,
3153 scm_on_unwind -> scm_frame_unwind,
3154 scm_on_rewind -> scm_frame_rewind,
3155 scm_on_unwind_with_scm -> scm_frame_unwind_with_scm,
3156 scm_on_rewind_with_scm -> scm_frame_rewind_with_scm.
3157 Changed all uses.
3158
3159 * aync.h, async.c: Did the follwing renamings:
3160 scm_with_blocked_asyncs -> scm_frame_block_asyncs,
3161 scm_with_unblocked_asyncs -> scm_frame_unblock_asyncs.
3162 Changed all uses.
3163
3164 * ports.h, ports.c: Did the follwing renamings:
3165 scm_with_current_input_port -> scm_frame_current_input_port,
3166 scm_with_current_output_port -> scm_frame_current_output_port,
3167 scm_with_current_error_port -> scm_frame_current_error_port.
3168 Changed all uses.
3169
3170 2004-01-07 Kevin Ryde <user42@zip.com.au>
3171
3172 * numbers.c (s_bignum): Remove, not used since gmp bignums.
3173 Reported by Richard Todd.
3174
3175 * threads-plugin.h (SCM_MUTEX_MAXSIZE): Increase to 12*sizeof(long),
3176 for the benefit of powerpc-apple-darwin5.5. Reported by Richard Todd.
3177
3178 * unif.c (scm_aind): Test SCM_CONSP rather than !SCM_NULLP while
3179 traversing the args list, fixes segv if an improper list is given.
3180 Reported by Rouben Rostamian.
3181
3182 2004-01-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3183
3184 * ports.c (swap_ports, scm_with_current_foo_port): Do not allocate
3185 swap_data on stack, use a 'malloc obj'.
3186
3187 * fluids.h, fluids.c (scm_make_initial_fluids, scm_copy_fluids,
3188 scm_swap_fluids, scm_swap_fluids_reverse): Renamed to
3189 scm_i_... since they are internal. Changed all uses.
3190
3191 * dynwind.c (frame_print): Removed, use the default printer.
3192 (WINDER_F_MARK, WINDER_MARK_P, winder_mark): New.
3193 (scm_on_unwind_with_scm, scm_on_rewind_with_scm): New. Use above
3194 to protect SCM values.
3195
3196 * dynwind.h (SCM_F_WIND_EXPLICITELY,
3197 SCM_F_WIND_EXPLICITLY): It's "explicitly" not "explicitely", damn.
3198 Changed all uses.
3199 (scm_on_unwind_with_scm, scm_on_rewind_with_scm): New.
3200
3201 2004-01-05 Marius Vollmer <mvo@zagadka.de>
3202
3203 * ports.h, ports.c (scm_with_current_input_port,
3204 scm_with_current_output_port, scm_with_current_error_port): New.
3205
3206 * async.h, async.c (scm_with_blocked_asyncs,
3207 scm_with_unblocked_asyncs): New.
3208
3209 2004-01-03 Marius Vollmer <mvo@zagadka.de>
3210
3211 * dynwind.h, scm_dynwind.c (scm_t_frame_flags, scm_t_wind_flags,
3212 scm_begin_frame, scm_end_frame, scm_on_unwind, scm_on_rewind):
3213 New.
3214 (scm_dowinds, scm_i_dowinds): scm_dowinds has been renamed to
3215 scm_i_dowinds and extended to handle frames and to invoke a 'turn'
3216 function when the outermost wind point has been reached. The
3217 latter is used to copy a continuation stack at the right time.
3218 scm_dowinds remains available.
3219 (SCM_GUARDSP, SCM_BEFORE_GUARD, SCM_AFTER_GUARD, SCM_GUARD_DATA,
3220 tc16_guard, guards_print): Removed.
3221 (scm_internal_dynamic_wind): Reimplemented using frames.
3222
3223 * continuations.c (copy_stack): New, do only the stack copying
3224 part of copy_stack_and_call.
3225 (copy_stack_and_call): Copy the stack after unwinding and before
3226 rewinding.
3227 (scm_dynthrow): Do not call scm_dowinds, this is now done by
3228 copy_stack_and_call.
3229
3230 2004-01-04 Kevin Ryde <user42@zip.com.au>
3231
3232 * numbers.c (scm_less_p): Don't convert frac to float for compares,
3233 can give bad results due to rounding.
3234
3235 * stime.c (scm_current_time, scm_gettimeofday): Add a comment about
3236 setzone/restorezone protection for DOS.
3237
3238 2003-12-26 Marius Vollmer <mvo@zagadka.de>
3239
3240 * gen-scmconfig.h.in, gen-scmconfig.c: Arrange for scm_t_intmax
3241 and scm_t_uintmax to be defined in scmconfig.h
3242
3243 2003-12-03 Kevin Ryde <user42@zip.com.au>
3244
3245 * numbers.c (scm_less_p): Remove spurious xisnan from frac+big case.
3246
3247 * numbers.c (scm_make_ratio): Check for numerator equal to
3248 SCM_MOST_NEGATIVE_FIXNUM and bignum denominator the negative of that,
3249 giving integer -1.
3250
3251 * numbers.c (scm_real_part): Return fraction unchanged rather than
3252 converting to flonum.
3253
3254 2003-11-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
3255
3256 * modules.c (module_variable): Fixed (and thus simplified) the
3257 definition of SCM_BOUND_THING_P to reflect the fact that since
3258 after the 1.4 series of guile, obarrays only hold variable
3259 objects.
3260
3261 2003-11-30 Marius Vollmer <mvo@zagadka.de>
3262
3263 * numbers.c (scm_logand): It's "#b...", not "#\b...".
3264
3265 From Paul Jarc:
3266
3267 * read.c (scm_lreadr): Signal an error for invalid escape
3268 sequences in strings. Code cleanups too.
3269
3270 * print.c (scm_iprin1): use \xNN hexadecimal sequences when
3271 writing control characters in strings.
3272
3273 2003-11-21 Marius Vollmer <mvo@zagadka.de>
3274
3275 * ports.c (scm_drain_input): Bug fix: only access the port after
3276 checking that it indeed is one.
3277
3278 2003-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
3279
3280 * eval.c (s_bad_define): New static identifier.
3281
3282 (m_body): Fixed comment.
3283
3284 (scm_m_define): Don't generate memoized code for definitions that
3285 are not on the top level. As a consequence, no memoized code at
3286 all is generated for definitions any more: Top level definitions
3287 are executed immediately during memoization and internal
3288 definitions are handled separately in m_expand_body.
3289
3290 (scm_unmemocopy, unmemocopy): Removed code for unmemoizing
3291 definitions. Consequently, there is no unmemoizing code any more
3292 that might modify the environment. Thus, the old scm_unmemocopy
3293 is removed and the old unmemocopy is renamed to scm_unmemocopy.
3294
3295 (SCM_CEVAL): The SCM_IM_DEFINE keyword can no longer occur in
3296 memoized code. Call EVALCAR for continuations. Prefer !SCM_NULLP
3297 over SCM_NIMP in places, where the argument is known to be part of
3298 a proper list.
3299
3300 2003-11-21 Kevin Ryde <user42@zip.com.au>
3301
3302 * numbers.c (scm_abs): Allocate a new real only for negatives, as done
3303 for bignums.
3304
3305 * numbers.c (scm_bit_extract): Use mpz functions, rearrange inum case
3306 to share some shifting.
3307
3308 * numbers.c (scm_integer_expt): Don't mpz_init after scm_i_clonebig or
3309 scm_i_mkbig, since they do so already. Don't mpz_clear a bignum SCM,
3310 since gc does this.
3311
3312 2003-11-19 Marius Vollmer <mvo@zagadka.de>
3313
3314 * numbers.c (scm_make_ratio): Rewritten to have a simpler
3315 structure. Previously, not all cases with a negative denominator
3316 were covered.
3317
3318 * numbers.c (mem2decimal_from_point): use scm_divide instead of
3319 scm_divide2real when forming the fractional part. This allows
3320 "#e1.2" to yield 6/5.
3321
3322 * numbers.c (scm_i_fraction_equalp): Do not treat the return value
3323 of scm_equal_p as a C boolean, use SCM_FALSEP. Previously, all
3324 fractions were equal to each other regardless of value. Ooops.
3325
3326 * numbers.c (scm_rationalize): Return an inexact result when given
3327 inexact arguments.
3328
3329 * numbers.c (scm_exact_p, scm_inexact_p): Throw error for
3330 non-numbers.
3331
3332 2003-11-18 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3333
3334 Support for exact fractions from Bill Schottstaedt! Thanks!
3335
3336 * print.c (scm_iprin1): Handle fractions.
3337
3338 * objects.h (scm_class_fraction): New.
3339 * objects.c (scm_class_fraction): New.
3340 (scm_class_of): Handle fractions.
3341
3342 * hash.c (scm_hasher): Handle fractions.
3343
3344 * numbers.c: New code for handling fraction all over the place.
3345 (scm_odd_p, scm_even_p): Handle inexact integers.
3346 (scm_rational_p): New function, same as scm_real_p.
3347 (scm_round_number, scm_truncate_number, scm_ceiling, scm_floor):
3348 New exact functions that replace the inexact 'dsubr'
3349 implementations.
3350 (scm_numerator, scm_denominator): New.
3351
3352 * numbers.h (SCM_NUMP): Recognize fractions.
3353 (SCM_FRACTIONP, SCM_SLOPPY_FRACTIONP, SCM_FRACTION_NUMERATOR,
3354 SCM_FRACTION_DENOMINATOR, SCM_FRACTION_SET_NUMERATOR,
3355 SCM_FRACTION_SET_DENOMINATOR, SCM_FRACTION_REDUCED_BIT,
3356 SCM_FRACTION_REDUCED_SET, SCM_FRACTION_REDUCED_CLEAR,
3357 SCM_FRACTION_REDUCED): New.
3358 (scm_floor, scm_ceiling, scm_truncate_number, scm_round_number):
3359 New prototypes.
3360 (scm_make_ratio, scm_rationalize, scm_numerator, scm_denominator,
3361 scm_rational_p): New prototypes.
3362 (scm_i_dbl2num, scm_i_fraction2double, scm_i_fraction_equalp,
3363 scm_i_print_fraction): New prototypes.
3364
3365 * goops.c (create_standard_classes): Create "<fraction>" class.
3366
3367 * gc-mark.c (scm_gc_mark_dependencies): Handle fractions.
3368
3369 * gc-card.c (scm_i_sweep_card): Include scm_tc16_fraction as a
3370 case in the switch, but do nothing for now.
3371
3372 * eval.c (SCM_CEVAL, SCM_APPLY, call_dsubr_1): Convert fractions
3373 to doubles when calling 'dsubr' functions.
3374
3375 * eq.c (scm_eqv_p, scm_equal_p): Handle fractions.
3376
3377 2003-11-18 Rob Browning <rlb@defaultvalue.org>
3378
3379 * gen-scmconfig.c (main): remove public definition of
3380 SCM_SIZEOF___INT64 and SCM_SIZEOF_UNSIGNED___INT64 and add
3381 direct typedef of long_long and ulong_long inside deprecated block
3382 when appropriate.
3383
3384 * deprecated.h: move long_long and ulong_long definitions to
3385 gen-scmconfig.c so that we don't need to add SCM_SIZEOF___INT64
3386 and SCM_SIZEOF_UNSIGNED___INT64 to the public namespace.
3387
3388 2003-11-17 Marius Vollmer <mvo@zagadka.de>
3389
3390 * hash.c (scm_string_hash): New hashing algorithm that takes the
3391 complete string into account.
3392
3393 * eval.c (scm_m_generalized_set_x): Macroexpand the target when it
3394 is a list. This allows (@ ...) to work with set!.
3395 (scm_m_generalized_set_x): Use ASSERT_SYNTAX_2 instead of
3396 SCM_ASSYNT.
3397
3398 * script.c (scm_compile_shell_switches): Use scm_c_read_string for
3399 the "-e" option instead of scm_str2symbol. This allows things
3400 like (@ ...) to be specified for the entry point.
3401
3402 2003-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
3403
3404 * eval.c (scm_m_letstar): Create memoized code in place to
3405 minimize consing.
3406
3407 2003-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
3408
3409 * eval.c (s_splicing): Commented and reformulated.
3410
3411 (lookup_global_symbol, lookup_symbol): New static functions.
3412
3413 (s_test, s_bindings, s_duplicate_bindings, s_variable): Removed.
3414
3415 (try_macro_lookup, literal_p): Use lookup_symbol instead of
3416 creating a temporary pair for scm_lookupcar.
3417
3418 (scm_unmemocar, unmemocar): Renamed scm_unmemocar to unmemocar,
3419 created deprecated wrapper function scm_unmemocar.
3420
3421 (SCM_VALIDATE_NON_EMPTY_COMBINATION, scm_sym_else,
3422 scm_sym_unquote, scm_sym_uq_splicing, scm_sym_enter_frame,
3423 scm_sym_apply_frame, scm_sym_exit_frame, scm_sym_trace, f_apply,
3424 undefineds, sym_three_question_marks): Moved around without
3425 modifications.
3426
3427 * eval.c, eval.h (scm_macroexp, scm_unmemocar): Deprecated.
3428
3429 2003-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
3430
3431 * eval.c (try_macro_lookup, expand_user_macros, is_system_macro_p,
3432 m_expand_body, scm_m_expand_body): Grouped together with m_body.
3433 No further modifications.
3434
3435 2003-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
3436
3437 * eval.c (s_mixed_body_forms): New static identifier.
3438
3439 (canonicalize_define, scm_m_define): The check for a bad
3440 expression is performed in canonicalize_define now.
3441
3442 (try_macro_lookup, expand_user_macros, is_system_macro_p): New
3443 static helper functions for m_expand_body.
3444
3445 (m_expand_body): Use ASSERT_SYNTAX to signal syntax errors. Only
3446 expand user defined macros. Fixed handling of the definition/
3447 expression boundary. Fixed handling of definitions grouped with
3448 'begin. Use canonicalize_define to expand definitions.
3449
3450 2003-11-13 Marius Vollmer <mvo@zagadka.de>
3451
3452 * read.c (scm_lreadr): detect EOF after backslash, and interpret
3453 \xNN hexadecimal sequences. From Paul Jarc, thanks!
3454
3455 * snarf.h (SCM_SMOB, SCM_GLOBAL_SMOB, SCM_SMOB_MARK,
3456 SCM_GLOBAL_SMOB_MARK, SCM_SMOB_FREE, SCM_GLOBAL_SMOB_FREE,
3457 SCM_SMOB_PRINT, SCM_GLOBAL_SMOB_PRINT, SCM_SMOB_EQUALP,
3458 SCM_GLOBAL_SMOB_EQUALP, SCM_SMOB_APPLY, SCM_GLOBAL_SMOB_APPLY):
3459 New macros from Paul Jarc. Thanks!
3460
3461 * gc_os_dep.c (scm_get_stack_base): Provide a definition that
3462 return NULL when the machine type is unknown. Previously,
3463 gc_os_dep.c would refuse to compile.
3464
3465 2003-11-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
3466
3467 * eval.c (scm_m_body, m_body, scm_m_lambda, memoize_named_let,
3468 scm_m_let, scm_m_letrec, m_expand_body): Renamed static function
3469 scm_m_body to m_body.
3470
3471 2003-11-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
3472
3473 * eval.c, eval.h (scm_m_expand_body, m_expand_body): Deprecated
3474 public use of scm_m_expand_body in eval.h. In eval.c, renamed
3475 scm_m_expand_body to m_expand_body and made it static. Added
3476 deprecated wrapper scm_m_expand_body.
3477
3478 (scm_eval_body, SCM_CEVAL, SCM_APPLY): Use m_expand_body instead
3479 of scm_m_expand_body.
3480
3481 2003-11-09 Kevin Ryde <user42@zip.com.au>
3482
3483 * dynl.c (scm_dynamic_unlink): Need scm_list_1 on error message
3484 argument. Reported by Mike Gran.
3485
3486 2003-11-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
3487
3488 * eval.c (s_missing_body_expression): New static identifier.
3489
3490 (s_body): Removed.
3491
3492 (scm_m_expand_body): Fixed core dump when passing a body with
3493 defines, but without expressions (see additions to syntax.test).
3494 Use ASSERT_SYNTAX to signal syntax errors.
3495
3496 2003-11-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
3497
3498 * eval.c (canonicalize_define): New static helper function.
3499
3500 (memoize_define, canonicalize_define): Extract handling of
3501 function currying to canonicalize_define.
3502
3503 2003-11-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
3504
3505 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
3506 Make sure that error checking in debug mode is not worse than in
3507 standard mode.
3508
3509 2003-11-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
3510
3511 * eval.c (scm_m_body, scm_m_lambda): Documentation strings are not
3512 handled in scm_m_body any more, but rather in scm_m_lambda.
3513
3514 (scm_m_body, memoize_named_let, scm_m_let, scm_m_letstar,
3515 scm_m_letrec, scm_m_expand_body): Check for validity is done by
3516 calling functions of scm_m_body.
3517
3518 (scm_m_lambda): Avoid unnecessary consing when creating the
3519 memoized code.
3520
3521 2003-11-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
3522
3523 * eval.c (s_expression): Added comment.
3524
3525 (s_empty_combination, error_unbound_variable): New static
3526 identifiers.
3527
3528 (SCM_VALIDATE_NON_EMPTY_COMBINATION, SCM_EVALIM2, scm_lookupcar1):
3529 Use ASSERT_SYNTAX, syntax_error or error_unbound_variable to
3530 signal syntax errors.
3531
3532 (SCM_CEVAL): Separated handling of evaluator bytecodes and other
3533 scheme objects.
3534
3535 2003-10-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
3536
3537 * eval.c (unmemocar, sym_three_question_marks, scm_unmemocar):
3538 Grouped together with unmemocopy, without modifications.
3539
3540 (build_binding_list, unmemocopy): Renamed names of list arguments
3541 and variables to reflect the actual order of the list elements.
3542
3543 2003-10-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
3544
3545 * eval.c (s_defun): New static identifier.
3546
3547 (scm_m_nil_cond, scm_m_atfop, scm_m_undefine): Add comments. Use
3548 ASSERT_SYNTAX to signal syntax errors. Avoid unnecessary consing
3549 when creating the memoized code.
3550
3551 2003-10-19 Kevin Ryde <user42@zip.com.au>
3552
3553 * numbers.c (scm_ash): Revise docstring as per recent update to manual.
3554
3555 * numbers.c (scm_i_big2dbl): Rewrite, carefully rounding to "closest"
3556 in accordance with R5RS, which just mpz_get_d doesn't really give.
3557
3558 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
3559
3560 * eval.c (s_bad_slot_number): New static identifier.
3561
3562 (scm_m_atslot_ref, scm_m_atslot_set_x): Use ASSERT_SYNTAX to
3563 signal syntax errors. Avoid unnecessary consing when creating the
3564 memoized code.
3565
3566 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
3567
3568 * eval.c (scm_m_cont, scm_m_at_call_with_values,
3569 scm_m_generalized_set_x): Use ASSERT_SYNTAX to signal syntax
3570 errors. Avoid unnecessary consing when creating the memoized
3571 code.
3572
3573 (scm_m_generalized_set_x): Let scm_m_set_x handle the R5RS
3574 standard case. Make sure line and file information are copied to
3575 every created expression.
3576
3577 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
3578
3579 * eval.c (scm_m_set_x, scm_m_apply, scm_m_atbind): Use
3580 ASSERT_SYNTAX to signal syntax errors. Avoid unnecessary consing
3581 when creating the memoized code.
3582
3583 (scm_m_atbind): Reversed the order, in which the init expressions
3584 are stored and executed. The order of execution is now equal to
3585 the order in which the initializers of the let-forms are executed.
3586 Use check_bindings and transform_bindings.
3587
3588 (SCM_CEVAL): Eliminated SCM_NIMP in favor of more appropriate
3589 !SCM_NULLP. Added some comments.
3590
3591 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
3592
3593 * eval.c: Sorted include files alphabetically.
3594
3595 (scm_m_begin): Added comment.
3596
3597 (scm_m_or): Use ASSERT_SYNTAX to signal syntax errors. Avoid
3598 unnecessary consing when creating the memoized code.
3599
3600 (iqq, scm_m_quasiquote, scm_m_quote): Use ASSERT_SYNTAX to signal
3601 syntax errors. Be more specific about the kind of error that was
3602 detected.
3603
3604 (scm_m_quote, unmemocopy): As an optimization, vector constants
3605 are now inserted unquoted into the memoized code. During
3606 unmemoization the quotes are added again to provide syntactically
3607 correct code.
3608
3609 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
3610
3611 * eval.c (scm_m_let, scm_m_letstar, scm_m_letrec,
3612 scm_m_expand_body, check_bindings): Extracted syntax checking of
3613 bindings to new static function check_bindings.
3614
3615 (scm_m_let, memoize_named_let): Extracted handling of named let to
3616 new static function memoize_named_let.
3617
3618 (transform_bindings, scm_m_let, scm_m_letstar, scm_m_letrec): Use
3619 ASSERT_SYNTAX to signal syntax errors. Be more specific about the
3620 kind of error that was detected. Avoid use of SCM_CDRLOC. Avoid
3621 unnecessary consing when creating the memoized code.
3622
3623 2003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
3624
3625 * eval.c (s_bad_formals, s_bad_formal, s_duplicate_formal): New
3626 static identifiers.
3627
3628 (s_clauses, s_formals, s_duplicate_formals): Removed.
3629
3630 (scm_m_lambda): Use ASSERT_SYNTAX to signal syntax errors. Be more
3631 specific about the kind of error that was detected. Prepare for
3632 easier integration of changes for separated memoization.
3633
3634 2003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
3635
3636 * eval.c (s_duplicate_binding): New static identifier.
3637
3638 (scm_m_case): Call scm_c_memq instead of implementing it inline.
3639
3640 (scm_m_define): Added comment about how we check for duplicate
3641 formals.
3642
3643 (scm_m_do): Added check for duplicate bindings.
3644
3645 (scm_m_if): Use ASSERT_SYNTAX to signal syntax errors. Avoid
3646 unnecessary consing when creating the memoized code.
3647
3648 (scm_c_improper_memq, c_improper_memq, scm_m_lambda): Renamed
3649 scm_c_improper_memq to c_improper_memq, since it is not exported.
3650
3651 (transform_bindings): Call scm_c_memq rather than
3652 scm_c_improper_memq.
3653
3654 (SCM_CEVAL): Simplified handling of SCM_IM_IF forms.
3655
3656 2003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
3657
3658 * eval.c (s_bad_bindings, s_bad_binding, s_bad_exit_clause): New
3659 static identifiers.
3660
3661 (scm_m_do): Use ASSERT_SYNTAX to signal syntax errors. Be more
3662 specific about the kind of error that was detected. Avoid use of
3663 SCM_CDRLOC. Avoid unnecessary consing when creating the memoized
3664 code, this way also making sure that file name, line number
3665 information etc. remain available.
3666
3667 2003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
3668
3669 * eval.c (memoize_as_thunk_prototype): New static function.
3670
3671 (scm_m_delay, scm_m_future): Use memoize_as_thunk_prototype.
3672 Avoid unnecessary consing when creating the memoized code.
3673
3674 2003-10-12 Kevin Ryde <user42@zip.com.au>
3675
3676 * list.c (scm_append): Track argument number and use in error.
3677
3678 2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
3679
3680 * eval.c (s_missing_expression, s_bad_variable): New static
3681 identifiers.
3682
3683 (scm_m_define): Use ASSERT_SYNTAX to signal syntax errors. Prefer
3684 R5RS terminology for the naming of variables. Be more specific
3685 about the kind of error that was detected. Make sure file name,
3686 line number etc. are added to all freshly created expressions.
3687 Avoid unnecessary consing when creating the memoized code.
3688
3689 2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
3690
3691 * eval.c (s_extra_expression, s_misplaced_else_clause,
3692 s_bad_cond_clause, s_missing_recipient): New static identifiers.
3693
3694 (s_extra_case_clause): Removed.
3695
3696 (scm_m_case, scm_m_cond): If a clause appears after an else
3697 clause, report a misplaced else clause.
3698
3699 (scm_m_cond): Use ASSERT_SYNTAX to signal syntax errors. Be more
3700 specific about the kind of error that was detected. Handle bound
3701 'else and '=>. Avoid unnecessary consing when creating the
3702 memoized code.
3703
3704 (scm_m_cond, unmemocopy, SCM_CEVAL): Use SCM_IM_ELSE to memoize
3705 the syntactic keyword 'else and SCM_IM_ARROW to memoize the
3706 syntactic keyword '=>.
3707
3708 2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
3709
3710 * eval.c (scm_m_case): Allow empty lists of case labels.
3711
3712 2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
3713
3714 * tags.h (SCM_IM_ELSE, SCM_IM_ARROW): New memoizer codes.
3715
3716 * print.c (scm_isymnames): Add names for the new memoizer codes.
3717
3718 * eval.c (s_missing_clauses, s_bad_case_clause,
3719 s_extra_case_clause, s_bad_case_labels, s_duplicate_case_label,
3720 literal_p): New static identifiers.
3721
3722 (scm_m_case): Use ASSERT_SYNTAX to signal syntax errors. Be more
3723 specific about the kind of error that was detected. Check for
3724 duplicate case labels. Handle bound 'else. Avoid unnecessary
3725 consing when creating the memoized code.
3726
3727 (scm_m_case, unmemocopy, SCM_CEVAL): Use SCM_IM_ELSE to memoize
3728 the syntactic keyword 'else.
3729
3730 2003-10-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
3731
3732 * eval.c (s_bad_expression, syntax_error_key, syntax_error,
3733 ASSERT_SYNTAX, ASSERT_SYNTAX_2): New static identifiers.
3734
3735 (scm_m_and): Use ASSERT_SYNTAX to signal syntax errors. Avoid
3736 unnecessary consing when creating the memoized code.
3737
3738 2003-10-09 Kevin Ryde <user42@zip.com.au>
3739
3740 * numbers.c (scm_inexact_to_exact): Don't depend on what double->long
3741 cast gives for values bigger than a long, or for nan or inf.
3742
3743 2003-10-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
3744
3745 * smob.h (scm_make_smob_type): Made the declaration match the
3746 definition.
3747
3748 2003-10-07 Marius Vollmer <mvo@zagadka.de>
3749
3750 * goops.c, objects.h, smob.c, smob.h: Make type names char
3751 const * instead of char *. Thanks to Paul Jarc!
3752
3753 2003-10-02 Kevin Ryde <user42@zip.com.au>
3754
3755 * strports.c (scm_call_with_output_string): scm_get_output_string
3756 rather than scm_strport_to_string, so as to guard against the port
3757 having been closed by the called procedure. Reported by Nic Ferrier.
3758
3759 2003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
3760
3761 * numbers.h (SCM_INEXACTP): Removed uses of SCM_TYP16S.
3762
3763 * tags.h, deprecated.h (SCM_TYP16S): Deprecated and moved from
3764 tags.h to deprecated.h.
3765
3766 2003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
3767
3768 This set of patches introduces a new tc7 code scm_tc7_number for
3769 numbers. Bignums, reals and complex numbers are turned from smobs
3770 into subtypes of scm_tc7_number.
3771
3772 * tags.h (scm_tc7_number): New.
3773
3774 * eq.c (scm_equal_p), eval.c (SCM_CEVAL), evalext.c
3775 (scm_self_evaluating_p), gc-card.c (scm_i_sweep_card), gc-mark.c
3776 (scm_gc_mark_dependencies), goops.c (create_smob_classes), hash.c
3777 (scm_hasher), numbers.c, numbers.h (SCM_NUMP), objects.c
3778 (scm_class_of), print.c (scm_iprin1), smob.c
3779 (scm_smob_prehistory): Don't handle bignums, reals and complex
3780 numbers as subtypes of scm_tc7_smob any more.
3781
3782 * numbers.h, tags.h (scm_tc16_big, scm_tc16_real,
3783 scm_tc16_complex): Moved definitions from tags.h to numbers.h.
3784
3785 2003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
3786
3787 * numbers.c (scm_make_complex), gc-card.c (scm_i_sweep_card): Use
3788 sizeof (scm_t_complex) to determine the memory size of the
3789 malloc'd area for complex numbers.
3790
3791 2003-09-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
3792
3793 * numbers.c (scm_bigequal): Fixed.
3794
3795 2003-09-16 Marius Vollmer <mvo@zagadka.de>
3796
3797 * stime.c (scm_current_time): 'time' does not set errno so don't
3798 use SCM_SYSERROR for reporting errors.
3799
3800 2003-09-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
3801
3802 This set of patches eliminates the dependency between the
3803 implementation of evaluator specific memoization codes and special
3804 constants like #f, '() etc. ('flags'), which are not evaluator
3805 specific. The goal is to remove definitions of evaluator
3806 memoization codes completely from the public interface. This will
3807 make it possible to experiment more freely with optimizations of
3808 guile's internal representation of memoized code.
3809
3810 * objects.c (scm_class_of): Eliminate dependency on SCM_ISYMNUM.
3811
3812 * print.c (iflagnames): New array, holding the printed names of
3813 guile's special constants ('flags').
3814
3815 (scm_isymnames): Now holds only the printed names of the
3816 memoization codes.
3817
3818 (scm_iprin1): Separate the handling of memoization codes and
3819 guile's special constants.
3820
3821 * tags.h (scm_tc9_flag, SCM_ITAG9, SCM_MAKE_ITAG9, SCM_ITAG9_DATA,
3822 SCM_IFLAGNUM): new
3823
3824 (scm_tc8_char, scm_tc8_iloc, SCM_BOOL_F, SCM_BOOL_T,
3825 SCM_UNDEFINED, SCM_EOF_VAL, SCM_EOL, SCM_UNSPECIFIED, SCM_UNBOUND,
3826 SCM_ELISP_NIL, SCM_IM_DISPATCH, SCM_IM_SLOT_REF,
3827 SCM_IM_SLOT_SET_X, SCM_IM_DELAY, SCM_IM_FUTURE,
3828 SCM_IM_CALL_WITH_VALUES, SCM_IM_NIL_COND, SCM_IM_BIND): Changed
3829 values.
3830
3831 (SCM_IFLAGP): SCM_IFLAGP now only tests for flags.
3832
3833 (SCM_IFLAGP, SCM_MAKIFLAG, SCM_IFLAGNUM): Generalized to use the
3834 tc9 macros and scm_tc9_flag.
3835
3836 2003-09-15 Marius Vollmer <mvo@zagadka.de>
3837
3838 * posix.c (scm_setgroups): Check that the gid list is not too
3839 long. Thanks to Paul Jarc!
3840
3841 2003-09-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
3842
3843 * tags.h: Reduced the number of short instructions from 14 to 13.
3844 The typecode of the former 14th short instruction is now used to
3845 represent long instructions. Changed some comments to reflect
3846 this fact.
3847
3848 (SCM_MAKISYM): ISYMs get a new tc7 code, namely the one that was
3849 previously used by SCM_IM_DEFINE.
3850
3851 (SCM_IM_DEFINE): Turned into a long instruction.
3852
3853 * eval.c (unmemocopy, SCM_CEVAL): Treat SCM_IM_DEFINE as a long
3854 instruction.
3855
3856 * eval.c (SCM_CEVAL): Since characters and iflags have now a tc7
3857 code that is separate from all instructions, one level of dispatch
3858 for long instructions can be eliminated.
3859
3860 * print.c (scm_isymnames): Removed some commented code.
3861
3862 2003-09-12 Marius Vollmer <mvo@zagadka.de>
3863
3864 * __scm.h (SCM_FENCE): Use __memory_barrier with the Intel
3865 compiler on IA64.
3866
3867 * hashtab.h (scm_tc16_hashtable): Added "extern" declaration.
3868
3869 * modules.c (scm_module_reverse_lookup): Check that the obarray
3870 really is a hashtable and do nothing if not.
3871
3872 * inline.h: Use "extern inline" only with GCC. Use "static
3873 inline" else.
3874
3875 2003-09-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
3876
3877 * numbers.h (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Removed uses
3878 of SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
3879
3880 * numbers.h, deprecated.h (SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP,
3881 SCM_SLOPPY_COMPLEXP): Deprecated and moved from numbers.h to
3882 deprecated.h.
3883
3884 2003-09-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
3885
3886 * eq.c (scm_eqv_p, scm_equal_p): Removed uses of
3887 SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
3888
3889 * eq.c (scm_eqv_p, scm_equal_p): Reordered comparisons from
3890 0.0==some_expression to some_expression==0.0. The latter is
3891 better readable. The former is preferred by some people, since it
3892 leads to a compiler error when confusing == with =. However, when
3893 using gcc, a warning will be issued if in an if-statement an
3894 assigment appears. Since many Guile developers are using gcc,
3895 such errors will not remain unnoticed anyway. We can therefore
3896 focus on better readability.
3897
3898 2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
3899
3900 * tags.h: Added description of Guile's type system. Removed some
3901 old and misleading comments.
3902
3903 2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
3904
3905 * unit.c (scm_cvref): Eliminate unnecessary uses of SCM_NIMP,
3906 SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
3907
3908 2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
3909
3910 * numbers.h (SCM_MAKINUM): Define in terms of scm_tc2_int.
3911
3912 (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Define in terms of the
3913 respective SLOPPY macro.
3914
3915 2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
3916
3917 * eq.c (scm_equal_p): Use SCM_TYP7 to check if an object is of
3918 type string, not SCM_TYP7S.
3919
3920 2003-09-03 Kevin Ryde <user42@zip.com.au>
3921
3922 * numbers.c (scm_lognot): Correction to docstring, ones-complement not
3923 2s-complement.
3924
3925 * stime.c (scm_strptime): Add comment about glibc strptime %s and
3926 current timezone requiring SCM_DEFER_INTS.
3927
3928 2003-08-30 Neil Jerram <neil@ossau.uklinux.net>
3929
3930 * script.c (scm_compile_shell_switches): Make -s switch optional
3931 if file to be loaded does not begin with a `-'. (Thanks to Aaron
3932 VanDevender for the patch!)
3933
3934 2003-08-30 Kevin Ryde <user42@zip.com.au>
3935
3936 * numbers.c (scm_lognot): Rewrite using ~ and mpz_com, for directness
3937 and to have non-integer types rejected as per other logical funcs.
3938
3939 2003-08-28 Kevin Ryde <user42@zip.com.au>
3940
3941 * gc.h (scm_remember_upto_here_1): Revise comments on the asm form.
3942
3943 2003-08-23 Kevin Ryde <user42@zip.com.au>
3944
3945 * simpos.c (scm_system): Remove SCM_DEFER_INTS, system() should be
3946 thread safe, and could take a long time too.
3947
3948 2003-08-22 Kevin Ryde <user42@zip.com.au>
3949
3950 * numbers.c (scm_difference): Correction to bignum - negative inum.
3951
3952 2003-08-14 Kevin Ryde <user42@zip.com.au>
3953
3954 * gc.h (scm_remember_upto_here_1, scm_remember_upto_here_2)
3955 [__GNUC__]: Use volatile asm macros rather than a function call.
3956 * gc.c (scm_remember_upto_here_1, scm_remember_upto_here_2): Undefine
3957 macros while defining functions.
3958
3959 * simpos.c (getenv): Use <stdlib.h> for prototype.
3960 (scm_system): In docstring, refer to status:exit-val rather than
3961 "functions above".
3962
3963 2003-08-09 Kevin Ryde <user42@zip.com.au>
3964
3965 * srcprop.c (scm_source_properties): Return plist from hash if it's a
3966 list set by source-properties! rather than an SRCPROPS object,
3967
3968 2003-07-29 Kevin Ryde <user42@zip.com.au>
3969
3970 * properties.c (scm_primitive_property_ref): In docstring, note
3971 parameters to not-found-proc, use hyphens rather than underscores for
3972 that parameter name.
3973 (scm_primitive_property_set_x): In docstring, VAL is the value
3974 parameter not CODE.
3975
3976 2003-07-27 Marius Vollmer <mvo@zagadka.de>
3977
3978 * print.c (scm_print_symbol_name): handle more weird characters by
3979 escaping the symbol name properly. Thanks to Paul Jarc!
3980
3981 * posix.h (scm_setgroups): New prototype.
3982 * posix.c (scm_setgroups): New. Thanks to Paul Jarc!
3983 (scm_getgroups): Handle groups ids that don't fit into a fixnum.
3984 Don't use SCM_WRITABLE_VELTS.
3985
3986 * gc.h (SCM_GC_SET_CELL_BVEC): New.
3987 * gc-card.c (scm_i_init_card_freelist): Use it. Thanks to
3988 Matthias Koeppe!
3989
3990 * __scm.h (SCM_C_INLINE_KEYWORD): New.
3991 * numbers.c: Use it in place of SCM_C_INLINE so that the code
3992 compiles when SCM_C_INLINE is undefined.
3993
3994 2003-07-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
3995
3996 * __scm.h: Reformulated the architecture and compiler properties
3997 in terms of properties of scm_t_bits and SCM variables rather than
3998 in terms of c standard types. This is since it is not known which
3999 of the standard types scm_t_bits and SCM variables will be defined
4000 to.
4001
4002 2003-07-24 Kevin Ryde <user42@zip.com.au>
4003
4004 * numbers.c (scm_angle): Use scm_flo0 for non-negative inum, bignum
4005 and real.
4006
4007 2003-07-18 Kevin Ryde <user42@zip.com.au>
4008
4009 * numbers.c (scm_product): In complex * bignum, correction to
4010 REAL/IMAG fetch, x is the complex, not y.
4011
4012 2003-07-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4013
4014 * numbers.c (scm_odd_p, scm_even_p): Bugfix: Treat result of
4015 scm_inf_p test as Scheme values.
4016 (scm_sum): Bugfix: Normalize bignum created from a negative bignum
4017 and a positive inum.
4018 Use GNU indentation style.
4019
4020 2003-07-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
4021
4022 * values.c (scm_values): Build lists of length 1 by using
4023 scm_list_1 instead of using scm_cons.
4024
4025 2003-07-10 Kevin Ryde <user42@zip.com.au>
4026
4027 * deprecation.c (scm_c_issue_deprecation_warning_fmt): Add va_end.
4028 * list.c (scm_list_n): Ditto.
4029
4030 * gc-malloc.c (scm_gc_realloc): Define "ptr" at start of function.
4031
4032 2003-07-08 Matthias Koeppe <mkoeppe@merkur.math.uni-magdeburg.de>
4033
4034 * tags.h (scm_t_bits, scm_t_signed_bits, etc): Avoid solaris empty
4035 defines of INTPTR_MAX and UINTPTR_MAX, combine conditionals for
4036 scm_t_bits and scm_t_signed_bits to avoid any chance of one and not
4037 the other using intptr_t.
4038
4039 2003-07-08 Kevin Ryde <user42@zip.com.au>
4040
4041 * numbers.c (scm_make_polar): Use sincos, when available.
4042 (scm_magnitude): Use hypot.
4043
4044 * ports.c (scm_char_ready_p, scm_peek_char): In docstrings, don't use
4045 @footnote since it doesn't go through to guile-procedures.txt.
4046
4047 * threads.c (scm_call_with_new_thread): In docstring, use "( )"
4048 outside @var to quieten makeinfo, and use @code.
4049
4050 2003-07-06 Han-Wen Nienhuys <hanwen@cs.uu.nl>
4051
4052 * gc-malloc.c (decrease_mtrigger): new function
4053 (increase_mtrigger): new function, separate debug registering and
4054 mtrigger administration.
4055 (scm_gc_realloc): bugfix: do mtrigger administration before the
4056 actual realloc, for the realloc might invalidate a GC-d segment of
4057 memory. Thanks to Sam Hocevar for pointing this out.
4058 (scm_gc_realloc): use scm_malloc_reregister instead of
4059 unregistering and registering in sequence.
4060
4061 2003-07-03 Han-Wen Nienhuys <hanwen@cs.uu.nl>
4062
4063 * __scm.h (SCM_ASSERT): change "else" expansion to "do { } while (0)"
4064
4065 2003-07-02 Han-Wen Nienhuys <hanwen@cs.uu.nl>
4066
4067 * __scm.h (SCM_ASRTGO): add "else" to macro expansions with if
4068 clauses.
4069
4070 2003-06-29 Marius Vollmer <mvo@zagadka.de>
4071
4072 * deprecated.h (SCM_OPDIRP, scm_fport, scm_option, scm_srcprops,
4073 scm_srcprops_chunk, scm_info_frame, scm_stack, scm_array,
4074 scm_array_dim, SCM_ARRAY_CONTIGUOUS, SCM_FUNC_NAME, SCM_WTA,
4075 RETURN_SCM_WTA, SCM_VALIDATE_NUMBER_COPY,
4076 SCM_VALIDATE_NUMBER_DEF_COPY, SCM_VALIDATE_OPDIR): Re-added from
4077 the release_1_6 branch.
4078
4079 2003-06-25 Stefan Jahn <stefan@lkcc.org>
4080
4081 * continuations.c: Redeclaration of getcontext() via the
4082 __asm__ ("getcontext") directive.
4083
4084 * continuations.h: Include <ucontext.h> instead of
4085 <sys/ucontext.h>.
4086
4087 2003-06-21 Kevin Ryde <user42@zip.com.au>
4088
4089 * numbers.c (_GNU_SOURCE): #define, to get C99 things.
4090 (scm_asinh, scm_acosh, scm_atanh, scm_truncate, $asinh, $acosh,
4091 $atanh, truncate): Use C library asinh, acosh, atanh and trunc, when
4092 available.
4093 (scm_inexact_to_exact): Expand isfinite to its definition !xisinf.
4094 (isfinite): Remove, conflicts with C99 isfinite().
4095
4096 2003-06-19 Marius Vollmer <mvo@zagadka.de>
4097
4098 * deprecated.h, deprecated.c (scm_strhash, scm_sym2ovcell_soft,
4099 scm_sym2ovcell, scm_intern_obarray_soft, scm_intern_obarray,
4100 scm_symbol_value0, scm_string_to_obarray_symbol scm_intern_symbol,
4101 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned_p,
4102 scm_symbol_bound_p, scm_symbol_set_x, scm_gentemp): Re-added from
4103 the release_1_6 branch.
4104
4105 2003-06-14 Stefan Jahn <stefan@lkcc.org>
4106
4107 * threads.h: Redefined scm_getspecific() and scm_setspecific()
4108 to be functions instead of macros.
4109
4110 * threads.c: Conditionalized inclusion of <sys/time.h> and
4111 <unistd.h>.
4112 (scm_getspecific, scm_setspecific): Made these two function
4113 real part of the API.
4114
4115 * posix.c (s_scm_putenv): Added some code to make a
4116 (putenv "FOO="), i.e. setting an empty string, work also on
4117 Win32 systems. Thanks to Kevin Ryde for the proposal.
4118
4119 2003-06-12 Kevin Ryde <user42@zip.com.au>
4120
4121 * posix.c (scm_putenv): Free temporary ptr in mingw unset. Add
4122 freebsd to comment about need to use unsetenv.
4123
4124 2003-06-02 Marius Vollmer <mvo@zagadka.de>
4125
4126 * ports.c (scm_peek_char): Safe the column of the port around the
4127 getc/ungetc calls. Thanks to Dr. Peter Ivanyi!
4128
4129 2003-06-07 Kevin Ryde <user42@zip.com.au>
4130
4131 * tags.h: Use inttypes.h and stdint.h when available, for INTPTR_MAX
4132 and friends required by scm_t_bits setups.
4133
4134 2003-06-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
4135
4136 * tags.h (scm_tc2_int): Added.
4137
4138 * tags.h (scm_tc3_int_1, scm_tc3_int_2): Expressed in terms of
4139 scm_tc2_int.
4140
4141 * tags.h (scm_tcs_cons_imcar, scm_tcs_cons_nimcar, scm_tcs_struct,
4142 scm_tcs_closures): Hard coded values replaced by symbolic ones.
4143
4144 2003-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
4145
4146 * eval.c: Partially undid my patch from 2003-05-31. This patch
4147 caused the segfault referenced in the previous changelog entry.
4148
4149 2003-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
4150
4151 * tags.h: Fixed comment about the immediate type code layout.
4152
4153 * eval.c: Fixed handling of non-special instructions. Without
4154 this patch, guile will segfault on (#\0) and similar instructions.
4155
4156 2003-06-05 Kevin Ryde <user42@zip.com.au>
4157
4158 * numbers.c (scm_max, scm_min): For inum, bignum and real, if other
4159 operand is NaN, then return NaN. Also avoid passing NaN to mpz_cmp_d.
4160
4161 * read.c (scm_input_error): Pass arg list parameter to scm_error_scm,
4162 rather than SCM_EOL. Needed by "Unknown # object" case in scm_lreadr.
4163
4164 2003-06-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
4165
4166 * __scm.h, gc-card.c (SCM_DEBUG_DEBUGGER_SUPPORT,
4167 SCM_DEBUG_DEBUGGING_SUPPORT): Renamed macro
4168 SCM_DEBUG_DEBUGGER_SUPPORT to SCM_DEBUG_DEBUGGING_SUPPORT and
4169 generalized it to apply not only to C level functions but also to
4170 scheme level functions.
4171
4172 * debug.c, debug.h, eval.c (make-iloc, scm_make_iloc, iloc?,
4173 scm_iloc_p, dbg-make-iloc, scm_dbg_make_iloc, dbg-iloc?,
4174 scm_dbg_iloc_p): Moved functions scm_make_iloc, scm_iloc_p to
4175 eval.c, made them available under SCM_DEBUG_DEBUGGING_SUPPORT == 1
4176 only and renamed them to scm_dbg_make_iloc, scm_dbg_iloc_p,
4177 respectively.
4178
4179 * deprecated.h, eval.c, eval.h (SCM_ILOC00, SCM_IDINC,
4180 SCM_IDSTMSK): Deprecated. The macro definitions are moved from
4181 eval.h into eval.c and a copy is placed into deprecated.h.
4182
4183 * eval.c, eval.h (SCM_MAKE_ILOC): Removed from eval.h and placed
4184 into eval.c. This definition was not part of the API in any
4185 officially released version of guile and thus does not need to go
4186 through a phase of deprecation.
4187
4188 2003-06-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
4189
4190 * deprecated.c, deprecated.h, eval.c, eval.h (scm_s_expression,
4191 scm_s_test, scm_s_body, scm_s_bindings, scm_s_variable,
4192 scm_s_clauses, scm_s_formals): Deprecated. In eval.c the
4193 definitions are make static and renamed from scm_s_xxx to s_xxx.
4194 In deprecated.c the original definitions are copied.
4195
4196 * deprecated.h, eval.c, eval (SCM_EVALIM2, SCM_EVALIM, SCM_XEVAL,
4197 SCM_XEVALCAR): Deprecated. The macro definitions are moved from
4198 eval.h into eval.c and a copy (slightly modified to work in user
4199 code) is placed into deprecated.h.
4200
4201 * eval.c: Use the local static s_xxx definitions instead of the
4202 scm_s_xxx definitions throughout.
4203
4204 2003-06-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
4205
4206 This set of patches separates the representation of the cxr family
4207 of functions (car, cdr etc.) from the dsubr family of functions
4208 (i. e. functions that take a double precision floating point
4209 argument). Further, the algorithm for handling the cxr function
4210 is improved.
4211
4212 * eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_1), numbers.c
4213 (scm_asinh, scm_acosh, scm_atanh, scm_truncate, scm_round, floor,
4214 ceil, sqrt, fabs, exp, log, sin, cos, tan, asin, acos, atan, sinh,
4215 cosh, tanh), objects.c (scm_class_of), procprop.c
4216 (scm_i_procedure_arity), ramap.c (scm_array_map_x), tags.h
4217 (scm_tc7_dsubr, scm_tcs_subrs): Introduce scm_tc7_dsubr as new
4218 typecode for the dsubr family of functions.
4219
4220 * ramap.c (ramap_cxr, ramap_dsubr): Renamed ramap_cxr to
4221 ramap_dsubr.
4222
4223 * eval.c (SCM_CEVAL, SCM_APPLY, call_cxr_1), pairs.c
4224 (scm_init_pairs): Make use of the (now usable) second cell element
4225 of a scm_tc7_cxr function to implement the cxr family of functions
4226 more efficiently.
4227
4228 2003-05-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
4229
4230 * eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_0,
4231 scm_trampoline_1, scm_trampoline_2): Postpone error cases to the
4232 end of an if-else-if-sequence of checks.
4233
4234 2003-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
4235
4236 * eval.c (SCM_CEVAL): Improved readability of call-with-values
4237 execution. Generalize apply_closure to apply_proc and use that
4238 for call-with-values.
4239
4240 2003-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
4241
4242 * eval.c (SCM_CEVAL): Avoid one level of indirection when applying
4243 a non closure.
4244
4245 2003-05-30 Stefan Jahn <stefan@lkcc.org>
4246
4247 * posix.c (s_scm_putenv): Use the new HAVE_UNSETENV
4248 appropriately for mingw32 hosts.
4249
4250 * numbers.h: Defining copysign(), isnan() and finite() to
4251 be prefixed by a single '_' for mingw32 hosts.
4252
4253 2003-05-30 Kevin Ryde <user42@zip.com.au>
4254
4255 * numbers.c (z_negative_one): New variable.
4256 (scm_init_numbers): Initialize it.
4257 (scm_logcount): Use it and mpz_hamdist to count zeros for negatives.
4258
4259 2003-05-29 Stefan Jahn <stefan@lkcc.org>
4260
4261 * win32-dirent.c: Use malloc() instead of scm_malloc().
4262
4263 * stime.c (s_scm_strftime): Add a type cast to avoid compiler
4264 warning.
4265
4266 * posix.c (s_scm_putenv): Disable use of unsetenv() for the
4267 mingw32 build.
4268
4269 * modules.c (s_scm_module_import_interface): Renamed local
4270 variable interface to _interface. Seems like 'interface'
4271 is a special compiler directive for the mingw32 compiler.
4272
4273 * mkstemp.c: Provide prototype to avoid compiler warning.
4274
4275 * load.c (s_scm_search_path): Fixed absolute and relative
4276 path detections for native Windows platforms.
4277
4278 * gc.h, threads.h: Export some more symbols using SCM_API (necessary
4279 to build on mingw32).
4280
4281 * gc-freelist.c ("s_scm_map_free_list",
4282 "s_scm_gc_set_debug_check_freelist_x"): Fixed use of FUNC_NAME.
4283
4284 * fports.c (fport_fill_input): Disable use of
4285 fport_wait_for_input() on Win32 platforms.
4286
4287 * filesys.c (s_scm_basename): Fixed __MINGW32__ code.
4288
4289 * Makefile.am: Modified some rules for cross compiling.
4290
4291 2003-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
4292
4293 * eval.c (SCM_CEVAL): In case of an application, all checks for a
4294 proper function object and the correct number of arguments are now
4295 performed in the application part of SCM_CEVAL.
4296
4297 (scm_badformalsp): Removed.
4298
4299 2003-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
4300
4301 * deprecated.c (scm_read_and_eval_x): Fixed C99-ism.
4302
4303 2003-05-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4304
4305 * num2integral.i.c (NUM2INTEGRAL): Avoid warning about conditional
4306 always being false by inserting preprocessor conditional. (Thanks
4307 to Bruce Korb.)
4308
4309 * __scm.h (SCM_STACK_PTR): New macro. (Cast argument through
4310 (void *) in order to avoid an aliasing warning; thanks to Bruce
4311 Korb.)
4312
4313 * stackchk.h (SCM_STACK_OVERFLOW_P): Use SCM_STACK_PTR.
4314
4315 * threads.c (suspend, launch_thread, scm_threads_mark_stacks): Use
4316 SCM_STACK_PTR.
4317
4318 * threads.c (scm_threads_mark_stacks): Bugfix: Changed
4319 thread->base --> t->base.
4320
4321 * eval.c (SCM_CEVAL): Don't cast argument of SCM_STACK_OVERFLOW_P.
4322
4323 2003-05-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4324
4325 * deprecated.h, deprecated.c (scm_makstr, scm_makfromstr,
4326 scm_variable_set_name_hint, scm_builtin_variable,
4327 scm_internal_with_fluids, scm_make_gsubr,
4328 scm_make_gsubr_with_generic, scm_create_hook, SCM_LIST0,
4329 SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5, SCM_LIST6,
4330 SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify, scm_sloppy_memq,
4331 scm_sloppy_memv, scm_sloppy_member, scm_read_and_eval_x,
4332 scm_subr_entry, SCM_SUBR_DOC, scm_make_subr,
4333 scm_make_subr_with_generic, scm_make_subr_opt,
4334 scm_call_catching_errors, scm_make_smob_type_mfpe,
4335 scm_set_smob_mfpe, scm_strprint_obj, scm_read_0str, scm_eval_0str,
4336 SCM_CHARS, SCM_UCHARS, SCM_LENGTH): Re-added from the release_1_6
4337 branch. Some have been slightly rewritten.
4338 (scm_i_object_chars, scm_i_object_length): New, to support
4339 SCM_CHARS, SCM_UCHARS, and SCM_LENTH.
4340
4341 2003-05-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
4342
4343 * eval.c (scm_m_do, unmemocopy, SCM_CEVAL): Reversed order of
4344 names and inits in the memoized code of do.
4345
4346 2003-05-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4347
4348 * c-tokenize.lex (yyget_lineno, yyget_in, yyget_out, yyget_leng,
4349 yyget_text, yyset_lineno, yyset_in, yyset_out, yyget_debug,
4350 yyset_debug, yylex_destroy): Added prototypes (otherwise we'll get
4351 a compilation error if error-on-warning is enabled).
4352
4353 2003-05-17 Marius Vollmer <mvo@zagadka.de>
4354
4355 * c-tokenize.lex: Gobble up complete lines after a '#'. This
4356 removes preprocessor directives from the snarfage that might
4357 otherwise confuse us. These directives appear when compiling with
4358 "-g3", for example.
4359
4360 2003-05-16 Han-Wen Nienhuys <hanwen@cs.uu.nl>
4361
4362 * ChangeLog: add my surname
4363
4364 * srcprop.c (scm_finish_srcprop): use
4365 scm_gc_register_collectable_memory()
4366 (scm_make_srcprops): idem.
4367
4368 2003-05-14 Han-Wen Nienhuys <hanwen@cs.uu.nl>
4369
4370 * gc-malloc.c (scm_gc_register_collectable_memory): avoid
4371 wrap-around for scm_mtrigger
4372 (scm_gc_register_collectable_memory): abort on overflowing
4373 scm_mallocated().
4374
4375 2003-05-13 Kevin Ryde <user42@zip.com.au>
4376
4377 * numbers.c (xmpz_cmp_d): New macro, handling infs if gmp doesn't.
4378 (scm_num_eq_p, scm_less_p, scm_max, scm_min): Use it.
4379
4380 2003-05-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4381
4382 * backtrace.c (scm_display_error_message): Introduced fancy
4383 printing with max level 7 and length 10. (Purpose: avoid printing
4384 gigantic objects in error messages.)
4385
4386 * print.c, print.h (scm_i_port_with_print_state): New function.
4387
4388 * print.c (scm_iprin1, scm_printer_apply,
4389 scm_port_with_print_state): Use scm_i_port_with_print_state.
4390 (scm_simple_format): Modified not to destroy print states.
4391 (print_state_mutex): New mutex.
4392 (scm_make_print_state, scm_free_print_state, scm_prin1):
4393 Lock/unlock print_state_mutex.
4394
4395 * deprecated.h (SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK):
4396 Use current names in definitions.
4397
4398 2003-05-10 Kevin Ryde <user42@zip.com.au>
4399
4400 * numbers.c (scm_num_eq_p, scm_less_p): Don't pass NaN to mpz_cmp_d.
4401
4402 * numbers.c (scm_integer_length): On negative bignums, adjust
4403 mpz_sizeinbase to account for it looking at absolute value where we
4404 want ones-complement.
4405
4406 * numbers.c (scm_gcd): In bignum/inum, don't pass yy==0 to mpz_gcd_ui
4407 since we're only using the ulong return value, and x might not fit.
4408
4409 2003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
4410
4411 * eval.c, eval.h, read.c, read.h (scm_sym_dot): Moved from eval to
4412 read. This will allow to make the definition in read.c static.
4413
4414 2003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
4415
4416 * eval.c, eval.h, evalext.c, evalext.h (scm_m_undefine): Moved
4417 from evalext to eval. This will allow to make some of the
4418 definitions in eval.c static.
4419
4420 2003-05-06 Kevin Ryde <user42@zip.com.au>
4421
4422 * numbers.c (scm_difference): In inum - bignum, handle negative inum.
4423 (scm_logcount): Use mpz_com, not mpz_neg.
4424
4425 2003-05-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
4426
4427 The purpose of this patch is to make guile's internal memoizers
4428 distinguishable from memoizing macros created on the scheme level
4429 or from user provided primitive memoizing macros. The reason is,
4430 that the internal memoizers are the only ones that are allowed to
4431 transform their scheme input into memoizer byte code, while all
4432 other memoizing macros may only transform scheme code into new
4433 scheme code.
4434
4435 To achieve this, a new macro type 'builtin-macro!' is introduced.
4436 Currently, 'builtin-macro!'s are handled as memoizing macros, but
4437 this will change when the memoizer and executor are separated.
4438
4439 * macros.[ch] (scm_i_makbimacro): New.
4440
4441 * macros.h (SCM_BUILTIN_MACRO_P): New.
4442
4443 * macros.c (macro_print, scm_macro_type): Support builtin-macro!s.
4444
4445 * eval.c, goops.c: All of guile's primitive memoizing macros are
4446 primitive builtin-macros now.
4447
4448 * eval.c (scm_macroexp, SCM_CEVAL): Make sure the primitive
4449 builtin-macros are handled equally to memoizing macros.
4450
4451 2003-05-04 Marius Vollmer <mvo@zagadka.de>
4452
4453 * throw.c (scm_ithrow): Remove "asm volatile" hack. It used to
4454 work around a bug in GCC 2.95.2 but is now a bug in itself.
4455
4456 2003-05-02 Marius Vollmer <mvo@zagadka.de>
4457
4458 * deprecated.h (scm_rstate, scm_rng, SCM_SLOPPY_CONSP,
4459 SCM_SLOPPY_NCONSP, scm_tc7_ssymbol, scm_tc7_msymbol,
4460 scm_tcs_symbols): New.
4461
4462 2003-04-30 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4463
4464 * deprecated.h, deprecated.c (scm_protect_object,
4465 scm_unprotect_object, SCM_SETAND_CAR, SCM_SETOR_CAR,
4466 SCM_SET_AND_CDR, SCM_SET_OR_CDR, SCM_FREEP, SCM_NFREEP,
4467 SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16,
4468 SCM_GCCDR, scm_remember, scm_the_root_module, scm_make_module,
4469 scm_ensure_user_module, scm_load_scheme_module, scm_port,
4470 scm_ptob_descriptor, scm_port_rw_active,
4471 scm_close_all_ports_except): New.
4472
4473 * ports.c (scm_c_port_for_each): New function, mostly copied from
4474 scm_port_for_each.
4475 (scm_port_for_each): Reimplemented using scm_c_port_for_each.
4476 * ports.h (scm_c_port_for_each): New prototype.
4477
4478 2003-04-28 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4479
4480 * eval.c (scm_m_atdispatch): Removed until actually needed. (This
4481 macro was introduced in anticipation of GOOPS method compilation
4482 code.)
4483
4484 * goops.c: Removed binding of @dispatch.
4485
4486 2003-04-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
4487
4488 * eval.c, goops.c (@dispatch, @slot-ref, @slot-set!): Move the
4489 instructions that bind the macros on the scheme level back to
4490 goops.c in order to make sure again that the bindings go into the
4491 (oop goops) module and are not visible from the outside.
4492
4493 2003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
4494
4495 * eval.c: Non functional change: Separated R5RS and non-R5RS
4496 macros into different sections of the file and ordered the
4497 memoizers alphabetically.
4498
4499 2003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
4500
4501 * eval.c (scm_ilookup): Rewritten to improve readability.
4502
4503 2003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
4504
4505 * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2):
4506 Partially reverted patch from 2003-04-23 in oder to find a better
4507 compromise between readability and debuggability.
4508
4509 2003-04-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
4510
4511 * eval.c, eval.h, goops.c, goops.h (scm_m_atslot_ref,
4512 scm_m_atslot_set_x, scm_m_atdispatch): Move the declarations and
4513 definitions of the special goops memoizers from goops.[ch] to
4514 eval.[ch]. Hmm... it seems that scm_m_atdispatch is not used
4515 throughout guile.
4516
4517 2003-04-24 Mikael Djurfeldt <mdj@kvast.blakulla.net>
4518
4519 * ports.c, ports.h (scm_i_port_table_mutex): New mutex.
4520
4521 * fports.c (scm_evict_ports): Lock/unlock scm_i_port_table_mutex.
4522
4523 * ports.c (scm_close_port, scm_flush_all_ports): Ditto.
4524
4525 * ioext.c (scm_fdes_to_ports): Ditto.
4526
4527 * vports.c (scm_make_soft_port): Changed SCM_DEFER/ALLOW_INTS into
4528 lock/unlock scm_i_port_table_mutex.
4529
4530 * strports.c (scm_mkstrport): Ditto.
4531
4532 * ports.c (scm_void_port, scm_port_for_each): Ditto.
4533
4534 * fports.c (scm_fdes_to_port): Ditto.
4535
4536 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
4537
4538 This set of patches contains no functional changes, only debatable
4539 minor stylistic ones. Still, in order to prepare a patch between
4540 my local copy and the CVS version, I decided to submit the changes
4541 below. Then, the patch will hopefully only contain relevant
4542 modifications :-)
4543
4544 * eval.c (iqq): Added const specifier.
4545
4546 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
4547 Use NULL instead of 0 to indicate that a pointer is returned.
4548 Removed some misleading 'fall through' comments.
4549
4550 * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2):
4551 Split up long expressions into smaller ones to be more debugging
4552 friendly.
4553
4554 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
4555
4556 * eval.h (SCM_ENTER_FRAME_HDLR, SCM_APPLY_FRAME_HDLR,
4557 SCM_EXIT_FRAME_HDLR): Use SCM_PACK to convert data to a SCM value
4558 rather than casting to SCM.
4559
4560 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
4561
4562 * sort.c, pairs.h: Removed unnecessary includes.
4563
4564 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
4565
4566 * sort.c: Replaced hand-made trampline code by the new official
4567 mechanism from eval.c. This fixes a segfault in the new test file
4568 sort.test.
4569
4570 (quicksort, compare_function, scm_restricted_vector_sort_x,
4571 scm_sorted_p, scm_merge, scm_merge_list_x, scm_merge_x,
4572 scm_merge_list_step, scm_sort_x, scm_sort, scm_merge_vector_x,
4573 scm_merge_vector_step, scm_stable_sort_x, scm_stable_sort,
4574 scm_sort_list_x, scm_sort_list): Use trampoline mechanism from
4575 eval.c.
4576
4577 (subr2less, lsubrless, closureless, applyless, scm_cmp_function,
4578 cmp_fun_t): Removed.
4579
4580 (compare_function): Added.
4581
4582 * sort.c (quicksort, SWAP, stack_node): Replaced pointer
4583 arithmetics with index arithmetics. Changed quicksort to work on
4584 an array of SCM values instead of an array of characters. Avoid
4585 bytewise copying of SCM elements. Avoid allocating memory on the
4586 stack with alloca. Fixed some comments.
4587
4588 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
4589
4590 * eval.c (EXTEND_ENV): Eliminated.
4591
4592 (unmemocopy, SCM_CEVAL, SCM_APPLY): Use SCM_EXTEND_ENV instead of
4593 EXTEND_ENV.
4594
4595 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
4596
4597 * __scm.h (SCM_DEBUG_DEBUGGER_SUPPORT): New compile-time option.
4598
4599 * gc.card.c (scm_gc_marked_p): Fixed compiler warning when
4600 compiling with SCM_DEBUG==1 by moving definition behind prototype.
4601
4602 * gc.card.c (scm_dbg_t_list_cell, scm_dbg_t_double_cell,
4603 scm_dbg_gc_marked_p, scm_dbg_gc_get_card, scm_dbg_gc_get_bvec,
4604 scm_t_list_cell_struct, scm_t_list_cell, scm_t_double_cell,
4605 scm_gc_marked_p, scm_gc_get_card, scm_gc_get_bvec): Fixed
4606 functions such that they check if the object is a non-immediate.
4607 Further, renamed identifiers to use the scm_dbg_ prefix and made
4608 their inclusion into the lib dependent of the
4609 SCM_DEBUG_DEBUGGER_SUPPORT compile time option.
4610
4611 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
4612
4613 * __scm.h: Fixed comment about the SCM_DEBUG_TYPING_STRICTNESS
4614 debug option.
4615
4616 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
4617
4618 * list.c (scm_ilength, scm_last_pair), unif.c (l2ra): Prefer
4619 !SCM_CONSP over SCM_NCONSP. Now, guile itself does not include
4620 any calls to SCM_NCONSP any more.
4621
4622 * unif.c (l2ra): Eliminate redundant check.
4623
4624 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
4625
4626 * list.c (scm_cons_star), ramap.c (scm_ra_sum, scm_ra_product,
4627 scm_array_map_x), unif.c (l2ra): Prefer !SCM_NULLP over
4628 SCM_NNULLP. Now, guile itself does not include any calls to
4629 SCM_NNULLP any more.
4630
4631 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
4632
4633 * eval.c (unmemocopy, SCM_APPLY, scm_map, scm_for_each,
4634 scm_copy_tree): Place assignment expressions which are part of
4635 other expressions into an expression of their own.
4636
4637 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
4638
4639 * goops.c (TEST_CHANGE_CLASS, scm_sys_initialize_object): Don't
4640 compare SCM values with !=.
4641
4642 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
4643
4644 * eval.c, eval.h, evalext.c, evalext.h (scm_sym_setter,
4645 scm_m_generalized_set_x, scm_init_evalext): Move the declaration
4646 and definition of the memoizer for the generalized set! macro from
4647 evalext.[ch] to eval.[ch]. Use the SCM_SYNTAX snarfer macro to
4648 define the macro object.
4649
4650 * eval.c, eval.h (s_set_x, scm_s_set_x, scm_m_set_x,
4651 scm_m_generalized_set_x): Since now scm_s_set_x is only used in
4652 eval.c, it is made static and renamed to s_set_x.
4653
4654 * evalext.c (scm_defined_p, scm_m_undefine): Prefer !SCM_<foo>
4655 over SCM_N<foo>.
4656
4657 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
4658
4659 * eval.c, root.h (scm_undefineds, SCM_NUM_PROTECTS, undefineds,
4660 scm_init_eval): Made scm_undefineds static in eval.c, renamed it
4661 to undefineds and registered the object as a permanent object.
4662
4663 * eval.c, eval.h (scm_f_apply, scm_init_eval): Made scm_f_apply
4664 static in eval.c, renamed it to f_apply and registered the object
4665 as a permanent object.
4666
4667 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
4668
4669 * eval.c (SCM_BIT7, SCM_BIT8, unmemocopy, SCM_CEVAL): Renamed
4670 file-local macro SCM_BIT8 to SCM_BIT7, which is more appropriate.
4671
4672 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
4673
4674 * numbers.c (scm_logtest): Fixed argument bug in the call to
4675 mpz_and, which showed up when compiling with SCM_DEBUG defined.
4676
4677 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
4678
4679 * gc-card.c (scm_i_sweep_card, scm_i_init_card_freelist): Fixed
4680 type errors that showed up when compiling with SCM_DEBUG defined.
4681
4682 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
4683
4684 * continuations.c, continuations.h, eval.c, eval.h, extensions.c,
4685 gsubr.c, guile.c, init.c, read.c, root.c, root.h, stackchk.h,
4686 throw.c: Removed uses of DEBUG_EXTENSIONS and DYNAMIC_LINKING to
4687 fix compile errors with --disable-deprecated.
4688
4689 2003-04-17 Rob Browning <rlb@defaultvalue.org>
4690
4691 * numbers.c (scm_integer_expt): fix case where we were declaring
4692 vars in the middle of a statement block. Thanks to Thamer
4693 Al-Harbash.
4694
4695 2003-04-17 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4696
4697 * goops.c (TEST_CHANGE_CLASS): Update variable class after class
4698 change.
4699
4700 * eq.c (scm_eqv_p): Turned into a primitive generic.
4701
4702 2003-04-16 Rob Browning <rlb@defaultvalue.org>
4703
4704 * gc_os_dep.c: Added patch for UnixWare and OpenUNIX support.
4705 Thanks to Boyd Gerber.
4706 Added check for __arm__ in addition to arm for LINUX and copied
4707 __s390__ defines from upstream libgc. Thanks to James Treacy for
4708 reporting the problems.
4709
4710 * numbers.c (PTRDIFF_MIN): use SCM_CHAR_BIT.
4711
4712 * socket.c: use SCM_CHAR_BIT.
4713
4714 * random.c (scm_c_random_bignum): use SCM_CHAR_BIT.
4715
4716 * num2integral.i.c (NUM2INTEGRAL): use SCM_CHAR_BIT.
4717
4718 2003-04-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
4719
4720 * feature.c (scm_init_feature): Always add threads feature.
4721
4722 2003-04-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4723
4724 * goops.c (scm_sys_fast_slot_ref): Use SCM_SLOT instead of
4725 scm_at_assert_bound_ref. (We don't want the unbound check. See
4726 oop/goops/active-slot.scm.)
4727
4728 2003-04-14 Rob Browning <rlb@defaultvalue.org>
4729
4730 * tags.h: scm_t_intptr should have been intptr_t.
4731
4732 2003-04-13 Rob Browning <rlb@defaultvalue.org>
4733
4734 * __scm.h (SCM_FLUSH_REGISTER_WINDOWS): don't just rely on "sparc"
4735 test. Instead use
4736 #if defined (sparc) || defined (__sparc__) || defined (__sparc)
4737 as gc_os_dep.c suggests is appropriate.
4738
4739 * goops.c (prep_hashsets): make static to match prototype.
4740 (scm_sym_args): SCM_SYMBOL -> SCM_GLOBAL_SYMBOL. Thanks to Albert
4741 Chin.
4742
4743 * c-tokenize.lex: remove trailing comma from enum. Thanks to
4744 Albert Chin.
4745
4746 * gc_os_dep.c: add NetBSD powerpc config info. Thanks to Thomas
4747 Klausner.
4748
4749 2003-04-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4750
4751 * goops.c (scm_sys_prep_layout_x): Instance allocation is now
4752 indicated through extra fields in getters-n-setters.
4753 (scm_add_slot): Adapted to new format of getters_n_setters slot.
4754 (Thanks to Andy Wingo.)
4755
4756 2003-02-25 Han-Wen Nienhuys <hanwen@cs.uu.nl>
4757
4758 * gc-segment.c: add comment
4759
4760 2003-04-07 Rob Browning <rlb@defaultvalue.org>
4761
4762 * debug.h: change "id" arg name to "info_id" to avoid objective-c
4763 clash.
4764
4765 * num2integral.i.c (NUM2INTEGRAL): fix bug pointed out by Mikael
4766 and add regression test to standalone/.
4767
4768 2003-04-06 Rob Browning <rlb@defaultvalue.org>
4769
4770 * strings.c (scm_mem2string): use memcpy rather than by-hand loop.
4771 Thanks to Dale P. Smith.
4772
4773 * random.c: #include gmp.h.
4774 (scm_c_random_bignum): normalize result on return.
4775
4776 * init.c: #include gmp.h.
4777
4778 * numbers.h: remove the gmp.h #include (not needed now).
4779
4780 * posix.h: change occurences of "id" to something else so we don't
4781 cause trouble when included via objective-c (can't hurt, might
4782 help). Still have usage in debug.h, though.
4783
4784 2003-04-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4785
4786 * random.c (scm_c_random_bignum): Don't generate a random number
4787 equal to m (the second argument of scm_c_random_bignum); only
4788 generate numbers in the range 0 <= r < m.
4789 (scm_c_default_rstate): Use SCM_VARIABLE_REF to access
4790 scm_var_random_state.
4791
4792 * num2integral.i.c (INTEGRAL2BIG): Put negation of n inside then
4793 clause.
4794
4795 2003-04-05 Rob Browning <rlb@defaultvalue.org>
4796
4797 * modules.c (scm_module_import_interface): move declaration of
4798 uses before any code.
4799
4800 2003-04-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4801
4802 * Makefile.am (scmconfig.h): Look for config.h in top_builddir,
4803 not top_srcdir.
4804
4805 * hashtab.c (rehash_after_gc): Clear to_rehash list before
4806 processing it in order to avoid an infinite loop.
4807
4808 * print.c (scm_prin1): Remember old state of pstate->writingp.
4809
4810 2003-04-05 Marius Vollmer <mvo@zagadka.de>
4811
4812 * Changed license terms to the plain LGPL thru-out.
4813
4814 2003-04-04 Rob Browning <rlb@defaultvalue.org>
4815
4816 * socket.c (FLIPCPY_NET_HOST_128): new macro.
4817 (ipv6_net_to_num, ipv6_num_to_net, bignum_in_ipv6_range_p):
4818 rewrite to handle GMP bignums.
4819
4820
4821 * random.c (scm_c_random_bignum): rewrite to handle GMP bignums.
4822
4823 * ports.c (scm_getc): minor tweak.
4824
4825 * numbers.h: remove SCM_BIGDIG conditionals, reorganize, and
4826 rewrite to handle GMP bignums.
4827
4828 * numbers.c: rewrite *many* functions to handle GMP bignums.
4829
4830 * num2integral.i.c (NUM2INTEGRAL, INTEGRAL2NUM, INTEGRAL2BIG):
4831 handle GMP bignums.
4832
4833 * num2float.i.c (NUM2FLOAT): handle GMP bignums.
4834
4835 * init.c (check_config): remove SCM_BIGDIG conditionals.
4836 (scm_init_guile_1): test to make sure mpz_t fits in a double_cell.
4837
4838 * gc-card.c ("sweep_card"): handle new mpz_t bignums.
4839
4840 * eval.c: remove SCM_BIGDIG conditionals.
4841
4842 * eq.c (s_scm_eqv_p): scm_i_bigcomp -> scm_i_bigcmp.
4843
4844 2003-03-31 Rob Browning <rlb@defaultvalue.org>
4845
4846 * Makefile.am (scmconfig.h): change srcdir to builddir. (Thanks
4847 to Kevin Ryde.)
4848
4849 2003-03-27 Rob Browning <rlb@defaultvalue.org>
4850
4851 * threads.h: fix various preprocessor usages of new public
4852 symbols to expect 0 or 1 values rather than 1 or undefined.
4853 i.e. change #ifdef to #if, etc.
4854
4855 * threads.c: fix various preprocessor usages of new public
4856 symbols to expect 0 or 1 values rather than 1 or undefined.
4857 i.e. change #ifdef to #if, etc.
4858
4859 * tags.h: fix various preprocessor usages of new public
4860 symbols to expect 0 or 1 values rather than 1 or undefined.
4861 i.e. change #ifdef to #if, etc.
4862
4863 * stacks.c: fix various preprocessor usages of new public
4864 symbols to expect 0 or 1 values rather than 1 or undefined.
4865 i.e. change #ifdef to #if, etc.
4866
4867 * stackchk.h: fix various preprocessor usages of new public
4868 symbols to expect 0 or 1 values rather than 1 or undefined.
4869 i.e. change #ifdef to #if, etc.
4870
4871 * stackchk.c: fix various preprocessor usages of new public
4872 symbols to expect 0 or 1 values rather than 1 or undefined.
4873 i.e. change #ifdef to #if, etc.
4874
4875 * sort.c: fix various preprocessor usages of new public
4876 symbols to expect 0 or 1 values rather than 1 or undefined.
4877 i.e. change #ifdef to #if, etc.
4878
4879 * read.c: fix various preprocessor usages of new public
4880 symbols to expect 0 or 1 values rather than 1 or undefined.
4881 i.e. change #ifdef to #if, etc.
4882
4883 * random.c: fix various preprocessor usages of new public
4884 symbols to expect 0 or 1 values rather than 1 or undefined.
4885 i.e. change #ifdef to #if, etc.
4886
4887 * print.c: fix various preprocessor usages of new public
4888 symbols to expect 0 or 1 values rather than 1 or undefined.
4889 i.e. change #ifdef to #if, etc.
4890
4891 * objects.c: fix various preprocessor usages of new public
4892 symbols to expect 0 or 1 values rather than 1 or undefined.
4893 i.e. change #ifdef to #if, etc.
4894
4895 * numbers.h: fix various preprocessor usages of new public
4896 symbols to expect 0 or 1 values rather than 1 or undefined.
4897 i.e. change #ifdef to #if, etc.
4898
4899 * null-threads.c: fix various preprocessor usages of new public
4900 symbols to expect 0 or 1 values rather than 1 or undefined.
4901 i.e. change #ifdef to #if, etc.
4902
4903 * lang.c: fix various preprocessor usages of new public
4904 symbols to expect 0 or 1 values rather than 1 or undefined.
4905 i.e. change #ifdef to #if, etc.
4906
4907 * lang.h: fix various preprocessor usages of new public
4908 symbols to expect 0 or 1 values rather than 1 or undefined.
4909 i.e. change #ifdef to #if, etc.
4910
4911 * iselect.h: fix various preprocessor usages of new public
4912 symbols to expect 0 or 1 values rather than 1 or undefined.
4913 i.e. change #ifdef to #if, etc.
4914
4915 * init.c: fix various preprocessor usages of new public
4916 symbols to expect 0 or 1 values rather than 1 or undefined.
4917 i.e. change #ifdef to #if, etc.
4918
4919 * gh_data.c: fix various preprocessor usages of new public
4920 symbols to expect 0 or 1 values rather than 1 or undefined.
4921 i.e. change #ifdef to #if, etc.
4922
4923 * gh.h: fix various preprocessor usages of new public
4924 symbols to expect 0 or 1 values rather than 1 or undefined.
4925 i.e. change #ifdef to #if, etc.
4926
4927 * gen-scmconfig.c: change most new public symbols to be defined to
4928 0 or 1 rather than being either 1 or undefined.
4929
4930 * gc_os_dep.c: fix various preprocessor usages of new public
4931 symbols to expect 0 or 1 values rather than 1 or undefined.
4932 i.e. change #ifdef to #if, etc.
4933 (STACK_GROWS_DOWN): define to 0 or 1 rather than 1 or undef.
4934
4935 * gc.h: fix various preprocessor usages of new public
4936 symbols to expect 0 or 1 values rather than 1 or undefined.
4937 i.e. change #ifdef to #if, etc.
4938
4939 * gc-card.c: fix various preprocessor usages of new public
4940 symbols to expect 0 or 1 values rather than 1 or undefined.
4941 i.e. change #ifdef to #if, etc.
4942
4943 * gc-mark.c: fix various preprocessor usages of new public
4944 symbols to expect 0 or 1 values rather than 1 or undefined.
4945 i.e. change #ifdef to #if, etc.
4946
4947 * feature.c: fix various preprocessor usages of new public
4948 symbols to expect 0 or 1 values rather than 1 or undefined.
4949 i.e. change #ifdef to #if, etc.
4950
4951 * evalext.c: fix various preprocessor usages of new public
4952 symbols to expect 0 or 1 values rather than 1 or undefined.
4953 i.e. change #ifdef to #if, etc.
4954
4955 * eval.h: fix various preprocessor usages of new public
4956 symbols to expect 0 or 1 values rather than 1 or undefined.
4957 i.e. change #ifdef to #if, etc.
4958
4959 * eval.c: fix various preprocessor usages of new public
4960 symbols to expect 0 or 1 values rather than 1 or undefined.
4961 i.e. change #ifdef to #if, etc.
4962
4963 * eq.c: fix various preprocessor usages of new public
4964 symbols to expect 0 or 1 values rather than 1 or undefined.
4965 i.e. change #ifdef to #if, etc.
4966
4967 * coop.c: fix various preprocessor usages of new public
4968 symbols to expect 0 or 1 values rather than 1 or undefined.
4969 i.e. change #ifdef to #if, etc.
4970
4971 * coop-threads.c: fix various preprocessor usages of new public
4972 symbols to expect 0 or 1 values rather than 1 or undefined.
4973 i.e. change #ifdef to #if, etc.
4974
4975 * coop-pthreads.c: fix various preprocessor usages of new public
4976 symbols to expect 0 or 1 values rather than 1 or undefined.
4977 i.e. change #ifdef to #if, etc.
4978
4979 * coop-defs.h: fix various preprocessor usages of new public
4980 symbols to expect 0 or 1 values rather than 1 or undefined.
4981 i.e. change #ifdef to #if, etc.
4982
4983 * convert.i.c: fix various preprocessor usages of new public
4984 symbols to expect 0 or 1 values rather than 1 or undefined.
4985 i.e. change #ifdef to #if, etc.
4986
4987 * continuations.c: fix various preprocessor usages of new public
4988 symbols to expect 0 or 1 values rather than 1 or undefined.
4989 i.e. change #ifdef to #if, etc.
4990
4991 * _scm.h: fix various preprocessor usages of new public symbols to
4992 expect 0 or 1 values rather than 1 or undefined. i.e. change
4993 #ifdef to #if, etc.
4994
4995 2003-03-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4996
4997 * init.c (scm_init_guile_1): Call scm_i_init_deprecated.
4998
4999 * deprecated.c, deprecated.h: New files, to collect deprecated
5000 things in one place.
5001 * Makefile.am: Added them in all the right places.
5002
5003 * Makefile.am (EXTRA_DIST): Added "scmconfig.h.top".
5004 (scmconfig.h): Get "scmconfig.h.top" from $(srcdir) so that VPATH
5005 builds work.
5006 (DOT_X_FILES): Removed "iselect.x".
5007 (DOT_DOC_FILES): Removed "iselect.doc".
5008
5009 2003-03-25 Rob Browning <rlb@defaultvalue.org>
5010
5011 * win32-socket.h: #include "libguile/__scm.h". Replace usage of
5012 HAVE_WINSOCK2_H with SCM_HAVE_WINSOCK2_H.
5013
5014 * win32-socket.c: #include <config.h> if HAVE_CONFIG_H.
5015
5016 * vports.c: #include <config.h> if HAVE_CONFIG_H.
5017
5018 * unif.c: #include <config.h> if HAVE_CONFIG_H. Replace usage of
5019 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
5020
5021 * threads.h: replace usage of struct timespect with
5022 scm_t_timespec. Replace usage of USE_PTHREAD_THREADS with
5023 SCM_USE_PTHREAD_THREADS. Remove typedef for struct timespec in
5024 favor of scm_t_timespec from scmconfig.h.
5025
5026 * threads.c: move libguile/_scm.h include to the top so we pick up
5027 any critical defines like _GNU_SOURCE early. Replace usage of
5028 struct timespect with scm_t_timespec. Replace usage of
5029 STACK_GROWS_UP with SCM_STACK_GROWS_UP. Replace usage of
5030 USE_PTHREAD_THREADS with SCM_USE_PTHREAD_THREADS.
5031
5032 * threads-plugin.h: replace usage of struct timespect with
5033 scm_t_timespec.
5034
5035 * threads-plugin.c: #include <config.h> if HAVE_CONFIG_H. Replace
5036 usage of struct timespect with scm_t_timespec.
5037
5038 * tags.h: move HAVE_STDINT_H handling to scmconfig.h. Move
5039 HAVE_INTTYPES_H handling to scmconfig.h. #include
5040 "libguile/__scm.h". Rework handling for scm_t_bits,
5041 scm_t_signed_bits, SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
5042 SCM_T_SIGNED_BITS_MIN, and SIZEOF_SCM_T_BITS to use scm_t_intptr,
5043 scm_t_uintptr, SCM_SIZEOF_INTPTR_T, and SCM_SIZEOF_UINTPTR_T, and
5044 SCM_SIZEOF_UNSIGNED_LONG. Rename usage of HAVE_ARRAYS to
5045 SCM_HAVE_ARRAYS.
5046
5047 * symbols.c: #include <config.h> if HAVE_CONFIG_H.
5048
5049 * struct.c: #include <config.h> if HAVE_CONFIG_H.
5050
5051 * strports.c: #include <config.h> if HAVE_CONFIG_H.
5052
5053 * strop.c: #include <config.h> if HAVE_CONFIG_H.
5054
5055 * stime.h: move handling of time related headers to scmconfig.h.
5056
5057 * stime.c: #include <config.h> if HAVE_CONFIG_H.
5058
5059 * stacks.c: replace usage of STACK_GROWS_UP with
5060 SCM_STACK_GROWS_UP.
5061
5062 * sort.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
5063 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5064
5065 * socket.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
5066 of uint32 and HAVE_UINT_32 with scm_t_int32.
5067
5068 * smob.c: #include <config.h> if HAVE_CONFIG_H.
5069
5070 * simpos.c: #include <config.h> if HAVE_CONFIG_H.
5071
5072 * script.c: #include <config.h> if HAVE_CONFIG_H.
5073
5074 * scmsigs.c: #include <config.h> if HAVE_CONFIG_H.
5075
5076 * scmconfig.h.top: new file -- preamble for scmconfig.h.
5077
5078 * rw.c: #include <config.h> if HAVE_CONFIG_H.
5079
5080 * regex-posix.c: #include <config.h> if HAVE_CONFIG_H.
5081
5082 * read.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5083
5084 * rdelim.c: #include <config.h> if HAVE_CONFIG_H.
5085
5086 * random.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
5087 of LONG32, LONG64, SIZEOF_LONG, and HAVE_LONG_LONGS with
5088 scm_t_int32, scm_t_int64, and SCM_HAVE_T_INT64. Rename usage of
5089 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5090
5091 * ramap.c: replace usage of HAVE_LONG_LONGS with
5092 "SCM_SIZEOF_LONG_LONG != 0".
5093
5094 * putenv.c: #include <config.h> if HAVE_CONFIG_H. #include
5095 "libguile/scmconfig.h".
5096
5097 * pthread-threads.c: #include <config.h> if HAVE_CONFIG_H.
5098
5099 * print.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5100 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
5101
5102 * posix.c: #include <config.h> if HAVE_CONFIG_H.
5103
5104 * ports.c: #include <config.h> if HAVE_CONFIG_H.
5105
5106 * objects.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5107
5108 * numbers.h: replace usage of HAVE_FLOATINGPOINT_H with
5109 SCM_HAVE_FLOATINGPOINT_H. Replace usage of HAVE_IEEEFP_H with
5110 SCM_HAVE_IEEEFP_H. Replace usage of HAVE_NAN_H with
5111 SCM_HAVE_NAN_H. Replace usage of STDC_HEADERS with
5112 SCM_HAVE_STDC_HEADERS. Replace usage of ptrdiff_t with
5113 scm_t_ptrdiff. Replace usage of HAVE_LONG_LONGS with
5114 "SCM_SIZEOF_LONG_LONG != 0".
5115
5116 * numbers.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
5117 of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0". Replace
5118 usage of ptrdiff_t with scm_t_ptrdiff. Replace usage of
5119 SIZEOF_PTRDIFF_T with SCM_SIZEOF_SCM_T_PTRDIFF.
5120
5121 * num2integral.i.c: #include <config.h> if HAVE_CONFIG_H.
5122
5123 * null-threads.h: replace usage of struct timespect with
5124 scm_t_timespec.
5125
5126 * net_db.c: #include <config.h> if HAVE_CONFIG_H.
5127
5128 * mkstemp.c: #include <config.h> if HAVE_CONFIG_H. #include
5129 "libguile/__scm.h". Remove definition of gcc_uint64_t in favor of
5130 scm_t_uint64 and rename usages.
5131
5132 * mallocs.c: #include <config.h> if HAVE_CONFIG_H.
5133
5134 * load.c: #include <config.h> if HAVE_CONFIG_H.
5135
5136 * iselect.h: move handling of time related headers to scmconfig.h.
5137 Rename usage of HAVE_SYS_SELECT_H to SCM_HAVE_SYS_SELECT_H.
5138 Rename usage of HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Rename
5139 usage of USE_COOP_THREADS to SCM_USE_COOP_THREADS.
5140
5141 * iselect.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
5142 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
5143 USE_NULL_THREADS to SCM_USE_NULL_THREADS.
5144
5145 * ioext.c: #include <config.h> if HAVE_CONFIG_H.
5146
5147 * inline.h: #include "libguile/__scm.h" at the top. Change code
5148 to use SCM_C_INLINE and SCM_INLINE_C_INCLUDINT_INLINE_H to decide
5149 what to do instead of creating a new public #define. Rename usage
5150 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
5151 USE_NULL_THREADS to SCM_USE_NULL_THREADS. Rename usage of
5152 USE_COPT_THREADS to SCM_USE_COPT_THREADS.
5153
5154 * inline.c: rearrange handling -- now we just #define
5155 SCM_INLINE_C_INCLUDING_INLINE_H to 1 and #include
5156 "libguile/inline.h". scmconfig.h will define SCM_C_INLINE as
5157 appropriate, and we use that in inline.h along with the above
5158 define to determine how to respond.
5159
5160 * init.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
5161 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5162
5163 * guile.c: #include <config.h> if HAVE_CONFIG_H.
5164
5165 * gh_data.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
5166 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5167
5168 * gh.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5169
5170 * gen-scmconfig.h.in: new file -- see gen-scmconfig.c for details.
5171
5172 * gen-scmconfig.c: new file -- see comments in file for details.
5173
5174 * gdbinit.c: #include <config.h> if HAVE_CONFIG_H.
5175
5176 * gc_os_dep.c: #include <config.h> if HAVE_CONFIG_H. Replace
5177 usage of STACK_GROWS_UP with SCM_STACK_GROWS_UP.
5178
5179 * gc.h: replace usage of SIZEOF_LONG with
5180 SCM_SIZEOF_UNSIGNED_LONG. Replace usage of USE_PTHREAD_THREADS
5181 with SCM_USE_PTHREAD_THREADS. Remove SCM_SIZEOF_LONG definition
5182 since we handle that in scmconfig.h now.
5183
5184 * gc.c: #include <config.h> if HAVE_CONFIG_H.
5185
5186 * gc-mark.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
5187 of HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of
5188 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
5189
5190 * gc-malloc.c: #include <config.h> if HAVE_CONFIG_H.
5191
5192 * gc-card.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5193 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
5194
5195 * fports.c: #include <config.h> if HAVE_CONFIG_H.
5196
5197 * filesys.c: #include <config.h> if HAVE_CONFIG_H.
5198
5199 * feature.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
5200 of USE_NULL_THREADS to SCM_USE_NULL_THREADS.
5201
5202 * extensions.c: #include <config.h> if HAVE_CONFIG_H.
5203
5204 * evalext.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5205 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
5206
5207 * eval.c: #include <config.h> if HAVE_CONFIG_H. #include
5208 "libguile/__scm.h" rather than scmconfig.h. Rename usage of
5209 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
5210 with "SCM_SIZEOF_LONG_LONG != 0".
5211
5212 * error.c: #include <config.h> if HAVE_CONFIG_H.
5213
5214 * eq.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
5215 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
5216 with "SCM_SIZEOF_LONG_LONG != 0".
5217
5218 * deprecation.c: #include <config.h> if HAVE_CONFIG_H.
5219
5220 * coop.c: replace usage of struct timespect with scm_t_timespec.
5221 #include <config.h> if HAVE_CONFIG_H.
5222
5223 * coop-threads.c: #include "libguile/_scm.h" early. Replace
5224 usage of struct timespect with scm_t_timespec. Replace usage of
5225 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
5226
5227 * coop-pthreads.c: #include "libguile/_scm.h" early. Replace
5228 usage of struct timespect with scm_t_timespec. Replace usage of
5229 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
5230
5231 * coop-defs.h: move handling of time related headers to
5232 scmconfig.h. Add #include "libguile/__scm.h". Rename usage of
5233 HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Replace usage of struct
5234 timespect with scm_t_timespec.
5235
5236 * convert.i.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5237
5238 * convert.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5239
5240 * convert.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
5241 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5242
5243 * continuations.c: move libguile/_scm.h include to the top so we
5244 pick up any critical defines like _GNU_SOURCE early.
5245
5246 * backtrace.c: #include <config.h> if HAVE_CONFIG_H.
5247
5248 * async.c: #include <config.h> if HAVE_CONFIG_H.
5249
5250 * alloca.c: #include <config.h> if HAVE_CONFIG_H.
5251
5252 * _scm.h: #include <config.h> if HAVE_CONFIG_H.
5253 Rename usage of USE_PTHREAD_THREADS to SCM_USE_PTHREAD_THREADS.
5254
5255 * __scm.h: move libguile/scmconfig.h include up to the top, so
5256 we're sure to pick up any critical defines like _GNU_SOURCE early.
5257 #include <limits.h> removed in favor of scmconfig.h inclusion when
5258 appropriate. STDC_HEADERS based inclusion of stdlib.h,
5259 sys/types.h, stddef.h, and sys/stdtypes.h removed in favor of
5260 scmconfig.h inclusion when appropriate. Various Win32 related
5261 definitions removed in favor of scmconfig.h inclusion when
5262 appropriate.
5263 (HAVE_UINTPTR_T): definition removed (see NEWS).
5264 (SIZEOF_PTRDIFF_T): definition removed (see NEWS).
5265 (HAVE_LONG_LONGS): definition removed (see NEWS).
5266 (HAVE_LONG_LONG): definition removed (see NEWS).
5267 (HAVE_PTRDIFF_T): definition removed (see NEWS).
5268
5269 * Makefile.am: scmconfig.h is now generated by building and
5270 running gen-scmconfig.h and capturing its output. gen-scmconfig
5271 uses config.h and the configure.in generated gen-scmconfig.h to
5272 decide what to output. See gen-scmconfig.c for details.
5273 (noinst_PROGRAMS): add gen-scmconfig.
5274 (gen_scmconfig_SOURCES): new variable.
5275 (gen-scmconfig.$(OBJEXT)): new target - be careful to handle
5276 cross-compiling right.
5277 (scmconfig.h): build scmconfig.h from gen-scmconfig's output.
5278 (BUILT_SOURCES): add scmconfig.h.
5279
5280 2003-03-19 Marius Vollmer <mvo@zagadka.de>
5281
5282 * gc_os_dep.c: Added defines for sparc-unknown-netbsdelf1.5 from
5283 Adrian Bunk. Thanks!
5284
5285 2003-03-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5286
5287 * goops.c (make_class_from_template): New fourth arg:
5288 applicablep.
5289 (scm_class_extended_generic_with_setter, scm_class_self): Fixed
5290 cpls.
5291
5292 * smob.c (scm_set_smob_apply): Call scm_i_inherit_applicable.
5293
5294 * goops.c, objects.c, objects.h (scm_make_extended_class): New
5295 second arg: applicablep.
5296 (scm_i_inherit_applicable): New function.
5297
5298 * goops.c, goops.h (scm_class_applicable,
5299 scm_class_extended_accessor): New classes.
5300
5301 2003-03-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5302
5303 * procs.c (scm_procedure_documentation): Removed redundant
5304 SCM_NIMP test and replaced other calls to SCM_IMP by more explicit
5305 predicates.
5306
5307 2003-03-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5308
5309 * list.c, list.h (scm_filter, scm_filter_x): New functions.
5310
5311 * modules.c (scm_module_import_interface): New function.
5312
5313 * goops.c, goops.h (scm_class_accessor_method): Renamed from
5314 scm_class_accessor.
5315 (scm_class_accessor): New class.
5316
5317 2003-03-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5318
5319 * goops.c (scm_primitive_generic_generic): Enable primitive
5320 generic if not enabled.
5321 (scm_sys_goops_loaded): Setup unextended primitive generics.
5322
5323 * goops.c, goops.h (scm_c_extend_primitive_generic): New function.
5324
5325 * snarf.h (SCM_PRIMITIVE_GENERIC, SCM_PRIMITIVE_GENERIC_1): New
5326 snarf macros.
5327
5328 * numbers.c (scm_abs): Use SCM_PRIMITIVE_GENERIC. (This is only a
5329 testing example. All uses of SCM_GPROC should be converted.)
5330
5331 * procprop.c (scm_stand_in_scm_proc): Use scm_assq instead of
5332 scm_assoc.
5333
5334 * eq.c (scm_equal_p): Turned into a primitive generic.
5335
5336 2003-02-27 Rob Browning <rlb@defaultvalue.org>
5337
5338 * Makefile.am (scmconfig.h): new target -- generate file from
5339 ../config.h.
5340 (modinclude_HEADERS): remove version.h.
5341 (nodist_modinclude_HEADERS): add version.h.
5342
5343 2003-02-24 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5344
5345 This fixes a serious GC bug, introduced during the latest
5346 reorganization of the GC, which disabled freeing of structs and
5347 GOOPS objects:
5348
5349 * struct.c (scm_struct_prehistory): Init scm_i_structs_to_free to
5350 SCM_EOL.
5351 (scm_struct_prehistory): Move scm_free_structs to
5352 scm_before_mark_c_hook.
5353
5354 * gc-card.c (sweep_card): Check that we haven't swept structs on
5355 this card before. That can happen if scm_i_sweep_all_segments has
5356 been called from some other place than scm_igc.
5357
5358 2003-02-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5359
5360 * environments.c (DEFAULT_OBARRAY_SIZE): Changed from 137 to 31
5361 (since hash tables now adapt their size).
5362
5363 * modules.c (scm_modules_prehistory): Changed from 2001 to 1533
5364 (current number of prehistory bindings; hashtable code will select
5365 a prime which is greater than this value).
5366
5367 * symbols.c (scm_symbols_prehistory): Changed from 1009 to 2139
5368 (current number of initial symbols).
5369
5370 * properties.c (scm_init_properties): Don't specify size of
5371 scm_properties_whash.
5372
5373 * objprop.c (scm_init_objprop): Don't specify size of
5374 scm_object_whash.
5375
5376 * keywords.c (scm_init_keywords): Don't specify a hash table size.
5377
5378 * hooks.c (scm_c_hook_add): Fixed bug in append mode.
5379
5380 The following changes introduce the use of resizable hash tables
5381 throughout Guile. It also renames the old *-hash-table* functions
5382 to *-alist-vector* and places them, together with the rest of the
5383 weak vector support, in the module (ice-9 weak-vector). We should
5384 probably introduce a new, better, API for weak references, for
5385 example "weak pairs" a la MIT-Scheme. (In Chez scheme, they even
5386 look like and are used like ordinary pairs.)
5387
5388 * environments.c (obarray_enter, obarray_retrieve, obarray_remove,
5389 leaf_environment_fold, obarray_remove_all): Use hashtable
5390 accessors.
5391
5392 * gc.c (scm_init_storage): Moved hook initialization to
5393 scm_storage_prehistory.
5394 (scm_storage_prehistory): New function.
5395 (scm_igc): Added commentary about placement of
5396 scm_after_sweep_c_hook.
5397
5398 * gc-mark.c (scm_mark_all): Use hashtable accessors.
5399 (scm_gc_mark_dependencies): Use SCM_WVECT_WEAK_KEY_P and
5400 SCM_WVECT_WEAK_VALUE_P.
5401
5402 * hashtab.c, hashtab.h (scm_hash_for_each, scm_hash_map): New
5403 functions.
5404 (scm_vector_to_hash_table, scm_c_make_resizing_hash_table):
5405 Removed.
5406 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table,
5407 scm_make_doubly_weak_hash_table): Moved here from weaks.c.
5408
5409 * init.c (scm_init_guile_1): Removed call to scm_init_weaks; Added
5410 calls to scm_storage_prehistory and scm_hashtab_prehistory.
5411
5412 * modules.c (module-reverse-lookup): Use hashtable accessors.
5413
5414 * symbols.c, symbols.h (scm_i_hash_symbol): New function.
5415
5416 * weaks.c, weaks.h (scm_make_weak_key_alist_vector,
5417 scm_make_weak_value_alist_vector,
5418 scm_make_doubly_weak_alist_vector): New functions.
5419
5420 * weaks.c (scm_init_weaks_builtins): New function.
5421
5422 * weaks.h (SCM_WVECTF_WEAK_KEY, SCM_WVECTF_WEAK_VALUE,
5423 SCM_WVECTF_NOSCAN, SCM_WVECT_WEAK_KEY_P, SCM_WVECT_WEAK_VALUE_P,
5424 SCM_WVECT_NOSCAN_P): New macros.
5425
5426 * weaks.c (scm_scan_weak_vectors): Use SCM_WVECT_WEAK_KEY_P
5427 and SCM_WVECT_WEAK_VALUE_P.
5428
5429 * weaks.c, weaks.h (scm_i_allocate_weak_vector): Renamed from
5430 allocate_weak_vector and exported.
5431
5432 2003-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5433
5434 * hashtab.c: Undid thread safety. (We decided that it's better to
5435 let the user explicitly protect the tables (or not) according what
5436 is suitable for the application.)
5437
5438 2003-02-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5439
5440 * hashtab.c (scm_hash_fn_remove_x, scm_internal_hash_fold): Made
5441 thread safe and handle resizing tables.
5442 (scm_ihashx, scm_sloppy_assx, scm_delx_x): Removed
5443 SCM_DEFER/ALLOW_INTS.
5444
5445 2003-02-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5446
5447 * hashtab.c (scm_vector_to_hash_table,
5448 scm_c_make_resizing_hash_table, scm_make_hash_table): New
5449 functions.
5450 (scm_hash_fn_get_handle, scm_hash_fn_create_handle_x): Made thread
5451 safe and handle resizing tables.
5452
5453 * weaks.c (scm_make_weak_key_hash_table,
5454 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
5455 Size argument made optional. Return resizable table if not
5456 specified.
5457
5458 2003-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5459
5460 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
5461 Fixed formals tests for closures. (Thanks to Kevin Ryde.)
5462
5463 2003-02-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5464
5465 * debug.c (scm_procedure_source): Handle all objects for which
5466 procedure? is #t. (Thanks to Bill Schottstaedt.)
5467
5468 2003-01-23 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5469
5470 * futures.c (mark_futures): Don't need to mark data of recycled
5471 futures.
5472 (scan_futures, cleanup_undead): Be smarter about marking
5473 futures---avoid unnecessary passes through future lists.
5474
5475 * futures.h, futures.c: New files; Introduced recycling of
5476 futures. For fine-grained threading this lifts performance to
5477 another level. We can now use parallelization in inner loops of
5478 Guile programs without impossible overhead.
5479
5480 * threads.h, threads.c: Moved futures to their own file.
5481
5482 * Makefile.am (libguile_la_SOURCES): Added futures.c.
5483 (DOT_X_FILES): Added futures.x.
5484 (DOT_DOC_FILES): Added futures.doc.
5485 (modinclude_HEADERS): Added futures.h.
5486
5487 * threads.c, threads.h (scm_i_create_thread): Renamed from
5488 create_thread and made global.
5489
5490 * futures.c (scm_make_future): New procedure.
5491
5492 * eval.c: #include "libguile/futures.h".
5493
5494 * init.c: #include "futures.h"
5495 (scm_init_guile_1): Call scm_init_futures.
5496
5497 * stime.c (SCM_TIME_UNITS_PER_SECOND): Renamed from CLKTCK.
5498
5499 * stime.h (SCM_TIME_UNITS_PER_SECOND): Definition moved here.
5500
5501 * eval.c, eval.h (scm_trampoline_0, scm_i_call_closure_0): New
5502 functions.
5503
5504 * eval.c (scm_trampoline_1): Fixed arguments test for closures.
5505
5506 2003-01-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5507
5508 * threads.c (create_thread): Don't unwind dynwind chain of parent
5509 thread before creation. Just start the new thread with an empty
5510 dynwind chain.
5511
5512 2003-01-20 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5513
5514 * evalext.c, evalext.h (scm_self_evaluating_p): New function.
5515
5516 2003-01-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5517
5518 * threads.c (scm_timed_wait_condition_variable): Support timed
5519 waiting also for simple condition variables.
5520
5521 * goops.c (TEST_CHANGE_CLASS): Use scm_change_object_class instead
5522 of calling the procedure change-object-class.
5523
5524 2003-01-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5525
5526 * ramap.c (scm_ramapc): Typo in error message.
5527
5528 2003-01-08 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5529
5530 * goops.c (scm_sys_prep_layout_x): Bugfix: Only create layout for
5531 slots with instance allocation.
5532
5533 * goops.c, goops.h (scm_class_extended_generic_with_setter): New
5534 class.
5535 (scm_compute_applicable_methods): Use scm_generic_function_methods.
5536
5537 * goops.c (scm_generic_function_methods): Support extended
5538 generic functions.
5539
5540 2002-12-29 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5541
5542 * eval.c (unmemocopy): Bugfix: scm_sym_delay --> scm_sym_future.
5543 Thanks to Neil for pointing this out!
5544
5545 2002-12-29 Neil Jerram <neil@ossau.uklinux.net>
5546
5547 * lang.h: Remove declarations matching definitions removed from
5548 lang.c (just below).
5549
5550 2002-12-28 Neil Jerram <neil@ossau.uklinux.net>
5551
5552 * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null,
5553 scm_m_while, scm_nil_eq): Remove definitions that were superfluous
5554 and already commented out.
5555
5556 * read.h (scm_lreadparen), read.c (scm_lreadr, scm_read_token,
5557 scm_lreadparen): Support reading vectors with Elisp syntax if
5558 SCM_ELISP_READ_EXTENSIONS is defined. (SCM_ELISP_READ_EXTENSIONS
5559 is not currently defined, and there isn't even a configure switch
5560 to enable it yet.)
5561
5562 2002-12-26 Marius Vollmer <mvo@zagadka.ping.de>
5563
5564 * Makefile.am (c-tokenize.o): Refer to source via $< so that vpath
5565 builds work.
5566 (EXTRA_DIST): Added version.h.in.
5567
5568 2002-12-21 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5569
5570 This change makes it possible for one thread to do lazy sweeping
5571 while other threads are running. Now only the mark phase need to
5572 have all threads asleep. We should look further into this issue.
5573 Presently, I've put the locking of scm_i_sweep_mutex at
5574 "conservative" places due to my current lack of knowledge about
5575 the garbage collector. Please feel free to restrict these regions
5576 further to allow for maximal parallelism!
5577
5578 * gc.c, gc.h (scm_i_sweep_mutex): New mutex.
5579
5580 * gc.c (scm_gc_for_newcell), gc-malloc.c (scm_realloc,
5581 scm_gc_register_collectable_memory): Substitute locking of
5582 scm_i_sweep_mutex for calls to scm_i_thread_put_to_sleep.
5583 (scm_igc): Lock sweep mutex here instead of in callers; Calls to
5584 scm_i_thread_put_to_sleep/scm_i_thread_wake_up used to demarkate
5585 the single-thread section (which now only contains the mark
5586 phase).
5587 (scm_gc): Don't lock sweeo mutex here since scm_igc locks it;
5588 Removed SCM_DEFER/ALLOW_INTS. Simply call scm_igc directly.
5589
5590 * threads.c (gc_section_mutex): Removed.
5591
5592 2002-12-19 Mikael Djurfeldt <mdj@kvast.blakulla.net>
5593
5594 * threads.c (create_thread): Clear parent field in root state in
5595 order not to unnecessarily remember dead threads.
5596
5597 * eval.c (call_subr2o_1, call_lsubr2_2): New functions.
5598 (scm_trampoline_1, scm_trampoline_2): Use them.
5599
5600 2002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
5601
5602 Partial introduction of real plugin interface.
5603
5604 * Makefile.am (modinclude_HEADERS): Added threads-plugin.h.
5605 (EXTRA_DIST): Added threads-plugin.c.
5606
5607 * threads-plugin.h, threads-plugin.c: New files.
5608
5609 * threads.h: #include "libguile/threads-plugin.h".
5610
5611 * threads.c: #include "libguile/threads-plugin.c".
5612
5613 * pthread-threads.c: Temporarily remove debugging functions.
5614
5615 * threads.c, threads.h (scm_yield): Added back.
5616
5617 2002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
5618
5619 * threads.c (really_launch): Detach before unlocking
5620 thread_admin_mutex in order not to risk being joined.
5621 (scm_i_thread_put_to_sleep, scm_i_thread_wake_up): Keep
5622 thread_admin_mutex locked during GC.
5623
5624 * pthread-threads.c, pthread-threads.h: Improvements to debugging
5625 functions.
5626
5627 2002-12-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
5628
5629 * pthread-threads.c, pthread-threads.h (SCM_DEBUG_THREADS): Added
5630 support for debugging mutex operations.
5631
5632 * threads.c (scm_thread): Removed filed joining_threads.
5633 (thread_print): Print thread number as well as address of thread
5634 structure.
5635 (scm_join_thread): Bugfix.
5636 (scm_lock_mutex, scm_try_mutex, scm_unlock_mutex,
5637 scm_timed_wait_condition_variable, scm_signal_condition_variable,
5638 scm_broadcast_condition_variable): Use the low-level API.
5639 (scm_all_threads): Return copy of thread list (to prevent
5640 unintended destruction).
5641 (scm_threads_prehistory): Initialize heap_mutex of fake thread.
5642
5643 * pthread-threads.c, pthread-threads.h, threads.c: Fixes to
5644 pthread "native" recursive mutex support.
5645
5646 2002-12-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5647
5648 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): New definitions.
5649 Simply lock a thread C API recursive mutex.
5650 (SCM_NONREC_CRITICAL_SECTION_START,
5651 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
5652 SCM_REC_CRITICAL_SECTION_END): Removed.
5653
5654 * eval.c: Replaced SOURCE_SECTION_START / SOURCE_SECTION_END with
5655 direct calls to scm_rec_mutex_lock / unlock around the three calls
5656 to scm_m_expand_body.
5657
5658 * eval.c, eval.h (promise_free): New function.
5659 (scm_force): Rewritten; Now thread-safe; Removed
5660 SCM_DEFER/ALLOW_INTS.
5661
5662 * pthread-threads.h: Added partially implemented plugin interface
5663 for recursive mutexes. These are, for now, only intended to be
5664 used internally within the Guile implementation.
5665
5666 * pthread-threads.c: New file.
5667
5668 * threads.c: Conditionally #include "pthread-threads.c".
5669
5670 * eval.c, eval.h (scm_makprom, scm_force): Rewritten to be
5671 thread-safe;
5672
5673 * snarf.h (SCM_MUTEX, SCM_GLOBAL_MUTEX, SCM_REC_MUTEX,
5674 SCM_GLOBAL_REC_MUTEX): New macros.
5675
5676 * eval.c, threads.c, threads.h, snarf.h: Rewrote critical section
5677 macros---use mutexes instead.
5678
5679 * tags.h (SCM_IM_FUTURE): New tag.
5680
5681 * eval.c (scm_m_future): New primitive macro.
5682 (SCM_CEVAL): Support futures.
5683 (unmemocopy): Support unmemoization of futures.
5684
5685 * print.c (scm_isymnames): Name of future isym.
5686
5687 * version.c: Unmade some changes to my private copy that got
5688 committed by mistake.
5689
5690 2002-12-11 Mikael Djurfeldt <mdj@kvast.blakulla.net>
5691
5692 * gc-malloc.c, gc.h, init.c: Reverted gc-malloc change of
5693 2002-12-10.
5694
5695 * gc.c (scm_igc): Don't call scm_i_thread_invalidate_freelists.
5696
5697 * gc.c (scm_gc_sweep): Call it here instead, which is a more
5698 logical place.
5699
5700 * threads.c (create_thread): Remember root object until the handle
5701 of the new thread is on all_threads list.
5702
5703 * root.c (scm_make_root): Moved copying of fluids until after
5704 creation of root handle so that the fluids are GC protected. Also
5705 removed the critical section.
5706
5707 2002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
5708
5709 * gc-malloc.c, gc.h (scm_gc_malloc_prehistory): New function.
5710
5711 * gc-malloc.c (malloc_mutex): New mutex.
5712 (scm_gc_malloc_prehistory): Initialize it.
5713 (scm_realloc): Serialize call to realloc
5714 (scm_calloc): Same for calloc.
5715 Thanks to Wolfgang Jaehrling!
5716 (Now we have to make sure all calls to malloc/realloc are made
5717 through scm_malloc.)
5718
5719 * init.c (scm_init_guile_1): Call scm_gc_malloc_prehistory.
5720
5721 * threads.c (really_launch): Release heap (to prevent deadlock).
5722 (create_thread): Release heap before locking thread admin mutex.
5723
5724 2002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
5725
5726 * threads.c (scm_i_thread_invalidate_freelists): New
5727 function.
5728
5729 * gc.c (scm_igc): Call scm_i_thread_invalidate_freelists.
5730
5731 * modules.c (scm_export): Inserted a return statement.
5732
5733 2002-12-10 Han-Wen Nienhuys <hanwen@cs.uu.nl>
5734
5735 * modules.c (scm_export): new function
5736
5737 * gc-card.c: add a note about malloc()/free() overhead.
5738
5739 2002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
5740
5741 * Makefile.am (c-tokenize.$(OBJEXT)): Don't look for c-tokenize.c
5742 in srcdir.
5743
5744 2002-12-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5745
5746 These changes remove scm_ints_disabled (which hasn't has any
5747 effect in Guile for quite some time).
5748
5749 * async.c, error.h (scm_ints_disabled): Removed.
5750
5751 * gc.c (scm_gc_for_newcell), init.c (scm_init_guile_1),
5752 root.c (scm_internal_cwdr), gdbint.c (SCM_BEGIN_FOREIGN_BLOCK,
5753 SCM_END_FOREIGN_BLOCK): Don't touch scm_ints_disabled.
5754 (old_ints): Removed.
5755
5756 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Define as a recursive
5757 critical section.
5758 (SCM_REDEFER_INTS, SCM_ALLOW_INTS): Define as SCM_DEFER_INTS and
5759 SCM_ALLOW_INTS.
5760
5761 2002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5762
5763 * threads.c (scm_mutex_lock, scm_cond_wait, scm_cond_timedwait):
5764 Removed accidental #if 0 around these functions.
5765
5766 These changes are the start of support for preemptive
5767 multithreading. Marius and I have agreed that I commit this code
5768 into the repository although it isn't thoroughly tested and surely
5769 introduces many bugs. The bugs should only be exposed when using
5770 threads, though. Signalling and error handling for threads is
5771 very likely broken. Work on making the implementation cleaner and
5772 more efficient is needed.
5773
5774 * __scm.h (SCM_ALLOW_INTS_ONLY): Removed.
5775 (SCM_NONREC_CRITICAL_SECTION_START,
5776 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
5777 SCM_REC_CRITICAL_SECTION_END): New macros.
5778 (SCM_CRITICAL_SECTION_START/END): Defined here.
5779
5780 * eval.c: Insert SOURCE_SECTION_START / SOURCE_SECTION_END around
5781 the three calls to scm_m_expand_body.
5782
5783 * gc.h: #include "libguile/pthread-threads.h";
5784 (SCM_FREELIST_CREATE, SCM_FREELIST_LOC): New macros.
5785
5786 * gc.c (scm_i_freelist, scm_i_freelist2): Defined to be of type
5787 scm_t_key;
5788
5789 * gc.c, gc-freelist.c, inline.h: Use SCM_FREELIST_LOC for freelist
5790 access.
5791
5792 * gc-freelist.c (scm_gc_init_freelist): Create freelist keys.
5793
5794 * gc-freelist.c, threads.c (really_launch): Use
5795 SCM_FREELIST_CREATE.
5796
5797 * gc-malloc.c (scm_realloc, scm_gc_register_collectable_memory):
5798
5799 * gc.c (scm_i_expensive_validation_check, scm_gc,
5800 scm_gc_for_newcell): Put threads to sleep before doing GC-related
5801 heap administration so that those pieces of code are executed
5802 single-threaded. We might consider rewriting these code sections
5803 in terms of a "call_gc_code_singly_threaded" construct instead of
5804 calling the pair of scm_i_thread_put_to_sleep () and
5805 scm_i_thread_wake_up (). Also, we would want to have as many of
5806 these sections eleminated.
5807
5808 * init.c (scm_init_guile_1): Call scm_threads_prehistory.
5809
5810 * inline.h: #include "libguile/threads.h"
5811
5812 * pthread-threads.h: Macros now conform more closely to the
5813 pthreads interface. Some of them now take a second argument.
5814
5815 * threads.c, threads.h: Many changes.
5816
5817 2002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5818
5819 * Makefile.am (version.h): Changed $^ --> $< in rule for
5820 version.h.
5821
5822 2002-12-08 Rob Browning <rlb@defaultvalue.org>
5823
5824 * version.h.in (SCM_MICRO_VERSION): use @--@ substitution now.
5825 (SCM_MINOR_VERSION): use @--@ substitution now.
5826 (SCM_MICRO_VERSION): use @--@ substitution now.
5827 (scm_effective_version): new function prototype.
5828
5829 * version.c (scm_effective_version): new function, also add
5830 effective-version.
5831
5832 * Makefile.am (schemelibdir): VERSION -> GUILE_EFFECTIVE_VERSION.
5833 (libpath.h): use GUILE_EFFECTIVE_VERSION to compute
5834 SCM_LIBRARY_DIR.
5835 (version.h): generate this here rather than configure.in. This
5836 approach tracks source edits better (i.e. more immediately).
5837 Might be worth considering for other .in files too.
5838
5839 2002-12-02 Marius Vollmer <mvo@zagadka.ping.de>
5840
5841 Reorganized thread package selection. A thread package now only
5842 implements a small set of pthread like functions and Guile
5843 implements the rest on top of that. Guile's implementation is
5844 what the "coop-pthreads" package has been previously. Support for
5845 "coop" threads has been removed until I get time to add it again.
5846
5847 * Makefile.am (libguile_la_SOURCES): Removed iselect.c.
5848 (noinst_HEADERS): Removed coop-threads.c, coop-threads.h, coop.c,
5849 null-threads.c, coop-pthreads.c.
5850 (modinclude_HEADERS): Removed coop-defs.h, coop-pthreads.h. Added
5851 pthread-threads.h.
5852
5853 * validate.h (SCM_VALIDATE_THREAD): Moved to threads.h.
5854
5855 * threads.h: Do not include "libguile/coop-defs.h". Include
5856 "libguile/pthread-threads.h" for USE_COPT_THREADS. Removed
5857 (previously deprecated) C level thread API prototypes. They are
5858 now in the thread package specific headers, "null-threads.h" and
5859 "pthread-threads.h".
5860 (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR):
5861 New.
5862 (scm_threads_init): Removed.
5863 (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END,
5864 SCM_THREAD_SWITCHING_CODE, scm_i_switch_counter,
5865 SCM_I_THREAD_SWITCH_COUNT): Define here.
5866 (scm_single_thread_p): Removed.
5867 (scm_call_with_new_thread): Take two args directly instead of list
5868 of two args.
5869 (scm_i_thread_data, scm_i_set_thread_data, SCM_THREAD_LOCAL_DATA,
5870 SCM_SET_THREAD_LOCAL_DATA): Define here.
5871
5872 * threads.c: Merged with "coop-pthreads.c".
5873
5874 * null-threads.h: Implement pthread-like API as a set of macros.
5875
5876 * pthread-threads.h: New, implement pthread-like API by deferring
5877 to pthread itself.
5878
5879 * init.c (scm_init_guile_1): Do not call scm_init_iselect, which
5880 has been lost in the reorganization.
5881
5882 2002-12-01 Mikael Djurfeldt <mdj@linnaeus>
5883
5884 The following change makes it possible to move procedure
5885 application dispatch outside inner loops. The motivation was
5886 clean implementation of efficient replacements of R5RS primitives
5887 in SRFI-1.
5888
5889 The semantics is clear: scm_trampoline_N returns an optimized
5890 version of scm_call_N (or NULL if the procedure isn't applicable
5891 on N args).
5892
5893 Applying the optimization to map and for-each increases efficiency
5894 noticeably. For example, (map abs ls) is 8 times faster than
5895 before.
5896
5897 * eval.h (scm_t_trampoline_1, scm_t_trampoline_2): New types.
5898
5899 * eval.c, eval.h (scm_trampoline_1, scm_trampoline_2): New functions.
5900
5901 * eval.c (call_subr2_2, call_lsubr_2, call_closure_2): New functions;
5902 (map, for-each): Handle also application on two args as a special
5903 case; Use trampolines.
5904
5905 Other changes:
5906
5907 * sort.c (scm_cmp_function): Choose subr2less for scm_tc7_subr_2o;
5908 (subr2oless): Removed.
5909 (scm_restricted_vector_sort_x): Use scm_return_first to keep the
5910 vector GC protected.
5911
5912 * eval.c (check_map_args): Use scm_out_of_range_pos instead of
5913 scm_out_of_range.
5914
5915 2002-11-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
5916
5917 * evalext.[ch] (scm_m_undefine, undefine): Deprecated.
5918
5919 2002-11-17 Mikael Djurfeldt <mdj@linnaeus>
5920
5921 * debug.c (scm_make_iloc): Added missing "return".
5922
5923 2002-11-17 Marius Vollmer <mvo@zagadka.ping.de>
5924
5925 * strports.c (scm_eval_string_in_module): Validate second arg to
5926 be a module. Thanks to Arno Peters!
5927
5928 2002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
5929
5930 * .cvsignore: remove goops.c
5931
5932 2002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
5933
5934 * modules.c (scm_env_top_level, scm_lookup_closure_module,
5935 module_variable, scm_module_lookup_closure,
5936 scm_module_transformer, scm_sym2var, scm_module_reverse_lookup,
5937 scm_system_module_env_p): Don't compare SCM values with C
5938 operators == or !=. Avoid SCM_IMP predicates. Prefer !SCM_FALSEP
5939 over SCM_NFALSEP.
5940
5941 2002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
5942
5943 * eval.h (SCM_MAKE_ILOC): New macro.
5944
5945 * debug.c (scm_make_iloc): Use SCM_MAKE_ILOC instead of computing
5946 the iloc bitpattern here.
5947
5948 2002-11-14 Mikael Djurfeldt <mdj@linnaeus>
5949
5950 * coop-pthreads.c, coop-pthreads.h: scm_internal_select should be
5951 part of the API, otherwise it's difficult to write Guile
5952 extensions using non-blocking I/O => moved #include
5953 "libguile/iselect.h" from coop-pthreads.c --> coop-pthreads.h.
5954
5955 * coop-pthreads.c (scm_unlock_mutex): Changed s_lock_mutex -->
5956 s_unlock_mutex.
5957
5958 2002-11-10 Marius Vollmer <mvo@zagadka.ping.de>
5959
5960 * __scm.h (USE_THREADS, GUILE_ISELECT): Do not define here. They
5961 are defined in configure.in.
5962
5963 * threads.c: Removed SCM_API from function definitions. SCM_API
5964 is only for declarations.
5965
5966 2002-11-07 Mikael Djurfeldt <mdj@linnaeus>
5967
5968 * coop-pthreads.h: Added support for thread specific data to the
5969 generic C API for the coop-pthreads case.
5970
5971 * threads.c, threads.h (scm_cond_init): Undo unintentional API
5972 change.
5973 (scm_cond_broadcast): Added missing function.
5974
5975 2002-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
5976
5977 * coop.c (coop_next_runnable_thread): Removed, wich should have
5978 happened when GUILE_ISELECT was hard-wired.
5979
5980 2002-11-03 Marius Vollmer <mvo@zagadka.ping.de>
5981
5982 * Makefile.am (libguile_la_SOURCES): Added threads.c
5983 (DOT_DOC_FILES): Added threads.doc.
5984 (DOT_X_FILES): Added threads.x.
5985 (EXTRA_libguile_la_SOURCES): Removed threads.c.
5986 (noinst_HEADERS): Added coop-pthreads.c.
5987 (modinclude_HEADERS): Added coop-pthreads.h.
5988
5989 * __scm.h (USE_THREADS, GUILE_ISELECT): Define when
5990 SCM_DEBUG_DEPRECATED. Removed their use thru-out Guile.
5991
5992 * iselect.c: Include "_scm.h" before testing HAVE_UNISTD_H.
5993 Thanks to Bill Schottstaedt!
5994
5995 * numbers.c (scm_integer_expt): Make 0^z == 0 for z != 0.
5996
5997 * _scm.h (HAVE_RESTARTABLE_SYSCALLS): Do define even when
5998 SCM_COPT_THREADS is defined.
5999 (SCM_SYSCALL): Use EINTR-expection version when SCM_COPT_THREADS
6000 is defined.
6001
6002 * coop-pthreads.c: Some harmless renamings of internal stuff.
6003 (create_thread): New, generalized version of
6004 scm_call_with_new_thread.
6005 (scm_call_with_new_thread): Use it.
6006 (scm_spawn_thread): New, use create_thread.
6007
6008 2002-11-02 Marius Vollmer <mvo@zagadka.ping.de>
6009
6010 * coop-pthreads.c, coop-pthreads.h: Redone completely, you might
6011 start testing it now.
6012
6013 * _scm.h: Include <errno.h< so that SCM_SYSCALL is correctly
6014 defined when HAVE_RESTARTABLE_SYSCALLS is not defined.
6015 (HAVE_RESTARTABLE_SYSCALLS): Do not define when USE_COPT_THREADS
6016 is defined.
6017
6018 2002-10-27 Marius Vollmer <mvo@zagadka.ping.de>
6019
6020 * scmsigs.c (signal_cell_handlers, install_handler_data,
6021 scm_delq_spine_x, really_install_handler, install_handler): New
6022 scheme for triggering signal handlers, to simplify take_signal.
6023 (take_signal): Simplified, to avoid race conditions.
6024 (scm_sigaction_for_thread): Use new Scheme. Validate that thread
6025 hasn't exited yet.
6026
6027 * async.c (scm_async_click): Reset pending_asyncs, handle
6028 signal_asyncs. Don't set cdr of a non-signal async to #f.
6029 (scm_i_queue_async_cell): Do not check cdr of cell for #f, queue
6030 always. Set pending_asyncs.
6031 (scm_system_async_mark_for_thread): Check that thread has not
6032 exited.
6033 (scm_unmask_signals, decrease_block): Call scm_async_click after
6034 block_asyncs becomes zero.
6035
6036 * __scm.h (SCM_ASYNC_CLICK): Check pending_asyncs instead of
6037 active_asyncs.
6038
6039 * root.h (scm_root_state): Added pending_asyncs and signal_asyncs
6040 fields.
6041 * root.c (root_mark): Mark them.
6042 (make_root): Initialize them.
6043
6044 * iselect.c, iselect.h: Replaced GUILE_ISELECT with
6045 USE_COOP_THREADS.
6046 (scm_internal_select): Define one version for USE_COOP_THREADS and
6047 one for USE_NULL_THREADS.
6048 (scm_init_iselect): Likewise.
6049
6050 * inline.h (scm_cell, scm_double_cell): Also allow
6051 USE_COPT_THREADS to not protect the slot initializers.
6052
6053 * init.c (scm_init_guile_1): Call scm_init_thread_procs. This is
6054 because threads need to be initialized before the stack, but
6055 gsubrs such as scm_timed_condition_variable_wait can only be
6056 created later.
6057
6058 * threads.h: Include "coop-pthreads.h" when requested.
6059 (scm_threads_make_mutex, scm_threads_lock_mutex,
6060 scm_threads_unlock_mutex, scm_threads_monitor): Removed, they were
6061 not implemented anyway.
6062 (scm_init_thread_procs, scm_try_mutex,
6063 scm_timed_condition_variable_wait,
6064 scm_broadcast_condition_variable, scm_c_thread_exited_p,
6065 scm_thread_exited_p): New prototypes.
6066 (struct timespec): Define if not already defined.
6067 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
6068 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
6069 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
6070 scm_cond_broadcast, scm_cond_destroy): Declarations moved here and
6071 deprecated.
6072
6073 * threads.c: Include <errno.h>. Include "coop-pthreads.c" when
6074 requested.
6075 (scm_thread_exited_p): New.
6076 (scm_try_mutex, scm_broadcast_condition_variable): Newly
6077 registered procedures.
6078 (scm_wait_condition_variable, scm_timed_wait_condition_variable):
6079 Use the latter as the procedure for "wait-condition-variable",
6080 thus offering a optional timeout parameter to Scheme.
6081 (scm_wait_condition_variable): Implement in terms of
6082 scm_timed_wait_condition_variable.
6083 (scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
6084 scm_mutex_unlock, scm_mutex_destroy, scm_cond_init,
6085 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
6086 scm_cond_broadcast, scm_cond_destroy): Implement in terms of
6087 scm_make_mutex, etc, and deprecate.
6088 (scm_init_threads): Do not create smobs, leave this to
6089 scm_threads_init. Do not include "threads.x" file.
6090 (scm_init_thread_procs): New, include "threads.x" here.
6091
6092 * null-threads.h (scm_null_mutex, scm_null_mutex_init,
6093 scm_null_mutex_lock, scm_null_mutex_unlock,
6094 scm_null_mutex_destroy, scm_null_condvar, scm_null_condvar_init,
6095 scm_null_condvar_wait, scm_null_condvar_signal,
6096 scm_null_condvar_destroy): Removed.
6097 (scm_mutex_init, scm_mutex_lock, scm_mutex_unlock, scm_cond_init,
6098 scm_cond_wait, scm_cond_signal, scm_cond_broadcast,
6099 scm_cond_destory): Do not define, they are now deprecated and
6100 handled by threads.{h,c}.
6101
6102 * null-threads.c (scm_null_mutex, scm_null_cond): Define here.
6103 (scm_threads_init): Create smobs here, using the appropriate
6104 sizes.
6105 (block): Removed, now unused.
6106 (scm_c_thread_exited_p): New.
6107 (scm_null_mutex_init, scm_null_mutex_lock, scm_null_mutex_unlock,
6108 scm_null_mutex_destroy, scm_null_condvar_init,
6109 scm_null_condvar_wait, scm_null_condvar_signal,
6110 scm_null_condvar_destroy): Removed and updated users to do their
6111 task directly.
6112 (scm_try_mutex, timeval_subtract,
6113 scm_timed_wait_condition_variable,
6114 scm_broadcast_condition_variable): New.
6115 (scm_wait_condition_variable): Removed.
6116
6117 * coop-defs.h (coop_m): Added 'level' field.
6118 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
6119 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
6120 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
6121 scm_cond_broadcast, scm_cond_destroy, struct timespec): Do not
6122 define.
6123 (coop_condition_variable_broadcast): New.
6124
6125 * coop-threads.c (scm_threads_init): Create smobs here, using the
6126 appropriate sizes.
6127 (scm_c_thread_exited_p, scm_try_mutex,
6128 scm_timed_wait_condition_variable,
6129 scm_broadcast_condition_variable): New.
6130 (scm_wait_condition_variable): Removed.
6131
6132 * coop.c (coop_new_mutex_init): Initialize level.
6133 (coop_mutex_trylock, coop_mutex_lock, coop_mutex_unlock): maintain
6134 level.
6135 (coop_condition_variable_signal): Renamed to
6136 coop_condition_variable_broadcast and reimplemented in terms of
6137 that. Thus...
6138 (coop_condition_variable_broadcast): New.
6139
6140 * goops.c (hell_mutex): Reimplemented using scm_make_mutex, etc.
6141
6142 * coop-pthreads.h, coop-pthreads.c: New, but unfinished.
6143
6144 2002-10-21 Marius Vollmer <mvo@zagadka.ping.de>
6145
6146 * null-threads.c: Include <time.h>. Also, use <...> for inclusion
6147 of system headers.
6148
6149 * async.c, goops.h, modules.h, validate.h (SCM_MAKE_VALIDATE_MSG):
6150 New. Use it instead of SCM_MAKE_VALIDATE in lots of places to
6151 give better error messages. Thanks to Bill Schottstaedt!
6152
6153 2002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
6154
6155 * evalext.h, evalext.c (scm_definedp, scm_defined_p): Renamed
6156 scm_definedp to scm_defined_p and deprecated scm_definedp.
6157
6158 2002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
6159
6160 * async.h, async.c (scm_system_async): Fixed deprecation to work
6161 correctly when deprecated features are excluded.
6162
6163 2002-10-16 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6164
6165 * async.c (scm_system_async_mark_for_thread): Validate thread
6166 argument.
6167
6168 * coop-threads.c (scm_i_thread_root): Do not validate argument.
6169
6170 * feature.c (scm_init_feature): Don't add 'threads' for
6171 USE_NULL_THREADS.
6172
6173 * inline.h (scm_cell, scm_double_cell): Also allow
6174 USE_NULL_THREADS to not protect the slot initializers.
6175
6176 * scmsigs.c (scm_sigaction_for_thread): It's "USE_THREADS" not
6177 "USE_THREAD".
6178
6179 * Makefile.am (noinst_HEADERS): Added null-threads.c.
6180 (modinclude_HEADERS): Added null-threads.h.
6181
6182 * threads.h: Include null-threads.h when !USE_COOP_THREADS.
6183 * threads.c: Include null-threads.c when !USE_COOP_THREADS.
6184 (scm_init_threads): Use generic type names scm_t_mutex and
6185 scm_t_cond instead of coop_m and coop_c.
6186
6187 * null-threads.c, null-threads.h: New files.
6188
6189 2002-10-15 Marius Vollmer <mvo@zagadka.ping.de>
6190
6191 * Makefile.am: Replaced "$<" in non-pattern rules with its value.
6192 This is to support makes that know about "$<" only in pattern
6193 rules, like Sun's make.
6194
6195 2002-10-13 Marius Vollmer <mvo@zagadka.ping.de>
6196
6197 * Makefile.am (libpath.h): Fixed typo in top_srcdir_absolute
6198 substitution. Thanks to David Allouche!
6199
6200 2002-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
6201
6202 * evalext.h: Replaced SCM_DEBUG_DEPRECATED with
6203 !SCM_ENABLE_DEPRECATED.
6204
6205 2002-10-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6206
6207 * async.c (scm_system_async_mark_for_thread): Only call
6208 scm_i_thread_root when USE_THREADS is defined. Use scm_root
6209 otherwise.
6210
6211 * scmsigs.c (take_signal): Only call scm_i_thread_root when
6212 USE_THREADS is defined. Use scm_root otherwise.
6213 (scm_sigaction_for_thread): Ignore THREAD argument when
6214 USE_THREADS is not defined. Also, move THREAD argument defaulting
6215 out of HAVE_SIGACTION section, which was a bug.
6216
6217 2002-10-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6218
6219 * scmsigs.c (scm_sigaction_for_thread): Store original handler in
6220 signal_handlers, not the closure that is used as the async.
6221 The closure is stored in signal_handler_cells, as previously.
6222
6223 2002-10-10 Marius Vollmer <mvo@zagadka.ping.de>
6224
6225 * root.h (scm_root_state): Added 'block_async' slot.
6226 (scm_active_asyncs): Removed abbrev.
6227 * root.c (scm_make_root): Initialize 'block_asyncs' slot.
6228
6229 * __scm.h (SCM_ASYNC_TICK): Do without the scm_active_asyncs
6230 abbrev.
6231
6232 * async.h (scm_call_with_blocked_asyncs,
6233 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
6234 scm_c_call_with_unblocked_asyncs): New prototypes.
6235 (scm_mask_signals, scm_unmask_signals): Deprecated.
6236 (scm_mask_ints): Turned into a macro.
6237 * async.c (scm_mask_ints): Removed.
6238 (scm_run_asyncs): Do not set scm_mask_ints while running an async.
6239 this should not be necessary.
6240 (scm_async_click): Test block_asyncs instead of scm_mask_ints.
6241 (scm_mask_signals, scm_unmask_signals): Deprecated. Emit
6242 deprecation warning and check for errornous use. Set block_asyncs
6243 instead of scm_mask_ints.
6244 (increase_block, decrease_block, scm_call_with_blocked_asyncs,
6245 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
6246 scm_c_call_with_unblocked_asyncs): New.
6247
6248 * script.c (scm_compile_shell_switches): Do not set scm_mask_ints.
6249 Asyncs are enabled by default.
6250
6251 2002-10-09 Neil Jerram <neil@ossau.uklinux.net>
6252
6253 * vports.c (scm_make_soft_port): Allow vector argument to carry a
6254 6th element: an input waiting thunk.
6255 (sf_input_waiting): New.
6256
6257 2002-10-05 Marius Vollmer <mvo@zagadka.ping.de>
6258
6259 * root.c (root_mark): Mark active_asyncs slot.
6260
6261 * async.c (scm_async_click): Set the cdr of a executed handler
6262 cell to SCM_BOOL_F, not SCM_EOL.
6263 (scm_i_queue_async_cell): Queue the cell at the end of the list,
6264 and only if the handler procedure is not already present.
6265 (scm_system_async_mark_for_thread): Initialize cdr of handler cell
6266 with SCM_BOOL_F.
6267 * scmsigs.c (scm_sigaction_for_thread): Likewise.
6268
6269 2002-10-04 Rob Browning <rlb@defaultvalue.org>
6270
6271 * guile.c (main): switch to scm_lt_dlset_preloaded_symbols;
6272
6273 * dynl.c (sysdep_dynl_link): switch to scm_lt_dlhandle,
6274 scm_lt_dlopenext, and scm_lt_dlerror.
6275 (sysdep_dynl_unlink): switch to scm_lt_dlhandle, scm_lt_dlclose,
6276 and scm_lt_dlerror.
6277 (sysdep_dynl_func): switch to scm_lt_dlhandle, scm_lt_dlsym,
6278 and scm_lt_dlerror.
6279 (sysdep_dynl_init): switch to scm_lt_dlinit();
6280
6281 * Makefile.am (libguile_la_LIBADD): switch to use
6282 libguile-ltdl.la.
6283
6284 * numbers.c (scm_integer_expt): (expt 0 1) should be 1.
6285
6286 2002-10-04 Marius Vollmer <mvo@zagadka.ping.de>
6287
6288 * scmsigs.h (scm_sigaction_for_thread): New prototype.
6289 * scmsigs.c (got_signal): Removed.
6290 (signal_handler_cells, signal_handler_threads): New.
6291 (take_signal): Queue the cell of the signal for the specified
6292 thread. Reset the signal handler on systems that don't have
6293 sigaction.
6294 (sys_deliver_signals): Removed.
6295 (close_1): New.
6296 (scm_sigaction_for_thread): Renamed from scm_sigaction and
6297 extended to also set the thread of a signal and allocate a cell
6298 for it. Keep the Scheme name "sigaction". Check that signum is
6299 within range. Also, use SCM_VECTOR_REF instead of SCM_VELTS.
6300 (scm_sigaction): Implement in terms of scm_sigaction_for_thread.
6301 (scm_init_scmsigs): Allocate signal_handler_cells and
6302 signal_handler_threads vectors.
6303
6304 * async.c: Removed GUILE_OLD_ASYNC_CLICK code. Reorganized so
6305 that system asnycs and user asyncs are separated. Reimplemented
6306 system asyncs to work per-thread.
6307
6308 * gc.c (scm_init_gc): Do not use scm_system_async.
6309
6310 * async.h (scm_asyncs_pending, scm_set_tick_rate,
6311 scm_set_switch_rate, scm_system_async_mark_from_signal_handler):
6312 Removed prototypes.
6313 (scm_i_queue_async_cell): New.
6314
6315 * __scm.h (scm_asyncs_pending_p): Removed.
6316 (SCM_ASYNC_CLICK): Check scm_active_asyncs instead of
6317 scm_asyncs_pending_p.
6318
6319 * async.h (scm_system_async_mark_for_thread): New prototype.
6320
6321 * __scm.h: Removed GUILE_OLD_ASYNC_CLICK code.
6322
6323 * root.h (scm_root_state): Added new "active_asyncs" slot.
6324 * root.c (scm_make_root): Initialize it to SCM_EOL.
6325
6326 * coop-defs.h (coop_t): Added new "handle" slot.
6327 * coop-threads.c (all_threads, scm_current_thread,
6328 scm_all_threads, scm_i_thread_root): New.
6329 (scm_threads_init): Add main thread to all_threads.
6330 (scheme_launch_thread): Remove thread from all_threads when it
6331 terminates.
6332 (scm_call_with_new_thread): Initialize handle slot of coop_t
6333 structure and add new thread to all_threads.
6334 (scm_spawn_thread): Likewise.
6335
6336 * threads.h (scm_current_thread, scm_all_threads): New prototypes.
6337 * threads.c (scm_current_thread, scm_all_threads): Register as
6338 primitives.
6339
6340 * dynl.c: Use scm_lt_ prefix for libltdl functions.
6341
6342 2002-09-29 Neil Jerram <neil@ossau.uklinux.net>
6343
6344 * script.c (scm_compile_shell_switches): Fix bad spelling of
6345 `explicitly' in comment.
6346
6347 2002-09-28 Neil Jerram <neil@ossau.uklinux.net>
6348
6349 * posix.c (scm_geteuid, scm_getegid, scm_seteuid, scm_setegid):
6350 Refer to provided? in doc string rather than deprecated feature?.
6351
6352 2002-09-24 Gary Houston <ghouston@arglist.com>
6353
6354 * inline.h (scm_double_cell): prevent reordering of statements
6355 with any following code (for GCC 3 strict-aliasing).
6356 * numbers.c (scm_make_real), num2float.i.c (FLOAT2NUM): removed
6357 the earlier version of the reordering prevention.
6358
6359 2002-09-19 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6360
6361 * inline.h (scm_double_cell): move SET_GCMARK set out of if body.
6362
6363 2002-09-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6364
6365 * gc-malloc.c (scm_gc_register_collectable_memory): more overflow
6366 protection.
6367
6368 2002-09-08 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6369
6370 * inline.h: include stdio.h
6371
6372 * smob.c (free_print): abort if scm_debug_cell_accesses_p is set
6373
6374 2002-09-05 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6375
6376 * gc-segment.c (scm_i_make_initial_segment): check user settings
6377 for sanity.
6378
6379 * gc-malloc.c (scm_gc_init_malloc): check user settings for
6380 sanity.
6381
6382 * gc-freelist.c (scm_init_freelist): check user settings for sanity.
6383
6384 * struct.h: change scm_structs_to_free to scm_i_structs_to_free
6385
6386 * gc-malloc.c (scm_gc_register_collectable_memory): use floats;
6387 these won't ever wrap around with high memory usage. Thanks to
6388 Sven Hartrumpf for finding this.
6389
6390 * gc-freelist.c: include <stdio.h>
6391
6392 * gc-malloc.c: add DEBUGINFO for mtrigger GCs.
6393
6394 2002-09-01 Marius Vollmer <mvo@zagadka.ping.de>
6395
6396 * vectors.h (SCM_VECTOR_REF): New.
6397
6398 * snarf.h (SCM_DEFINE_PUBLIC): New.
6399
6400 2002-08-30 Marius Vollmer <mvo@zagadka.ping.de>
6401
6402 * socket.c (scm_addr_vector): Added size of address to arguments.
6403 Use it to avoid accessing a non-existent path in a sockaddr_un.
6404 Changed all callers.
6405
6406 2002-08-29 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6407
6408 * gc.h: remove DOUBLECELL card flags.
6409
6410 * gc-malloc.c (scm_calloc): try to use calloc() before calling
6411 scm_realloc().
6412
6413 * gc-segment.c (scm_i_initialize_heap_segment_data): remove card
6414 init loop; handle this from scm_init_card_freelist()
6415
6416 * gc-card.c (scm_init_card_freelist): init bit vector here.
6417
6418 * numbers.c (scm_make_real): prevent reordering of statements
6419 num2float.i.c (FLOAT2NUM): idem
6420
6421 2002-08-27 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6422
6423 * eval.h: prepend libguile/ to include path
6424
6425 2002-08-26 Marius Vollmer <mvo@zagadka.ping.de>
6426
6427 * script.c (scm_compile_shell_switches): Added "2002" to Copyright
6428 years. Thanks to Martin Grabmüller!
6429
6430 2002-08-25 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6431
6432 * gc-segment.c (scm_i_get_new_heap_segment): use float in stead of
6433 unsigned numbers for computing minimum heap increment. This
6434 prevents weird results when a a negative minimum increment is
6435 computed.
6436
6437 2002-08-24 Marius Vollmer <mvo@zagadka.ping.de>
6438
6439 * gc_os_dep.c: When we have __libc_stack_end, use that directly
6440 instead of the old tricks.
6441
6442 * guile-snarf.in: Do not expect the input file to be the first
6443 argument after the optional "-o" option, just pass everything to
6444 the pre-processor without extracting the input file name.
6445
6446 2002-08-23 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6447
6448 * gc-segment.c (scm_i_get_new_heap_segment): Oops. We want segment
6449 length *at* least SCM_MIN_HEAP_SEG_SIZE, not at most.
6450
6451 2002-08-22 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6452
6453 * gc.h, gc.c: make scm_cells_allocated unsigned again. Thanks to
6454 Bill Schottstaedt for the bug report
6455
6456 2002-08-20 Marius Vollmer <mvo@zagadka.ping.de>
6457
6458 * print.c (scm_iprin1): Print primitives generics always as
6459 "primitive-generic" even when they have no primitive methods yet.
6460
6461 2002-08-17 Gary Houston <ghouston@arglist.com>
6462
6463 * coop.c (coop_create): removed bogus 2nd argument in scm_malloc
6464 call.
6465
6466 2002-08-17 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6467
6468 * ports.c (scm_add_to_port_table): small bugfix.
6469
6470 * mallocs.c (scm_malloc_obj): use scm_gc_malloc in stead of
6471 malloc.
6472
6473 * gc-segment.c (scm_i_get_new_heap_segment): remove cluster cruft:
6474 only use SCM_MIN_HEAP_SEG_SIZE.
6475
6476 * ports.c (scm_add_to_port_table): add backwards compatibility
6477 function
6478
6479 * ports.h: use scm_i_ prefix for port table and port table size.
6480
6481 2002-08-15 Mikael Djurfeldt <mdj@linnaeus>
6482
6483 * vports.c (scm_make_soft_port): Initialize pt variable.
6484
6485 2002-08-13 Marius Vollmer <mvo@zagadka.ping.de>
6486
6487 * strports.h (scm_c_eval_string_in_module,
6488 scm_eval_string_in_module): New prototypes.
6489 * strports.c (scm_eval_string_in_module): New, but use
6490 "eval-string" as the Scheme name and make second parameter
6491 optional.
6492 (scm_eval_string): Implement using scm_eval_string_in_module.
6493 (scm_c_eval_string_in_module): New.
6494 Thanks to Ralf Mattes for the suggestion!
6495
6496 2002-08-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6497
6498 * gc-card.c ("sweep_card"): remove SCM_MISC_ERROR messages: print
6499 message and abort.
6500
6501 * gc-mark.c ("scm_gc_mark_dependencies"): idem.
6502
6503 * ports.c ("scm_new_port_table_entry"): return a boxed SCM in
6504 stead of scm_t_port*. The function now takes a tag argument.
6505
6506 2002-08-08 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6507
6508 * gc.h: add scm_debug_cells_gc_interval to public interface
6509
6510 * gc-card.c ("sweep_card"): set scm_gc_running while sweeping.
6511
6512 * gc.c (scm_i_expensive_validation_check): separate expensive
6513 validation checks from cheap ones.
6514
6515 2002-08-06 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6516
6517 * read.c (scm_input_error): new function: give meaningful error
6518 messages, and throw read-error
6519
6520 * gc-malloc.c (scm_calloc): add scm_calloc.
6521
6522 2002-08-05 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6523
6524 * tags.h: remove GC bits documentation from the tags table.
6525
6526 * read.c (INPUT_ERROR): Prepare for file:line:column error
6527 messages for errors in scm_lreadr() and friends.
6528
6529 2002-08-04 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6530
6531 * gc-malloc.c (scm_malloc): use scm_realloc() (simplifies
6532 implementation).
6533 (scm_gc_calloc): new function
6534
6535 2002-08-04 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6536
6537 * ports.c (scm_new_port_table_entry): init port entry to 0
6538 completely.
6539
6540 * ports.c (scm_new_port_table_entry): change function from
6541 scm_add_to_port_table. This prevents cells with null-pointers from
6542 being exposed to GC.
6543
6544 * vports.c (scm_make_soft_port) strports.c (scm_mkstrport),
6545 fports.c (scm_fdes_to_port): Use scm_new_port_table_entry().
6546
6547 * gc.c (scm_gc_stats): add cell-yield and malloc-yield statistic
6548 to gc-stats.
6549
6550 * numbers.c (big2str): return "0" for 0 iso. ""
6551
6552 * gc-segment.c, gc-malloc.c gc-mark.c, gc-freelist.c, gc-card.c,
6553 private-gc.h: new file
6554
6555 * gc.c: completely revised and cleaned up the GC. It now uses lazy
6556 sweeping. More documentation in workbook/newgc.text
6557
6558 2002-07-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6559
6560 * random.c (rstate_free): Return zero.
6561
6562 2002-07-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
6563
6564 * environments.c (remove_key_from_alist): Removed.
6565
6566 (obarray_remove): Simplified.
6567
6568 2002-07-24 Stefan Jahn <stefan@lkcc.org>
6569
6570 * continuations.h: ia64: Include <signal.h> before
6571 <sys/ucontext.h>.
6572
6573 2002-07-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6574
6575 * modules.c (scm_sym2var): Don't compare SCM values with ==.
6576
6577 2002-07-21 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6578
6579 * goops.c (scm_compute_applicable_methods): use
6580 scm_remember_upto_here_1 iso scm_remember_upto_here
6581
6582 * macros.c: include deprecation.h
6583
6584 * vectors.c (scm_vector_move_right_x): remove side effect in
6585 macro arg.
6586 (scm_vector_move_left_x): idem.
6587
6588 * net_db.c, posix.c, socket.c: variable naming: change ans to
6589 result.
6590
6591 * sort.c (scm_merge_vector_x): accept vector as argument
6592 iso. SCM*. This is needed for full GC correctness.
6593
6594 * gc.h: undo previous undocumented changes related to #ifdef
6595 GENGC.
6596
6597 2002-07-20 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6598
6599 * *.c: add space after commas everywhere.
6600
6601 * *.c: use SCM_VECTOR_SET everywhere, where a vector is written.
6602 Document cases where SCM_WRITABLE_VELTS() is used.
6603
6604 * vectors.h (SCM_VELTS): prepare for write barrier, and let
6605 SCM_VELTS() return a const pointer
6606 (SCM_VECTOR_SET): add macro.
6607
6608 2002-07-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
6609
6610 * eval.c (SCM_CEVAL), macros.c (macro_print, scm_makmacro,
6611 scm_sym_macro, scm_macro_type), macros.h (scm_makmacro):
6612 Deprecated the special kind of built-in dynamic syntax transformer
6613 that was inaccurately named "macro". Note: The built-in syntax
6614 transformers that are named "mmacro" or "memoizing-macro" still
6615 exist, and it is these which come much closer to what one would
6616 call a macro.
6617
6618 2002-07-13 Neil Jerram <neil@ossau.uklinux.net>
6619
6620 * eval.c (unmemocopy): Fix for
6621 1001-local-eval-error-backtrace-segfaults (unmemoization crash
6622 with internal definitions and local-eval).
6623
6624 2002-07-12 Gary Houston <ghouston@arglist.com>
6625
6626 * dynl.c: Don't define stub procedures if DYNAMIC_LINKING is not
6627 defined. They don't do anything useful, especially since the
6628 only case where DYNAMIC_LINKING is undefined seems to be
6629 when --with-modules=no is given to configure, which is basically
6630 requesting that the "dynamic linking module" be omitted.
6631
6632 * Makefile.am (libguile_la_SOURCES): move dynl.c from
6633 libguile_la_SOURCES to EXTRA_libguile_la_SOURCES.
6634
6635 * extensions.c (load_extension): check DYNAMIC_LINKING for
6636 scm_dynamic_call.
6637 * init.c (scm_init_guile_1): check DYNAMIC_LINKING for
6638 scm_init_dynamic_linking.
6639
6640 2002-07-10 Marius Vollmer <mvo@zagadka.ping.de>
6641
6642 * guile.c, iselect.h, net_db.c, posix.c, socket.c: No need to
6643 check for Cygwin when including <winsock2.h>, this is already
6644 check for by configure. Thus, revert change from 2002-07-07.
6645
6646 2002-07-10 Gary Houston <ghouston@arglist.com>
6647
6648 * eq.c: include <string.h>
6649 * dynl.c: docstring editing.
6650
6651 2002-07-09 Gary Houston <ghouston@arglist.com>
6652
6653 * dynl.c (scm_dynamic_call): docstring editing.
6654
6655 2002-07-08 Rob Browning <rlb@defaultvalue.org>
6656
6657 * gc_os_dep.c: HURD fixes.
6658
6659 2002-07-07 Marius Vollmer <mvo@zagadka.ping.de>
6660
6661 Crosscompiling and Cygwin fixes by Jan Nieuwenhuizen. Thanks!
6662
6663 * Makefile.am: Override default rule for c-tokenize.$(OBJECT);
6664 this should be compiled for BUILD host.
6665 Override default rule for
6666 guile_filter_doc_snarfage$(EEXECT); this should run on BUILD host.
6667 Add missing $(EXEEXT) to guile_filter_doc_snarfage invocation.
6668 (snarf2checkedtexi): Use GUILE_FOR_BUILD instead of preinstguile.
6669
6670 * guile.c, iselect.h, net_db.c, posix.c, socket.c: Do not include
6671 <winsock2.h> on Cygwin even when we have it.
6672
6673 2002-07-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
6674
6675 * __scm.h (SCM_CAUTIOUS), eval.c (scm_eval_args, deval_args,
6676 SCM_CEVAL): Removed compile time option SCM_CAUTIOUS to clean up
6677 the code. Full number of arguments checking of closures is
6678 mandatory now. However, the option to disable the checking has
6679 most probably not been used anyway.
6680
6681 2002-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
6682
6683 * __scm.h (SCM_RECKLESS), backtrace.c (SCM_ASSERT), debug.c
6684 (scm_debug_options), eval.c (scm_lookupcar, scm_lookupcar1,
6685 scm_badargsp, SCM_CEVAL, SCM_APPLY, scm_map, scm_for_each),
6686 feature.c (scm_init_feature), gsubr.c (scm_gsubr_apply), numbers.c
6687 (scm_logand, scm_logior, scm_logxor, scm_i_dbl2big), srcprop.c
6688 (scm_source_properties, scm_set_source_properties_x,
6689 scm_source_property): Removed compile time option SCM_RECKLESS to
6690 clean up the code. Full number of arguments checking of closures
6691 is mandatory now. However, the option to disable the checking has
6692 most probably not been used anyway.
6693
6694 * srcprop.c (scm_source_properties, scm_set_source_properties_x,
6695 scm_source_property): Use !SCM_CONSP instead of SCM_NCONSP.
6696
6697 2002-06-30 Gary Houston <ghouston@arglist.com>
6698
6699 * dynl.c: Removed all SCM_DEFER_INTS/SCM_ALLOW_INTS, which won't
6700 do anything useful. Added a comment about need for a mutex if
6701 pre-emptive threading is supported.
6702
6703 * posix.c (scm_convert_exec_args), dynl.c
6704 (scm_make_argv_from_stringlist): static procs: 1) renamed both to
6705 allocate_string_pointers. 2) simplified: don't reallocate the
6706 strings, just make an array of pointers 3) avoid memory leaks on
6707 error 4) let the procedure report errors in its own name.
6708 Consequences: 1) the procedures now assume that SCM strings are
6709 nul-terminated, which should always be the case. 2) Since strings
6710 are not reallocated, it's now possible for strings passed to
6711 dynamic-args-call to be mutated.
6712
6713 2002-06-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
6714
6715 * __scm.h, eval.c, eval.h: Removed compile time option
6716 MEMOIZE_LOCALS to clean up the code. Now, caching of local
6717 variable positions during memoization is mandatory. However, the
6718 option to disable the caching has most probably not been used
6719 anyway.
6720
6721 2002-06-18 Marius Vollmer <mvo@zagadka.ping.de>
6722
6723 * print.c (scm_simple_format): Print missing part of format before
6724 ~% control. Thanks to Daniel Skarda!
6725
6726 2002-06-01 Marius Vollmer <mvo@zagadka.ping.de>
6727
6728 * mkstemp.c: Added exception notice to license statement.
6729
6730 2002-05-22 Marius Vollmer <mvo@zagadka.ping.de>
6731
6732 * numbers.c (mem2ureal): When returning an inexact zero, make sure
6733 it is represented as a floating point value so that we can change
6734 its sign.
6735
6736 From John W. Eaton <jwe@bevo.che.wisc.edu>
6737
6738 * numbers.c (idbl2str): Don't omit sign when printing negative zero.
6739
6740 2002-05-14 Thien-Thi Nguyen <ttn@giblet.glug.org>
6741
6742 * gc_os_dep.c: For I386/OPENBSD, allow for `__i386__'
6743 in addition to `i386'. Thanks to Dale P. Smith.
6744
6745 2002-05-08 Marius Vollmer <mvo@zagadka.ping.de>
6746
6747 * eq.c (real_eqv): New.
6748 (scm_eqv_p): Use it when comparing reals and complexes.
6749
6750 * numbers.c: Include <string.h>, for strncmp.
6751 (mem2complex): Do not create negative NaNs.
6752 (scm_leq_p, scm_geq_p): Explicitely return #f when comparing a
6753 NaN.
6754 (scm_inexact_to_exact): Signal error when converting a NaN.
6755
6756 2002-05-06 Marius Vollmer <mvo@zagadka.ping.de>
6757
6758 * posix.c (scm_putenv): Handle removing variables explicitely by
6759 calling unsetenv.
6760
6761 From John W. Eaton.
6762
6763 * numbers.h: Conditionally include floatingpoint.h, ieeefp.h, and
6764 nan.h. Provide declarations for scm_inf_p, scm_nan_p, scn_inf,
6765 and scm_nan.
6766 * numbers.c: [SCO && ! HAVE_ISNAN] (isnan): New function.
6767 [SCO && ! HAVE_ISINF] (isinf): New function.
6768 (xisinf, xisnan): New functions.
6769 (IS_INF): Delete.
6770 (isfinite): Define in terms of xisinf.
6771 (scm_inf_p, scm_nan_p): New functions.
6772 (guile_Inf, guile_NaN): New file-scope vars.
6773 (guile_ieee_init): New function.
6774 (scm_inf, scm_nan): New functions.
6775 (idbl2str): Handle Inf and NaN. Remove funny label and
6776 corresponding gotos.
6777 (ALLOW_DIVIDE_BY_ZERO): New macro.
6778 (scm_divide): Allow division by zero to occur if
6779 ALLOW_DIVIDE_BY_ZERO is defined.
6780 Handle bignums and ints as special cases.
6781
6782 Additional stuff by me:
6783
6784 numbers.c (mem2ureal): Recognize "inf.0" and "nan.xxx".
6785 (scm_even_p, scm_odd_p): Treat infinity as even and odd.
6786 (iflo2str): Don't output a '+' for negative numbers or for Inf and
6787 NaN. They will provide their own sign.
6788 (scm_divide): Only allow divides by inexact zeros. Dividing by
6789 exact zeros still signals an errors.
6790
6791 2002-04-22 Thien-Thi Nguyen <ttn@giblet.glug.org>
6792
6793 * goops.h (scm_slot_exists_p): Rename from scm_slots_exists_p.
6794 * goops.c (scm_slot_exists_p): Rename from scm_slots_exists_p.
6795 (scm_slot_exists_p): Rename from scm_slots_exists_p.
6796 Thanks to Andreas Rottmann.
6797
6798 2002-04-20 Gary Houston <ghouston@arglist.com>
6799
6800 * removal of unused fields in root state (thanks to Christopher
6801 Cramer for pointing out the disuse.)
6802 * root.h (scm_root_state): removed def_inp, def_outp, def_errp.
6803 (scm_def_inp, scm_def_outp, scm_def_errp): removed.
6804
6805 * root.c (root_mark): don't mark them.
6806 (scm_make_root): don't set them to #f.
6807 * init.c (scm_init_standard_ports): don't initialise with the
6808 default ports.
6809
6810 2002-04-17 Marius Vollmer <mvo@zagadka.ping.de>
6811
6812 * Makefile.am (EXTRA_DIST): Added cpp_err_symbols.c and
6813 cpp_sig_symbols.c.
6814
6815 2002-04-16 Marius Vollmer <mvo@zagadka.ping.de>
6816
6817 * guile-snarf.in: Do not clean input file. This would write to
6818 the $(srcdir) during a VPATH build, which is not allowed. It also
6819 isn't needed since it only works when an output filename has been
6820 specified and in that case we don't need to clean the input file
6821 because the output file will already exist.
6822
6823 2002-03-31 Marius Vollmer <mvo@zagadka.ping.de>
6824
6825 * guile-snarf: Install the trap for removing $cleanfile only when
6826 the value of $cleanfile is actually known.
6827
6828 2002-04-10 Rob Browning <rlb@defaultvalue.org>
6829
6830 * .cvsignore: add versiondat.h and *.c.clean.c.
6831
6832 2002-03-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
6833
6834 * srcprop.[ch] (scm_c_source_property_breakpoint_p): New
6835 function, replaces macro SRCBRKP.
6836
6837 (SRCBRKP): Deprecated.
6838
6839 * eval.c (SCM_CEVAL): Replaced use of SRCBRKP by call to
6840 scm_c_source_property_breakpoint_p. Removed some use of arg1 as
6841 temporary variable.
6842
6843 2002-03-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
6844
6845 * debug.h, eval.c: Deprecated CHECK_ENTRY, CHECK_APPLY and
6846 CHECK_EXIT and removed all references to them.
6847
6848 2002-03-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
6849
6850 * debug.h (scm_ready_p, debug_print): Removed declarations.
6851
6852 * eval.c (EVALCELLCAR): Removed.
6853
6854 (SCM_CEVAL): Eliminated label loopnoap. Removed side-effecting
6855 operation from condition.
6856
6857 2002-03-24 Marius Vollmer <mvo@zagadka.ping.de>
6858
6859 * guile-snarf.in: When the output filename is "-", write to
6860 stdout. When no "-o" option is given, use "-" as the output
6861 filename (i.e., stdout). Only 'clean' the inputfile or remove the
6862 output file on error when the output file name is not "-". Define
6863 the preprocessor macro SCM_MAGIC_SNARFER while snarfing.
6864
6865 * Makefile.am (.c.x): Pass "-o $@" to guile-snarf.
6866
6867 2002-03-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
6868
6869 * eval.c (SCM_CEVAL, SCM_APPLY): Eliminated labels wrongnumargs
6870 and the corresponding goto statements. Removed redundant code.
6871
6872 2002-03-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6873
6874 * eval.c (SCM_CEVAL): Minimized scope of variable arg2.
6875 Eliminated redundant SCM_IMP check. Exlined call to EVALCAR.
6876 Re-enabled handing of rpsubrs and asubrs.
6877
6878 2002-03-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6879
6880 * eval.c (SIDEVAL): Removed.
6881
6882 (SCM_CEVAL): Minimized scope of variable orig_sym. Eliminated
6883 goto-labels cdrxnoap, cdrxbegin and nontoplevel_cdrxnoap. Changed
6884 argument checking order for set! to locals, variables and symbols.
6885 Improvements to control structure. Removed some uses of arg1 and
6886 arg2 as temporary variables.
6887
6888 2002-03-15 Thien-Thi Nguyen <ttn@giblet.glug.org>
6889
6890 * guile-snarf.in: Remove "--compat=1.4" support.
6891 Add "-d" and "-D" support.
6892
6893 (deprecated_list): New var.
6894 (compat_mode_clean_xxx): Delete.
6895 (grep_deprecated): New func.
6896 ("main"): If "-d" or "-D", call `grep_deprecated'.
6897
6898 2002-03-15 Neil Jerram <neil@ossau.uklinux.net>
6899
6900 * hooks.h: Change scm_t_c_hookype_t everywhere to
6901 scm_t_c_hook_type.
6902
6903 Docstring fixes:
6904
6905 * strings.c (scm_string_p): Change unnecessary `iff' to `if'.
6906
6907 * ports.c (scm_sys_make_void_port): Use `@file'.
6908
6909 * numbers.c (scm_number_p, scm_real_p): Use `otherwise' rather
6910 than `else'.
6911
6912 * macros.c (scm_makmacro): Don't say that the form replaces its
6913 source, because it doesn't.
6914 (scm_makmmacro): Clarify difference between this and scm_makmacro.
6915
6916 * backtrace.c (scm_display_error), filesys.c (scm_umask,
6917 scm_select, scm_basename), goops.c (scm_method_generic_function),
6918 numbers.c (scm_integer_length), posix.c (scm_getgroups, scm_execl,
6919 scm_setlocale, scm_flock), socket.c (scm_shutdown): Correct
6920 spelling mistakes.
6921
6922 * debug.c (scm_debug_options), eval.c
6923 (scm_eval_options_interface), read.c (scm_read_options): Change
6924 incorrect @var in docstring to @code.
6925
6926 2002-03-14 Marius Vollmer <mvo@zagadka.ping.de>
6927
6928 * unif.c (singp): Use SCM_REALP instead of SCM_SLOPPY_REALP.
6929
6930 * snarf.h (SCM_SNARF_INIT): Add "^:^" after code so that
6931 guile-snarf can remove trailing non-init code.
6932
6933 * guile-snarf.in (modern_snarf): Remove everything following and
6934 including "^:^" from the output.
6935
6936 2002-03-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
6937
6938 * eval.c (SCM_CEVAL), srcprop.h (SRCBRKP): Eliminated union 't'.
6939
6940 * eval.c (SCM_CEVAL): Exlined call to EVALCAR.
6941
6942 2002-03-13 Thien-Thi Nguyen <ttn@giblet.glug.org>
6943
6944 * guile-snarf.in: Update copyright.
6945 Rewrite to internalize error handling.
6946 Add "--compat=1.4" handling.
6947 Add commentary.
6948
6949 * Makefile.am (libpath.h): Use @top_srcdir_absolute@.
6950 (snarfcppopts): New var.
6951 (.c.x): Use $(snarfcppopts). Rework guile-snarf usage.
6952 (.c.doc): Use $(snarfcppopts).
6953
6954 * alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,
6955 continuations.c, debug-malloc.c, debug.c, deprecation.c, dynl.c,
6956 dynwind.c, environments.c, eq.c, error.c, eval.c, evalext.c,
6957 extensions.c, feature.c, filesys.c, fluids.c, fports.c, gc.c,
6958 goops.c, gsubr.c, guardians.c, hash.c, hashtab.c, hooks.c,
6959 ioext.c, iselect.c, keywords.c, lang.c, list.c, load.c, macros.c,
6960 modules.c, net_db.c, numbers.c, objects.c, objprop.c, options.c,
6961 pairs.c, ports.c, posix.c, print.c, procprop.c, procs.c,
6962 properties.c, ramap.c, random.c, rdelim.c, read.c, regex-posix.c,
6963 root.c, rw.c, scmsigs.c, script.c, simpos.c, socket.c, sort.c,
6964 srcprop.c, stackchk.c, stacks.c, stime.c, strings.c, strop.c,
6965 strorder.c, strports.c, struct.c, symbols.c, threads.c, throw.c,
6966 unif.c, values.c, variable.c, vectors.c, version.c, vports.c,
6967 weaks.c: Retire inclusion guard macro SCM_MAGIC_SNARFER.
6968
6969 2002-03-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
6970
6971 * eval.c (SCM_CEVAL): Got rid of the last reference to t.lloc.
6972 The next step will be to remove the union 't' and simplify the
6973 code of SCM_CEVAL that way.
6974
6975 2002-03-12 Neil Jerram <neil@ossau.uklinux.net>
6976
6977 * iselect.c (collisionp, gnfds, greadfds, gwritefds, gexceptfds,
6978 rreadfds, rwritefds, rexceptfds): Made static.
6979
6980 * gc.c (terminating), fports.c (terminating): Renamed
6981 scm_i_terminating.
6982
6983 2002-03-11 Marius Vollmer <mvo@zagadka.ping.de>
6984
6985 * numbers.c (scm_divide): Adapt code from libstdc++/f2c to void
6986 potential overflow problems. Thanks to John W Eaton!
6987
6988 * strop.c (string_capitalize_x): Treat characters as unsigned so
6989 that 8-bit chars work. Thanks to David Pirotte!
6990
6991 2002-03-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
6992
6993 * eval.c (SCM_CEVAL): Cleaned up the handling of 'slot-ref',
6994 'slot-set!' and 'nil-cond'. Removed some uses of t.arg1, arg2 and
6995 proc as temporary variables. Introduced temporary variables with
6996 hopefully descriptive names for clarification. Replaced SCM_N?IMP
6997 by a more explicit predicate in some places.
6998
6999 2002-03-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
7000
7001 * eval.c (SCM_CEVAL): Cleaned up the handling of #@dispatch.
7002 Added lots of comments regarding the implementation of #@dispatch.
7003 Changed intra-procedure communication to use t.arg1 instead of
7004 arg2. Removed some uses of t.arg1, t.lloc and proc as temporary
7005 variables. Introduced temporary variables with hopefully
7006 descriptive names for clarification. Replaced SCM_N?IMP by a more
7007 explicit predicate in some places. Use SCM_INSTANCE_HASH instead
7008 of computing the expression explicitly. Eliminate now unused
7009 label nontoplevel_cdrxbegin.
7010
7011 * goops.h (SCM_INSTANCE_HASH): New macro.
7012
7013 * objects.h (SCM_CMETHOD_FORMALS, SCM_CMETHOD_BODY): New macros.
7014
7015 2002-03-08 Thien-Thi Nguyen <ttn@giblet.glug.org>
7016
7017 * Makefile.am (bin_SCRIPTS): Revive this decl, w/ initial element
7018 "guile-snarf" moved back from `noinst_SCRIPTS'.
7019
7020 2002-03-08 Neil Jerram <neil@ossau.uklinux.net>
7021
7022 * srcprop.c (scm_set_source_property_x): If SRCPROPS obj already
7023 exists when adding a source property other than those that are
7024 handled explicitly, add the new property to the SRCPROPS obj's
7025 plist.
7026
7027 * debug.h (SCM_MAX_FRAME_SIZE): Remove incorrect comment about use
7028 of SCM_MAX_FRAME_SIZE as a bit mask; it isn't used like this.
7029
7030 * eval.c (SCM_CEVAL): Don't store scm_debug_eframe_size in
7031 debug.status. It isn't needed, and it can overflow the bits
7032 reserved for it (which may lead to a segv or a GC abort).
7033
7034 2002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
7035
7036 * eval.c (SCM_CEVAL): Cleaned up the handling of 'apply'. Removed
7037 side-effecting operations from conditions and macro calls.
7038 Replaced SCM_N?IMP by a more explicit predicate in some places.
7039 Minimized the scope of some variables.
7040
7041 2002-03-02 Stefan Jahn <stefan@lkcc.org>
7042
7043 * convert.i.c: Fixed int <-> long conversions which would have
7044 failed if their sizes were different.
7045
7046 2002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
7047
7048 * eval.c (SCM_CEVAL): Cleaned up the handling of 'if', 'let',
7049 'letrec' and 'set*': Removed some uses of t.arg1, t.lloc and proc
7050 as temporary variables. Removed side-effecting operations from
7051 conditions and macro calls. Introduced temporary variables with
7052 hopefully descriptive names for clarification. Replaced SCM_N?IMP
7053 by a more explicit predicate in some places. Removed code that
7054 was conditionally compiled if SICP was defined - which it never
7055 is.
7056
7057 2002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
7058
7059 * eval.c (SCM_CEVAL): Cleaned up the handling of 'cons' and 'do':
7060 Removed some uses of t.arg1 and proc as temporary variables.
7061 Removed side-effecting operations from conditions and macro calls.
7062 Introduced temporary variables with hopefully descriptive names
7063 for clarification. Replaced SCM_N?IMP by a more explicit
7064 predicate in some places.
7065
7066 2002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
7067
7068 * eval.c (scm_badargsp, SCM_CEVAL): Replaced SCM_N?IMP by a more
7069 explicit predicate in some places.
7070
7071 (CHECK_EQVISH): Removed.
7072
7073 (SCM_CEVAL): Removed some uses of t.arg1 and proc as temporary
7074 variables. Removed side-effecting operations from conditions and
7075 macro calls. Introduced temporary variables for clarification.
7076 Sorted if-else-if check for the type of the last form in a list by
7077 frequency. Avoided some unnecessary tail-recursion calls.
7078
7079 2002-03-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
7080
7081 * gc.c (SCM_HEAP_SEG_SIZE, CELL_UP, CELL_DN, NEXT_DATA_CELL,
7082 init_heap_seg, alloc_some_heap), gc.h (struct scm_cell, struct
7083 scm_t_cell, SCM_CELLPTR, SCM_GC_CARD_SIZE,
7084 SCM_GC_IN_CARD_HEADERP), tags.h (SCM_CELLP): Renamed the struct
7085 scm_cell and all its uses to scm_t_cell in accordance to Guile's
7086 naming scheme for types.
7087
7088 * alist.c (scm_acons), convert.i.c (CTYPES2UVECT,
7089 CTYPES2UVECT_OPTIONAL), coop-threads.c (scm_call_with_new_thread,
7090 scm_spawn_thread), debug.c (scm_make_debugobj), environments.c
7091 (scm_make_environment), eval.c (scm_closure), fports.c
7092 (scm_fdes_to_port), gc.c (scm_deprecated_newcell,
7093 scm_deprecated_newcell2), inline.h (scm_alloc_cell, scm_cell),
7094 list.c (SCM_I_CONS), numbers.c (scm_i_mkbig), pairs.c (scm_cons),
7095 ports.c (scm_void_port), procs.c (scm_c_make_subr, scm_makcclo),
7096 smob.c (scm_make_smob), smob.h (SCM_NEWSMOB), strings.c
7097 (scm_take_str, scm_allocate_string), strports.c (scm_mkstrport),
7098 unif.c (scm_make_uve), variable.c (make_variable), vectors.c
7099 (scm_c_make_vector), vports.c (scm_make_soft_port): Renamed
7100 scm_alloc_cell to scm_cell.
7101
7102 * environments.c (core_environments_observe), gc.c
7103 (scm_deprecated_newcell2), goops.c (wrap_init, scm_wrap_object),
7104 inline.h (scm_alloc_double_cell, scm_double_cell), num2float.i.c
7105 (FLOAT2NUM), numbers.c (scm_make_real), procs.c
7106 (scm_make_procedure_with_setter), smob.h (SCM_NEWSMOB2,
7107 SCM_NEWSMOB3), struct.c (scm_make_struct, scm_make_vtable_vtable),
7108 symbols.c (scm_mem2symbol, scm_mem2uninterned_symbol), weaks.c
7109 (allocate_weak_vector): Renamed scm_alloc_double_cell to
7110 scm_double_cell.
7111
7112 2002-02-27 Stefan Jahn <stefan@lkcc.org>
7113
7114 * convert.i.c, convert.c: Better range checking.
7115
7116 * inet_aton.c, fports.c: Commented the inclusion of <winsock2.h>.
7117
7118 * deprecation.c (vsnprintf): Define to `_vsnprintf' for
7119 Windows (MinGW).
7120
7121 2002-02-26 Thien-Thi Nguyen <ttn@giblet.glug.org>
7122
7123 * Makefile.am: Update path to pre-inst-guile automake frag.
7124
7125 2002-02-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
7126
7127 * gc.c (scm_gc_sweep): Make it compile even when deprecated
7128 features are excluded.
7129
7130 2002-02-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
7131
7132 * num2integral.i.c (NUM2INTEGRAL): Fixed signedness problem.
7133
7134 2002-02-25 Gary Houston <ghouston@arglist.com>
7135
7136 * convert.c: include <string.h> for convert_i.c.
7137
7138 2002-02-24 Rob Browning <rlb@defaultvalue.org>
7139
7140 * .cvsignore: add stamp-h1.
7141
7142 2002-02-21 Neil Jerram <neil@ossau.uklinux.net>
7143
7144 * unif.c (scm_array_to_list): Correct name, which had been
7145 accidentally changed to scm_t_arrayo_list!
7146
7147 2002-02-20 Mikael Djurfeldt <mdj@linnaeus>
7148
7149 * gc.c (scm_gc_sweep): Print an error message when aborting due to
7150 underflowing scm_mallocated.
7151
7152 2002-02-14 Marius Vollmer <marius.vollmer@uni-dortmund.de>
7153
7154 * gc.h, gc.c (scm_must_malloc, scm_must_realloc, scm_must_strdup,
7155 scm_must_strndup, scm_done_malloc, scm_done_free, scm_must_free):
7156 Reimplemented using the new scm_gc_malloc, etc., functions and
7157 deprecated.
7158
7159 2002-02-11 Thien-Thi Nguyen <ttn@giblet.glug.org>
7160
7161 * Makefile.am (bin_PROGRAMS): Move `guile_filter_doc_snarfage'
7162 to `noinst_PROGRAMS'.
7163 (bin_SCRIPTS): Move all values to `noinst_SCRIPTS'; delete.
7164 (noinst_PROGRAMS, noinst_SCRIPTS): New.
7165
7166 2002-02-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
7167
7168 * gc.h, gc.c (scm_gc_sweep): Issue deprecation warning when
7169 non-zero is returned from a port or smob free function.
7170 (scm_malloc, scm_realloc, scm_strndup, scm_strdup,
7171 scm_gc_register_collectable_memory,
7172 scm_gc_unregister_collectable_memory, scm_gc_malloc,
7173 scm_gc_realloc, scm_gc_free, scm_gc_strndup, scm_gc_strdup): New.
7174
7175 * backtrace.c, continuations.c, convert.i.c, coop-threads.c,
7176 debug-malloc.c, dynl.c, environments.c, environments.h,
7177 extensions.c, filesys.c, fports.c, gc.c, gc.h, gh_data.c, goops.c,
7178 guardians.c, hooks.c, init.c, keywords.c, load.c, numbers.c,
7179 ports.c, posix.c, procs.c, rdelim.c, regex-posix.c, root.c,
7180 smob.c, stime.c, strings.c, struct.c, struct.h, symbols.c, unif.c,
7181 vectors.c, weaks.c: Use scm_gc_malloc/scm_malloc and
7182 scm_gc_free/free instead of scm_must_malloc and scm_must_free, as
7183 appropriate. Return zero from smob and port free functions.
7184
7185 * debug-malloc.c (scm_malloc_reregister): Handle "old == NULL".
7186
7187 * deprecation.h, deprecation.c: Reimplemented to allow deprecation
7188 messages while the GC is running.
7189 (scm_c_issue_deprecation_warning_fmt): New.
7190
7191 * fports.c (scm_setvbuf): Reset read buffer to saved values when
7192 it is pointing to the putback buffer.
7193
7194 2002-02-08 Thien-Thi Nguyen <ttn@giblet.glug.org>
7195
7196 * gsubr.c (create_gsubr): On "too many args" error,
7197 also display arg count and name. Thanks to Bill Schottstaedt.
7198
7199 2002-02-05 Thien-Thi Nguyen <ttn@giblet.glug.org>
7200
7201 * Makefile.am: Include $(top_srcdir)/pre-inst-guile.am.
7202
7203 (bin_SCRIPTS): Remove guile-snarf-docs-texi.
7204 (alldotdocfiles, snarf2checkedtexi, dotdoc2texi): New vars.
7205 (guile.texi, guile-procedures.texi): Use $(dotdoc2texi).
7206
7207 * guile-snarf-docs-texi.in: Bye bye.
7208
7209 2002-02-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
7210
7211 * symbols.c (scm_make_symbol): Fix typo in docstring.
7212
7213 * symbols.h (scm_mem2uninterned_symbol, scm_symbol_interned_p,
7214 scm_make_symbol): New prototypes.
7215
7216 2002-02-03 Marius Vollmer <mvo@zagadka.ping.de>
7217
7218 * symbols.h (SCM_SET_SYMBOL_HASH): Removed.
7219 (SCM_SYMBOL_INTERNED_P): New.
7220 * symbols.c (scm_symbol_hash): Use scm_ulong2num instead of
7221 SCM_MAKINUM since hash values can well be bignums.
7222 (scm_mem2symbol): Only use hash values below SCM_T_BITS_MAX/2.
7223 This signals a interned symbol.
7224 (scm_mem2uninterned_symbol, scm_symbol_interned_p,
7225 scm_make_symbol): New.
7226
7227 * print.c (scm_iprin1): Print uninterned symbols unreadably.
7228
7229 2002-02-02 Thien-Thi Nguyen <ttn@giblet.glug.org>
7230
7231 * __scm.h (HAVE_UINTPTR_T): Only define if UINTPTR_T attributes
7232 are defined: UINTPTR_MAX, INTPTR_MAX, INTPTR_MIN.
7233 Thanks to Dave Love.
7234
7235 2002-01-31 Marius Vollmer <mvo@zagadka.ping.de>
7236
7237 * symbols.c (scm_gensym): Use " g" as default prefix, not "g".
7238 This might help to make unintended clashes less likely.
7239 (scm_string_to_symbol): Protect the string until the symbols is
7240 created.
7241
7242 2002-01-31 Stefan Jahn <stefan@lkcc.org>
7243
7244 * convert.c, convert.h, convert.i.c: New files containing C
7245 array to Scheme conversion helpers meant to be replacement
7246 functions for the deprecated gh interface.
7247
7248 * Makefile.am: Setup rules for new `convert.*' files.
7249
7250 2002-01-28 Stefan Jahn <stefan@lkcc.org>
7251
7252 * symbols.c (scm_c_symbol2str): New function, replacement for
7253 `gh_scm2newsymbol()'.
7254
7255 * strings.c (scm_c_substring2str): New function. Proper
7256 replacement for `gh_get_substr()'.
7257
7258 * socket.c: Include `stdint.h' if available for the `uint32_t'
7259 declaration.
7260
7261 * scmsigs.c (scm_sigaction): Initialize `chandler' (inhibits
7262 compiler warning).
7263
7264 * backtrace.c: Include `lang.h' for GUILE_DEBUG conditional.
7265
7266 2002-01-22 Neil Jerram <neil@ossau.uklinux.net>
7267
7268 Other changes unrelated to Elisp...
7269
7270 * eval.c (scm_m_if): Use s_if rather than repeating string literal
7271 "if".
7272 (comments): Fix a few typos.
7273 (scm_for_each): Add parentheses around oddly unparenthesized
7274 if/while conditions.
7275
7276 * read.c (scm_read_opts): Add full stop at end of doc for
7277 `keywords' option.
7278
7279 * script.c (scm_compile_shell_switches): Use scm_str2symbol
7280 instead of gh_symbol2scm.
7281
7282 * srcprop.h (SRCPROPBRK): Return C type rather than SCM.
7283 (SRCBRKP): Use SRCPROPBRK rather than duplicating its logic.
7284
7285 * srcprop.c (scm_srcprops_to_plist, scm_source_property): Change
7286 SRCPROPBRK (x) to SCM_BOOL (SRCPROPBRK (x)).
7287
7288 First batch of changes for Elisp support...
7289
7290 * alist.c, async.c, boolean.c, dynl.c, eval.c, filesys.c,
7291 fluids.c, list.c, load.c, options.c, posix.c, print.c, sort.c,
7292 throw.c, vectors.c, weaks.c: Add #include for lang.h.
7293
7294 * eval.c, eval.h, init.c, lang.c, lang.h: Use SCM_ENABLE_ELISP to
7295 conditionalize compilation and initialization of Elisp support
7296 function.
7297
7298 * alist.c (scm_assq, scm_assv, scm_assoc), async.c
7299 (scm_asyncs_pending, scm_run_asyncs, noop), backtrace.c
7300 (scm_set_print_params_x), dynl.c (scm_make_argv_from_stringlist),
7301 filesys.c (fill_select_type, retrieve_select_type), fluids.c
7302 (scm_swap_fluids, scm_swap_fluids_reverse), list.c (scm_null_p,
7303 scm_ilength, scm_append_x, scm_last_pair, scm_reverse,
7304 scm_reverse_x, scm_list_ref, scm_list_set_x, scm_list_cdr_set_x,
7305 scm_c_memq, scm_memv, scm_member), load.c (scm_search_path),
7306 options.c (change_option_setting, scm_options), posix.c
7307 (environ_list_to_c), print.c (scm_iprlist), throw.c
7308 (scm_exit_status), vectors.c (scm_vector), weaks.c
7309 (scm_weak_vector): Use SCM_NULL_OR_NIL_P instead of SCM_NULLP.
7310
7311 * boolean.c (scm_not): Use `SCM_FALSEP || SCM_NILP' instead of
7312 just SCM_FALSEP.
7313
7314 * boolean.c (scm_boolean_p): Use `SCM_BOOLP || SCM_NILP' instead
7315 of just SCM_BOOLP.
7316
7317 * eval.c (scm_lisp_nil, scm_lisp_t, s_nil_ify, scm_m_nil_ify,
7318 s_t_ify, scm_m_t_ify, s_0_cond, scm_m_0_cond, s_0_ify,
7319 scm_m_0_ify, s_1_ify, scm_m_1_ify): Removed.
7320 (scm_m_atfop): Support function aliasing. Support both function
7321 args, which need transformation, and macro args, which do not.
7322 Add explanatory comments.
7323 (SCM_CEVAL): In switch cases for SCM_IM_AND, SCM_IM_COND,
7324 SCM_IM_DO, SCM_IM_IF and SCM_IM_OR, add `|| SCM_NILP' to existing
7325 checks for SCM_FALSEP. In switch case for SCM_IM_NIL_COND, use
7326 SCM_NULLP || SCM_NILP instead of checks against (removed)
7327 scm_lisp_nil. Removed switch cases for SCM_IM_NIL_IFY,
7328 SCM_IM_T_IFY, SCM_IM_0_COND, SCM_IM_0_IFY, SCM_IM_1_IFY.
7329
7330 * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null,
7331 scm_m_while, scm_nil_eq): Commented out; I don't think we need
7332 these, but I don't want to remove them yet, just in case.
7333 (scm_init_lang): Define `%nil' variable on Scheme level to hold
7334 Elisp nil value.
7335
7336 * lang.h (SCM_NILP): Test against Elisp nil value instead of
7337 against (removed) scm_lisp_nil.
7338 (SCM_NILNULLP, SCM_NIL2EOL, SCM_EOL2NIL): Commented out.
7339 (SCM_NULL_OR_NIL_P): New.
7340
7341 * list.c (scm_append): Use SCM_VALIDATE_NULL_OR_NIL instead of
7342 SCM_VALIDATE_NULL.
7343
7344 * print.c (scm_isymnames): Fix comment. Remove #@nil-ify,
7345 #@t-ify, #@0-cond, #@0-ify, #@1-ify. Add #nil (for SCM_ELISP_NIL
7346 value).
7347
7348 * sort.c (scm_sorted_p, scm_merge, scm_merge_list_x, scm_merge_x,
7349 scm_sort_x, scm_sort, scm_stable_sort_x, scm_stable_sort): Use
7350 SCM_NULL_OR_NIL_P instead of SCM_NULLP. In constructions like `if
7351 (SCM_NULLP (x)) return SCM_EOL;', return x rather than SCM_EOL.
7352
7353 * tags.h (SCM_IM_NIL_IFY, SCM_IM_T_IFY, SCM_IM_0_COND,
7354 SCM_IM_0_IFY, SCM_IM_1_IFY): Removed.
7355 (SCM_IM_BIND, SCM_IM_DELAY, SCM_IM_CALL_WITH_VALUES, SCM_UNBOUND):
7356 Numbering shifted down accordingly.
7357 (SCM_ELISP_NIL): New IFLAG.
7358
7359 * validate.h (SCM_VALIDATE_NULL_OR_NIL): New.
7360
7361 2002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
7362
7363 * eval.c: Removed outdated references to "everr". Improved some
7364 comments.
7365
7366 (scm_deval_args, deval_args): Renamed scm_deval_args to
7367 deval_args, since it is not part of the interface.
7368
7369 (SCM_CEVAL): Added (maybe somewhat verbose) comment. Avoid to
7370 use references to debug.vect[0] before it exists. Add parentheses
7371 to switch statement.
7372
7373 * goops.h: Added local emacs variables.
7374
7375 2002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
7376
7377 * eval.[ch] (scm_deval_args): Made static.
7378
7379 * srcprop.c (scm_source_property): Remove redundant SCM_IMP
7380 test.
7381
7382 * strings.c (scm_c_string2str): Clarified comment. Replaced
7383 THINKME by FIXME for uniformness. Removed question about whether
7384 arguments need to be protected from garbage collection: Arguments
7385 must be protected as any other variable.
7386
7387 2002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
7388
7389 * procs.h (SCM_CLOSURE_BODY): New Macro.
7390
7391 * debug.c (scm_procedure_name, scm_procedure_source), eval.c
7392 (SCM_CEVAL, SCM_APPLY), goops.c (scm_sys_initialize_object,
7393 get_slot_value, set_slot_value), procs.c
7394 (scm_procedure_documentation), sort.c (closureless), stacks.c
7395 (get_applybody): Replace SCM_CDR (SCM_CODE (...)) by
7396 SCM_CLOSURE_BODY.
7397
7398 * sort.c (closureless): Prefer !SCM_FOOP over SCM_NFOOP.
7399
7400 2001-12-26 Marius Vollmer <mvo@zagadka.ping.de>
7401
7402 * Makefile.am (guile-procedures.txt): When we don't have makeinfo,
7403 use "cp" instead.
7404
7405 2001-12-16 Marius Vollmer <mvo@zagadka.ping.de>
7406
7407 * stacks.c, stacks.h (scm_t_stackype): Renamed to scm_stack_type
7408 everywhere.
7409
7410 * continuations.c (scm_make_continuation): Do not retain the
7411 throw_value when the continuation is invoked.
7412
7413 2001-12-08 Stefan Jahn <stefan@lkcc.org>
7414
7415 * strings.c (scm_c_string2str): New function. Converts a
7416 given Scheme string into a C string. Also put in two
7417 THINKME's regarding the malloc policy for the missing converter
7418 routines.
7419
7420 2001-12-01 Neil Jerram <neil@ossau.uklinux.net>
7421
7422 * gh_data.c (gh_module_lookup): Use scm_str2symbol rather than
7423 gh_symbol2scm.
7424
7425 2001-11-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
7426
7427 * gc.h (SCM_GC_CELL_WORD, SCM_GC_CELL_OBJECT,
7428 SCM_GC_SET_CELL_WORD, SCM_GC_SET_CELL_OBJECT): New macros.
7429
7430 (SCM_GC_CELL_TYPE, SCM_CELL_WORD, SCM_CELL_OBJECT,
7431 SCM_SET_CELL_WORD, SCM_SET_CELL_OBJECT, SCM_FREE_CELL_CDR,
7432 SCM_GC_SET_CELL_OBJECT): Express in terms of SCM_GC_CELL_*
7433 macros.
7434
7435 (SCM_FREE_CELL_P): Express in terms of SCM_GC_CELL_TYPE.
7436
7437 * inline.h (scm_alloc_cell, scm_alloc_double_cell): Use
7438 SCM_GC_CELL_* macros when accessing free cells.
7439
7440 2001-11-25 Marius Vollmer <mvo@zagadka.ping.de>
7441
7442 * vectors.h (SCM_MAKE_VECTOR_TAG): New.
7443 * unif.h (SCM_MAKE_BITVECTOR_TAG, SCM_MAKE_UVECTOR_TAG): New.
7444 * symbols.h (SCM_MAKE_SYMBOL_TAG): New.
7445 * strings.h (SCM_MAKE_STRING_TAG): New.
7446 * procs.h (SCM_MAKE_CCLO_TAG): New.
7447 * numbers.h (SCM_MAKE_BIGNUM_TAG): New.
7448
7449 * goops.h: Replaced SCM_DEBUG_DEPRECATED with
7450 !SCM_ENABLE_DEPRECATED.
7451
7452 * async.c, async.h (scm_system_async_mark_from_signal_handler):
7453 New.
7454
7455 * scmsigs.c (scm_take_signal): Removed all code that assumes that
7456 signal handlers are allowed to divert the flow of control. Call
7457 scm_system_async_mark_from_signal_handler instead of
7458 scm_system_async_mark.
7459
7460
7461 Deprecated SCM_NEWCELL and SCM_NEWCELL2. Added scm_alloc_cell and
7462 scm_alloc_double_cell in their place.
7463
7464 * gc.h (SCM_GC_SET_ALLOCATED, scm_debug_newcell,
7465 scm_debug_newcell2, scm_tc16_allocated): Removed from header.
7466 (scm_deprecated_newcell, scm_deprecated_newcell2): New.
7467 (SCM_NEWCELL, SCM_NEWCELL2): Implement in terms of
7468 scm_deprecated_newcell and scm_deprecated_newcell2.
7469
7470 gc.c (scm_tc16_allocated): Only define when including deprecated
7471 features.
7472 (scm_debug_newcell, scm_debug_newcell2): Removed.
7473 (scm_init_storage): Do not initialize scm_tc16_allocated.
7474 (scm_init_gc): Do it here.
7475 (allocated_mark): New, from old code.
7476 (scm_deprecated_newcell, scm_deprecated_newcell2): New.
7477
7478 * inline.c, inline.h: New files.
7479 * Makefile.am: Added them in all the right places.
7480
7481 * _scm.h: Include "libguile/inline.h".
7482
7483 * alist.c, coop-threads.c, debug.c, environments.c, eval.c,
7484 fports.c, gh_data.c, goops.c, guardians.c, lang.c, list.c,
7485 num2float.i.c, numbers.c, pairs.c, ports.c, print.c, procs.c,
7486 smob.c, smob.h, strings.c, strports.c, struct.c, symbols.c,
7487 unif.c, variable.c, vectors.c, vports.c, weaks.c: Replaced
7488 SCM_NEWCELL and SCM_NEWCELL2 with scm_alloc_cell and
7489 scm_alloc_double_cell, respectively.
7490
7491 2001-11-23 Marius Vollmer <mvo@zagadka.ping.de>
7492
7493 * modules.c (scm_c_use_module): Adapt to changes to
7494 `process-use-modules'.
7495
7496 2001-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
7497
7498 * numbers.c (scm_divide): Fix more division by zero errors.
7499
7500 2001-11-21 Gary Houston <ghouston@arglist.com>
7501
7502 * Makefile.am (OMIT_DEPENDENCIES): removed, since it seems to be
7503 obsolete. autogen.sh says:
7504 invalid unused variable name: `OMIT_DEPENDENCIES'
7505
7506 2001-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
7507
7508 * numbers.c (scm_divide): Fix (/ 0). Thanks to Keith Wright for
7509 reporting the bug.
7510
7511 2001-11-21 Marius Vollmer <mvo@zagadka.ping.de>
7512
7513 * Makefile.am (install-exec-hook): Prepend $(DESTDIR) to filename.
7514 Thanks to Eric Gillespie, Jr!
7515
7516 2001-11-21 Stefan Jahn <stefan@lkcc.org>
7517
7518 * win32-socket.c (getservent, setservent, endservent,
7519 getprotoent, setprotoent, endprotoent): New functions.
7520 Appropriate replacements for M$-Windows.
7521
7522 * numbers.c (SIZE_MAX, PTRDIFF_MAX, PTRDIFF_MIN): Reintroduced
7523 these definitions for GUILE_DEBUG.
7524
7525 * net_db.c: Include "win32-socket.h" if compiling with a native
7526 M$-Windows compiler. Include some pieces of code (protoent and
7527 servent interface) protected by HAVE_* macros when using a
7528 native M$-Windows compiler.
7529
7530 2001-11-20 Marius Vollmer <mvo@zagadka.ping.de>
7531
7532 * modules.c (scm_c_export): Do nothing when the first argument is
7533 already the terminating NULL. Thanks to Han-Wen Nienhuys!
7534
7535 2001-11-20 Thien-Thi Nguyen <ttn@glug.org>
7536
7537 * Makefile.am (libpath.h): In SCM_BUILD_INFO,
7538 also include `buildstamp'.
7539
7540 2001-11-18 Rob Browning <rlb@defaultvalue.org>
7541
7542 * version.c
7543 (s_scm_major_version): use SCM_MAJOR_VERSION.
7544 (s_scm_minor_version): use SCM_MINOR_VERSION.
7545 (s_scm_micro_version): use SCM_MICRO_VERSION.
7546 (s_scm_version): use SCM_MAJOR_VERSION, SCM_MINOR_VERSION, and
7547 SCM_MICRO_VERSION.
7548
7549 * version.h.in
7550 (SCM_MAJOR_VERSION): renamed from SCM_GUILE_MAJOR_VERSION.
7551 (SCM_MINOR_VERSION): renamed from SCM_GUILE_MINOR_VERSION.
7552 (SCM_MICRO_VERSION): renamed from SCM_GUILE_MICRO_VERSION.
7553
7554 2001-11-18 Neil Jerram <neil@ossau.uklinux.net>
7555
7556 * vectors.c (scm_vector_move_left_x, scm_vector_move_right_x):
7557 Rewrite docstrings without reference to substring-move-left/right,
7558 since the latter no longer exist.
7559
7560 2001-11-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
7561
7562 * eval.c: Removed bogus comment about acros.
7563
7564 (scm_unmemocar): Use !SCM_CONSP instead of SCM_IMP.
7565 Minimize scope of local variable. Eliminate dependency on
7566 macro DEBUG_EXTENSIONS.
7567
7568 (s_splicing): New error message string.
7569
7570 (scm_m_body): Issue 'bad body' message rather than 'missing
7571 expression' message.
7572
7573 (scm_m_quote): Eliminate unnecessary copying.
7574
7575 (scm_m_lambda, scm_m_letstar, scm_m_letrec, scm_m_let): Leave the
7576 checking of the body to scm_m_body.
7577
7578 (scm_m_do): Move comment to function header. Rename arg1 to
7579 binding. Made the code a bit easier to read.
7580
7581 (evalcar): Removed.
7582
7583 (iqq): Added a comment. Changed the depth parameter to
7584 unsigned. Use size_t for vector lengths. Make sure vector object
7585 is gc protected as long as its contents are read. Add some syntax
7586 checks. Get rid of unnecessary SCM_IMP test. Clean up the
7587 control structure a bit.
7588
7589 (scm_m_delay): Added comment about the implementation of
7590 scm_m_delay.
7591
7592 (scm_m_define): Add comment about guile's currying define
7593 syntax. Renamed 'proc' to 'name'. Eliminate dependency on macro
7594 DEBUG_EXTENSIONS. Simplified code a bit. Eliminate SICP code.
7595
7596 (scm_m_letrec1): Removed. Part of the functionality is taken
7597 over by the new function 'transform_bindings'.
7598
7599 (transform_bindings): New function. Takes over some of the
7600 functionality of removed function 'scm_m_letrec1', namely to split
7601 a list of bindings into a reversed list of variables and a list of
7602 initializers.
7603
7604 (scm_m_letrec): Call 'transform_bindings'.
7605
7606 (scm_m_let): Minimized scope of local variables. Renamed 'proc'
7607 to 'temp' and 'arg1' to 'binding'. Eliminated redundant SCM_NIMP
7608 test. Use 'transform_bindings'. Fixed scoping error with named
7609 let (Thanks to Aubrey Jaffer for reporting the bug and to Neil
7610 Jerram for suggesting the fix). Cleaned up the control structure
7611 a bit.
7612
7613 (scm_m_expand_body): Use 'transform_bindings'. Eliminated
7614 unnecessary consing. Eliminated unnecessary
7615 SCM_DEFER/ALLOW_INTS.
7616
7617 (SCM_CEVAL): Un-obfuscated some loops.
7618
7619 2001-11-16 Neil Jerram <neil@ossau.uklinux.net>
7620
7621 * gc.h (scm_unhash_name): Old declaration removed.
7622
7623 * eval.c (s_scm_eval): Change @var{primitive-eval} to
7624 @code{primitive-eval}.
7625
7626 * feature.c, vectors.c, net_db.c, unif.c, weaks.c, struct.c,
7627 version.c, alist.c, ports.c, ramap.c, unif.c, strings.c, list.c:
7628 Change @deffnx lines in docstrings to say {Scheme Procedure}
7629 rather than primitive or procedure.
7630
7631 * posix.c (scm_execl), filesys.c (scm_close), unif.c
7632 (scm_array_set_x, scm_array_contents, scm_uniform_array_read_x,
7633 scm_bit_set_star_x, scm_bit_invert_x), ramap.c (scm_array_fill_x,
7634 scm_array_for_each, scm_array_index_map_x), vectors.c (scm_vector,
7635 scm_make_vector, scm_vector_to_list, scm_vector_fill_x), strop.c
7636 (scm_string_split, scm_string_ci_to_symbol), strings.c
7637 (scm_string_p), sort.c (scm_merge), print.c (scm_newline),
7638 macros.c (scm_macro_type), alist.c (scm_acons, scm_assq):
7639 Docstring fixes and improvements reflecting edits that have been
7640 made in the reference manual source.
7641
7642 * objprop.c (scm_object_properties, scm_set_object_properties_x,
7643 scm_object_property, scm_set_object_property_x): Remove invalid
7644 @deffnx lines for corresponding procedure property primitives.
7645
7646 These changes add a @deffnx C function declaration and function
7647 index entries for each Guile primitive to the copy of the doc
7648 snarf output that is used for reference manual synchronization.
7649 Online help is unchanged.
7650
7651 * snarf.h (SCM_SNARF_DOCS): Output primitive's C function name.
7652 (SCM_DEFINE, SCM_DEFINE1, SCM_REGISTER_PROC): Supply to C function
7653 name to SCM_SNARF_DOCS.
7654
7655 * guile-snarf-docs-texi.in: Pass the shell script's arguments into
7656 snarf-check-and-output-texi.
7657
7658 * Makefile.am (guile-procedures.texi): New rule.
7659 (BUILT_SOURCES, guile.texi, guile-procedures.txt, CLEANFILES):
7660 Changed so that the last stage of doc snarfing is now performed
7661 twice, once to produce guile-procedures.txt for online help, and
7662 once to produce guile.texi for reference manual synchronization.
7663
7664 2001-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
7665
7666 * eval.c (RETURN): Wrap in do{}while(0) in order to make it
7667 safely usable as a single statement followed by a ';', for example
7668 in an if statement.
7669
7670 (SCM_CEVAL, SCM_APPLY): Clean up code using 'RETURN'.
7671
7672 2001-11-13 Neil Jerram <neil@ossau.uklinux.net>
7673
7674 * random.c (scm_random_solid_sphere_x,
7675 scm_random_hollow_sphere_x): Correct "shere" typos.
7676
7677 * hashtab.c (scm_hash_fold): Add missing apostrophe to docstring.
7678
7679 * version.c (scm_version): Update docstring to include
7680 `micro-version'.
7681
7682 2001-11-13 Marius Vollmer <mvo@zagadka.ping.de>
7683
7684 * modules.c (scm_c_export): Call va_end after collecting the
7685 symbols.
7686
7687 * strop.h, strop.c (scm_substring_move_left_x,
7688 scm_substring_move_right_x): Removed.
7689
7690 * __scm.h (HAVE_UINTPTR_T, HAVE_PTRDIFF_T, HAVE_LONG_LONG,
7691 HAVE_LONG_LONGS): Define to "1" when defining them, to mirror what
7692 configure does.
7693
7694 2001-11-12 Marius Vollmer <mvo@zagadka.ping.de>
7695
7696 * numbers.c: Document macros to define when including
7697 num2integral.i.c. MAX_VALUE and MIN_VALU are no longer used, we
7698 now rely on SIZEOF_ macros that have been figured out at
7699 configure time.
7700
7701 * num2integral.i.c: Adapt to new interface.
7702 (NUM2INTEGRAL): Test whether a fixnum can be represented in the
7703 target type by casting it and checking whether it is still the
7704 same. Do not try to handle bignums for integral types that are
7705 smaller than fixnums. When handling bignums, collect the
7706 magnituse first into a unsigned type, and correctly check for
7707 overflow.
7708 (INTEGRAL2BIG): Do not use MIN_VALUE explicitely by observing that
7709 only -MIN_VALUE can still be negative of all negative numbers (in
7710 twos-complement).
7711
7712 * tags.h (SIZEOF_SCM_T_BITS): Define it appropriately.
7713
7714 * __scm.h: Define HAVE_UINTPTR_T, HAVE_PTRDIFF_T and
7715 HAVE_LONG_LONG depending on whether their size is non-zero.
7716
7717 2001-11-11 Thien-Thi Nguyen <ttn@glug.org>
7718
7719 * strop.c (scm_string_null_p): Docfix; nfc.
7720 Thanks to Scott Lenser.
7721
7722 2001-11-07 Neil Jerram <neil@ossau.uklinux.net>
7723
7724 * extensions.c (scm_load_extension): Canonicalize docstring
7725 whitespace.
7726
7727 * unif.c (scm_uniform_array_write), ports.c
7728 (scm_current_output_port, scm_force_output), dynwind.c
7729 (scm_dynamic_wind), scmsigs.c (scm_setitimer, scm_getitimer),
7730 filesys.c (scm_open, scm_lstat), struct.c
7731 (scm_make_struct_layout), random.c (scm_random,
7732 scm_random_solid_sphere_x, scm_random_hollow_sphere_x, strop.c
7733 (scm_i_index): Remove superfluous whitespace from end of docstring
7734 lines.
7735
7736 * filesys.c (scm_select), guardians.c (scm_guardian_greedy_p),
7737 strings.c (scm_make_string), variable.c (scm_make_variable,
7738 scm_make_undefined_variable, scm_variable_p, scm_variable_set_x,
7739 scm_variable_bound_p), scmsigs.c (scm_setitimer, scm_getitimer),
7740 posix.c (scm_crypt), struct.c (scm_make_vtable_vtable), hashtab.c
7741 (scm_hash_fold), ports.c (scm_port_for_each): Remove superfluous
7742 newline at end of docstrings.
7743
7744 * modules.c (scm_set_current_module): Add missing newline to
7745 docstring.
7746
7747 2001-11-07 Stefan Jahn <stefan@lkcc.org>
7748
7749 * win32-socket.[ch]: New files. Defines Winsock-API error codes
7750 and makes them available through Guile. That is because the
7751 Winsock-API does not store its errors in `errno' and thus cannot
7752 return error messages via `strerror (errno)'.
7753
7754 * socket.c (scm_init_socket): Initialize `win32-socket' part
7755 here under M$-Windows.
7756
7757 * numbers.h: Added missing declaration of
7758 `scm_sys_check_number_conversions()'.
7759
7760 * error.c: Local definition of SCM_I_STRERROR and SCM_I_ERRNO
7761 and use in `(strerror)' and `(system-error)'.
7762
7763 * Makefile.am (EXTRA_libguile_la_SOURCES): Added
7764 `win32-socket.[ch]' to extra source and header files.
7765
7766 2001-11-06 Marius Vollmer <mvo@zagadka.ping.de>
7767
7768 * script.c (scm_shell_usage, scm_compile_shell_switches): Prepend
7769 a call to turn-on-debugging when --debug has been given instead of
7770 turning it on directly. Also, handle new `--no-debug' option,
7771 which might suppress the call to turn-on-debugging.
7772
7773 2001-11-05 Stefan Jahn <stefan@lkcc.org>
7774
7775 * struct.c (s_scm_struct_vtable_p): Corrected docstring.
7776
7777 2001-11-04 Stefan Jahn <stefan@lkcc.org>
7778
7779 * Makefile.am (libguile_la_LIBADD): Added $(THREAD_LIBS_LOCAL)
7780 here (was at guile_LDADD) which describes the dependency
7781 correctly and allows a clean build on Win32.
7782
7783 * __scm.h (SCM_API): Follow-up patch. Renamed __FOO__ macros
7784 into FOO.
7785
7786 * __scm.h: USE_DLL_IMPORT indicates the usage of the DLL
7787 import macros for external libraries (libcrypt, libqthreads,
7788 libreadline and libregex).
7789
7790 * coop-defs.h: Include <winsock2.h> for `struct timeval'.
7791
7792 * posix.c (flock): Added support for flock() in M$-Windows.
7793
7794 * guile.c (SCM_IMPORT): Follow-up patch. Use SCM_IMPORT instead
7795 of __SCM_IMPORT__.
7796
7797 * fports.c (getflags): Differentiate reading and writing pipes
7798 descriptors.
7799
7800 * filesys.c (S_IS*): Redefine all of the S_IS*() macros for
7801 M$-Windows.
7802
7803 * coop.c (coop_condition_variable_timed_wait_mutex): Use
7804 conditionalized error code if `ETIMEDOUT' is not available.
7805 (scm_thread_usleep): Remove bogus declaration of `struct timeval
7806 timeout'.
7807
7808 * numbers.c (PTRDIFF_MIN): Moved this definition where it actually
7809 belongs. That is because NO_PREPRO_MAGIC gets undefined after
7810 each inclusion of `num2integral.i.c'.
7811 (SIZE_MAX): Define NO_PREPRO_MAGIC if SIZE_MAX is undefined.
7812
7813 2001-11-03 Marius Vollmer <mvo@zagadka.ping.de>
7814
7815 * eval.c (scm_m_begin): Allow `(begin)`, with no subforms.
7816 (SCM_CEVAL): Evaluate an empty `begin' to SCM_UNSPECIFIED.
7817
7818 2001-11-02 Mikael Djurfeldt <mdj@linnaeus>
7819
7820 * print.c (scm_iprin1): Mark print state as revealed when
7821 dispatching to generic write or display.
7822
7823 * unif.c (scm_ra2contig): Fixed memory overwrite bug.
7824
7825 2001-11-02 Marius Vollmer <mvo@zagadka.ping.de>
7826
7827 Support for native Win32. Thanks to Stefan Jahn!
7828
7829 * Makefile.am: Add win32-uname.c, win32-uname.h, win32-dirent.c
7830 and win32-dirent.h to extra source and header files. These
7831 include the uname() and the POSIX dirent interface implementation
7832 for M$-Windows. Put `-no-undefined' into LDFLAGS to support
7833 linkers which do not allow unresolved symbols inside shared
7834 libraries. Corrected `guile_filter_doc_snarfage$(EXEEXT)'
7835 dependency.
7836
7837 * __scm.h: Defined SCM_API. This macro gets prepended to all
7838 function and data definitions which should be exported or imported
7839 in the resulting dynamic link library in the Win32 port.
7840
7841 * __scm.h, alist.h, arbiters.h, async.h, backtrace.h, boolean.h,
7842 chars.h, continuations.h, coop-defs.h, coop-threads.h,
7843 debug-malloc.h, debug.h, deprecation.h, dynl.h, dynwind.h,
7844 environments.h, eq.h, error.h, eval.h, evalext.h, extensions.h,
7845 feature.h, filesys.h, fluids.h, fports.h, gc.h, gdb_interface.h,
7846 gdbint.h, gh.h, goops.h, gsubr.h, guardians.h, hash.h, hashtab.h,
7847 hooks.h, init.h, ioext.h, iselect.h, keywords.h, lang.h, list.h,
7848 load.h, macros.h, mallocs.h, modules.h, net_db.h, numbers.h,
7849 objects.h, objprop.h, options.h, pairs.h, ports.h, posix.h, print.h,
7850 procprop.h, procs.h, properties.h, ramap.h, random.h, rdelim.h,
7851 read.h, regex-posix.h, root.h, rw.h, scmsigs.h, script.h, simpos.h,
7852 smob.h, socket.h, sort.h, srcprop.h, stackchk.h, stacks.h, stime.h,
7853 strings.h, strop.h, strorder.h, strports.h, struct.h, symbols.h,
7854 tags.h, threads.h, throw.h, unif.h, values.h, variable.h, vectors.h,
7855 vports.h, weaks.h:
7856 Prefixed each each exported symbol with SCM_API.
7857
7858 * continuations.c: Added comment about the use of the extern
7859 declarations of {get,set}context() functions used in the ia64 port.
7860
7861 * continuations.h, gc.c: `__libc_ia64_register_backing_store_base'
7862 is meant to be a `unsigned long *'.
7863
7864 * filesys.c: Include `direct.h' if possible. Use local
7865 `win32-dirent.h' for the native M$-Windows port. Define S_IS*()
7866 macros for M$-Windows. Implementation of `fstat_Win32()' which is
7867 able to differentiate between sockets and other file descriptors.
7868 Use this function as wrapper in `scm_fstat()'. Fixed typo in
7869 `scm_dirname()'.
7870
7871 * fports.c: Include `io.h' is possible. Put `*fp' into referring
7872 statement block in `scm_fport_buffer_add()'.
7873 Some corrections in `getflags()'.
7874
7875 * gdb_interface.h (GDB_INTERFACE): Also support __CYGWIN__.
7876
7877 * guile.c: Make sure to define __SCM_IMPORT__ for shared library
7878 build on Win32. Disable preloaded symbols on Win2 platforms.
7879
7880 * ioext.c, ports.c: Include `io.h' is possible.
7881
7882 * mkstemp.c: Include `process.h' is possible.
7883
7884 * net_db.c: Disable extern declaration of `h_errno' for __CYGWIN__,
7885 too.
7886 Put `scm_return_entry()' into HAVE_GETSERVENT conditional.
7887
7888 * posix.c: Remove unnecessary dirent includes and defines. Include
7889 local `win32-uname.h' for MinGW. Extern declaration of
7890 `mkstemp()' for systems where it does not exists. Make
7891 `getlogin()' available on M$-Windows.
7892
7893 * scmsigs.c: Made `usleep()' avalable on MinGW.
7894
7895 * stime.c: On M$-Windows `tzname[]' is known to be `_tzname[]'.
7896
7897 * win32-dirent.c: Include "win32-dirent.h", not "dirent.h".
7898
7899 * win32-uname.c: Include "win32-uname.h", not "uname.h".
7900
7901 2001-10-28 Mikael Djurfeldt <mdj@linnaeus>
7902
7903 * unif.c (scm_uniform_array_read_x, scm_uniform_array_write):
7904 Don't apply scm_uniform_vector_length on arrays.
7905
7906 2001-10-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
7907
7908 * eval.c (scm_lookupcar, scm_m_letstar, scm_m_do, iqq,
7909 scm_m_define, scm_m_letrec1, scm_m_let, scm_m_expand_body,
7910 scm_macroexp, unmemocopy, scm_eval_args, scm_deval_args,
7911 SCM_CEVAL, scm_map, scm_init_eval): When building lists, prefer
7912 scm_list_<n> over scm_cons[2]?.
7913
7914 (scm_unmemocar, scm_m_cond, scm_m_letstar, scm_m_letrec1,
7915 scm_m_let, scm_m_atbind, unmemocopy, SCM_CEVAL, SCM_APPLY): Use
7916 SCM_C[AD][AD]R instead of explicit form.
7917
7918 (scm_m_set_x, scm_m_cond, scm_m_letstar, scm_m_do): Reordered
7919 comparison parameters.
7920
7921 (scm_m_case, scm_m_cond, scm_m_letstar, scm_m_do, SCM_CEVAL): Use
7922 !SCM_NULLP instead of SCM_NIMP.
7923
7924 (scm_m_case): Don't copy the form. Renamed proc to clause and
7925 minimized its scope. Renamed x to clauses. Removed side
7926 effecting operation from macro call.
7927
7928 (scm_m_cond): Don't copy the form. Renamed arg1 to clause and
7929 minimized its scope. Renamed x to clauses. Minimized the scope
7930 of variable 'len'. Make sure the else clause is treated specially
7931 even in case of '=>' occurences. Don't change the else to #t in
7932 order to be able to distinguish this case in the evaluator. Leave
7933 type checking of the recipient to the evaluator.
7934
7935 (scm_c_improper_memq): Made the comment somewhat clearer.
7936
7937 (scm_m_lambda): Renamed proc to formals. Removed unnecessary
7938 test for SCM_IM_LET at the place of the formal parameters.
7939 Simplified the formal parameter checking.
7940
7941 (scm_m_letstar): Added Comment. Renamed proc to bindings.
7942 Renamed arg1 to binding and minimized its scope. Eliminated
7943 unnecessary consing.
7944
7945 (scm_m_do): Renamed proc to bindings. Minimized the scope of
7946 variable 'len'.
7947
7948 (build_binding_list): New static function.
7949
7950 (unmemocopy): Don't use SCM_TYP7 on pairs (it's unclean).
7951 Further, split up the 'letrec' unmemoizing code to the
7952 corresponding parts for 'do', 'let' and 'letrec', adding comments
7953 to each form. Cleanup the handling of the do form (This removes
7954 some *real* code :-).
7955
7956 (SCM_CEVAL): Removed side effecting operation from macro call.
7957 Handle the 'else clause of the 'cond form specially - the symbol
7958 'else is not replaced with #t any more.
7959
7960 2001-10-14 Gary Houston <ghouston@arglist.com>
7961
7962 * version.c (scm_version): use sprintf instead of snprintf,
7963 for portability. thanks to Bill Schottstaedt.
7964
7965 2001-10-14 Mikael Djurfeldt <mdj@linnaeus>
7966
7967 * read.c (scm_lreadr): When user-defined hash procedure returns
7968 SCM_UNSPECIFIED: Fall back to standard handling instead of raising
7969 an exception. (This prevents parsing of uniform vectors from
7970 interfering with parsing of numbers.)
7971
7972 2001-10-13 Marius Vollmer <mvo@zagadka.ping.de>
7973
7974 * numbers.c: Set NO_PREPRO_MAGIC when defining our version of
7975 PTRDIFF_MIN. Thanks to Ken Raeburn.
7976
7977 2001-10-07 Marius Vollmer <mvo@zagadka.ping.de>
7978
7979 * Makefile.am (EXTRA_libguile_la_SOURCES): Added "mkstemp.c".
7980
7981 * eval.c (scm_m_atbind): First try to find the variable without
7982 defining it locally; when it has not been found, define it
7983 locally.
7984
7985 * modules.c (module_variable): Pass over variables that exist but
7986 are unbound.
7987
7988 2001-10-06 Marius Vollmer <mvo@zagadka.ping.de>
7989
7990 * backtrace.c (display_backtrace_file_and_line): Only use
7991 scm_basename when POSIX support is compiled in. Thanks to Chris
7992 Cramer.
7993
7994 2001-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
7995
7996 * numbers.c (mem2uinteger): Return number read so far when coming
7997 across a hexdigit after having read a # or if not reading a hex
7998 value. This will enable the calling code to correctly handle
7999 forms like 1e2. (The background is, that the exponent markers d,
8000 e and f are also hexdigits.) Thanks to Mikael Djurfeldt for
8001 providing this patch.
8002
8003 (mem2complex): Fix erroneous double-negation. Now, numbers like
8004 1-i will be read correctly.
8005
8006 2001-10-12 Mikael Djurfeldt <mdj@linnaeus>
8007
8008 * debug.c (scm_mem_to_proc): Fixed typo in previous change.
8009
8010 * validate.h (SCM_VALIDATE_DOUBLE_DEF_COPY): New macro.
8011
8012 2001-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
8013
8014 * print.c (scm_print_state_vtable, print_state_pool):
8015 Initialize. These variables are now registered as gc roots.
8016
8017 (scm_current_pstate): Update documentation.
8018
8019 (scm_current_pstate, scm_make_print_state, scm_free_print_state,
8020 scm_prin1, scm_init_print): print_state_pool is registered as a
8021 gc root and thus does not need to be protected by a surrounding
8022 pair any more.
8023
8024 (make_print_state): The car of print_state_pool no longer holds
8025 the scm_print_state_vtable.
8026
8027 (scm_current_pstate, scm_make_print_state, print_circref,
8028 scm_iprin1, scm_prin1, scm_iprlist): Prefer !SCM_<foo> over
8029 SCM_N<foo>.
8030
8031 (scm_prin1): When building lists, prefer scm_list_<n> over
8032 scm_cons[2]?.
8033
8034 (scm_iprlist): Removed a redundant SCM_IMP test.
8035
8036 (scm_simple_format): Use SCM_EQ_P to compare SCM values.
8037
8038 2001-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
8039
8040 * debug.c (scm_make_iloc): Prefer !SCM_<foo> over SCM_N<foo>.
8041
8042 (scm_memcons, scm_mem_to_proc): When building lists, prefer
8043 scm_list_<n> over scm_cons[2]?.
8044
8045 (scm_mem_to_proc): Prefer SCM_CONSP over SCM_NIMP.
8046
8047 (scm_procedure_name): Use SCM_CADR instead of explicit form.
8048
8049 (debugobj_print): Coerce scm_intprint arg 1 to long, not int.
8050 Thanks to Rob Browning for the patch (see log entry 2001-09-21) -
8051 for some reason his patch didn't make it into the cvs.
8052
8053 2001-10-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
8054
8055 * numbers.c (mem2decimal_from_point): Cleaned up the parsing a
8056 little bit - should even be somewhat more accurate now.
8057
8058 2001-10-08 Rob Browning <rlb@defaultvalue.org>
8059
8060 * gc.c: support ia64 register backing store.
8061 (SCM_MARK_BACKING_STORE): new macro.
8062
8063 * continuations.h: support ia64 register backing store.
8064 (struct scm_t_contregs): add ia64 register backing store.
8065
8066 * continuations.c: support ia64 register backing store.
8067 (continuation_mark): mark ia64 register backing store.
8068 (continuation_free): free ia64 register backing store.
8069 (scm_make_continuation): capture ia64 register backing store.
8070 (copy_stack_and_call): copy ia64 register backing store.
8071
8072 2001-10-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
8073
8074 * hashtab.c (scm_hash_fn_create_handle_x): The result of assoc_fn
8075 is known to be #f if no entry is found. Thus, use !SCM_FALSEP
8076 instead of SCM_NIMP to test for that case.
8077
8078 * strings.h (SCM_SET_STRING_LENGTH): Cast the length to
8079 scm_t_bits instead of long.
8080
8081 2001-10-06 Marius Vollmer <mvo@zagadka.ping.de>
8082
8083 * tags.h (SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
8084 SCM_T_SIGNED_BITS_MIN): New.
8085 * numbers.h (SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM):
8086 Use them to make these macros computable by the preprocessor.
8087
8088 * num2integral.i.c (INTEGRAL2NUM): Let the preprocessor test
8089 whether the integral type fits in a fixnum, not the compiler.
8090 This removes a spurious compiler warning. Also, honor the
8091 NO_PREPRO_MAGIC flag to suppress any preprocessor tests. This is
8092 needed for `long long's.
8093
8094 * numbers.c: Define NO_PREPRO_MAGOC when including
8095 num2integral.c.i for `long long' and `signed long long'.
8096
8097 2001-10-06 Mikael Djurfeldt <mdj@linnaeus>
8098
8099 These changes fixes a race condition in the Guile coop - pthread
8100 compatibility code.
8101
8102 * coop.c (mother_awake_p): New variable.
8103 (coop_create): Set mother_awake_p before creating or signalling
8104 mother; wait until mother is going to sleep before returning.
8105 (mother): Reset mother_awake_p before going to sleep.
8106
8107 2001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
8108
8109 * options.c (protected_objects, scm_init_options): The content of
8110 protected_objects is now protected from garbage collection using
8111 scm_gc_register_root instead of scm_permanent_object.
8112
8113 (get_option_setting): New static function that computes an option
8114 setting as it was formerly done in the function scm_options.
8115
8116 (get_documented_option_setting): New static function that
8117 returns option documentation as it was formerly done in the
8118 function scm_options. Note that documentation C strings are no
8119 longer precomputed into SCM objects. Instead, they are converted
8120 into SCM strings every time get_documented_option_setting is
8121 called.
8122
8123 (change_option_setting): New static functions that modifies the
8124 option setting as it was formerly done in the function
8125 scm_options. The function is now exception safe, i. e. won't
8126 cause a memory leak when interrupted. Further, only non-immediate
8127 option values are added to the protection list.
8128
8129 (scm_options): This function now has only the purpose to dispatch
8130 to to get_option_setting, get_documented_option_setting or
8131 change_option_setting, depending on the arguments given to
8132 scm_options.
8133
8134 (scm_init_opts): Don't convert documentation C strings into SCM
8135 strings. Further, don't protect any object values: They _must_
8136 be immediate values, otherwise there is no guarantee that they
8137 have not been collected before anyway.
8138
8139 * options.[ch] (scm_t_option): Made type unsigned, name into a
8140 constant char* and val into a scm_t_bits type.
8141
8142 (scm_options, scm_init_opts): The number of options is guaranteed
8143 to be larger or equal to zero. Thus, the type is changed to
8144 unsigned.
8145
8146 2001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
8147
8148 * num2integral.i.c (NUM2INTEGRAL): Eliminated some warnings about
8149 testing an unsigned value for being >= 0.
8150
8151 2001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
8152
8153 * numbers.h: Removed old comment about using SCM_CAR to access
8154 non-pair cells.
8155
8156 (SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM): Make sure
8157 the return value is signed. Thanks to Brian Crowder for the bug
8158 report.
8159
8160 (SCM_SRS): Avoid unnecessary casting and don't unpack input
8161 values. With this patch, SCM_SRS can be safely used for other
8162 types than scm_t_signed_bits. However, it should still better be
8163 an internal macro and thus be renamed to SCM_I_SRS.
8164
8165 (SCM_MAKINUM, SCM_INUM): Use proper casting.
8166
8167 2001-10-03 Gary Houston <ghouston@arglist.com>
8168
8169 * continuations.h, unif.h: in the descriptions of the bit patterns
8170 of the heap cells, make bit 0 the least significant.
8171
8172 2001-09-25 Thien-Thi Nguyen <ttn@glug.org>
8173
8174 * chars.h (SCM_MAKE_CHAR): Use `scm_t_bits' instead of `intptr_t'.
8175 Thanks to Golubev I. N.
8176
8177 2001-09-25 Gary Houston <ghouston@arglist.com>
8178
8179 * ports.c (scm_drain_input): extended the docstring. thanks to
8180 Alex Schroeder and Thien-Thi Nguyen.
8181
8182 2001-09-23 Mikael Djurfeldt <mdj@linnaeus>
8183
8184 * validate.h (SCM_NUM2FLOAT, SCM_NUM2DOUBLE,
8185 SCM_VALIDATE_FLOAT_COPY, SCM_VALIDATE_DOUBLE_COPY): New
8186 macros. (The NUM names might soon change.)
8187
8188 * numbers.h: Added missing declarations.
8189
8190 2001-09-22 Mikael Djurfeldt <mdj@linnaeus>
8191
8192 * Makefile.am: Distribute num2float.i.c.
8193
8194 * num2float.i.c: New file, multiply included by numbers.c, used
8195 to "templatize" the float <-> num conversion routines.
8196
8197 * numbers.c: New functions: scm_num2float, scm_float2num,
8198 scm_num2double, scm_double2num.
8199
8200 2001-09-21 Rob Browning <rlb@defaultvalue.org>
8201
8202 * .cvsignore: really add version.h
8203
8204 * strings.h (SCM_SET_STRING_LENGTH): coerce "l" to a long.
8205 Otherwise it fails on the alpha. However, we might rather choose
8206 this size conditionally.
8207
8208 * numbers.c (scm_gcd): change "k" to a long from an int.
8209 Otherwise it fails on the alpha. However, we might rather choose
8210 this size conditionally.
8211
8212 * error.c (scm_wta): coerce char* to intptr_t before int
8213 assignment.
8214
8215 * debug.c (debugobj_print): coerce scm_intprint arg 1 to long, not
8216 int.
8217
8218 * chars.h (SCM_MAKE_CHAR): coerce value to intptr_t.
8219
8220 2001-09-20 Mikael Djurfeldt <mdj@linnaeus>
8221
8222 * numbers.c (scm_integer_expt): Accept inexact integer in second
8223 argument. (Thanks to Bill Schottstaedt.)
8224
8225 2001-09-20 Rob Browning <rlb@defaultvalue.org>
8226
8227 * .cvsignore: add version.h
8228
8229 * versiondat.h.in: removed (obsolete).
8230
8231 * version.h.in: renamed from version.h.
8232 (SCM_GUILE_MAJOR_VERSION): new public macro.
8233 (SCM_GUILE_MINOR_VERSION): new public macro.
8234 (SCM_GUILE_MICRO_VERSION): new public macro.
8235
8236 * version.h: renamed to version.h.in.
8237
8238 * version.c
8239 (scm_major_version): support integer *_VERSION macros.
8240 (scm_minor_version): support integer *_VERSION macros.
8241 (scm_micro_version): support integer *_VERSION macros.
8242 (scm_version): support integer *_VERSION macros.
8243
8244 2001-09-20 Mikael Djurfeldt <mdj@linnaeus>
8245
8246 * error.c, error.h: Made error keys globally accessible.
8247 Applications might want to test for these or use them in a direct
8248 call to scm_error.
8249
8250 * num2integral.i.c (NUM2INTEGRAL): Report an error when these
8251 routines are passed an inexact. This change in behavior is
8252 motivated by concordance with R5RS: It is more common that a
8253 primitive doesn't want to accept an inexact for an exact.
8254
8255 2001-09-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
8256
8257 The following patch partially undoes my patch from 2001-06-30,
8258 where I added the function scm_gc_mark_cell_conservatively. The
8259 function is buggy, since it breaks guile during conservative
8260 marking if a pointer on the stack points directly into the list of
8261 free cells on the heap: With conservative cell marking this will
8262 cause the whole free list to be scanned and marked - boom!
8263
8264 * gc.c (allocated_mark, MARK, heap_segment,
8265 scm_gc_mark_cell_conservatively, scm_init_storage), gc.h
8266 (scm_gc_mark_cell_conservatively): Remove function
8267 scm_gc_mark_cell_conservatively and update the corresponding
8268 comments and uses accordingly. Thanks to Christopher Cramer for
8269 the patch. (Minor corrections by me.)
8270
8271 2001-09-15 Gary Houston <ghouston@arglist.com>
8272
8273 * root.h (scm_root_state): removed the continuation_stack and
8274 continuation_stack_ptr members, which have no apparent purpose.
8275 (scm_continuation_stack, scm_continuation_stack_ptr): #defines
8276 removed.
8277
8278 * root.c (root_mark), init.c (restart_stack, start_stack), gc
8279 (scm_igc): remove all references to contination_stack and
8280 continuation_stack_ptr, avoiding allocation of a vector and
8281 useless processing during gc.
8282
8283 2001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
8284
8285 * guardians.c (tconc_t, t_tconc): Renamed tconc_t to t_tconc.
8286
8287 (TCONC_IN): Make sure that the cell word 0 is initialized last.
8288
8289 (guardians_t, t_guardians): Renamed guardians_t to t_guardians.
8290
8291 (GUARDIAN, GUARDIAN_DATA): Renamed GUARDIAN to GUARDIAN_DATA.
8292
8293 (guardian_apply, scm_get_one_zombie, scm_make_guardian,
8294 mark_and_zombify): Prefer !SCM_<foo> over SCM_N<foo>.
8295
8296 2001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
8297
8298 * guardians.c (mark_dependencies_in_tconc,
8299 whine_about_self_centered_zombies, scm_init_guardians): Register
8300 the static global variable `self_centered_zombies' via
8301 scm_gc_register_root, to make some cdr-ing unnecessary.
8302
8303 2001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
8304
8305 * backtrace.c (display_backtrace_file,
8306 display_backtrace_file_and_line): Use SCM_EQ_P when comparing SCM
8307 values, use SCM_FALSEP when comparing SCM values against #f.
8308 Thanks to Rob Browning for the bug report.
8309
8310 2001-09-12 Martin Baulig <martin@home-of-linux.org>
8311
8312 * strings.[ch] (scm_str2string): New function.
8313
8314 2001-09-06 Marius Vollmer <mvo@zagadka.ping.de>
8315
8316 * gc.c (scm_done_free): Always subtract size from scm_mallocated
8317 when computing nm, even if it's negative.
8318 (scm_must_malloc): Abort on overflow of scm_mtrigger.
8319 (scm_must_realloc): Likewise.
8320
8321 2001-09-01 Michael Livshin <mlivshin@bigfoot.com>
8322
8323 * numbers.c (scm_sys_check_number_conversions): new function,
8324 defined if Guile is compiled in debugging mode. currently checks
8325 `scm_num2ulong', should check much much more.
8326
8327 * num2integral.i.c (NUM2INTEGRAL): when converting a bignum to
8328 unsigned, ensure that it's positive. thanks to Martin Baulig!
8329
8330 2001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
8331
8332 * __scm.h: Added new section about compile time selectable
8333 features.
8334
8335 (long_long, ulong_long, scm_sizet, SCM_WNA, SCM_OUTOFRANGE,
8336 SCM_NALLOC, SCM_HUP_SIGNAL, SCM_INT_SIGNAL, SCM_FPE_SIGNAL,
8337 SCM_BUS_SIGNAL, SCM_SEGV_SIGNAL, SCM_ALRM_SIGNAL, SCM_GC_SIGNAL,
8338 SCM_TICK_SIGNAL, SCM_SIG_ORD, SCM_ORD_SIG, SCM_NUM_SIGS):
8339 Removed.
8340
8341 * deprecation.c (scm_include_deprecated_features): Simplified.
8342
8343 * eval.c (EVALCAR, unmemocopy), eval.h (SCM_XEVALCAR): Use
8344 `SCM_IMP´ instead of `!SCM_CELLP´.
8345
8346 * eval.c (unmemocopy): Eliminate redundant SCM_CELLP tests.
8347 Extract side-effecting operations from macros.
8348
8349 (scm_init_eval): Don't initialize *top-level-lookup-closure*,
8350 scm_top_level_lookup_closure_var and scm_system_transformer.
8351
8352 * gc.c (CELL_P): New local definition to replace SCM_CELLP.
8353
8354 (heap_segment): Use CELL_P instead of SCM_CELLP.
8355
8356 * init.c (start_stack): Don't initialize
8357 scm_top_level_lookup_closure_var and scm_system_transformer.
8358
8359 * modules.c (scm_set_current_module): Don't access
8360 scm_top_level_lookup_closure_var and scm_system_transformer.
8361
8362 (scm_sym2var): Don't call scm_variable_set_name_hint.
8363
8364 (scm_post_boot_init_modules): Removed deprecated initializations.
8365
8366 * print.c (scm_ipruk): Don't access cell contents of non cells.
8367
8368 * strings.c (scm_string_set_x): All strings are writable.
8369
8370 * strings.h (SCM_STRINGP): Use SCM_TYP7 to determine the string
8371 type. There is only one string type now.
8372
8373 (SCM_STRING_COERCE_0TERMINATION_X): Deprecated.
8374
8375 * tags.h: Remove comments about two different string types.
8376
8377 (SCM_CELLP, SCM_NCELLP): Deprecated.
8378
8379 * variable.c (make_variable): Remove code variant for vcells.
8380
8381 * variable.h (SCM_VARIABLE_REF, SCM_VARIABLE_SET,
8382 SCM_VARIABLE_LOC): Remove code variant for vcells.
8383
8384 * __scm.h, deprecation.[ch]: Renamed SCM_DEBUG_DEPRECATED to
8385 SCM_ENABLE_DEPRECATED with the logic reversed.
8386
8387 * dynl.c (moddata, registered_mods), dynl.[ch]
8388 (scm_register_module_xxx, scm_registered_modules,
8389 scm_clear_registered_modules), error.[ch] (scm_wta), eval.c
8390 (*top-level-lookup-closure*), eval.[ch]
8391 (scm_top_level_lookup_closure_var, scm_system_transformer,
8392 scm_eval_3, scm_eval2), gc.h (SCM_SETAND_CAR, SCM_SETOR_CAR,
8393 SCM_SETAND_CDR, SCM_SETOR_CDR, SCM_FREEP, SCM_NFREEP,
8394 SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16,
8395 SCM_GCCDR), gc.[ch] (scm_remember, scm_protect_object,
8396 scm_unprotect_object), modules.c (root_module_lookup_closure,
8397 scm_sym_app, scm_sym_modules, module_prefix, make_modules_in_var,
8398 beautify_user_module_x_var, try_module_autoload_var,
8399 scm_module_full_name), modules.[ch] (scm_the_root_module,
8400 scm_make_module, scm_ensure_user_module, scm_load_scheme_module),
8401 ports.h (scm_port, scm_ptob_descriptor, scm_port_rw_active),
8402 ports.[ch] (scm_close_all_ports_except), random.h (scm_rstate,
8403 scm_rng, scm_i_rstate), strings.h (SCM_SLOPPY_STRINGP,
8404 SCM_RWSTRINGP, SCM_STRING_UCHARS, SCM_STRING_CHARS), strings.[ch]
8405 (scm_read_only_string_p, scm_makstr, scm_makfromstr,
8406 scm_make_shared_substring), tags.h (scm_tc7_substring,
8407 SCM_SLOPPY_CONSP, SCM_SLOPPY_NCONSP, scm_tc7_ssymbol,
8408 scm_tc7_msymbol, scm_tcs_symbols), variable.c (sym_huh),
8409 variable.[ch] (scm_variable_set_name_hint, scm_builtin_variable),
8410 variable.h (SCM_VARVCELL, SCM_UDVARIABLEP, SCM_DEFVARIABLEP):
8411 Removed.
8412
8413 * dynl.c (scm_dynamic_link, scm_dynamic_func), error.c
8414 (scm_error_scm), filesys.c (scm_chown, scm_chmod, scm_open_fdes,
8415 scm_stat, scm_link, scm_rename, scm_delete_file, scm_mkdir,
8416 scm_rmdir, scm_opendir, scm_chdir, scm_symlink, scm_readlink,
8417 scm_lstat, scm_copy_file), fports.c (scm_open_file), ioext.c
8418 (scm_fdopen), net_db.c (scm_gethost, scm_getnet, scm_getproto,
8419 scm_getserv), ports.c (scm_truncate_file, scm_sys_make_void_port),
8420 posix.c (scm_getpwuid, scm_getgrgid, scm_execl, scm_execlp,
8421 scm_execle, scm_mkstemp, scm_utime, scm_access, scm_setlocale,
8422 scm_mknod, scm_crypt, scm_chroot, scm_getpass, scm_sethostname),
8423 regex-posix.c (scm_make_regexp, scm_regexp_exec), simpos.c
8424 (scm_system, scm_getenv), socket.c (scm_inet_aton), stime.c
8425 (setzone, scm_strftime, scm_strptime), vports.c
8426 (scm_make_soft_port): Remove calls to
8427 SCM_STRING_COERCE_0TERMINATION_X. Since the substring type is
8428 gone, all strings are 0-terminated anyway.
8429
8430 * dynl.h (LIBGUILE_DYNL_H, SCM_DYNL_H), random.h (RANDOMH,
8431 SCM_RANDOM_H): Renamed the macros that are defined to inhibit
8432 double inclusion of the same headers to the SCM_<filename>_H
8433 format.
8434
8435 * eval.c (SCM_CEVAL), gc.c (MARK, scm_gc_sweep), gh_data.c
8436 (gh_scm2chars), hash.c (scm_hasher), objects.c (scm_class_of),
8437 print.c (scm_iprin1): The type scm_tc7_substring does not exist
8438 any more.
8439
8440 * ports.h (SCM_PORTP, SCM_OPPORTP, SCM_OPINPORTP, SCM_OPOUTPORTP,
8441 SCM_INPUT_PORT_P, SCM_OUTPUT_PORT_P, SCM_OPENP), tags.h
8442 (SCM_TYP16_PREDICATE), variable.h (SCM_VARIABLEP): Prefer
8443 !SCM_<foo> over SCM_N<foo>.
8444
8445 2001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
8446
8447 * Makefile.am: Remove references to symbols-deprecated.c.
8448
8449 * symbols.c (scm_init_symbols): Don't initialize deprecated
8450 symbol functions.
8451
8452 * symbols-deprecated.c: Removed.
8453
8454 * fluids.[ch] (scm_internal_with_fluids), gsubr.[ch]
8455 (scm_make_gsubr, scm_make_gsubr_with_generic), hooks.[ch]
8456 (scm_create_hook), list.c (list*), list.h (SCM_LIST[0-9],
8457 scm_listify), list.[ch] (scm_sloppy_memq, scm_sloppy_memv,
8458 scm_sloppy_member), load.c (scm_end_of_file_key), load.[ch]
8459 (scm_read_and_eval_x), numbers.[ch] (scm_mkbig, scm_big2inum,
8460 scm_adjbig, scm_normbig, scm_copybig, scm_2ulong2big, scm_dbl2big,
8461 scm_big2dbl), numbers.h (SCM_FIXNUM_BIT), procs.h
8462 (scm_subr_entry, SCM_SUBR_DOC), procs.[ch] (scm_make_subr_opt,
8463 scm_make_subr, scm_make_subr_with_generic), root.c (setjmp_type,
8464 setjmp_type), root.[ch] (scm_call_catching_errors), smob.[ch]
8465 (scm_make_smob_type_mfpe, scm_set_smob_mfpe), strports.[ch]
8466 (scm_strprint_obj, scm_read_0str, scm_eval_0str), symbols.h
8467 (SCM_CHARS, SCM_UCHARS, SCM_SETCHARS, SCM_SLOPPY_SUBSTRP,
8468 SCM_SUBSTR_STR, SCM_SUBSTR_OFFSET, SCM_LENGTH_MAX, SCM_LENGTH,
8469 SCM_SETLENGTH, SCM_ROSTRINGP, SCM_ROLENGTH, SCM_ROCHARS,
8470 SCM_ROUCHARS, SCM_SUBSTRP, SCM_COERCE_SUBSTR, scm_strhash,
8471 scm_sym2vcell, scm_sym2ovcell_soft, scm_sym2ovcell,
8472 scm_intern_obarray_soft, scm_intern_obarray, scm_intern,
8473 scm_intern0, scm_sysintern, scm_sysintern0,
8474 scm_sysintern0_no_module_lookup, scm_symbol_value0,
8475 scm_string_to_obarray_symbol, scm_intern_symbol,
8476 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned_p,
8477 scm_symbol_bound_p, scm_symbol_set_x, scm_gentemp,
8478 scm_init_symbols_deprecated), vectors.c (s_vector_set_length_x),
8479 vectors.[ch] (scm_vector_set_length_x): Removed.
8480
8481 * fluids.h (FLUIDSH, SCM_FLUIDS_H), gsubr.c (GSUBRH, SCM_GSUBR_H),
8482 list.h (LISTH, SCM_LIST_H), load.h (LOADH, SCM_LOAD_H), root.h
8483 (ROOTH, SCM_ROOT_H), strports.h (STRPORTSH, SCM_STRPORTS_H):
8484 Renamed the macros that are defined to inhibit double inclusion of
8485 the same headers to the SCM_<filename>_H format.
8486
8487 * procs.h (SCM_CLOSUREP, SCM_PROCEDURE_WITH_SETTER_P), symbols.h
8488 (SCM_SYMBOLP), vectors.h (SCM_VECTORP): Prefer !SCM_<foo> over
8489 SCM_N<foo>.
8490
8491 2001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
8492
8493 * continuations.h (scm_contregs), debug.h (scm_debug_info,
8494 scm_debug_frame, SCM_DSIDEVAL), filesys.h (SCM_OPDIRP), fports.h
8495 (scm_fport), options.h (scm_option), snarf.h (SCM_CONST_LONG,
8496 SCM_VCELL, SCM_GLOBAL_VCELL, SCM_VCELL_INIT,
8497 SCM_GLOBAL_VCELL_INIT), srcprop.h (scm_srcprops,
8498 scm_srcprops_chunk), stacks.h (scm_info_frame, scm_stack), unif.h
8499 (scm_array, scm_array_dim, SCM_ARRAY_CONTIGUOUS, SCM_HUGE_LENGTH),
8500 validate.h (SCM_FUNC_NAME, SCM_WTA, RETURN_SCM_WTA,
8501 SCM_VALIDATE_NUMBER_COPY, SCM_VALIDATE_NUMBER_DEF_COPY,
8502 SCM_VALIDATE_STRINGORSUBSTR, SCM_VALIDATE_ROSTRING,
8503 SCM_VALIDATE_ROSTRING_COPY, SCM_VALIDATE_NULLORROSTRING_COPY,
8504 SCM_VALIDATE_RWSTRING, SCM_VALIDATE_OPDIR): Removed.
8505
8506 * continuations.h (CONTINUATIONSH, SCM_CONTINUATIONS_H), filesys.h
8507 (FILESYSH, SCM_FILESYS_H), fports.h (FPORTSH, SCM_FPORTS_H),
8508 options.h (OPTIONSH, SCM_OPTIONS_H), regex-posix.h (REGEXPOSIXH,
8509 SCM_REGEX_POSIX_H), snarf.h (LIBGUILE_SNARF_H, SCM_SNARF_H),
8510 srcprop.h (SCM_SOURCE_PROPERTIES_H, SCM_SRCPROP_H), unif.h
8511 (SCM_UNIFORM_VECTORS_H, SCM_UNIF_H), validate.h (SCM_VALIDATE_H__,
8512 SCM_VALIDATE_H): Renamed the macros that are defined to inhibit
8513 double inclusion of the same headers to the SCM_<filename>_H
8514 format.
8515
8516 * debug.h (SCM_RESET_DEBUG_MODE), regex-posix.h (SCM_RGXP),
8517 srcprop.h (SRCBRKP, PROCTRACEP), struct.h (SCM_STRUCTP),
8518 validate.h (SCM_VALIDATE_THUNK, SCM_VALIDATE_ARRAY,
8519 SCM_VALIDATE_VECTOR_OR_DVECTOR, SCM_VALIDATE_VTABLE): Prefer
8520 !SCM_<foo> over SCM_N<foo>.
8521
8522 2001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
8523
8524 * _scm.h (_SCMH, SCM__SCM_H), alist.h (ALISTH, SCM_ALIST_H),
8525 arbiters.h (ARBITERSH, SCM_ARBITERS_H), backtrace.h (BACKTRACEH,
8526 SCM_BACKTRACE_H), boolean.h (BOOLEANH, SCM_BOOLEAN_H), chars.h
8527 (SCM_CHARSH, SCM_CHARS_H), coop-defs.h (COOP_DEFSH,
8528 SCM_COOP_DEFS_H), coop-threads.h (COOP_THREADSH,
8529 SCM_COOP_THREADS_H), debug-malloc.h (DEBUGMALLOCH,
8530 SCM_DEBUG_MALLOC_H), dynwind.h (DYNWINDH, SCM_DYNWIND_H),
8531 environments.h (ENVIRONMENTS_H, SCM_ENVIRONMENTS_H), eq.h (EQH,
8532 SCM_EQ_H), evalext.h (EVALEXTH, SCM_EVALEXT_H), extensions.h
8533 (LIBGUILE_EXTENSIONS_H, SCM_EXTENSIONS_H), feature.h (FEATUREH,
8534 SCM_FEATURE_H), gdbint.h (GDBINTH, SCM_GDBINT_H), guardians.h
8535 (SCM_GUARDIANH, SCM_GUARDIANS_H), hash.h (HASHH, SCM_HASH_H),
8536 hashtab.h (HASHTABH, SCM_HASHTAB_H), init.h (INITH, SCM_INIT_H),
8537 ioext.h (IOEXTH, SCM_IOEXT_H), iselect.h (ISELECTH,
8538 SCM_ISELECT_H), keywords.h (KEYWORDSH, SCM_KEYWORDS_H), lang.h
8539 (LANGH, SCM_LANG_H), mallocs.h (MALLOCSH, SCM_MALLOCS_H), net_db.h
8540 (SCM_NETDBH, SCM_NET_DB_H), objprop.h (OBJPROPH, SCM_OBJPROP_H),
8541 posix.h (POSIXH, SCM_POSIX_H), procprop.h (PROCPROPH,
8542 SCM_PROCPROP_H), properties.h (PROPERTIES_H, SCM_PROPERTIES_H),
8543 ramap.h (RAMAPH, SCM_RAMAP_H), rdelim.h (SCM_RDELIM,
8544 SCM_RDELIM_H), read.h (READH, SCM_READ_H), rw.h (SCM_RW,
8545 SCM_RW_H), scmsigs.h (SCMSIGSH, SCM_SCMSIGS_H), script.h (SCRIPTH,
8546 SCM_SCRIPT_H), simpos.h (SIMPOSH, SCM_SIMPOS_H), socket.h
8547 (SCM_SOCKETH, SCM_SOCKET_H), sort.h (SORTH, SCM_SORT_H),
8548 stackchk.h (STACKCHKH, SCM_STACKCHK_H), stime.h (STIMEH,
8549 SCM_STIME_H), strop.h (STROPH, SCM_STROP_H), strorder.h
8550 (STRORDERH, SCM_STRORDER_H), threads.h (THREADSH, SCM_THREADS_H),
8551 throw.h (THROWH, SCM_THROW_H), version.h (VERSIONH,
8552 SCM_VERSION_H), vports.h (VPORTSH, SCM_VPORTS_H): Renamed
8553 the macros that are defined to inhibit double inclusion of the
8554 same headers to the SCM_<filename>_H format.
8555
8556 2001-08-27 Marius Vollmer <mvo@zagadka.ping.de>
8557
8558 * ports.c, ports.h, fprots.c, gc.c, ioext.c: Replaced
8559 "scm_t_portable" with "scm_port_table" which was an artifact from
8560 the great "scm_*_t -> scm_t_" renaming.
8561
8562 2001-08-25 Thien-Thi Nguyen <ttn@revel.glug.org>
8563
8564 * gc_os_dep.c (GC_noop1): Move before `GC_find_limit' where it is
8565 used; nfc. Thanks to Bill Schottstaedt.
8566
8567 * validate.h (SCM_VALIDATE_USHORT_COPY, SCM_VALIDATE_SHORT_COPY,
8568 SCM_VALIDATE_UINT_COPY, SCM_VALIDATE_INT_COPY): New macros.
8569 Thanks to Chris Cramer.
8570
8571 2001-08-25 Marius Vollmer <mvo@zagadka.ping.de>
8572
8573 * Makefile.am (AUTOMAKE_OPTIONS): Change "foreign" to "gnu".
8574
8575 * eval.c (scm_m_atbind): Redesigned to behvae like `let', but with
8576 dynamic scope.
8577 * dynwind.h (scm_swap_bindings): Declare.
8578 * dynwind.c (scm_swap_bindings): Make non-static.
8579
8580 2001-08-25 Michael Livshin <mlivshin@bigfoot.com>
8581
8582 * gc.c (scm_gc_sweep): now can sweep unreachable variables (by
8583 doing exactly nothing about them). thanks Neil!
8584
8585 2001-08-18 Neil Jerram <neil@ossau.uklinux.net>
8586
8587 * __scm.h (SCM_ENABLE_VCELLS): Fix spelling mistake in comment.
8588
8589 2001-08-17 Thien-Thi Nguyen <ttn@revel.glug.org>
8590
8591 * gc.c: Fix omission bug: Add `heap_segment' forward decl
8592 (proto) in the case when either `GUILE_DEBUG' or
8593 `GUILE_DEBUG_FREELIST' preprocessor symbols are defined.
8594
8595 (map_free_list): Fix typo: Ref `f' correctly.
8596
8597 Thanks to Chris Cramer.
8598
8599 2001-08-15 Rob Browning <rlb@defaultvalue.org>
8600
8601 * Makefile.am (libguile_la_LDFLAGS): use libtool interface version
8602 variables.
8603 (libpath.h): change libguileversion to libguileinterface.
8604
8605 2001-08-07 Marius Vollmer <mvo@zagadka.ping.de>
8606
8607 * Makefile.am (EXTRA_DIST): Distribute ChangeLog-1996-1999 and
8608 ChangeLog-2000. Thanks to Daniel Skarda!
8609
8610 2001-08-07 Michael Livshin <mlivshin@bigfoot.com>
8611
8612 * guile-snarf-docs-texi.in: don't call the tokenizer here, we now
8613 do it from the Makefile.
8614
8615 * Makefile.am: rearrange the snarfing slightly, so that .doc files
8616 are of a reasonable size.
8617
8618 2001-08-02 Neil Jerram <neil@ossau.uklinux.net>
8619
8620 * stacks.c (scm_make_stack): Improve docstring by explaining use
8621 of cutting args.
8622
8623 2001-08-01 Marius Vollmer <mvo@zagadka.ping.de>
8624
8625 * chars.c (scm_char_alphabetic_p, scm_char_numeric_p,
8626 scm_char_whitespace_p, scm_char_upper_case_p,
8627 scm_char_lower_case_p, scm_char_is_both_p): Do not require
8628 characters to fulfill isascii in addition to the primary
8629 predicate.
8630
8631 2001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
8632
8633 * numbers.c (DIGITS, scm_small_istr2int, scm_istr2int,
8634 scm_istr2flo, scm_istring2number): Removed.
8635
8636 (iflo2str, scm_real_p, scm_integer_p): Use SCM_<foo> instead of
8637 SCM_SLOPPY_<foo>.
8638
8639 (t_exactness, t_radix, DIGIT2UINT, XDIGIT2UINT, mem2uinteger,
8640 mem2decimal_from_point, mem2ureal, mem2complex, scm_i_mem2number):
8641 Added.
8642
8643 (scm_string_to_number): Use new number parser.
8644
8645 (scm_exact_to_inexact): Replace dummy by a GPROC, which also
8646 handles complex numbers.
8647
8648 * numbers.h (NUMBERSH, SCM_NUMBERS_H): Rename <foo>H to
8649 SCM_<foo>_H.
8650
8651 (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Prefer !SCM_<pred> over
8652 SCM_N<pred>.
8653
8654 (scm_istr2int, scm_istr2flo, scm_istring2number): Removed.
8655
8656 (scm_i_mem2number): Added.
8657
8658 (scm_exact_to_inexact): Changed signature.
8659
8660 * read.c (scm_lreadr): Perform the shortcut test for '+ and '-
8661 here instead of within scm_i_mem2number. Call scm_i_mem2number
8662 instead of scm_istr2int and scm_istring2number.
8663
8664 2001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
8665
8666 * eval.c (scm_lookupcar, scm_m_body, scm_m_lambda, unmemocopy,
8667 scm_unmemocopy, scm_badargsp, scm_eval_body, CHECK_EQVISH,
8668 SCM_CEVAL, scm_nconc2last, SCM_APPLY, scm_copy_tree): Prefer
8669 !SCM_<pred> over SCM_N<pred>.
8670
8671 (scm_eval_body): Remove side effecting code from macro call.
8672
8673 (SCM_CEVAL, SCM_APPLY): Remove goto statement and redundant
8674 SCM_NIMP test.
8675
8676 2001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
8677
8678 * pairs.h (SCM_VALIDATE_PAIR): Use SCM_CONSP, not SCM_ECONSP.
8679
8680 2001-07-29 Marius Vollmer <mvo@zagadka.ping.de>
8681
8682 Removed vcell slot from structs.
8683
8684 * struct.h (scm_vtable_index_vcell): Removed. Renumbered
8685 subsequent indices.
8686
8687 * struct.c (scm_struct_vtable_p): Do not check vcell slot for
8688 zero. Use scm_vtable_index_layout instead of "0" when accessing
8689 said slot.
8690 (scm_init_struct): Remove vcell slot layout code from
8691 required_vtable_fields.
8692
8693 * objects.h (scm_si_redefined, scm_si_hashsets): Renumbered.
8694
8695 * goops.c (build_class_class_slots): Removed vcell slot
8696 definition.
8697
8698 * goops.h: Renumbered slot indices. (SCM_CLASS_CLASS_LAYOUT):
8699 Removed vcell slot layout code.
8700 (scm_si_vcell): Removed.
8701
8702 2001-07-26 Marius Vollmer <mvo@zagadka.ping.de>
8703
8704 "Glocs" have been removed.
8705
8706 * tags.h: Update tag system docs.
8707 (scm_tc3_cons_gloc): Renamed to scm_tc3_struct. Changed all uses.
8708 (scm_tcs_cons_gloc): Renamed to scm_tcs_struct. Changed all uses.
8709 (SCM_ECONSP, SCM_NECONSP): Removed. Changed all uses to SCM_CONSP
8710 or SCM_NCONSP, respectively.
8711
8712 * struct.c, struct.h, srcprop.c, procs.c, procprop.c, print.c,
8713 objects.c. modules.c, goops.c, eval.c, debug.c: Changed all uses
8714 of scm_tc3_cond_gloc and scm_tcs_cons_gloc. See above.
8715
8716 * print.c (scm_iprin1): Remove printing of glocs. Do not try to
8717 tell glocs from structs.
8718
8719 * gc.c (scm_gc_mark, scm_gc_sweep): Remove handling of glocs.
8720
8721 * eval.c (scm_m_atbind): Make a list of variables, not glocs.
8722 (scm_ceval, scm_deval): For SCM_IM_BIND, fiddle with variables
8723 instead of with glocs.
8724 (EVALCAR): Do not test for glocs.
8725 (scm_lookupcar, scm_lookupcar1): Do not handle glocs in race
8726 condition.
8727 (scm_unmemocar): Do not handle glocs.
8728 (scm_m_atfop): Memoize as a variable, not as a gloc.
8729 (scm_eval_args, scm_deval_args): Do not handle glocs.
8730 (scm_ceval, scm_deval): Likewise.
8731
8732 * eval.h (SCM_XEVALCAR): Do not test for glocs.
8733 (SCM_GLOC_VAR, SCM_GLOC_VAL, SCM_GLOC_SET_VAL, SCM_GLOC_VAL_LOC):
8734 Removed.
8735
8736 * debug.h, debug.c (scm_make_gloc, scm_gloc_p): Removed.
8737
8738 * dynwind.c (scm_swap_bindings): Likewise.
8739 (scm_dowinds): Updated to recognize lists of variables instead of
8740 lists of glocs.
8741
8742 * __scm.h (SCM_CAUTIOS, SCM_RECKLESS): Update comments.
8743
8744
8745 * gc_os_dep.c (GC_noop1): Moved into the same #if/#endif context
8746 where it is needed.
8747
8748 2001-07-25 Gary Houston <ghouston@arglist.com>
8749
8750 * numbers.c (scm_logand, scm_logior, scm_logxor): adjusted the
8751 docstrings to reflect the n-ary implementation.
8752
8753 2001-07-26 Marius Vollmer <mvo@zagadka.ping.de>
8754
8755 * eval.c (scm_ceval, scm_deval): Use "RETURN" macro when returning
8756 value of a variable, not the plain "return" statement.
8757
8758 2001-07-25 Marius Vollmer <mvo@zagadka.ping.de>
8759
8760 * eval.c: Allow variables in memoized code (in addition to glocs).
8761 (scm_lookupcar): Handle variables in lost races. Replace symbol
8762 with variable directly, do not make a gloc.
8763 (scm_unmemocar): Rewrite variables using a reverse lookup, just
8764 like glocs.
8765 (scm_ceval, scm_deval): Deal with variables in SCM_IM_SET and in
8766 the main switch.
8767
8768 2001-07-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
8769
8770 * variable.c (scm_i_variable_print): Use "value" instead of
8771 "binding" since a binding is the mapping between symbols and
8772 variables, not between variables and their values.
8773
8774 * tags.h (scm_tc7_variable): New.
8775 * gc.c (scm_gc_mark): Handle scm_tc7_variable objects.
8776 * print.c (scm_iprin1): Likewise.
8777
8778 * variable.h (scm_tc16_variable): Removed.
8779 (SCM_VARIABLEP): Test for new tc7 code.
8780 (scm_i_variable_print): New.
8781 * variable.c (scm_tc16_variable): Removed.
8782 (variable_print): Renamed to scm_i_variable_print and made
8783 non-static.
8784 (variable_equal_p): Removed.
8785 (make_variable): Construct a tc7 object instead of a smob.
8786 (scm_init_variable): Do not register smob.
8787
8788 2001-07-22 Marius Vollmer <mvo@zagadka.ping.de>
8789
8790 * tags.h: Include inttypes.h when we have it.
8791
8792 2001-07-13 Marius Vollmer <mvo@zagadka.ping.de>
8793
8794 * tags.h (SCM_UNBOUND): Make it the 34th isym/iflag, the 33th slot
8795 is taken by the new SCM_IM_CALL_WITH_VALUES.
8796 * print.c (scm_isymnames): Update table accordingly.
8797
8798 2001-07-22 Gary Houston <ghouston@arglist.com>
8799
8800 * regex-posix.c (s_scm_regexp_exec): use scm_long2num not
8801 SCM_MAKINUM to convert regoff_t value to SCM.
8802
8803 2001-07-21 Gary Houston <ghouston@arglist.com>
8804
8805 * scmsigs.c: include sys/time.h for itimer stuff.
8806
8807 2001-07-19 Rob Browning <rlb@defaultvalue.org>
8808
8809 * gc_os_dep.c (GC_noop1): ifdef out (unused) to quiet warning.
8810
8811 * c-tokenize.lex: add option %nounput to quiet warning.
8812 Add prototype for yylex to quiet warning.
8813
8814 * scmconfig.h.in: add flags for setitimer and getitimer.
8815
8816 * scmsigs.h (scm_init_scmsigs): new prototype.
8817 (scm_init_scmsigs): new prototype.
8818
8819 * scmsigs.c (s_scm_setitimer): new function.
8820 (s_scm_setitimer): new function.
8821
8822 2001-07-18 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
8823
8824 * alist.c, arbiters.c, async.h, backtrace.h, boolean.c, chars.c,
8825 chars.h, continuations.h, debug-malloc.h, dynl.c, feature.c,
8826 feature.h, filesys.h, fluids.h, fports.h, gc_os_dep.c,
8827 gdb_interface.h, gh_eval.c, gh_funcs.c, gh_io.c, gh_list.c,
8828 gh_predicates.c, gsubr.c, gsubr.h, guardians.h,
8829 guile-func-name-check.in, guile-snarf-docs-texi.in,
8830 guile-snarf-docs.in, guile-snarf.awk.in, guile-snarf.in,
8831 hashtab.h, iselect.h, keywords.h, lang.c, list.h, load.h,
8832 objprop.c, objprop.h, options.c, options.h, random.h,
8833 regex-posix.h, root.c, root.h, script.c, snarf.h, stackchk.c,
8834 strerror.c, strop.h, strports.h, threads.h, values.c, values.h,
8835 version.c, version.h: Updated copyright notice.
8836
8837 2001-07-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
8838
8839 * goops.c (sym_layout, sym_vcell, sym_vtable, sym_print,
8840 sym_procedure, sym_setter, sym_redefined, sym_h0, sym_h1, sym_h2,
8841 sym_h3, sym_h4, sym_h5, sym_h6, sym_h7, sym_name,
8842 sym_direct_supers, sym_direct_slots, sym_direct_subclasses,
8843 sym_direct_methods, sym_cpl, sym_default_slot_definition_class,
8844 sym_slots, sym_getters_n_setters, sym_keyword_access, sym_nfields,
8845 sym_environment, scm_sym_change_class): New static variables to
8846 hold predefined symbols.
8847
8848 (build_class_class_slots): Build the list using scm_list_n
8849 instead of cons. Also, slots are already created as lists, thus
8850 making a call to maplist unnecessary.
8851
8852 (scm_class_name, scm_class_direct_supers, scm_class_direct_slots,
8853 scm_class_direct_subclasses, scm_class_direct_methods,
8854 scm_class_precedence_list, scm_class_slots, scm_class_environment,
8855 scm_method_procedure, create_standard_classes, purgatory): Use
8856 predefined symbols.
8857
8858 (build_slots_list, compute_getters_n_setters,
8859 scm_sys_initialize_object, scm_sys_inherit_magic_x,
8860 get_slot_value_using_name, set_slot_value_using_name,
8861 scm_sys_invalidate_method_cache_x, scm_generic_capability_p,
8862 scm_compute_applicable_methods, scm_sys_method_more_specific_p,
8863 make_struct_class): Prefer !SCM_<pred> over SCM_N<pred>.
8864
8865 (scm_sys_prep_layout_x): Minimize variable scopes.
8866
8867 (scm_sys_prep_layout_x, scm_sys_fast_slot_ref,
8868 scm_sys_fast_slot_set_x): Fix signedness.
8869
8870 (go_to_hell, go_to_heaven, purgatory, scm_change_object_class,
8871 lock_cache_mutex, unlock_cache_mutex, call_memoize_method,
8872 scm_memoize_method, scm_wrap_object): Use packing and unpacking
8873 when converting to and from SCM values.
8874
8875 (scm_enable_primitive_generic_x): Add rest argument checking.
8876
8877 (map, filter_cpl, maplist, scm_sys_initialize_object,
8878 scm_sys_prep_layout_x, slot_definition_using_name,
8879 scm_enable_primitive_generic_x, scm_compute_applicable_methods,
8880 call_memoize_method, scm_make, scm_make_class): Prefer explicit
8881 predicates over SCM_N?IMP tests.
8882
8883 (scm_sys_prep_layout_x): Fix typo in error message. Fix type
8884 checking.
8885
8886 (burnin, go_to_hell): Use SCM_STRUCT_DATA instead of the SCM_INST
8887 alias.
8888
8889 2001-07-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
8890
8891 * fports.c (fport_print): Don't use SCM_C[AD]R for non pairs.
8892
8893 * num2integral.i.c (INTEGRAL2NUM, INTEGRAL2BIG): Fix signedness.
8894
8895 * symbols-deprecated.c (scm_gentemp): Simplify vector test.
8896
8897 * vectors.c (scm_vector_p): Eliminate redundant IMP test.
8898
8899 2001-07-12 Michael Livshin <mlivshin@bigfoot.com>
8900
8901 * strings.c (s_scm_string): fix arg position in assert.
8902
8903 2001-07-11 Gary Houston <ghouston@arglist.com>
8904
8905 * strports.c (st_write): use memcpy, not strncpy. thanks to
8906 Dale P. Smith.
8907
8908 2001-07-09 Thien-Thi Nguyen <ttn@revel.glug.org>
8909
8910 * alist.c, alloca.c, arbiters.c, async.c, async.h, backtrace.c,
8911 boolean.c, chars.c, continuations.c, coop-defs.h, coop-threads.c,
8912 debug-malloc.h, debug.c, debug.h, dynl.c, dynwind.c, eq.c,
8913 error.c, eval.c, evalext.c, feature.c, feature.h, filesys.c,
8914 filesys.h, fluids.c, fluids.h, fports.c, fports.h, gc.c, gc.h,
8915 gdbint.c, gsubr.c, guardians.c, hash.c, hashtab.c, hooks.c,
8916 hooks.h, inet_aton.c, init.c, ioext.c, keywords.c, keywords.h,
8917 lang.c, list.c, load.c, macros.c, mallocs.c, memmove.c, modules.c,
8918 net_db.c, numbers.c, numbers.h, objects.c, objprop.c, options.c,
8919 pairs.c, pairs.h, ports.c, ports.h, posix.c, print.c, print.h,
8920 procprop.c, procs.c, procs.h, properties.c, putenv.c, ramap.c,
8921 random.c, random.h, read.c, regex-posix.c, regex-posix.h, root.c,
8922 root.h, scmsigs.c, script.c, simpos.c, smob.c, snarf.h, socket.c,
8923 sort.c, srcprop.c, srcprop.h, stackchk.c, stacks.c, stacks.h,
8924 stime.c, strerror.c, strings.c, strings.h, strop.c, strorder.c,
8925 strports.c, struct.c, struct.h, symbols-deprecated.c, symbols.c,
8926 symbols.h, tags.h, threads.c, threads.h, throw.c, unif.c, unif.h,
8927 variable.c, variable.h, vectors.c, vectors.h, version.c, vports.c,
8928 weaks.c, weaks.h: Remove "face-lift" comment.
8929
8930 2001-07-08 Rob Browning <rlb@defaultvalue.org>
8931
8932 * .cvsignore: add stamp-h.in.
8933
8934 2001-07-04 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
8935
8936 * hooks.c (scm_make_hook, scm_add_hook_x),
8937 (scm_remove_hook_x, scm_reset_hook_x, scm_run_hook): Added return
8938 value info to the docstrings.
8939
8940 2001-07-03 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
8941
8942 Some more compatibility patches for Windows.
8943
8944 * posix.c (getlogin): getlogin() implementation for Windows.
8945
8946 * backtrace.c, ioext.c: Include <stdio.h>.
8947
8948 * unif.c, script.c, rw.c, error.c: Include <io.h>, if it does
8949 exist.
8950
8951 * cpp_sig_symbols.in: Added SIGBREAK.
8952
8953 2001-07-01 Marius Vollmer <mvo@zagadka.ping.de>
8954
8955 * strports.c (scm_read_0str, scm_eval_0str): Call
8956 scm_c_read_string and scm_c_eval_string respectively, not
8957 themselves. Thanks to Dale P. Smith!
8958
8959 2001-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
8960
8961 * unif.c (scm_array_set_x): The variable args does not
8962 necessarily have to be a list. Further, got rid of a redundant
8963 SCM_NIMP test.
8964
8965 2001-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
8966
8967 * list.c (SCM_I_CONS): Make sure the cell type is initialized
8968 last.
8969
8970 * gc.c (s_scm_map_free_list, scm_igc, scm_gc_sweep,
8971 init_heap_seg): Fixed signedness.
8972
8973 (init_heap_seg): Replaced strange for-loop with a while loop.
8974
8975 * weaks.h (WEAKSH, SCM_WEAKS_H): Rename <foo>H to SCM_<foo>_H.
8976
8977 (SCM_WVECTP): Prefer !SCM_<pred> over SCM_N<pred>.
8978
8979 The following patch adds conservative marking for the elements of
8980 free or allocated cells.
8981
8982 * gc.c (allocated_mark, heap_segment): New static functions.
8983
8984 (which_seg): Deleted, since the functionality is now provided by
8985 function heap_segment.
8986
8987 (map_free_list): Use heap_segment instead of which_seg.
8988
8989 (MARK): If cell debugging is disabled, mark free cells
8990 conservatively.
8991
8992 (scm_mark_locations, scm_cellp): Extracted the search for the
8993 heap segment of a SCM value into function heap_segment.
8994
8995 (scm_init_storage): Allocated cells must be marked
8996 conservatively.
8997
8998 * gc.[ch] (scm_gc_mark_cell_conservatively): New function.
8999
9000 The following patch changes the representation of weak vectors to
9001 double cells instead of using an extension of the vector's
9002 allocated memory.
9003
9004 * gc.c (MARK): Use SCM_SET_WVECT_GC_CHAIN instead of assigning to
9005 the result of SCM_WVECT_GC_CHAIN.
9006
9007 (scm_gc_sweep): Weak vectors don't have extra fields any more.
9008
9009 * weaks.c (allocate_weak_vector): New static function. It does
9010 not patch any previously created vector object during the
9011 construction of a weak vector, and thus doesn't need to switch
9012 off interrupts during vector creation.
9013
9014 (scm_make_weak_vector, scm_make_weak_key_hash_table,
9015 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
9016 Use allocate_weak_vector to provide the new weak vector object.
9017
9018 * weaks.h (SCM_WVECT_TYPE, SCM_SET_WVECT_TYPE,
9019 SCM_SET_WVECT_GC_CHAIN): New macros. The weak vector subtype is
9020 now stored in the double cell.
9021
9022 (SCM_IS_WHVEC, SCM_IS_WHVEC_V, SCM_IS_WHVEC_B, SCM_IS_WHVEC_ANY):
9023 Use SCM_WVECT_TYPE.
9024
9025 (SCM_WVECT_GC_CHAIN): The weak objects are now chained together
9026 using an entry of the double cell.
9027
9028 2001-06-30 Thien-Thi Nguyen <ttn@revel.glug.org>
9029
9030 * stamp-h.in: bye bye
9031
9032 2001-06-30 Marius Vollmer <mvo@zagadka.ping.de>
9033
9034 * gh_eval.c (gh_eval_str): Use scm_c_eval_string instead of
9035 scm_eval_0str.
9036
9037 * load.c, load.h (scm_c_primitive_load,
9038 scm_c_primitive_load_path): New.
9039
9040 * strports.c, strports.h (scm_c_read_string): Renamed from
9041 scm_read_0str. Also, added "const" qualifier to argument.
9042 (scm_c_eval_string): Renamed from scm_eval_0str.
9043 (scm_read_0str, scm_eval_0str): Deprecated.
9044
9045 2001-06-28 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9046
9047 * fluids.c (scm_c_with_fluid): Use scm_list_1() instead of
9048 SCM_LIST1.
9049
9050 2001-06-28 Keisuke Nishida <kxn30@po.cwru.edu>
9051
9052 * list.h (scm_list_1, scm_list_2, scm_list_3, scm_list_4, scm_list_5,
9053 scm_list_n): New functions.
9054 (SCM_LIST0, SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5,
9055 SCM_LIST6, SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify): Deprecated.
9056 (lots of files): Use the new functions.
9057
9058 * goops.c (CALL_GF1, CALL_GF2, CALL_GF3, CALL_GF4): Use scm_call_N.
9059
9060 * strings.c: #include "libguile/deprecation.h".
9061
9062 2001-06-27 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9063
9064 * read.c (scm_lreadr): When reading a hash token, check for a
9065 user-defined hash procedure first, so that overriding the builtin
9066 hash characters is possible (this was needed for implementing
9067 SRFI-4's read synax `f32(...)').
9068
9069 * num2integral.i.c: Use scm_t_signed_bits instead of scm_t_bits,
9070 because the latter is unsigned now and breaks comparisons like
9071 (n < (scm_t_signed_bits)MIN_VALUE).
9072
9073 2001-06-26 Neil Jerram <neil@ossau.uklinux.net>
9074
9075 * eval.h, eval.c (scm_call_4): New function.
9076
9077 * eval.c (SCM_APPLY, SCM_CEVAL, ENTER_APPLY): Call trap handlers
9078 directly rather than dispatching to them via scm_ithrow and a lazy
9079 catch.
9080
9081 * eval.c (scm_evaluator_trap_table), eval.h (SCM_ENTER_FRAME_HDLR,
9082 SCM_APPLY_FRAME_HDLR, SCM_EXIT_FRAME_HDLR): Add three new options
9083 for trap handler procedures.
9084
9085 * debug.h (SCM_RESET_DEBUG_MODE): Add checks for trap handler
9086 procedures not being #f.
9087
9088 2001-06-27 Michael Livshin <mlivshin@bigfoot.com>
9089
9090 * Makefile.am (c-tokenize.c): add rule to generate it.
9091 (EXTRA_DIST): add c-tokenize.lex, so it gets distributed.
9092
9093 filter-doc-snarfage.c: remove.
9094
9095 2001-06-26 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9096
9097 * ports.c (scm_output_port_p): Use result of SCM_COERCE_OUTPORT.
9098
9099 The following set of changes makes compiling Guile under various
9100 Windows compilers easier. Compilation under GNU systems should
9101 not be affected at all.
9102
9103 Thanks to Stefan Jahn for all necessary information, patches and
9104 testing.
9105
9106 * posix.c: Conditialize getpwent, getgrent, kill, getppid, getuid,
9107 getpgrp, ttyname, primitive-fork and some header inclusion for
9108 Windows.
9109
9110 * random.c: Define M_PI, if not predefined and use __int64 for
9111 LONG64 under Windows.
9112
9113 * scmsigs.c: Emulate some functions (alarm, sleep, kill) under
9114 Windows and conditionalize some signal names.
9115
9116 * socket.c (scm_getsockopt): Added missing comma.
9117 Include socket library header under Windows.
9118
9119 * stime.c (CLKTCK): Add cast to int, to make it compile under
9120 Windows.
9121
9122 * ports.c (truncate): New function, compiled only under Windows.
9123
9124 * net_db.c: Do not declare errno under Windows.
9125
9126 * iselect.h, inet_aton.c: Include socket library headers under
9127 Windows.
9128
9129 * guile.c (inner_main): Under Windows, initialize socket library
9130 and initialize gdb_interface data structures.
9131
9132 * gdb_interface.h: Under Windows, gdb_interface cannot be
9133 initialized statically. Initialize at runtime instead.
9134
9135 * fports.c (write_all): ssize_t -> size_t.
9136 (fport_print): Conditionalize call to ttyname().
9137 (getflags): New function, compiled only under Windows.
9138
9139 * filesys.c: Conditionalize inclusion of <pwd.h>. Conditionalize
9140 primitives chown, link, fcntl.
9141 (scm_basename, scm_dirname): Under Windows, handle \ as well as /
9142 as path seperator.
9143
9144 * backtrace.c: Include <io.h> under Windows.
9145
9146 * async.h (ASYNCH, SCM_ASYNC_H): Rename <foo>H to SCM_<foo>_H.
9147
9148 * _scm.h: Added preprocessor conditional for __MINGW32__ for errno
9149 declaration.
9150
9151 2001-06-27 Keisuke Nishida <kxn30@po.cwru.edu>
9152
9153 * eval.c (scm_call_0, scm_call_1, scm_call_2, scm_call_3,
9154 scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3): New functions.
9155 * eval.h (scm_call_0, scm_call_1, scm_call_2, scm_call_3,
9156 scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3): Declared.
9157 * async.c (scm_run_asyncs), coop-threads.c (scheme_body_bootstrip,
9158 scheme_handler_bootstrip), debug.c (with_traps_inner), dynwind.c
9159 (scm_dynamic_wind, scm_dowinds), environments.c
9160 (import_environment_conflict), eval.c (scm_macroexp, scm_force,
9161 scm_primitive_eval_x, scm_primitive_eval), fluids.c (apply_thunk),
9162 goops.c (GETVAR, purgatory, make_class_from_template,
9163 scm_ensure_accessor), hashtab.c (scm_ihashx, scm_sloppy_assx,
9164 scm_delx_x, fold_proc), hooks.c (scm_c_run_hook), load.c
9165 (scm_primitive_load), modules.c (scm_resolve_module,
9166 scm_c_define_module, scm_c_use_module, scm_c_export,
9167 module_variable, scm_eval_closure_lookup, scm_sym2var,
9168 scm_make_module, scm_ensure_user_module, scm_load_scheme_module),
9169 ports.c (scm_port_for_each), print.c (scm_printer_apply),
9170 properties.c (scm_primitive_property_ref), ramap.c (ramap,
9171 ramap_cxr, rafe, scm_array_index_map_x, read.c (scm_lreadr),
9172 scmsigs.c (sys_deliver_signals), sort.c (applyless), strports.c
9173 (scm_object_to_string, scm_call_with_output_string,
9174 scm_call_with_input_string), throw.c (scm_body_thunk,
9175 scm_handle_by_proc, hbpca_body), unif.c (scm_make_shared_array,
9176 scm_make_shared_array), vports.c (sf_flush, sf_write,
9177 sf_fill_input, sf_close): Use one of the above functions.
9178 * goops.c, hashtab.c, scmsigs.c, sort.c: #include "libguile/root.h".
9179
9180 2001-06-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
9181
9182 * filesys.c (scm_close), ports.c (scm_close_port,
9183 scm_port_closed_p), strop.c (scm_string_null_p): Use SCM_BOOL
9184 instead of SCM_NEGATE_BOOL.
9185
9186 * filesys.c (scm_stat): Clean up type dispatch.
9187
9188 * filesys.c (scm_stat), ports.c (scm_input_port_p,
9189 scm_output_port_p): Get rid of redundant IM type check.
9190
9191 * filesys.c (scm_readdir, scm_getcwd, scm_readlink), gh_data.c
9192 (gh_str2scm), load.c (scm_primitive_load, scm_internal_parse_path,
9193 scm_search_path), net_db.c (scm_gethost, scm_getnet, scm_getproto,
9194 scm_return_entry), numbers.c (scm_number_to_string), objects.c
9195 (scm_make_subclass_object), ports.c (scm_port_mode), read.c
9196 (scm_lreadr), simpos.c (scm_getenv), socket.c (scm_inet_ntoa,
9197 scm_addr_vector), stime.c (scm_strftime), strings.c
9198 (scm_makfromstrs, scm_makfrom0str, scm_substring), strings.h
9199 (SCM_STRING_COERCE_0TERMINATION_X), strop.c (string_copy,
9200 scm_string_split), strports.c (scm_strport_to_string), symbols.c
9201 (scm_symbol_to_string), vports.c (sf_write): Use scm_mem2string
9202 instead of scm_makfromstr.
9203
9204 * net_db.c (scm_sethost, scm_setnet, scm_setproto, scm_setserv),
9205 ports.c (scm_close_all_ports_except), read.c (scm_lreadr,
9206 scm_read_hash_extend), stime.c (scm_strftime), strings.c
9207 (scm_string_append, scm_string), strings.h (SCM_STRINGP,
9208 SCM_STRING_COERCE_0TERMINATION_X, SCM_RWSTRINGP), strop.c
9209 (string_capitalize_x): Prefer explicit type check over SCM_N?IMP,
9210 !SCM_<pred> over SCM_N<pred>.
9211
9212 * strings.[ch] (scm_makfromstr): Deprecated.
9213
9214 (scm_mem2string): New function, replaces scm_makfromstr.
9215
9216 * strings.c (scm_substring), strop.c (string_copy,
9217 scm_string_split), strports.c (scm_strport_to_string), symbols.c
9218 (scm_symbol_to_string): Fix gc problem.
9219
9220 * strings.h (STRINGSH, SCM_STRINGS_H): Rename <foo>H to
9221 SCM_<foo>_H.
9222
9223 * validate.h (SCM_VALIDATE_SUBSTRING_SPEC_COPY): Eliminate
9224 warning about comparing signed and unsigned values. This fix is
9225 not optimal, since it won't work reliably if sizeof (c_start) >
9226 sizeof (size_t) or sizeof (c_end) > sizeof (size_t). A better
9227 solution is to define this macro as an inline function, thus
9228 allowing to specifiy the types of c_start and c_end.
9229
9230 2001-06-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
9231
9232 * debug.h (SCM_DEBUGOBJ_FRAME): Deliver result as a
9233 scm_t_debug_frame*.
9234
9235 * debug.h (DEBUGH, SCM_DEBUG_H), stacks.h (STACKSH, SCM_STACKSH):
9236 Rename <foo>H to SCM_<foo>_H.
9237
9238 * stacks.c (NEXT_FRAME, narrow_stack): Prefer explicit type check
9239 over SCM_N?IMP, !SCM_<pred> over SCM_N<pred>.
9240
9241 (narrow_stack): Make i unsigned. Don't use side-effecting
9242 operations in conditions.
9243
9244 (narrow_stack, scm_make_stack, scm_stack_id,
9245 scm_last_stack_frame): Get rid of redundant SCM_N?IMP checks.
9246
9247 (scm_make_stack, scm_stack_id, scm_last_stack_frame): Clean up
9248 type dispatch. No need to cast result of SCM_DEBUGOBJ_FRAME any
9249 more.
9250
9251 (scm_stack_ref, scm_frame_previous, scm_frame_next): Fix
9252 signedness.
9253
9254 (scm_last_stack_frame): Remove bogus `;´.
9255
9256 * stacks.h (SCM_FRAMEP): Fix type check.
9257
9258 2001-06-25 Michael Livshin <mlivshin@bigfoot.com>
9259
9260 * Makefile.am (MAINTAINERCLEANFILES): be sure to remove
9261 c-tokenize.c when doing maintainer-clean.
9262
9263 * snarf.h (SCM_SNARF_DOCS): change the "grammar" slightly.
9264
9265 * guile-snarf-docs.in, guile-snarf-docs-texi.in: rewrite &
9266 simplify.
9267
9268 * eval.c: all hash signs are in column 0.
9269
9270 * Makefile.am (guile_filter_doc_snarfage): build using
9271 c-tokenize.c, not filter-doc-snarfage.c.
9272 rearrange snarfing dependencies a bit.
9273
9274 * c-tokenize.lex: new file.
9275
9276 2001-06-25 Marius Vollmer <mvo@zagadka.ping.de>
9277
9278 * srcprop.h, srcprop.c (scm_srcprops_to_plist): Renamed from
9279 scm_t_srcpropso_plist. See the big type renaming.
9280 * coop-defs.h (scm_mutex_trylock, scm_cond_timedwait): Likewise.
9281 Thanks to Seth Alves!
9282
9283 * numbers.c (SIZE_MAX, PTRDIFF_MIN, PTRDIFF_MAX): Only define when
9284 they aren't defined already.
9285
9286 2001-06-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
9287
9288 * backtrace.c (display_backtrace_body): Use SCM_VALIDATE_STACK
9289 and SCM_VALIDATE_OPOUTPORT instead of SCM_ASSERT. Fix signedness
9290 problem.
9291
9292 * backtrace.c (display_expression, scm_set_print_params_x,
9293 display_application, display_frame, scm_backtrace), numbers.c
9294 (scm_istring2number), objects.c (scm_class_of,
9295 scm_mcache_lookup_cmethod, scm_mcache_compute_cmethod): Prefer
9296 explicit type check over SCM_N?IMP, !SCM_<pred> over SCM_N<pred>.
9297
9298 * fluids.c (scm_fluid_ref, scm_fluid_set_x): Fluid numbers are
9299 always positive.
9300
9301 * numbers.c (scm_i_mkbig): Remove unnecessary casts, remove
9302 unnecessary SCM_DEFER_INTS, SCM_ALLOW_INTS.
9303
9304 * objects.c (scm_class_of): Type fix.
9305
9306 (scm_mcache_lookup_cmethod): Improved comment, simplified,
9307 eliminated goto.
9308
9309 * pairs.h (scm_error_pair_access): The function can return if
9310 called recursively.
9311
9312 2001-06-20 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9313
9314 * init.c (scm_init_guile_1): Removed initialization of tag.c.
9315
9316 * gdbint.c, init.c: Removed inclusion of tag.h.
9317
9318 * tag.h, tag.c: Removed files.
9319
9320 * Makefile.am: Removed tag.{h,c,doc,x} in various places.
9321
9322 2001-06-20 Gary Houston <ghouston@arglist.com>
9323
9324 * deprecation.c, extensions.c, rw.c: include string.h.
9325
9326 2001-06-19 Gary Houston <ghouston@arglist.com>
9327
9328 * filter-doc-snarfage.c (process): added ungetc in
9329 MULTILINE_COOKIE case since otherwise it fails when there's no
9330 space between the '(' and the quote of the following string
9331 (gcc 3.0).
9332
9333 2001-06-14 Marius Vollmer <mvo@zagadka.ping.de>
9334
9335 Throughout: replace "scm_*_t" with "scm_t_*", except "scm_lisp_t".
9336
9337 2001-06-14 Marius Vollmer <mvo@zagadka.ping.de>
9338
9339 * unif.h (SCM_ARRAY_NDIM): Shift then cast so that no sign
9340 extension takes place.
9341 * strings.h (SCM_STRING_LENGTH): Likewise.
9342 (SCM_STRING_MAX_LENGTH): Use unsigned numbers.
9343
9344 * __scm.h (ptrdiff_t): Typedef to long when configure didn't find
9345 it.
9346
9347 * tags.h: Include <stdint.h> when we have it.
9348 (scm_bits_t): Changed to be a unsigned type. Use uintptr_t when
9349 available. Else use "unsigned long".
9350 (scm_signed_bits_t): New.
9351
9352 * numbers.h (SCM_SRS): Cast shiftee to scm_signed_bits_t.
9353 (SCM_INUM): Cast result to scm_signed_bits_t.
9354
9355 2001-06-13 Thien-Thi Nguyen <ttn@revel.glug.org>
9356
9357 * mkstemp.c: Update path to #include file scmconfig.h.
9358 Thanks to Golubev I. N.
9359
9360 2001-06-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
9361
9362 * struct.h (SCM_STRUCT_VTABLE_FLAGS): New macro.
9363
9364 * goops.h (SCM_NUMBER_OF_SLOTS): Removed bogus `\´ at the end of
9365 the macro definition.
9366
9367 (SCM_CLASSP, SCM_INSTANCEP, SCM_PUREGENERICP, SCM_ACCESSORP,
9368 SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Use SCM_STRUCT_VTABLE_FLAGS
9369 instead of SCM_INST_TYPE.
9370
9371 (SCM_ACCESSORP, SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Make sure
9372 the object is a struct before accessing its struct flags.
9373
9374 (SCM_INST_TYPE, SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Deprecated.
9375
9376 2001-06-10 Gary Houston <ghouston@arglist.com>
9377
9378 * rdelim.c (scm_init_rdelim_builtins): don't try to activate the
9379 (ice-9 rdelim) module in (guile) and (guile-user). it didn't
9380 work reliably anymore. try it from boot-9.scm instead.
9381
9382 2001-06-09 Marius Vollmer <mvo@zagadka.ping.de>
9383
9384 * ports.c (scm_lfwrite): Maintain columnd and row count in port.
9385 Thanks to Matthias Köppe!
9386
9387 2001-06-08 Michael Livshin <mlivshin@bigfoot.com>
9388
9389 * snarf.h, filter-doc-snarfage.c: more changes to cope with
9390 space-happy C preprocessors.
9391
9392 * filter-doc-snarfage.c, guile-snarf.in: try to cope with spaces
9393 inside cookies. thanks to Matthias Köppe!
9394
9395 2001-06-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
9396
9397 * keywords.c (keyword_print): Don't use SCM_C[AD]R to access
9398 keywords. Fix gc protection.
9399
9400 * objects.c (scm_mcache_lookup_cmethod): Don't use side effecting
9401 operations in macro calls.
9402
9403 * pairs.c (scm_error_pair_access): Avoid recursion.
9404
9405 Thanks to Matthias Koeppe for reporting the bugs that correspond
9406 to the following set of patches.
9407
9408 * unif.c (scm_bit_set_star_x, scm_bit_invert_x), vectors.h
9409 (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR): Obtain the
9410 bitvector base address using SCM_BITVECTOR_BASE.
9411
9412 * unif.h (SCM_BITVECTOR_BASE): Return the base address as an
9413 unsigned long*.
9414
9415 2001-06-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
9416
9417 * goops.c (SCM_CLASS_REDEF): Removed.
9418
9419 * vectors.h (VECTORSH, SCM_VECTORS_H): Renamed <foo>H to
9420 SCM_<foo>_H.
9421
9422 Thanks to Matthias Koeppe for reporting the bugs that correspond
9423 to the following set of patches.
9424
9425 * goops.c (scm_sys_prep_layout_x, scm_basic_basic_make_class,
9426 create_basic_classes, scm_sys_fast_slot_set_x, set_slot_value,
9427 scm_sys_allocate_instance, clear_method_cache,
9428 scm_sys_invalidate_method_cache_x, scm_make,
9429 create_standard_classes, scm_make_port_classes, scm_make_class,
9430 scm_add_slot): Use SCM_SET_SLOT to set slot values.
9431
9432 (prep_hashsets): Use SCM_SET_HASHSET to set class hash values.
9433
9434 * goops.h (SCM_SET_SLOT, SCM_SET_HASHSET): New macros.
9435
9436 * ramap.c (BINARY_ELTS_CODE, BINARY_PAIR_ELTS_CODE,
9437 UNARY_ELTS_CODE): Remove bogus break statement.
9438
9439 * vectors.h (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR):
9440 Don't access bit vectors elements as SCM objects.
9441
9442 * weaks.c (scm_make_weak_vector, scm_make_weak_key_hash_table,
9443 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
9444 Don't assign to an unpacked value.
9445
9446 2001-06-07 Dirk Herrmann <D.Herrmann@tu-bs.de>
9447
9448 * __scm.h (SCM_NORETURN): Moved here from error.h.
9449
9450 (SCM_UNUSED): New macro.
9451
9452 (SCM_DEBUG_PAIR_ACCESSES): New macro.
9453
9454 * backtrace.c (display_error_handler), continuations.c
9455 (continuation_print), debug.c (debugobj_print), dynwind.c
9456 (guards_print), environments.c (observer_print,
9457 core_environments_finalize, leaf_environment_cell,
9458 leaf_environment_print, eval_environment_print,
9459 eval_environment_observer, import_environment_define,
9460 import_environment_undefine, import_environment_print,
9461 import_environment_observer, export_environment_define,
9462 export_environment_undefine, export_environment_print,
9463 export_environment_observer), eval.c (scm_m_quote, scm_m_begin,
9464 scm_m_if, scm_m_set_x, scm_m_and, scm_m_or, scm_m_case,
9465 scm_m_cond, scm_m_lambda, scm_m_letstar, scm_m_do, scm_m_delay,
9466 scm_m_letrec1, scm_m_apply, scm_m_cont, scm_m_nil_cond,
9467 scm_m_nil_ify, scm_m_t_ify, scm_m_0_cond, scm_m_0_ify,
9468 scm_m_1_ify, scm_m_atfop, scm_m_at_call_with_values), evalext.c
9469 (scm_m_generalized_set_x), fluids.c (fluid_print), fports.c
9470 (fport_print), gc.c (gc_start_stats, scm_remember_upto_here_1,
9471 scm_remember_upto_here_2, scm_remember_upto_here, mark_gc_async),
9472 gh_init.c (gh_standard_handler), goops.c (get_slot_value,
9473 set_slot_value, test_slot_existence, scm_change_object_class,
9474 scm_m_atslot_ref, scm_m_atslot_set_x, make_struct_class,
9475 default_setter), guardians.c (guardian_print, guardian_gc_init,
9476 guardian_zombify, whine_about_self_centered_zombies), guile.c
9477 (inner_main), init.c (stream_handler), keywords.c (keyword_print),
9478 mallocs.c (malloc_print), numbers.c (scm_print_real,
9479 scm_print_complex, scm_bigprint), ports.c (flush_port_default,
9480 end_input_default, scm_port_print, fill_input_void_port,
9481 write_void_port), root.c (root_print), smob.c (scm_mark0,
9482 scm_free0, scm_smob_print, scm_smob_apply_1_error,
9483 scm_smob_apply_2_error, scm_smob_apply_3_error, free_print),
9484 stime.c (restorezone), strings.c (scm_makfromstr), struct.c
9485 (scm_struct_free_0, scm_struct_free_standard,
9486 scm_struct_free_entity, scm_struct_gc_init, scm_free_structs),
9487 throw.c (jmpbuffer_print, lazy_catch_print, ss_handler,
9488 scm_handle_by_throw, scm_ithrow), weaks.c
9489 (scm_weak_vector_gc_init, scm_mark_weak_vector_spines,
9490 scm_scan_weak_vectors), ramap.c (scm_array_fill_int), filesys.c
9491 (scm_dir_print): Mark unused parameters with SCM_UNUSED.
9492
9493 * error.h (SCM_NORETURN): Moved to __scm.h.
9494
9495 * error.h (ERRORH, SCM_ERROR_H), pairs.h (PAIRSH, SCM_PAIRS_H):
9496 Renamed <foo>H to SCM_<foo>_H.
9497
9498 * gc.c (debug_cells_gc_interval): New static variable.
9499
9500 (scm_assert_cell_valid): If selected by the user, perform
9501 additional garbage collections.
9502
9503 (scm_set_debug_cell_accesses_x): Extended to let the user specify
9504 if additional garbage collections are desired.
9505
9506 (mark_gc_async): If additional garbage collections are selected
9507 by the user, don't call the after-gc-hook. Instead require the
9508 user to run the hook manually.
9509
9510 * pairs.c (scm_error_pair_access): New function. Only compiled
9511 if SCM_DEBUG_PAIR_ACCESSES is set to 1.
9512
9513 * pairs.h (SCM_VALIDATE_PAIR): New macro.
9514
9515 (SCM_CAR, SCM_CDR, SCM_SETCAR, SCM_SETCDR): If
9516 SCM_DEBUG_PAIR_ACCESSES is set to 1, make sure that the argument
9517 is a real pair object. (Glocs are also accepted, but that may
9518 change.) If not, abort with an error message.
9519
9520 2001-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
9521
9522 * eval.c (SCM_VALIDATE_NON_EMPTY_COMBINATION): New macro.
9523
9524 (SCM_CEVAL, SCM_APPLY): Replace calls to SCM_EVALIM2 with calls
9525 to SCM_VALIDATE_NON_EMPTY_COMBINATION.
9526
9527 2001-06-05 Marius Vollmer <mvo@zagadka.ping.de>
9528
9529 * extensions.c (scm_c_register_extension): Allow NULL as library
9530 name.
9531 (load_extension): Ignore NULL library names when comparing.
9532
9533 * hash.c (scm_hasher): Use SCM_UNPACK in the case labels so that
9534 non-pointers are being compared. Thanks to Alexander Klimov!
9535
9536 2001-06-04 Gary Houston <ghouston@arglist.com>
9537
9538 * rw.c (scm_write_string_partial): new procedure implementing
9539 write-string/partial in (ice-9 rw).
9540 * rw.h: declare scm_write_string_partial.
9541
9542 2001-06-04 Marius Vollmer <mvo@zagadka.ping.de>
9543
9544 * keywords.c (keyword_print): Substract 1 from length of symbol
9545 name, accounting for the silly dash.
9546
9547 * dynl.c (scm_registered_modules, scm_clear_registered_modules):
9548 Do not emit deprecation warning.
9549
9550 Added exception notice to all files.
9551
9552 * dynl.c: Include "deprecation.h".
9553
9554 2001-06-03 Marius Vollmer <mvo@zagadka.ping.de>
9555
9556 * dynl.c (scm_register_module_xxx, scm_registered_modules,
9557 scm_clear_registered_modules): Deprecated.
9558
9559 2001-06-02 Rob Browning <rlb@cs.utexas.edu>
9560
9561 * .cvsignore: add guile_filter_doc_snarfage guile-snarf-docs
9562 guile-snarf-docs-texi.
9563
9564 * fports.c: HAVE_ST_BLKSIZE changed to
9565 HAVE_STRUCT_STAT_ST_BLKSIZE.
9566 (scm_fport_buffer_add): HAVE_ST_BLKSIZE changed to
9567 HAVE_STRUCT_STAT_ST_BLKSIZE.
9568
9569 * filesys.c (scm_stat2scm): HAVE_ST_RDEV changed to
9570 HAVE_STRUCT_STAT_ST_RDEV.
9571 (scm_stat2scm): HAVE_ST_BLKSIZE changed to
9572 HAVE_STRUCT_STAT_ST_BLKSIZE.
9573 (scm_stat2scm): HAVE_ST_BLOCKS changed to
9574 HAVE_STRUCT_STAT_ST_BLOCKS.
9575
9576 2001-06-02 Marius Vollmer <mvo@zagadka.ping.de>
9577
9578 * strports.c (scm_eval_string): Use scm_primitive_eval_x instead
9579 of scm_eval_x to allow module changes between the forms in the
9580 string. Set/restore module using scm_c_call_with_current_module.
9581
9582 * mkstemp.c: New file, slightly modified from libiberties
9583 mkstemps.c.
9584
9585 2001-05-31 Michael Livshin <mlivshin@bigfoot.com>
9586
9587 * guile-snarf-docs.in, guile-snarf-docs-texi.in,
9588 filter-doc-snarfage.c: new files.
9589
9590 * Makefile.am: add stuff to [build,] use and distribute
9591 guile-snarf-docs, guile-snarf-docs-texi, guile_filter_doc_snarfage.
9592
9593 * guile-snarf.in: grok the new snarf output.
9594
9595 * snarf.h: make the output both texttools- and `read'-friendly.
9596
9597 * guile-doc-snarf.in: reimplement in terms of guile-snarf and
9598 guile-snarf-docs. (should also deprecate, I guess. maybe not).
9599
9600 2001-05-31 Marius Vollmer <mvo@zagadka.ping.de>
9601
9602 * print.c (scm_simple_format): Support "~~" and "~%". Signal
9603 error for unsupported format controls and for superflous
9604 arguments. Thanks to Daniel Skarda!
9605
9606 * print.h, print.c (scm_print_symbol_name): Factored out of
9607 scm_iprin1.
9608 (scm_iprin1): Call it.
9609
9610 * keywords.c (keyword_print): Use scm_print_symbol_name so that
9611 weird names are printed correctly.
9612
9613 * print.c (scm_print_symbol_name): Symbols whose name starts with
9614 `#' or `:' or ends with `:' are considered weird.
9615
9616 2001-05-30 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9617
9618 * numbers.c (scm_difference, scm_divide): Clarified comments for -
9619 and /.
9620
9621 2001-05-29 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9622
9623 * debug.h: Removed prototype for scm_eval_string.
9624
9625 2001-05-28 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9626
9627 * symbols.c (scm_gensym): Fix buffer overrun (try `(gensym
9628 (make-string 2000 #\!))' in an older version).
9629
9630 Change strncpy to memcpy to allow embedded NUL characters in
9631 symbol prefix.
9632
9633 2001-05-28 Michael Livshin <mlivshin@bigfoot.com>
9634
9635 * hooks.c (scm_create_hook): deprecated.
9636 (make_hook): deleted.
9637 (scm_make_hook): all the hook creation code is now here.
9638
9639 * gc.c (scm_init_gc): don't call `scm_create_hook'. instead make
9640 a hook, make it permanent, and do a `scm_c_define' on it.
9641
9642 * strop.c (s_scm_string_capitalize_x): fix docstring quoting.
9643
9644 * socket.c (s_scm_inet_pton): fix docstring quoting.
9645 (s_scm_inet_ntop): ditto.
9646
9647 * num2integral.i.c (INTEGRAL2NUM): cast to fix a warning.
9648
9649 * hashtab.c (scm_internal_hash_fold): fix argument position in
9650 SCM_ASSERT.
9651
9652 * environments.c (s_scm_import_environment_set_imports_x): fix
9653 argument position in SCM_ASSERT.
9654
9655 * debug.c (s_scm_make_gloc): fix SCM packing/unpacking.
9656 (s_scm_make_iloc): ditto.
9657
9658 2001-05-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
9659
9660 * __scm.h (SCM_DEBUG_TYPING_STRICTNESS): Make 1 the default.
9661
9662 * eval.c (promise_print): Read the promise's value as an object.
9663
9664 (SCM_CEVAL): Don't perform side-effecting operations in macro
9665 parameters.
9666
9667 * eval.h (SCM_EVALIM2): Fix the typing strictness of the
9668 conditional expression.
9669
9670 * gc.c (scm_master_freelist, scm_master_freelist2): Added missing
9671 initializer.
9672
9673 * gh_data.c (gh_set_substr): Removed redundant unsigned >= 0
9674 text, removed redundant computation of effective_length and fixed
9675 the overflow check.
9676
9677 * goops.c (test_slot_existence): Use SCM_EQ_P to compare SCM
9678 values.
9679
9680 (wrap_init): Don't use SCM_C[AD]R for non pairs.
9681
9682 (hell): Make it a scm_bits_t pointer rather than a SCM pointer.
9683
9684 * goops.c (scm_sys_modify_class), strports.c (st_resize_port),
9685 struct.h (SCM_SET_STRUCT_PRINTER): Store unpacked values.
9686
9687 * goops.h (SCM_ACCESSORS_OF, SCM_SLOT): Return a SCM value.
9688
9689 * goops.h (GOOPSH, SCM_GOOPS_H), modules.h (MODULESH,
9690 SCM_MODULES_H), objects.h (OBJECTSH, SCM_OBJECTS_H), struct.h
9691 (STRUCTH, SCM_STRUCT_H), symbols.h (SYMBOLSH, SCM_SYMBOLS_H),
9692 __scm.h (__SCMH, SCM___SCM_H): Change <foo>H to SCM_<foo>_H.
9693
9694 * modules.[ch] (scm_module_tag): Make it a scm_bits_t value.
9695
9696 * objects.h (SCM_SET_CLASS_INSTANCE_SIZE): Fixed typing.
9697
9698 * ramap.c (ramap_rp): Removed bogus `;´.
9699
9700 * sort.c (scm_restricted_vector_sort_x): Fixed signedness
9701 problem.
9702
9703 * symbols.h (SCM_PROP_SLOTS, SCM_SET_PROP_SLOTS, SCM_SYMBOL_FUNC,
9704 SCM_SET_SYMBOL_FUNC, SCM_SYMBOL_PROPS, SCM_SET_SYMBOL_PROPS):
9705 Read SCM objects rather than scm_bits_t values.
9706
9707 * tags.h (SCM_VOIDP_TEST): Removed.
9708
9709 (SCM_DEBUG_TYPING_STRICTNESS): Now takes values 0, 1, 2. The
9710 value of 2 now corresponds to the former 1, the current 1
9711 corresponds to the former situation that SCM_VOIDP_TEST was
9712 defined.
9713
9714 (SCM): Now defined as typedef struct scm_unused_struct * SCM;
9715 If this appears to be not ANSI compliant, we will change it to
9716 typedef struct scm_unused_struct { } * SCM;
9717 Thanks to Han-Wen Nienhuys for the suggestion.
9718
9719 * unif.c (scm_array_set_x): Fix typing problem, and use
9720 SCM_UVECTOR_BASE instead of SCM_VELTS or SCM_CELL_WORD_1 when
9721 dealing with uniform vectors.
9722
9723 2001-05-27 Michael Livshin <mlivshin@bigfoot.com>
9724
9725 * gc.c (scm_init_storage): init `scm_gc_registered_roots'.
9726 (scm_igc): mark from them, too (precisely, not conservatively!).
9727
9728 * root.h (scm_gc_registered_roots): new object in
9729 scm_sys_protects.
9730
9731 * hooks.c (scm_create_hook): call `scm_gc_protect_object' instead
9732 `scm_protect_object'. shouldn't call it at all, though, it seems.
9733
9734 * gc.c (scm_[un]protect_object): deprecated.
9735 (scm_gc_[un]protect_object): new names for scm_[un]protect_object.
9736 (scm_gc_[un]register_root[s]): new.
9737
9738 * gc.h: add prototypes for scm_gc_[un]protect_object,
9739 scm_gc_[un]register_root[s].
9740
9741 2001-05-26 Michael Livshin <mlivshin@bigfoot.com>
9742
9743 revert the controversial part of the 2001-05-24 changes.
9744
9745 2001-05-25 Marius Vollmer <mvo@zagadka.ping.de>
9746
9747 * modules.c (scm_env_module): Exported to Scheme.
9748
9749 * eval.c (scm_debug_opts): New option `show-file-name'.
9750
9751 * debug.h (SCM_SHOW_FILE_NAME): New.
9752
9753 * backtrace.c: Include "libguile/filesys.h".
9754 (sym_base, display_backtrace_get_file_line,
9755 display_backtrace_file, display_backtrace_file_and_line): New.
9756 (display_frame): Call display_backtrace_file_and_line if that is
9757 requested.
9758 (display_backtrace_body): Call scm_display_backtrace_file if
9759 requested.
9760
9761 * debug.h (scm_lookup_cstr, scm_lookup_soft, scm_evstr):
9762 Prototypes removed since there's no definition for these
9763 functions.
9764
9765 2001-05-24 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9766
9767 * unif.c (scm_make_ra, array_free), unif.h (SCM_ARRAY_DIMS):
9768 Changed use of scm_array->scm_array_t and
9769 scm_array_dim->scm_array_dim_t to enable build with
9770 --disable-deprecated.
9771
9772 2001-05-24 Michael Livshin <mlivshin@bigfoot.com>
9773
9774 The purpose of this set of changes is to regularize Guile's usage
9775 of ANSI C integral types, with the following ideas in mind:
9776
9777 - SCM does not nesessarily have to be long.
9778 - long is not nesessarily enough to store pointers.
9779 - long is not nesessarily the same size as int.
9780
9781 The changes are incomplete and possibly buggy. Please test on
9782 something exotic.
9783
9784 * validate.h
9785 (SCM_NUM2{SIZE,PTRDIFF,SHORT,USHORT,BITS,UBITS,INT,UINT}[_DEF]):
9786 new macros.
9787
9788 * unif.h: type renaming:
9789 scm_array -> scm_array_t
9790 scm_array_dim -> scm_array_dim_t
9791 the old names are deprecated, all in-Guile uses changed.
9792
9793 * tags.h (scm_ubits_t): new typedef, representing unsigned
9794 scm_bits_t.
9795
9796 * stacks.h: type renaming:
9797 scm_info_frame -> scm_info_frame_t
9798 scm_stack -> scm_stack_t
9799 the old names are deprecated, all in-Guile uses changed.
9800
9801 * srcprop.h: type renaming:
9802 scm_srcprops -> scm_srcprops_t
9803 scm_srcprops_chunk -> scm_srcprops_chunk_t
9804 the old names are deprecated, all in-Guile uses changed.
9805
9806 * gsubr.c, procs.c, print.c, ports.c, read.c, rdelim.c, ramap.c,
9807 rw.c, smob.c, sort.c, srcprop.c, stacks.c, strings.c, strop.c,
9808 strorder.c, strports.c, struct.c, symbols.c, unif.c, values.c,
9809 vectors.c, vports.c, weaks.c:
9810 various int/size_t -> size_t/scm_bits_t changes.
9811
9812 * random.h: type renaming:
9813 scm_rstate -> scm_rstate_t
9814 scm_rng -> scm_rng_t
9815 scm_i_rstate -> scm_i_rstate_t
9816 the old names are deprecated, all in-Guile uses changed.
9817
9818 * procs.h: type renaming:
9819 scm_subr_entry -> scm_subr_entry_t
9820 the old name is deprecated, all in-Guile uses changed.
9821
9822 * options.h (scm_option_t.val): unsigned long -> scm_bits_t.
9823 type renaming:
9824 scm_option -> scm_option_t
9825 the old name is deprecated, all in-Guile uses changed.
9826
9827 * objects.c: various long -> scm_bits_t changes.
9828 (scm_i_make_class_object): flags: unsigned long -> scm_ubits_t
9829
9830 * numbers.h (SCM_FIXNUM_BIT): deprecated, renamed to
9831 SCM_I_FIXNUM_BIT.
9832
9833 * num2integral.i.c: new file, multiply included by numbers.c, used
9834 to "templatize" the various integral <-> num conversion routines.
9835
9836 * numbers.c (scm_mkbig, scm_big2num, scm_adjbig, scm_normbig,
9837 scm_copybig, scm_2ulong2big, scm_dbl2big, scm_big2dbl):
9838 deprecated.
9839 (scm_i_mkbig, scm_i_big2inum, scm_i_adjbig, scm_i_normbig,
9840 scm_i_copybig, scm_i_short2big, scm_i_ushort2big, scm_i_int2big,
9841 scm_i_uint2big, scm_i_long2big, scm_i_ulong2big, scm_i_bits2big,
9842 scm_i_ubits2big, scm_i_size2big, scm_i_ptrdiff2big,
9843 scm_i_long_long2big, scm_i_ulong_long2big, scm_i_dbl2big,
9844 scm_i_big2dbl, scm_short2num, scm_ushort2num, scm_int2num,
9845 scm_uint2num, scm_bits2num, scm_ubits2num, scm_size2num,
9846 scm_ptrdiff2num, scm_num2short, scm_num2ushort, scm_num2int,
9847 scm_num2uint, scm_num2bits, scm_num2ubits, scm_num2ptrdiff,
9848 scm_num2size): new functions.
9849
9850 * modules.c (scm_module_reverse_lookup): i, n: int -> scm_bits_t.
9851
9852 * load.c: change int -> size_t in various places (where the
9853 variable is used to store a string length).
9854 (search-path): call scm_done_free, not scm_done_malloc.
9855
9856 * list.c (scm_ilength): return a scm_bits_t, not long.
9857 some other {int,long} -> scm_bits_t changes.
9858
9859 * hashtab.c: various [u]int -> scm_bits_t changes.
9860 scm_ihashx_closure -> scm_ihashx_closure_t (and made a typedef).
9861 (scm_ihashx): n: uint -> scm_bits_t
9862 use scm_bits2num instead of scm_ulong2num.
9863
9864 * gsubr.c: various int -> scm_bits_t changes.
9865
9866 * goops.[hc]: various {int,long} -> scm_bits_t changes.
9867
9868 * gh_data.c (gh_num2int): no loss of precision any more.
9869
9870 * gh.h (gh_str2scm): len: int -> size_t
9871 (gh_{get,set}_substr): start: int -> scm_bits_t,
9872 len: int -> size_t
9873 (gh_<num>2scm): n: int -> scm_bits_t
9874 (gh_*vector_length): return scm_[u]size_t, not unsigned long.
9875 (gh_length): return scm_bits_t, not unsigned long.
9876
9877 * gc.[hc]: various small changes relating to many things stopping
9878 being long and starting being scm_[u]bits_t instead.
9879 scm_mallocated should no longer wrap around.
9880
9881 * fports.h: type renaming:
9882 scm_fport -> scm_fport_t
9883 the old name is deprecated, all in-Guile uses changed.
9884
9885 * fports.c (fport_fill_input): count: int -> scm_bits_t
9886 (fport_flush): init_size, remaining, count: int -> scm_bits_t
9887
9888 * debug.h (scm_lookup_cstr, scm_lookup_soft, scm_evstr): removed
9889 those prototypes, as the functions they prototype don't exist.
9890
9891 * fports.c (default_buffer_size): int -> size_t
9892 (scm_fport_buffer_add): read_size, write_size: int -> scm_bits_t
9893 default_size: int -> size_t
9894 (scm_setvbuf): csize: int -> scm_bits_t
9895
9896 * fluids.c (n_fluids): int -> scm_bits_t
9897 (grow_fluids): old_length, i: int -> scm_bits_t
9898 (next_fluid_num, scm_fluid_ref, scm_fluid_set_x): n: int ->
9899 scm_bits_t
9900 (scm_c_with_fluids): flen, vlen: int -> scm_bits_t
9901
9902 * filesys.c (s_scm_open_fdes): changed calls to SCM_NUM2LONG to
9903 the new and shiny SCM_NUM2INT.
9904
9905 * extensions.c: extension -> extension_t (and made a typedef).
9906
9907 * eval.h (SCM_IFRAME): cast to scm_bits_t, not int. just so
9908 there are no nasty surprises if/when the various deeply magic tag
9909 bits move somewhere else.
9910
9911 * eval.c: changed the locals used to store results of SCM_IFRAME,
9912 scm_ilength and such to be of type scm_bits_t (and not int/long).
9913 (iqq): depth, edepth: int -> scm_bits_t
9914 (scm_eval_stack): int -> scm_bits_t
9915 (SCM_CEVAL): various vars are not scm_bits_t instead of int.
9916 (check_map_args, scm_map, scm_for_each): len: long -> scm_bits_t
9917 i: int -> scm_bits_t
9918
9919 * environments.c: changed the many calls to scm_ulong2num to
9920 scm_ubits2num.
9921 (import_environment_fold): proc_as_ul: ulong -> scm_ubits_t
9922
9923 * dynwind.c (scm_dowinds): delta: long -> scm_bits_t
9924
9925 * debug.h: type renaming:
9926 scm_debug_info -> scm_debug_info_t
9927 scm_debug_frame -> scm_debug_frame_t
9928 the old names are deprecated, all in-Guile uses changed.
9929 (scm_debug_eframe_size): int -> scm_bits_t
9930
9931 * debug.c (scm_init_debug): use scm_c_define instead of the
9932 deprecated scm_define.
9933
9934 * continuations.h: type renaming:
9935 scm_contregs -> scm_contregs_t
9936 the old name is deprecated, all in-Guile uses changed.
9937 (scm_contregs_t.num_stack_items): size_t -> scm_bits_t
9938 (scm_contregs_t.num_stack_items): ulong -> scm_ubits_t
9939
9940 * continuations.c (scm_make_continuation): change the type of
9941 stack_size from long to scm_bits_t.
9942
9943 * ports.h: type renaming:
9944 scm_port_rw_active -> scm_port_rw_active_t (and made a typedef)
9945 scm_port -> scm_port_t
9946 scm_ptob_descriptor -> scm_ptob_descriptor_t
9947 the old names are deprecated, all in-Guile uses changed.
9948 (scm_port_t.entry): int -> scm_bits_t.
9949 (scm_port_t.line_number): int -> long.
9950 (scm_port_t.putback_buf_size): int -> size_t.
9951
9952 * __scm.h (long_long, ulong_long): deprecated (they pollute the
9953 global namespace and have little value beside that).
9954 (SCM_BITS_LENGTH): new, is the bit size of scm_bits_t (i.e. of an
9955 SCM handle).
9956 (ifdef spaghetti): include sys/types.h and sys/stdtypes.h, if they
9957 exist (for size_t & ptrdiff_t).
9958 (scm_sizet): deprecated.
9959
9960 * Makefile.am (noinst_HEADERS): add num2integral.i.c
9961
9962 2001-05-23 Marius Vollmer <mvo@zagadka.ping.de>
9963
9964 * snarf.h (SCM_CONST_LONG): Use SCM_VCELL_INIT instead of
9965 SCM_VARIABLE_INIT since that it what it used to be.
9966
9967 * deprecation.c (scm_include_deprecated_features): Make docstring
9968 ANSIsh. Thanks to Matthias Köppe!
9969
9970 2001-05-21 Marius Vollmer <mvo@zagadka.ping.de>
9971
9972 * symbols.c (scm_mem2symbol): Re-introduce indirect cell. It is
9973 needed for weak-key hashtables.
9974
9975 * procs.c (scm_make_subr_with_generic): Add missing last argument
9976 in call to scm_c_define_gsubr_with_generic. Thanks to Ariel Rios.
9977
9978 * eval.c: Use SCM_EQ_P instead of `==' or `!=' in certain
9979 places. (scm_c_improper_memq): Return 1 instead of SCM_BOOL_T.
9980
9981 * eval.h (SCM_EVALIM2): Use SCM_EQ_P instead of `=='.
9982
9983 2001-05-20 Marius Vollmer <mvo@zagadka.ping.de>
9984
9985 * symbols.c (scm_mem2symbol): Call `scm_must_strndup' instead of
9986 `duplicate_string'. Do not use an indirect cell, store symbol
9987 directly in collision list of hash table.
9988 (duplicate_string): Removed.
9989
9990 * init.c (scm_init_guile_1): Call scm_init_extensions.
9991
9992 * Makefile.am: Add "extensions.c" and related files in all the
9993 right places.
9994
9995 * extensions.h, extension.c: New files.
9996
9997 * gc.h, gc.c (scm_must_strdup, scm_must_strndup): New.
9998
9999 * modules.h (scm_system_module_env_p): Move out of deprecated
10000 section.
10001
10002 * rw.h (scm_init_rw): Added prototype.
10003
10004 * gsubr.h, gsubr.c (scm_c_make_gsubr, scm_c_define_gsubr,
10005 scm_c_make_gsubr_with_generic, scm_c_define_gsubr_with_generic):
10006 New functions. They replace scm_make_gsubr and
10007 scm_make_gsubr_with_generic. The `make' variants only create the
10008 gsubr object, while the `define' variants also put it into the
10009 current module. Changed all callers.
10010 (scm_make_gsubr, scm_make_gsubr_with_generic): Deprecated.
10011
10012 * procs.h, procs.c (scm_c_make_subr, scm_c_define_subr,
10013 scm_c_make_subr_with_generic, scm_c_define_subr_with_generic): New
10014 functions. They replace scm_make_subr, scm_make_subr_opt and
10015 scm_make_subr_with_generic. The `make' variants only create the
10016 subr object, while the `define' variants also put it into the
10017 current module. Changed all callers.
10018 (scm_make_subr, scm_make_subr_opt, scm_make_subr_with_generic):
10019 Deprecated.
10020
10021 * eval.c, gc.c, gh_funcs.c, goops.c, macros.c, pairs.c, ramap.c,
10022 rdelim.c, rw.c, scmsigs.c, snarf.h, values.c: Changed according to
10023 the comments above.
10024
10025 2001-05-19 Neil Jerram <neil@ossau.uklinux.net>
10026
10027 * throw.c (scm_lazy_catch): Slight docstring clarification.
10028
10029 2001-05-19 Marius Vollmer <mvo@zagadka.ping.de>
10030
10031 * throw.c: Lazy-catch handlers are no longer allowed to return.
10032 Fixed comments throughout.
10033 (scm_ithrow): Signal an error when a lazy-catch handler returns.
10034 Moved actual jump to jmpbuf into if-branch where the jmpbuf is
10035 recognized as such.
10036
10037 * version.c (s_scm_micro_version): Fix typo in FUNC_NAME, it
10038 refered to s_scm_minor_version previously.
10039
10040 * modules.h, modules.c: Moved around a lot of code so that
10041 deprecated features appear at the bottom.
10042 (root_module_lookup_closure, scm_sym_app, scm_sym_modules,
10043 module_prefix, make_modules_in_var, beautify_user_module_x_var,
10044 scm_the_root_module, scm_make_module, scm_ensure_user_module,
10045 scm_load_scheme_module): Deprecated.
10046 (scm_system_module_env_p): Return SCM_BOOL_T directly for
10047 environments corresponding to the root module.
10048 (convert_module_name, scm_c_resolve_module,
10049 scm_c_call_with_current_module, scm_c_define_module,
10050 scm_c_use_module, scm_c_export): New.
10051 (the_root_module): New static variant of scm_the_root_module. Use
10052 it everywhere instead of scm_the_root_module.
10053
10054 * fluids.h, fluids.c (scm_internal_with_fluids): Deprecated.
10055 (scm_c_with_fluids): Renamed from scm_internal_with_fluids.
10056 (scm_c_with_fluid): New.
10057 (scm_with_fluids): Use scm_c_with_fluids instead of
10058 scm_internal_with_fluids.
10059
10060 * goops.h, goops.c (scm_init_goops_builtins): Renamed from
10061 `scm_init_goops'. Do not explicitly create/switch modules.
10062 Return SCM_UNSPECIFIED.
10063 (scm_init_goops): Only register `%init-goops-builtins' procedure.
10064 (scm_load_goops): Use scm_c_resolve_module instead of
10065 scm_resolve_module.
10066
10067 * init.c (scm_init_guile_1): Call `scm_init_goops' instead of
10068 `scm_init_oop_goops_goopscore_module'. Call `scm_init_rdelim' and
10069 `scm_init_rw' prior to loading the startup files.
10070
10071 * rdelim.h, rdelim.c: (scm_init_rdelim_builtins): Renamed from
10072 scm_init_rdelim. Do not explicitly create/switch modules.
10073 Return SCM_UNSPECIFIED.
10074 (scm_init_rdelim): Only register `%init-rdelim-builtins'
10075 procedure.
10076
10077 * rw.c (scm_init_rw_builtins): Renamed from scm_init_rw. Do not
10078 explicitly create/switch modules. Return SCM_UNSPECIFIED.
10079 (scm_init_rw): Only register `%init-rw-builtins' procedure.
10080
10081 * script.c (scm_shell): Evaluate the compiled switches in the
10082 current module, not in the root module.
10083
10084 2001-05-18 Marius Vollmer <mvo@zagadka.ping.de>
10085
10086 * fluids.c (scm_c_with_fluids): Rename from
10087 scm_internal_with_fluids.
10088 (scm_internal_with_fluids): Deprecated.
10089 (scm_c_with_fluid): New.
10090
10091 2001-05-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
10092
10093 * print.h (PRINTH, SCM_PRINT_H): Renamed PRINTH to SCM_PRINT_H.
10094
10095 (SCM_PORT_WITH_PS_PORT, SCM_PORT_WITH_PS_PS): Only pairs may be
10096 accessed with SCM_C[AD]R.
10097
10098 (SCM_COERCE_OUTPORT): Removed redundant SCM_NIMP test.
10099
10100 2001-05-16 Rob Browning <rlb@cs.utexas.edu>
10101
10102 * version.c (s_scm_major_version): doc fixes.
10103 (s_scm_minor_version): doc fixes.
10104 (s_scm_minor_version): new function.
10105
10106 * version.h (scm_init_version): new function.
10107
10108 * versiondat.h.in: add GUILE_MICRO_VERSION.
10109
10110 2001-05-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
10111
10112 * deprecation.c (scm_init_deprecation): Renamed
10113 GUILE_WARN_DEPRECATED_DEFAULT to SCM_WARN_DEPRECATED_DEFAULT.
10114
10115 2001-05-16 Marius Vollmer <mvo@zagadka.ping.de>
10116
10117 * Makefile.am (cpp_sig_symbols.c, cpp_err_symbols.c): Make
10118 dependent on cpp_cnvt.awk
10119
10120 2001-05-15 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10121
10122 * script.c (scm_compile_shell_switches): New command line option
10123 `--use-srfi' for loading a list of SRFIs on startup.
10124 (scm_shell_usage): Added `--use-srfi' to help message.
10125
10126 2001-05-10 Marius Vollmer <mvo@zagadka.ping.de>
10127
10128 Merged from mvo-vcell-cleanup-1-branch.
10129
10130 The concept of vcells has been removed from Guile. With it,
10131 explicit obarrays and associated operations are gone. Use
10132 hashtables instead of obarrays.
10133
10134 Throughout: use scm_sym2var instead of scm_sym2vcell and treat
10135 result as variable instead of vcell. Glocs no longer point to a
10136 vcell but to a variable. Use scm_c_define instead of
10137 scm_sysintern and treat the result as a variable (which it is),
10138 not a vcell.
10139
10140 * variable.c, variable.h (SCM_VARVCELL, SCM_UDVARIABLEP,
10141 SCM_DEFVARIABLEP): Deprecated.
10142 (SCM_VARIABLE_REF, SCM_VARIABLE_SET, SCM_VARIABLE_LOC): New.
10143 (variable_print): Do not print name of variable.
10144 (variable_equalp): Compare values, not vcells.
10145 (anonymous_variable_sym): Removed.
10146 (make_vcell_variable): Removed.
10147 (make_variable): New, as replacement.
10148 (scm_make_variable, scm_make_undefined_variable): Do not take name
10149 hint parameter.
10150 (scm_variable_ref): Check for SCM_UNDEFINED and throw "unbound"
10151 error in that case.
10152 (scm_builtin_variable): Deprecated.
10153
10154 * symbols.c, symbols.h (scm_sym2vcell, scm_sym2ovcell_soft,
10155 scm_sym2ovcell, scm_intern_obarray_soft, scm_intern_obarray,
10156 scm_intern, scm_intern0, scm_sysintern0_no_module_lookup,
10157 scm_sysintern, scm_sysintern0, scm_symbol_value0,
10158 scm_string_to_obarray_symbol, scm_intern_symbol,
10159 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned,
10160 scm_symbol_bound_p, scm_symbol_set_x, scm_gentmp, gentmp_counter):
10161 Deprecated and moved to "symbols-deprecated.c".
10162 (copy_and_prune_obarray, scm_builtin_bindings): Removed.
10163 (scm_init_symbols): Call scm_init_symbols_deprecated.
10164 * symbols-deprecated.c: New file.
10165 * Makefile.am: Added symbols-deprecated.c and related files in all
10166 the right places.
10167
10168 * snarf.h (SCM_VCELL, SCM_GLOBAL_VCELL, SCM_VCELL_INIT,
10169 SCM_GLOBAL_VCELL_INIT): Deprecated.
10170 (SCM_VARIABLE, SCM_GLOBAL_VARIABLE, SCM_VARIABLE_INIT,
10171 SCM_GLOBAL_VARIABLE_INIT): New, as replacement. Changed all uses.
10172
10173 * print.c (scm_iprin1): Use scm_module_reverse_lookup instead of
10174 SCM_GLOC_SYM.
10175
10176 * evalext.c, filesys.c, fports.c, gdbint.c, gh_data.c, gsubr.c,
10177 hooks.c, load.c, numbers.c, objects.c, ports.c, posix.c, procs.c,
10178 ramap.c, random.c, read.c, regex-posix.c, scmsigs.c, script.c,
10179 socket.c, srcprop.c, stacks.c, stime.c, struct.c, tag.c, throw.c:
10180 Changed according to the `throughout' comments.
10181
10182 * modules.h, modules.c (scm_module_system_booted_p): Changed type
10183 to `int'.
10184 (scm_module_type): Removed.
10185 (the_root_module): Renamed to the_root_module_var. Now points to
10186 a variable instead of a vcell. Updated all uses.
10187 (scm_the_root_module): Return SCM_BOOL_F when module systems
10188 hasn't been booted yet.
10189 (SCM_VALIDATE_STRUCT_TYPE): Removed.
10190 (scm_post_boot_init_modules): Made static.
10191 (scm_set_current_module): Call scm_post_boot_init_modules on first
10192 call.
10193 (make_modules_in, beautify_user_module_x, resolve_module,
10194 try_module_autoload, module_make_local_var_x): Tacked on "_var"
10195 suffix. Now point to variables instead of vcells. Updated all
10196 uses.
10197 (scm_module_lookup_closure): Deal with the module being SCM_BOOL_F
10198 and return SCM_BOOL_F in that case.
10199 (scm_module_transformer): Likewise.
10200 (sym_module, scm_lookup_closure_module, scm_env_module): New.
10201 (SCM_F_EVAL_CLOSURE_INTERFACE, SCM_EVAL_CLOSURE_INTERFACE_P): New.
10202 (scm_eval_closure_lookup): Do not allow new definitions when
10203 `interface' flag is set.
10204 (scm_standard_interface_eval_closure): New.
10205 (scm_pre_modules_obarray, scm_sym2var, scm_module_lookup,
10206 scm_lookup, scm_module_define, scm_define, scm_c_module_lookup,
10207 scm_c_lookup, scm_c_module_define, scm_c_define,
10208 scm_module_reverse_lookup, scm_get_pre_modules_obarray,
10209 scm_modules_prehistory): New.
10210 (scm_post_boot_init_modules): Use scm_c_define and scm_c_lookup
10211 instead of scm_intern0.
10212
10213 * macros.c (scm_make_synt): Return SCM_UNSPECIFIED instead of the
10214 symbol.
10215
10216 * keywords.c (s_scm_make_keyword_from_dash_symbol): Use a regular
10217 hashtable operations to maintain the keywords, not obarray ones.
10218
10219 * init.c (scm_load_startup_files): Do not call
10220 scm_post_boot_init_modules. This is done by
10221 scm_set_current_module now.
10222 (scm_init_guile_1): Call scm_modules_prehistory. Call
10223 scm_init_variable early on.
10224
10225 * goops.c (s_scm_sys_goops_loaded): Get
10226 var_compute_applicable_methods from scm_sym2var, not from a direct
10227 invocation of scm_goops_lookup_closure.
10228
10229 * gh_funcs.c (gh_define): Return SCM_UNSPECIFIED instead of vcell.
10230
10231 * gc.c: Added simple debugging hack to mark phase of GC: When
10232 activated, do not tail-call scm_gc_mark. This gives nice
10233 backtraces.
10234 (scm_unhash_name): Removed.
10235
10236 * feature.c (features): Renamed to features_var. Now points to a
10237 variable instead of a vcell. Updated all uses.
10238
10239 * eval.h (SCM_TOP_LEVEL_LOOKUP_CLOSURE): Use
10240 `scm_current_module_lookup_closure' which will do the right thing
10241 when the module system hasn't been booted yet.
10242 (SCM_GLOC_SYM): Removed.
10243 (SCM_GLOC_VAR, SCM_GLOC_SET_VAL): New.
10244 (SCM_GLOC_VAL, SCM_GLOC_LOC): Reimplemented in terms of variables.
10245
10246 * eval.c (scm_lookupcar, scm_lookupcar1): Deal with variables
10247 instead of with vcells. Do not overwrite `var' with the result of
10248 the lookup, use the new `real_var' instead. Remove `var2' in
10249 exchange (which was only used with threads).
10250 (sym_three_question_marks): New.
10251 (scm_unmemocar): Use `scm_module_reverse_lookup' instead of
10252 `SCM_GLOC_SYM'.
10253 (scm_lisp_nil, scm_lisp_t): Directly define as symbols.
10254 (scm_m_atfop): Expect the function definition to be a variable
10255 instead of a vcell.
10256 (scm_macroexp): Do not use `unmemocar', explicitely remember the
10257 symbol instead.
10258 (scm_unmemocopy): Removed thoughts about anti-macro interface.
10259 (scm_eval_args): Use more explicit code in the gloc branch of the
10260 atrocious struct ambiguity test. The optimizer will sort this
10261 out.
10262 (scm_deval_args): Likewise.
10263 (SCM_CEVAL): Likewise. Also, do not use unmemocar, explicitely
10264 remember the symbol instead. Added some comments where
10265 scm_tc3_cons_gloc really exclusively refers to structs.
10266 (scm_init_eval): Use scm_define to initialize "nil" and "t" to
10267 scm_lisp_nil and scm_lisp_t, respectively. Use scm_define instead
10268 of scm_sysintern in general.
10269
10270 * dynwind.c (scm_swap_bindings): Use SCM_GLOC_SET_VAL instead of
10271 explicit magic.
10272
10273 * debug.c (s_scm_make_gloc): Only allow proper variables, no
10274 pairs. Put the variable directly in the gloc.
10275 (s_scm_gloc_p): Use `scm_tc3_cons_gloc' instead of the magic `1'.
10276 (scm_init_debug): Use scm_c_define instead scm_sysintern.
10277
10278 * cpp_cnvt.awk: Emit "scm_c_define" instead of "scm_sysintern".
10279
10280 * backtrace.h, backtrace.c (scm_the_last_stack_fluid): Renamed to
10281 scm_the_last_stack_fluid_var. It now points to a variable instead
10282 of a vcell. Updated all uses.
10283 (scm_has_shown_backtrace_hint_p_var): Now points to a variable
10284 instead of a vcell. Updated all uses.
10285
10286 * _scm.h: Include "variables.h" and "modules.h" since almost
10287 everybody needs them now.
10288
10289 * root.h (scm_symhash, scm_symhash_vars): Removed.
10290 * gc.c (scm_init_storage): Do not initialize them.
10291
10292 2001-05-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
10293
10294 * eval.c (scm_init_eval): Initialize scm_undefineds and
10295 scm_listofnull.
10296
10297 * gc.c (scm_debug_newcell, scm_debug_newcell2): Fixed to behave
10298 like the SCM_NEWCELL macro counterparts.
10299
10300 (scm_init_storage, scm_init_gc): Moved initialization of
10301 scm_tc16_allocated from scm_init_gc to scm_init_storage.
10302
10303 (scm_init_storage): Moved initialization of scm_undefineds and
10304 scm_listofnull to eval.c, initializion of scm_nullstr to
10305 strings.c, initializion of scm_nullvect to vectors.c.
10306
10307 * gc.h (SCM_NEWCELL, SCM_NEWCELL2): Prefer SCM_NULLP over
10308 SCM_IMP, as in scm_debug_newcell and scm_debug_newcell2.
10309
10310 * init.c (scm_init_guile_1): Reordered some initializations and
10311 added dependcy information comments.
10312
10313 * load.c (scm_init_load): Use scm_nullstr.
10314
10315 * strings.c (scm_init_strings): Initialize scm_nullstr.
10316
10317 * vectors.c (scm_init_vectors): Initialize scm_nullvect.
10318
10319 2001-05-15 Marius Vollmer <mvo@zagadka.ping.de>
10320
10321 * values.c (print_values): Print as a unreadable object, not as
10322 multiple lines. Thanks to Matthias Köppe!
10323
10324 2001-05-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
10325
10326 * deprecation.c: Fixed copyright date.
10327
10328 * deprecation.h (DEPRECATION_H, SCM_DEPRECATION_H): Renamed
10329 DEPRECATION_H to SCM_DEPRECATION_H.
10330
10331 2001-05-10 Thien-Thi Nguyen <ttn@revel.glug.org>
10332
10333 * guile-doc-snarf.in: Update copyright.
10334 Fix relative path bug. Thanks to Sergey Poznyakoff.
10335
10336 2001-05-10 Marius Vollmer <mvo@zagadka.ping.de>
10337
10338 * ports.c (scm_port_revealed, scm_set_port_revealed_x): Only
10339 accept open ports. Thanks to Quetzalcoatl Bradley!
10340
10341 2001-05-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10342
10343 * procs.c: Increased `scm_subr_table_room' to 800 because Guile now
10344 has 779 primitives on startup.
10345
10346 2001-05-09 Marius Vollmer <mvo@zagadka.ping.de>
10347
10348 * eval.c (scm_i_eval): Copy expression before passing it to
10349 SCM_XEVAL. The copy operation was removed unintendedly during my
10350 change on 2001-03-25.
10351
10352 2001-05-09 Michael Livshin <mlivshin@bigfoot.com>
10353
10354 from Matthias Köppe (thanks!):
10355
10356 * ports.c (scm_c_read): pointer arithmetic on void pointers isn't
10357 portable.
10358
10359 * deprecation.c (s_scm_include_deprecated_features): ANSI'fied the
10360 docstring.
10361
10362 2001-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
10363
10364 * gc.c (scm_init_gc): Added FIXME comment.
10365
10366 * hooks.c: Since hooks don't have a name any more, it is not
10367 necessary to include objprop.h.
10368
10369 (hook_print, scm_add_hook_x): Replace SCM_NFALSEP by !SCM_FALSEP.
10370
10371 (symbol_name, scm_make_hook_with_name): Removed.
10372
10373 (scm_create_hook): Don't set the hook's name property.
10374
10375 * hooks.h (HOOKSH, SCM_HOOKS_H): Renamed HOOKSH to SCM_HOOKS_H.
10376
10377 (SCM_HOOK_NAME, scm_make_hook_with_name): Removed.
10378
10379 * init.c (scm_init_guile_1): Hooks don't use objprops any more.
10380
10381 * numbers.c (SCM_FLOBUFLEN, FLOBUFLEN, scm_number_to_string,
10382 scm_print_real, scm_print_complex): Renamed SCM_FLOBUFLEN to
10383 FLOBUFLEN and define it unconditionally.
10384
10385 2001-05-07 Marius Vollmer <mvo@zagadka.ping.de>
10386
10387 * gh_data.c (gh_lookup): Call gh_module_lookup with
10388 `scm_current_module ()', not `#f'.
10389 (gh_module_lookup): Expect a module instead of an obarray as first
10390 argument and do lookup in that module.
10391
10392 * ramap.c (raeql_1): Do not call scm_uniform_vector_length on
10393 arrays. The length of array is already determined differently and
10394 scm_uniform_vector_length does not work on arrays.
10395
10396 2001-05-06 Marius Vollmer <mvo@zagadka.ping.de>
10397
10398 * snarf.h (SCM_FUNC_CAST_ARBITRARY_ARGS): Use "SCM (*)()" for C++
10399 as well. "SCM (*)(...)" does not work on RedHat 7.1.
10400
10401 * __scm.h (SCM_WTA_DISPATCH_0): Removed ARG and POS parameters,
10402 they are not used. Changed `wrong type' error into `wrong num
10403 args' error. Changed all callers.
10404
10405 * numbers.c (scm_difference): Call SCM_WTA_DISPATCH_0 when zero
10406 arguments are supplied.
10407
10408 2001-05-05 Thien-Thi Nguyen <ttn@revel.glug.org>
10409
10410 * regex-posix.c (scm_regexp_exec): Expand docstring to briefly
10411 describe `regexp/notbol' and `regexp/noteol' execution flags.
10412
10413 * strop.c (scm_substring_move_x): Doc fix; nfc.
10414
10415 2001-05-05 Marius Vollmer <mvo@zagadka.ping.de>
10416
10417 * objects.c, objects.h (scm_valid_object_procedure_p): New.
10418 (scm_set_object_procedure_x): Use it to check argument. Fix
10419 docstring.
10420
10421 * evalext.c (scm_definedp): Fix docstring.
10422
10423 2001-05-05 Gary Houston <ghouston@arglist.com>
10424
10425 * socket.c: use HAVE_IPV6 instead of AF_INET6 to enable IPv6
10426 support.
10427
10428 2001-05-04 Neil Jerram <neil@ossau.uklinux.net>
10429
10430 * eval.c (scm_promise_p), list.c (scm_append_x, scm_reverse_x),
10431 symbols.c (scm_symbol_to_string), vports.c (scm_make_soft_port):
10432 Change R4RS references to R5RS.
10433
10434 * guile-snarf.awk.in: Fixes so that (i) blank lines in the
10435 docstring source are correctly reproduced in the output (ii)
10436 we don't anymore get occasional trailing quotes. Also reorganized
10437 and commented the code a little.
10438
10439 * scmsigs.c (scm_raise), throw.c (scm_throw): Docstring format
10440 fixes.
10441
10442 2001-05-04 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10443
10444 * strop.c (scm_string_split): New procedure.
10445
10446 * strop.h (scm_string_split): Added prototype.
10447
10448 2001-05-04 Gary Houston <ghouston@arglist.com>
10449
10450 * socket.c: define uint32_t if netdb.h doesn't. thanks to
10451 Dale P. Smith.
10452
10453 2001-05-02 Marius Vollmer <mvo@zagadka.ping.de>
10454
10455 * rw.c: Include "modules.h" and "strports.h".
10456
10457 * net_db.h (scm_gethost): Added prototype.
10458
10459 * deprecation.h, deprecation.c: New.
10460 * Makefile.am (libguile_la_SOURCES): Added "deprecation.c".
10461 (DOT_X_FILES): Added "deprecation.x".
10462 (modinclude_HEADERS): Added "deprecation.h".
10463
10464 * init.c: Include "deprecation.h".
10465 (scm_init_guile_1): Call scm_init_deprecation.
10466
10467 2001-05-01 Marius Vollmer <mvo@zagadka.ping.de>
10468
10469 * gh.h (gh_init_guile, gh_make_string, gh_string_length,
10470 gh_string_ref, gh_string_set_x, gh_substring, gh_string_append):
10471 New.
10472
10473 2001-04-29 Gary Houston <ghouston@arglist.com>
10474
10475 * rw.c: new file, implementing C part of module (ice-9 rw).
10476 (scm_read_string_x_partial): moved from ioext.c
10477 (scm_init_rw): new proc.
10478 * rw.h: new file.
10479 init.c: include rw.h and call scm_init_rw.
10480 Makefile.am: include rw.c and rw.h.
10481
10482 2001-04-28 Rob Browning <rlb@cs.utexas.edu>
10483
10484 * numbers.c: enabled local definition of SCM_FLOBUFLEN until we
10485 know what's supposed to happen to it.
10486
10487 * list.h (scm_list_star): deprecation expired - removed.
10488
10489 * numbers.h (scm_dblproc): deprecation expired - removed.
10490 (SCM_UNEGFIXABLE): deprecation expired - removed.
10491 (SCM_FLOBUFLEN): deprecation expired - removed.
10492 (SCM_INEXP): deprecation expired - removed.
10493 (SCM_CPLXP): deprecation expired - removed.
10494 (SCM_REAL): deprecation expired - removed.
10495 (SCM_IMAG): deprecation expired - removed.
10496 (SCM_REALPART): deprecation expired - removed.
10497 (scm_makdbl): deprecation expired - removed.
10498 (SCM_SINGP): deprecation expired - removed.
10499 (SCM_NUM2DBL): deprecation expired - removed.
10500 (SCM_NO_BIGDIG): deprecation expired - removed.
10501
10502 * tags.h (SCM_DOUBLE_CELLP): deprecation expired - removed.
10503 (scm_tc_dblr): deprecation expired - removed.
10504 (scm_tc_dblc): deprecation expired - removed.
10505 (scm_tc16_flo): deprecation expired - removed.
10506 (scm_tc_flo): deprecation expired - removed.
10507
10508 * tag.h (scm_tag): deprecation expired - removed.
10509
10510 * tag.c: (scm_tag): deprecation expired - removed.
10511
10512 * ioext.c: (scm_fseek): deprecation expired - removed.
10513
10514 * ioext.h (scm_fseek): deprecation expired - removed.
10515
10516 * gh_data.c (gh_int2scmb): deprecation expired - removed.
10517
10518 * gh.h (gh_int2scmb): deprecation expired - removed.
10519
10520 2001-04-28 Neil Jerram <neil@ossau.uklinux.net>
10521
10522 * stacks.c (scm_make_stack): Fix typo in docstring.
10523
10524 2001-04-27 Rob Browning <rlb@cs.utexas.edu>
10525
10526 * error.c (scm_sysmissing): deprecation expired - removed.
10527
10528 * error.h (scm_sysmissing): deprecation expired - removed.
10529
10530 * gc.c
10531 (scm_init_gc): gc-thunk deprecation expired - removed.
10532 (scm_gc_vcell): deprecation expired - removed.
10533 (gc_async_thunk): scm_gc_vcell related code removed.
10534
10535 * vectors.h (SCM_NVECTORP): deprecation expired - removed.
10536
10537 * strings.h
10538 (SCM_NSTRINGP): deprecation expired - removed.
10539 (SCM_NRWSTRINGP): deprecation expired - removed.
10540
10541 * continuations.h (SCM_SETJMPBUF): deprecation expired - removed.
10542
10543 * chars.h
10544 (SCM_ICHRP): deprecation expired - removed.
10545 (SCM_ICHR): deprecation expired - removed.
10546 (SCM_MAKICHR): deprecation expired - removed.
10547
10548 * ports.h
10549 (SCM_INPORTP): deprecation expired - removed.
10550 (SCM_OUTPORTP): deprecation expired - removed.
10551
10552 2001-04-25 Marius Vollmer <mvo@zagadka.ping.de>
10553
10554 * modules.c (scm_module_type): New.
10555 (scm_post_boot_init_modules): Initialize from Scheme value.
10556 (the_module, scm_current_module, scm_init_modules): the_module is
10557 now a C only fluid.
10558 (scm_current_module): Export to Scheme.
10559 (scm_set_current_module): Do not call out to Scheme, do all the
10560 work in C. Export procedure to Scheme. Only accept modules, `#f'
10561 is no longer valid as the current module. Only set
10562 scm_top_level_lookup_closure_var and scm_system_transformer when
10563 they are not deprecated.
10564 (scm_module_transformer, scm_current_module_transformer): New.
10565
10566 * modules.h (scm_module_index_transformer, SCM_MODULE_TRANSFORMER,
10567 scm_current_module_transformer, scm_module_transformer): New.
10568
10569 * gh_data.c: Removed FIXME comment about gh_lookup returning
10570 SCM_UNDEFINED. That's the right thing to do.
10571
10572 * eval.h, eval.c (scm_system_transformer): Deprecated by moving it
10573 into the conditionally compiled sections.
10574 * eval.c (scm_primitive_eval_x, scm_primitive_eval): Use
10575 scm_current_module_transformer instead of scm_system_transformer.
10576 * init.c (start_stack): Move initialization of
10577 scm_system_transformer to the deprecated section.
10578
10579 2001-04-22 Neil Jerram <neil@ossau.uklinux.net>
10580
10581 * throw.c (scm_throw): Correct docstring.
10582
10583 2001-04-22 Gary Houston <ghouston@arglist.com>
10584
10585 * socket.c: attempted to improve the docstrings slightly.
10586
10587 * net_db.c: remove bogus "close" declaration.
10588 (inet_aton declaration, scm_inet_aton, scm_inet_ntoa,
10589 scm_inet_netof, scm_lnaof, scm_inet_makeaddr, INADDR_ANY etc.):
10590 moved to socket.c.
10591 * net_db.h: declarations moved too.
10592
10593 * socket.c (scm_htonl, scm_ntohl): use uint32_t instead of unsigned
10594 long.
10595 (ipv6_net_to_num, ipv6_num_to_net): new static procedures.
10596 (VALIDATE_INET6): new macro.
10597 (scm_inet_pton, scm_inet_ntop): new procedures, implementing
10598 inet-pton and inet-ntop.
10599 (scm_fill_sockaddr): use VALIDATE_INET6 and ipv6_num_to_net.
10600 (scm_addr_vector): use ipv6_net_to_num.
10601
10602 2001-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
10603
10604 * eq.c (scm_equal_p), ramap.c (scm_init_ramap): Don't compute the
10605 smob number explicitly. Use SCM_TC2SMOBNUM instead.
10606
10607 * gc.c (MARK, scm_gc_sweep): Only check for illegal heap objects
10608 when compiled in debug mode.
10609
10610 (scm_gc_sweep): Only call smob's free function if it is defined.
10611
10612 * print.c (scm_iprin1): No need to check for validity of smob
10613 type or existence of print function.
10614
10615 * smob.[ch] (scm_smobs): Made into a fixed size global array.
10616 Resizing will not work well with preemptive threading.
10617
10618 * smob.c (scm_smob_print): Don't use SCM_CDR to access smob data.
10619
10620 (scm_make_smob_type): Extracted initialization of smob
10621 descriptors to scm_smob_prehistory. Don't use scm_numsmob outside
10622 of the critical section.
10623
10624 (scm_smob_prehistory): Initialize all smob descriptors. By
10625 default, don't assign a smob free function: Most smob types don't
10626 need one.
10627
10628 * smob.h (SMOBH, SCM_SMOB_H): Renamed SMOBH to SCM_SMOB_H.
10629
10630 2001-04-21 Gary Houston <ghouston@arglist.com>
10631
10632 * socket.c (FLIP_NET_HOST_128): new macro.
10633 (scm_fill_sockaddr): use new macro.
10634 (scm_addr_vector): completed IPv6 address support. added const
10635 to the address parameter.
10636
10637 2001-04-20 Gary Houston <ghouston@arglist.com>
10638
10639 * socket.c (scm_fill_sockaddr): call htons for sin6_port.
10640 Don't assign sin6_scope_id in structure unless HAVE_SIN6_SCOPE_ID
10641 is defined.
10642 (scm_addr_vector): use a switch instead of multiple if statements.
10643 Add support for IPv6 (incomplete) .
10644 MAX_ADDR_SIZE: increase to size of struct sockaddr_in6 if needed.
10645
10646 2001-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
10647
10648 * struct.c (scm_free_structs): Only pairs may be accessed with
10649 SCM_C[AD]R.
10650
10651 2001-04-19 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
10652
10653 * unif.h (SCM_ARRAY_CONTIGUOUS): Reintroduced as deprecated.
10654
10655 * __scm.h (SCM_WTA_DISPATCH_0, SCM_WTA_DISPATCH_1,
10656 SCM_WTA_DISPATCH_2, SCM_WTA_DISPATCH_n): Inserted required
10657 parentheses in order to get the correct associativity.
10658
10659 2001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
10660
10661 * unif.c (scm_array_to_list): Added missing handling of arrays of
10662 bytes. Thanks to Masao Uebayashi for the bug report.
10663
10664 2001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
10665
10666 * debug.c (scm_procedure_source): Use SCM_CLOSURE_FORMALS more
10667 consistently.
10668
10669 2001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
10670
10671 * procs.h (SCM_CLOSURE_FORMALS): New macro.
10672
10673 * debug.c (scm_procedure_source), eval.c (scm_badformalsp,
10674 SCM_CEVAL, SCM_APPLY), goops.c (get_slot_value, set_slot_value),
10675 procprop.c (scm_i_procedure_arity), sort.c (closureless): Use
10676 SCM_CLOSURE_FORMALS.
10677
10678 * eval.c (scm_badformalsp, SCM_CEVAL), procprop.c
10679 (scm_i_procedure_arity): Prefer stronger predicates like
10680 SCM_NULLP or SCM_FALSEP over SCM_IMP.
10681
10682 * macros.c (macro_print): Extracted macro printing code from
10683 print.c and simplified it.
10684
10685 (scm_macro_type): Use SCM_MACRO_TYPE;
10686
10687 (scm_init_macros): Use macro_print for printing macros.
10688
10689 * print.c (scm_print_opts): Improved option documentation.
10690
10691 (scm_iprin1): Extracted printing of macros to macros.c.
10692 Simplified printing of ordinary closures.
10693
10694 * procs.c (scm_thunk_p): Fixed handling of closures. Thanks to
10695 Martin Grabmueller for the bug report.
10696
10697 2001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
10698
10699 This patch eliminates some further applications of SCM_C[AD]R to
10700 non pair cells.
10701
10702 * gc.h (SCM_SETAND_CAR, SCM_SETOR_CAR): Deprecated. These have
10703 never been applied to real pairs.
10704
10705 * srcprop.h (SCM_SOURCE_PROPERTY_FLAG_BREAK): Added.
10706
10707 (SRCPROPBRK): Use SCM_SOURCE_PROPERTY_FLAG_BREAK.
10708
10709 * unif.h (SCM_ARRAY_CONTIGUOUS, SCM_ARRAY_FLAG_CONTIGUOUS,
10710 SCM_ARRAY_CONTP): Renamed SCM_ARRAY_CONTIGUOUS to
10711 SCM_ARRAY_FLAG_CONTIGUOUS and use it.
10712
10713 (SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG):
10714 Added.
10715
10716 * srcprop.h (SRCPROPH), unif.h (UNIFH): Renamed to
10717 SCM_SOURCE_PROPERTIES_H and SCM_UNIFORM_VECTORS_H, respectively.
10718
10719 * srcprop.h (SETSRCPROPBRK, CLEARSRCPROPBRK), unif.c
10720 (scm_dimensions_to_uniform_array, scm_ra_set_contp): Don't use
10721 SCM_SET{AND,OR}_CAR.
10722
10723 2001-04-17 Gary Houston <ghouston@arglist.com>
10724
10725 * some initial support for IPv6:
10726
10727 * socket.c (scm_fill_sockaddr): improve the argument validation.
10728 don't allocate memory until all args are checked. instead of
10729 unconditional memset of soka, try setting sin_len to 0 if
10730 SIN_LEN is defined. add support for AF_INET6. define FUNC_NAME.
10731 (scm_socket, scm_connect): extend docstrings for IPv6.
10732 (scm_init_socket): intern AF_INET6 and PF_INET6.
10733
10734 2001-04-17 Niibe Yutaka <gniibe@m17n.org>
10735
10736 * srcprop.c (scm_make_srcprops): Added SCM_ALLOW_INTS which
10737 matches SCM_DEFER_INTS at the beginning of the function.
10738
10739 * mallocs.c (scm_malloc_obj): Remove un-matched SCM_ALLOW_INTS.
10740
10741 * gc.c (scm_igc): Unconditionally call
10742 SCM_CRITICAL_SECTION_START/END.
10743
10744 * fluids.c (next_fluid_num): Unconditionally call
10745 SCM_CRITICAL_SECTION_START/END.
10746 (s_scm_make_fluid): Remove un-matched SCM_DEFER_INTS.
10747
10748 * coop-defs.h (SCM_THREAD_DEFER, SCM_THREAD_ALLOW,
10749 SCM_THREAD_REDEFER, SCM_THREAD_REALLOW_1, SCM_THREAD_REALLOW_2):
10750 Removed.
10751
10752 * __scm.h (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END):
10753 Defined as nothing for the case of !defined(USE_THREADS).
10754 (SCM_THREAD_DEFER, SCM_THREAD_ALLOW, SCM_THREAD_REDEFER):
10755 Removed.
10756 (<stdio.h>): Include when (SCM_DEBUG_INTERRUPTS == 1).
10757 (SCM_CHECK_NOT_DISABLED, SCM_CHECK_NOT_ENABLED): Print FILE and
10758 LINE.
10759 (SCM_DEFER_INTS, SCM_ALLOW_INTS_ONLY, SCM_ALLOW_INTS,
10760 SCM_REDEFER_INTS, SCM_REALLOW_INTS): Don't use
10761 SCM_THREAD_DEFER/SCM_THREAD_ALLOW. Instead, use
10762 SCM_CRITICAL_SECTION_START/END.
10763 (SCM_REALLOW_INTS: Bug fix. Don't call
10764 SCM_THREAD_SWITCHING_CODE.
10765 (SCM_TICK): Don't use SCM_DEFER_INTS/SCM_ALLOW_INTS. Instead, use
10766 SCM_THREAD_SWITCHING_CODE directly.
10767 (SCM_ENTER_A_SECTION): Unconditionally use
10768 SCM_CRITICAL_SECTION_START/END. (was:
10769 SCM_DEFER_INTS/SCM_ALLOW_INTS when SCM_POSIX_THREADS defined).
10770
10771 2001-04-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
10772
10773 * __scm.h (SCM_CAREFUL_INTS, SCM_DEBUG_INTERRUPTS): Replaced the
10774 macro SCM_CAREFUL_INTS by the macro SCM_DEBUG_INTERRUPTS and
10775 allowed to explicitly set this macro via the CFLAGS variable
10776 during make.
10777
10778 * fluids.c (next_fluid_num), gc.c (scm_igc), coop-defs.h
10779 (SCM_THREAD_CRITICAL_SECTION_START,
10780 SCM_THREAD_CRITICAL_SECTION_END): Renamed
10781 SCM_THREAD_CRITICAL_SECTION_START/END to
10782 SCM_CRITICAL_SECTION_START/END.
10783
10784 2001-04-11 Keisuke Nishida <kxn30@po.cwru.edu>
10785
10786 * debug-malloc.c (grow, scm_debug_malloc_prehistory): Use memset
10787 instead of bzero.
10788
10789 * coop.c, iselect.c (FD_ZERO_N): Unconditionally use memset.
10790 (MISSING_BZERO_DECL): Remove the declaration.
10791
10792 Thanks to NIIBE Yutaka.
10793
10794 2001-04-10 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
10795
10796 * init.c, goops.c, goops.h: Reverted change of 2001-03-29. (The
10797 goops module should be registered in order to work for an
10798 application which uses libguile statically linked.)
10799
10800 2001-04-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
10801
10802 * numbers.[ch] (scm_num2long, scm_num2long_long,
10803 scm_num2ulong_long, scm_num2ulong): Argument position is an
10804 unsigned integer.
10805
10806 * environments.c (eval_environment_folder,
10807 import_environment_folder), gh_data.c (gh_scm2longs,
10808 gh_scm2floats, gh_scm2doubles): Distinguish between 0 and NULL
10809 for integers and pointers, respectively.
10810
10811 * gh_data.c (gh_scm2ulong, gh_scm2long, gh_scm2int), socket.c
10812 (scm_fill_sockaddr), unif.c (scm_array_set_x), validate.h
10813 (SCM_NUM2ULONG, SCM_NUM2LONG, SCM_NUM2LONG_DEF,
10814 SCM_NUM2LONG_LONG): Don't pass argument positions as pointers.
10815
10816 * filesys.c (scm_open_fdes, scm_open), net_db (scm_inet_ntoa,
10817 scm_inet_netof, scm_lnaof, scm_gethost, scm_getproto), posix.c
10818 (scm_utime), ramap.c (scm_array_fill_int), scmsigs.c
10819 (scm_sigaction), socket.c (scm_htonl, scm_ntohl, scm_sendto),
10820 stime.c (scm_localtime, scm_gmtime), struct.c (scm_struct_set_x),
10821 validate.h (SCM_VALIDATE_LONG_COPY): Whitespace fixes.
10822
10823 2001-04-09 Neil Jerram <neil@ossau.uklinux.net>
10824
10825 * strings.c (scm_read_only_string_p): Update docstring to reflect
10826 current (non-)usage of "read only" strings.
10827 (scm_make_shared_substring): Clarify docstring by changing
10828 "semantics" to "arguments".
10829
10830 2001-04-06 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10831
10832 * hooks.c (scm_make_hook, scm_make_hook_with_name),
10833 (scm_hook_p, scm_hook_empty_p, scm_run_hook): Docstring
10834 improvements.
10835
10836 2001-04-03 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10837
10838 The following changes make the documentation more consistent.
10839
10840 * rdelim.c (scm_write_line), posix.c (scm_utime), ports.c
10841 (scm_seek), net_db.c (scm_inet_aton, scm_inet_ntoa),
10842 (scm_inet_netof, scm_lnaof, scm_inet_makeaddr), ioext.c
10843 (scm_ftell): Changed @smalllisp ... @end smalllisp to @lisp
10844 ... @end lisp.
10845
10846 * vports.c (scm_make_soft_port), version.c (scm_version), unif.c
10847 (scm_array_dimensions, scm_make_shared_array),
10848 (scm_transpose_array, scm_enclose_array, scm_bit_count_star),
10849 throw.c (scm_catch), struct.c (scm_make_vtable_vtable), strop.c
10850 (scm_string_rindex, scm_string_index, scm_substring_fill_x),
10851 (scm_string_null_p), strings.c (scm_read_only_string_p), root.c
10852 (scm_call_with_dynamic_root), ramap.c (scm_array_index_map_x),
10853 posix.c (scm_mknod), numbers.c (scm_logtest, scm_logbit_p),
10854 macros.c (scm_makmmacro), list.c (scm_append), environments.c
10855 (scm_environment_fold), dynwind.c (s_scm_dynamic_wind): Changed
10856 @example ... @end example to @lisp ... @end lisp.
10857
10858 * weaks.c (scm_weak_vector): Corrected docstring.
10859
10860 * hashtab.c (scm_hashq_ref, scm_hashq_set_x, scm_hashq_remove_x),
10861 (scm_hashv_ref, scm_hashv_set_x, scm_hashv_remove_x),
10862 (scm_hash_ref, scm_hash_set_x, scm_hash_remove_x, scm_hashx_ref),
10863 (scm_hashx_set_x, scm_hashx_get_handle),
10864 (scm_hashx_create_handle_x), regex-posix.c (scm_make_regexp),
10865 (scm_regexp_exec, scm_regexp_p), numbers.c (scm_logtest),
10866 vectors.c (scm_vector_fill_x), strings.c
10867 (scm_make_shared_substring), symbols.c (scm_string_to_symbol),
10868 objprop.c (scm_set_object_properties_x):
10869 (scm_set_object_property_x), throw.c (scm_catch, scm_lazy_catch),
10870 strports.c (scm_call_with_input_string), ports.c
10871 (scm_truncate_file), ioext.c (scm_ftell), ports.c (scm_seek),
10872 list.c (scm_append_x), dynwind.c (scm_dynamic_wind), error.c
10873 (scm_error_scm), vports.c (scm_make_soft_port), weaks.c
10874 (scm_make_weak_vector,scm_weak_vector_p),
10875 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table),
10876 (scm_make_doubly_weak_hash_table, scm_weak_key_hash_table_p),
10877 (scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
10878 macros.c (scm_macro_type), dynl.c (scm_dynamic_link),
10879 (scm_dynamic_unlink, scm_dynamic_call, scm_dynamic_args_call):
10880 Made parameter names match documentation by renaming parameters
10881 and/or fixing docstrings.
10882
10883 * numbers.c (scm_ash): Corrected Texinfo markup.
10884
10885 * strop.c (scm_string_index, scm_string_rindex),
10886 (scm_substring_fill_x, scm_string_null_p): Removed `qdocs'.
10887
10888 * vports.c (scm_make_soft_port), unif.c
10889 (scm_uniform_vector_length, scm_array_p, scm_array_rank),
10890 (scm_dimensions_to_uniform_array, scm_transpose_array),
10891 (scm_array_in_bounds_p, scm_uniform_vector_ref),
10892 (scm_bit_count, scm_bit_position, scm_bit_count_star),
10893 (scm_array_to_list, scm_list_to_uniform_array),
10894 (scm_array_prototype, symbols.c (scm_string_to_symbol), strports.c
10895 (scm_open_input_string, scm_open_output_string),
10896 (scm_get_output_string), strop.c (scm_string_copy),
10897 (scm_string_fill_x), strings.c (scm_string_p, scm_string), stime.c
10898 (scm_get_internal_real_time, scm_times),
10899 (scm_get_internal_run_time, scm_current_time, scm_gettimeofday),
10900 (scm_localtime, scm_gmtime), socket.c (scm_htons, scm_ntohs),
10901 (scm_htonl, scm_ntohl, scm_socket, scm_socketpair),
10902 (scm_getsockopt, scm_getsockname, scm_getpeername, scm_recvfrom),
10903 simpos.c (scm_system), random.c (scm_random_uniform),
10904 (scm_random_normal, scm_random_exp), ramap.c
10905 (scm_array_equal_p), posix.c (scm_pipe, scm_getgroups),
10906 (scm_status_exit_val, scm_status_term_sig, scm_status_stop_sig),
10907 (scm_getppid, scm_getuid, scm_getgid, scm_geteuid, scm_getegid),
10908 (scm_getpgrp, scm_ttyname, scm_ctermid, scm_tcgetpgrp, scm_uname),
10909 (scm_environ, scm_tmpnam, scm_mkstemp, scm_access, scm_getpid),
10910 (scm_setlocale), ports.c (scm_char_ready_p, scm_drain_input),
10911 (scm_pt_size, scm_pt_member, scm_port_revealed, scm_port_mode),
10912 (scm_close_port, scm_input_port_p, scm_output_port_p, scm_port_p),
10913 (scm_port_closed_p, scm_eof_object_p, scm_read_char),
10914 (scm_peek_char), pairs.c (scm_pair_p, scm_cons), numbers.c
10915 (scm_logand, scm_logior, scm_logxor, scm_lognot),
10916 (scm_integer_expt, scm_bit_extract, scm_logcount),
10917 (scm_integer_length, scm_string_to_number, scm_inexact_to_exact),
10918 net_db.c (scm_inet_netof, scm_lnaof), modules.c
10919 (scm_interaction_environment), macros.c (scm_makacro),
10920 (scm_makmacro, scm_makmmacro), keywords.c (scm_keyword_p), ioext.c
10921 (scm_ftell, scm_dup_to_fdes, scm_fileno, scm_isatty_p),
10922 (scm_fdopen, scm_fdes_to_ports), gc.c (scm_gc_stats), fluids.c
10923 (scm_fluid_ref), filesys.c (scm_open_fdes),
10924 (scm_stat, scm_directory_stream_p, scm_getcwd, scm_readlink):
10925 Docstring correction: `Returns' -> `Return'
10926
10927 * gc.c (scm_set_debug_cell_accesses_x):
10928 (s_scm_gc_set_debug_check_freelist_x):
10929 * fluids.c (scm_fluid_p): Added texinfo markup.
10930
10931 * error.c (scm_strerror): Made docstring more precise.
10932
10933 * vectors.c (scm_vector_p, scm_vector, scm_make_vector),
10934 (scm_vector_to_list, _scm_vector_fill_x), symbols.c
10935 (scm_symbol_p, scm_symbol_to_string), strorder.c
10936 (scm_string_equal_p, scm_string_ci_equal_p, scm_string_less_p),
10937 (scm_string_leq_p, scm_string_gr_p, scm_string_geq_p),
10938 (scm_string_ci_less_p, scm_string_ci_leq_p, scm_string_ci_gr_p):
10939 (scm_string_ci_geq_p), strop.c (scm_string_copy),
10940 (scm_string_fill_x): Removed `(r5rs)' from docstrings.
10941
10942 2001-04-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
10943
10944 * gc.c (MARK): Re-introduce a cheap sanity test for non debug
10945 mode, as suggested by Michael Livshin.
10946
10947 2001-03-31 Michael Livshin <mlivshin@bigfoot.com>
10948
10949 * backtrace.c (display_backtrace_body): since the `print_state'
10950 variable is not used (instead its data field is used directly as
10951 `pstate'), protect it from the hungry compiler optimizations.
10952 thanks to Bill Schottstaedt for the report.
10953
10954 2001-03-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
10955
10956 * gc.[ch] (scm_tc16_allocated): New type tag for allocated cells.
10957 It is only defined and used if guile is compiled with
10958 SCM_DEBUG_CELL_ACCESSES set to true. It's purpose is, to never
10959 let cells with a free_cell type tag be visible outside of the
10960 garbage collector when in debug mode.
10961
10962 * gc.c (scm_debug_cell_accesses_p): Set to true as default.
10963
10964 (scm_assert_cell_valid): Use a local static variable to avoid
10965 recursion.
10966
10967 (MARK): Only check for rogue cell pointers in debug mode. Use
10968 scm_cellp for this purpose and place all checks for rogue pointers
10969 into that function. Further, since due to conservative scanning
10970 we may encounter free cells during marking, don't use the standard
10971 cell type accessor macro to determine the cell type.
10972
10973 (scm_cellp): Check if the cell pointer actually points into a
10974 card header.
10975
10976 (scm_init_gc): Initalize scm_tc16_allocated.
10977
10978 * gc.h (GCH): Renamed to SCM_GC_H.
10979
10980 (SCM_VALIDATE_CELL): Enclose the expression in brackets. This
10981 might be unnecessary, but I feel better this way :-)
10982
10983 (SCM_GC_CELL_TYPE): New macro.
10984
10985 (SCM_SETAND_CDR, SCM_SETOR_CDR): Deprecated. These are not used
10986 in guile, and it is unlikely that they will be applied to real
10987 pairs anyway.
10988
10989 (SCM_SET_FREE_CELL_TYPE): Removed. It was not used.
10990
10991 (SCM_GC_SET_ALLOCATED): New macro. Only non-empty if guile is
10992 compiled with SCM_DEBUG_CELL_ACCESSES set to true.
10993
10994 (SCM_NEWCELL, SCM_NEWCELL2): Use of SCM_GC_SET_ALLOCATED will
10995 make sure that in debug mode no free cell will ever be visible
10996 outside of the garbage collector.
10997
10998 2001-03-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
10999
11000 * async.c (scm_asyncs_pending): Don't use != to compare SCM
11001 values.
11002
11003 * async.c (scm_system_async), variable.c (scm_make_variable,
11004 scm_make_undefined_variable): Use scm_cons to create a pair.
11005
11006 * debug.c (scm_reverse_lookup): Perform proper type checking.
11007 Remove suspicious use of SCM_SLOPPY_CONSP.
11008
11009 * eq.c (scm_equal_p), tags.h (SCM_ECONSP): Use SCM_CONSP instead
11010 of SCM_SLOPPY_CONSP. A sane compiler should be able to perform
11011 the corresponding optimization.
11012
11013 * eval.c (iqq): Use proper type check.
11014
11015 (scm_m_expand_body): Remove redundant type checks.
11016
11017 (promise_print): Don't access promise cells as pairs.
11018
11019 * eval.c (EVALCAR, iqq, scm_m_expand_body, scm_eval_args,
11020 scm_deval_args SCM_CEVAL), guardians.c (scm_guard), hashtab.c
11021 (scm_internal_hash_fold), print.c (scm_iprlist): Use !SCM_CELLP
11022 for SCM_NCELLP, !SCM_CONSP for SCM_NCONSP, !SCM_IMP for SCM_NIMP,
11023 !SCM_FALSEP for SCM_NFALSEP, !SCM_NULLP for SCM_NNULLP
11024
11025 * eval.c (scm_m_define, scm_macroexp, SCM_CEVAL), print.c
11026 (scm_iprin1): Use new macro predicate and accessors.
11027
11028 * eval.h (scm_tc16_macro): Removed declaration. It is declared
11029 in macros.h.
11030
11031 * eval.h (EVALH), macros.h (MACROSH), ports.h (PORTSH), procs.h
11032 (PROCSH), tags.h (TAGSH), variable.h (VARIABLEH): Renamed to
11033 SCM_EVAL_H, SCM_MACROS_H, SCM_PORTS_H, SCM_PROCS_H, SCM_TAGS_H and
11034 SCM_VARIABLE_H. Even the macros that are used to inhibit
11035 including a header file twice should be in the SCM_ namespace.
11036
11037 * fluids.c (scm_swap_fluids, scm_swap_fluids_reverse),
11038 properties.c (scm_primitive_property_ref,
11039 scm_primitive_property_del_x): Prefer stronger predicates like
11040 SCM_NULLP or SCM_FALSEP over SCM_IMP.
11041
11042 * gc.c (MARK): Use proper macros to access procedure-with-setter
11043 cell elements and closure cell elements.
11044
11045 (gc_sweep_freelist_finish, scm_gc_sweep, init_heap_seg): Don't
11046 access free cells as pairs.
11047
11048 (scm_unprotect_object): scm_hashq_get_handle returns #f if
11049 no hashtab entry is found.
11050
11051 * gc.c (scm_gc_sweep), ports.c (scm_close_port): Use new macro
11052 SCM_CLR_PORT_OPEN_FLAG.
11053
11054 * guardians.c (TCONC_IN), print.c (scm_free_print_state): Don't
11055 use SCM_SET_C[AD]R for uninitialized cells.
11056
11057 * hashtab.c (scm_hash_fn_get_handle): Use SCM_VALIDATE_VECTOR.
11058 If the hashtable has no slots, return #f instead of '(). This
11059 unifies the return value with most assoc-functions.
11060
11061 (scm_hash_fn_ref): Use proper type check.
11062
11063 (scm_hashq_get_handle, scm_hashv_get_handle, scm_hash_get_handle):
11064 Removed references to non-existing functions from documentation.
11065
11066 * keywords.c (scm_keyword_dash_symbol): Use proper macros to
11067 access keyword cell elements.
11068
11069 * macros.h (SCM_MACROP, SCM_MACRO_TYPE, SCM_MACRO_CODE): New
11070 macros.
11071
11072 * ports.h (SCM_CLR_PORT_OPEN_FLAG): New macro.
11073
11074 * print.c (scm_iprlist): Added comment. Improved loop
11075 conditions.
11076
11077 * procs.h (SCM_ENV, SCM_SETENV): Don't access closure cells as
11078 pairs.
11079
11080 * smob.c (scm_markcdr): Don't access smob cells as pairs.
11081
11082 * tags.h (SCM_SLOPPY_CONSP, SCM_SLOPPY_NCONSP): Deprecated.
11083
11084 * throw.c (ACTIVATEJB, DEACTIVATEJB): Don't access jump buffer
11085 cells as pairs.
11086
11087 * variable.c (variable_print, variable_equalp, scm_variable_ref,
11088 scm_variable_set_x): Use proper macros to access variable cell
11089 elements.
11090
11091 (scm_variable_bound_p): Don't use SCM_NEGATE_BOOL.
11092
11093 * variable.h (SCM_VARVCELL): Don't access variable cells as
11094 pairs.
11095
11096 * vectors.c (scm_vector), weaks.c (scm_weak_vector): Simplified,
11097 added FIXME comment, removed register specifier.
11098
11099 2001-03-29 Keisuke Nishida <kxn30@po.cwru.edu>
11100
11101 * goops.c, goops.h (scm_init_oop_goops_goopscore_module): Deprecated.
11102 * init.c (scm_init_guile_1): Don't init goopscore module.
11103
11104 2001-03-27 Marius Vollmer <mvo@zagadka.ping.de>
11105
11106 * eval.c (SCM_APPLY): Check that arg1 is bound for scm_tc7_cxr.
11107
11108 2001-03-27 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11109
11110 * strop.c (scm_string_to_list): Fixed docstring markup.
11111 (scm_string_upcase_x, scm_string_upcase, scm_string_downcase_x),
11112 (scm_string_downcase, scm_string_capitalize_x),
11113 (scm_string_capitalize): Rewrote and corrected docstrings.
11114 (scm_string_ci_to_symbol): Made docstring more explicit.
11115
11116 2001-03-27 Marius Vollmer <mvo@zagadka.ping.de>
11117
11118 * values.h (scm_values_vtable, SCM_VALUESP): Moved here so that
11119 eval.c can use it.
11120 (scm_call_with_values): Removed.
11121 * values.c (values_vtable, scm_values_vtable): Added "scm_" prefix
11122 so that it can be exported.
11123 (scm_call_with_values): Removed.
11124
11125 * tags.h (SCM_IM_CALL_WITH_VALUES): New isym.
11126 * eval.c: Include "libguile/values.h"
11127 (scm_m_at_call_with_values, scm_sym_at_call_with_values):
11128 New.
11129 (unmemocopy, scm_ceval, scm_deval): Handle new isym.
11130 * eval.h (scm_sym_at_call_with_values, scm_m_at_call_with_values):
11131 New delcarations to support above change.
11132
11133 * eval.c (scm_primitive_eval_x, scm_primitive_eval): Fix syntax
11134 errors with last change.
11135
11136 2001-03-25 Marius Vollmer <mvo@zagadka.ping.de>
11137
11138 * eval.c (scm_primitive_eval_x, scm_primitive_eval, scm_i_eval_x,
11139 scm_i_eval): Moved the application of the system transformer from
11140 scm_i_eval to scm_primitive_eval.
11141
11142 2001-03-23 Neil Jerram <neil@ossau.uklinux.net>
11143
11144 * guile-snarf.awk.in: Substitute "\\" with "\" in .doc output.
11145
11146 * strop.c (scm_string_index): Fix docstring line break
11147 regression.
11148
11149 * list.c (scm_cons_star): Fix docstring typo.
11150
11151 2001-03-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
11152
11153 * gc.c (scm_init_storage), gdbint.c (scm_init_gdbint), numbers.c
11154 (big2str), ports.c (scm_drain_input), read.c (scm_read,
11155 scm_grow_tok_buf), strings.c (scm_string, scm_makfromstr,
11156 scm_make_string, scm_string_append), strports.c (st_resize_port,
11157 scm_object_to_string), unif.c (scm_make_uve): Replace calls to
11158 scm_makstr with calls to scm_allocate_string.
11159
11160 * strings.[ch] (scm_allocate_string): New function.
11161
11162 * strings.[ch] (scm_makstr): Deprecated.
11163
11164 2001-03-18 Gary Houston <ghouston@arglist.com>
11165
11166 * posix.c (scm_tmpnam): check that return value from tmpnam is not
11167 NULL. rewrote the docstring.
11168 (scm_mkstemp): new procedure implementing "mkstemp!".
11169 * posix.h: declare scm_mkstemp.
11170
11171 * net_db.c: declare h_errno if configure didn't define HAVE_H_ERRNO.
11172 normally it would be found in netdb.h.
11173
11174 2001-03-17 Gary Houston <ghouston@arglist.com>
11175
11176 * sort.c (scm_sort): move sortvec variable to avoid a compiler
11177 warning when HAVE_ARRAYS is not defined. move len too.
11178
11179 * Makefile.am (DOT_X_FILES): remove net_db.x, posix.x, socket.x.
11180 (EXTRA_DOT_X_FILES): let configure set the value.
11181 (DOT_DOC_FILES): remove net_db.doc, posix.doc, socket.doc.
11182
11183 * gc.c (scm_must_malloc): changed the comment explaining when
11184 scm_must variants of malloc/free etc., should be used, based on
11185 explanation from Dirk Herrmann.
11186 * fports.c (scm_fport_buffer_add): use FUNC_NAME instead of a local
11187 string with procedure name. use scm_must_malloc instead of malloc.
11188 (scm_setvbuf, scm_fdes_to_port, fport_close): use scm_must variants
11189 of malloc/free.
11190 * ports.c (scm_add_to_port_table, scm_remove_from_port_table,
11191 scm_ungetc): use scm_must variants of malloc/realloc/free.
11192 (scm_add_to_port_table, scm_ungetc): define FUNC_NAME.
11193
11194 2001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
11195
11196 * __scm.h (SCM_ASSERT, SCM_WTA_DISPATCH_0, SCM_WTA_DISPATCH_1,
11197 SCM_WTA_DISPATCH_2, SCM_WTA_DISPATCH_n): Don't call scm_wta, call
11198 scm_wrong_type_arg instead.
11199
11200 (SCM_WNA): Deprecated.
11201
11202 * error.[ch] (scm_wta): Deprecated.
11203
11204 * numbers.c (s_i_log): Minor comment fix.
11205
11206 * read.c (scm_lreadr), unif.c (scm_aind, scm_shap2ra,
11207 scm_make_shared_array, scm_transpose_array, scm_enclose_array,
11208 scm_array_in_bounds_p): Don't use SCM_ASSERT to check for
11209 wrong-num-args or misc errors.
11210
11211 * unif.c (scm_make_shared_array, scm_transpose_array,
11212 scm_enclose_array, scm_array_in_bounds_p, scm_array_set_x):
11213 Validate the rest argument (note: this is only done when guile is
11214 built with SCM_DEBUG_REST_ARGUMENT=1)
11215
11216 (scm_array_in_bounds_p, scm_uniform_vector_ref, scm_array_set_x):
11217 Replace calls to scm_wrong_num_args by SCM_WRONG_NUM_ARGS.
11218
11219 * validate.h (SCM_FUNC_NAME, SCM_VALIDATE_NUMBER_COPY,
11220 SCM_VALIDATE_NUMBER_DEF_COPY): Deprecated.
11221
11222 2001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
11223
11224 * validate.h (SCM_WRONG_NUM_ARGS): Call scm_error_num_args_subr
11225 instead of scm_wrong_num_args.
11226
11227 * coop-threads.c: Don't include libguile/strings.h. (Was only
11228 needed for former implementation of SCM_WRONG_NUM_ARGS.)
11229
11230 * debug.c (scm_m_start_stack): Don't use SCM_ASSERT to check for
11231 wrong-num-args errors.
11232
11233 2001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
11234
11235 * error.[ch] (scm_error_num_args_subr): New function.
11236
11237 2001-03-16 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11238
11239 * list.c (scm_list, scm_cons_star, scm_null_p, scm_list_p),
11240 (scm_length, scm_append, scm_reverse, scm_list_ref),
11241 (scm_memq, scm_memv, scm_member, scm_delv_x, scm_delete_x),
11242 (scm_delq, scm_delv, scm_delete, scm_delq1_x, scm_delv1_x),
11243 (scm_delete1_x), gc.c (scm_map_free_list),
11244 (scm_free_list_length), hash.c (scm_hashq, scm_hashv),
11245 (scm_hash), hashtab.c (scm_hashq_ref, scm_hashq_set_x),
11246 (scm_hashq_remove_x, scm_hashv_ref, scm_hashv_set_x),
11247 (scm_hashv_remove_x, scm_hash_ref, scm_hash_set_x),
11248 (scm_hash_remove_x), ports.c (scm_pt_size, scm_pt_member), print.c
11249 (scm_current_pstate), scmsigs.c (scm_usleep), goops.c
11250 (scm_get_keyword, scm_sys_compute_slots): Added texinfo markup.
11251
11252 * weaks.c (scm_weak_vector_p, scm_weak_key_hash_table_p),
11253 (scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
11254 rdelim.c (scm_read_delimited_x), strop.c (scm_string_index),
11255 symbols.c (scm_symbol_interned_p), numbers.c
11256 (scm_string_to_number), ports.c (scm_port_p): Corrected texinfo
11257 markup.
11258
11259 2001-03-16 Keisuke Nishida <kxn30@po.cwru.edu>
11260
11261 * snarf.h (SCM_CONST_LONG): Deprecated.
11262 * tag.c (CONST_INUM): New macro. Use it to define scm_utag_*.
11263
11264 2001-03-15 Marius Vollmer <marius.vollmer@uni-dortmund.de>
11265
11266 * numbers.c (scm_num2ulong): Check that a bignum is positive
11267 before looking at the magnitude. Correctly check for overflow
11268 during conversion.
11269 (scm_num2long_long): Likewise.
11270 (scm_num2ulong_long): New.
11271 (ULONG_LONG_MAX): Define if not already defined.
11272 * numbers.h: (scm_num2ulong_long): New prototype.
11273
11274 2001-03-15 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11275
11276 * validate.h (SCM_VALIDATE_OPOUTSTRPORT): New macro.
11277
11278 * strports.h (SCM_STRPORTP, SCM_OPSTRPORTP, SCM_OPINSTRPORTP),
11279 (SCM_OPOUTSTRPORTP): New predicate macros.
11280 (scm_open_input_string, scm_open_output_string),
11281 (scm_get_output_string): New prototypes.
11282
11283 * strports.c (scm_open_input_string, scm_open_output_string),
11284 (scm_get_output_string): New procedures (SRFI-6 compliant).
11285 Made scm_tc16_strport non-static.
11286
11287 2001-03-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
11288
11289 * macros.h (SCM_ASSYNT): Removed unused object argument from
11290 signature.
11291
11292 * eval.c (scm_m_body, scm_m_quote, scm_m_begin, scm_m_if,
11293 scm_m_set_x, scm_m_and, scm_m_or, scm_m_case, scm_m_cond,
11294 scm_m_letstar, scm_m_do, scm_m_quasiquote, scm_m_delay,
11295 scm_m_define, scm_m_letrec1, scm_m_letrec, scm_m_let, scm_m_apply,
11296 scm_m_cont, scm_m_nil_cond, scm_m_nil_ify, scm_m_t_ify,
11297 scm_m_0_cond, scm_m_0_ify, scm_m_1_ify, scm_m_atfop, scm_m_atbind,
11298 scm_m_expand_body), evalext.c (scm_m_generalized_set_x,
11299 scm_m_undefine), goops.c (scm_m_atslot_ref, scm_m_atslot_set_x,
11300 scm_m_atdispatch): Removed unused object argument from call to
11301 SCM_ASSYNT.
11302
11303 2001-03-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
11304
11305 * gh.h/gh_data.c (gh_ints2scm): Changed the signature to use a
11306 const int* to reflect that the input array of integers remains
11307 unchanged. Thanks to Brett Viren for the hint.
11308
11309 2001-03-14 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11310
11311 * gh_data.c (gh_scm2chars, gh_scm2shorts, gh_scm2longs),
11312 (gh_scm2floats, gh_scm2doubles): Check for malloc() returning NULL
11313 in various places.
11314 (gh_scm2newstr, gh_symbol2newstr): Change call to
11315 scm_must_malloc() to malloc(), because user-free()able memory is
11316 allocated.
11317
11318 * gc.c: Added declaration of `scm_debug_check_freelist'.
11319
11320 2001-03-13 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11321
11322 * ports.c (scm_port_mode): Changed `mode' array size to 4.
11323
11324 2001-03-12 Keisuke Nishida <kxn30@po.cwru.edu>
11325
11326 * strports.c (scm_object_to_string): New procedure.
11327 (scm_strprint_obj): Deprecated.
11328 * strports.h: Reflect the changes.
11329
11330 2001-03-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
11331
11332 * goops.h (SCM_VALIDATE_PUREGENERIC): New macro.
11333
11334 * goops.c (scm_m_atslot_ref, scm_m_atslot_set_x,
11335 scm_m_atdispatch): Provide definitions for FUNC_NAME. Don't use
11336 SCM_ASSYNT to check for correct argument types. Either use some
11337 SCM_VALIDATE_* macro or an explicit test.
11338
11339 (scm_make_foreign_object): Don't use SCM_ASSERT to check for
11340 misc-errors.
11341
11342 * macros.h (SCM_ASSYNT): On assertion failure, issue a misc-error
11343 instead of calling scm_wta.
11344
11345 2001-03-12 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11346
11347 * load.c (scm_primitive_load, scm_primitive_load_path),
11348 (scm_sys_search_load_path): Corrected docstrings (file ->
11349 filename).
11350
11351 * eval.c (scm_force): Added texinfo markup to docstring.
11352 (scm_promise_p): Renamed parameter to `obj' to match docstring.
11353
11354 * debug-malloc.c: Reinserted #include <stdio.h>.
11355
11356 2001-03-11 Keisuke Nishida <kxn30@po.cwru.edu>
11357
11358 * list.c (s_scm_reverse_x): Use SCM_VALIDATE_LIST.
11359
11360 * environments.c, error.c, eval.c, filesys.c, hashtab.c, load.c,
11361 net_db.c, procprop.c, read.c, scmsigs.c, socket.c, struct.c:
11362 Use SCM_LISTn instead of scm_listify.
11363
11364 2001-03-10 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11365
11366 * _scm.h: Removed #include <errno.h>.
11367
11368 * error.c, net_db.c, putenv.c, stime.c: Removed declaration of
11369 errno variable (can be a macro on some systems, for example when
11370 using linux libc with threads).
11371
11372 * error.c, filesys.c, gc.c, ioext.c, iselect.c, net_db.c, ports.c,
11373 posix.c, print.c, putenv.c, scmsigs.c, script.c, simpos.c, smob.c,
11374 socket.c, srcprop.c, stime.c, strop.c, unif.c, vports.c: Added
11375 #include <errno.h> in these 20 out of 100 files.
11376
11377 2001-03-10 Gary Houston <ghouston@arglist.com>
11378
11379 * socket.c: add a definition of SUN_LEN (from glibc) for when it's
11380 not already defined.
11381
11382 2001-03-09 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11383
11384 * coop.c: Inserted #include <stdio.h>.
11385
11386 * iselect.c: Reinserted #include <stdio.h>.
11387
11388 2001-03-10 Marius Vollmer <mvo@zagadka.ping.de>
11389
11390 * posix.c: Replaced `#define' of __USE_XOPEN right before
11391 including unistd.h with a define of _GNU_SOURCE at the very top of
11392 the file.
11393
11394 2001-03-09 Keisuke Nishida <kxn30@po.cwru.edu>
11395
11396 * alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,
11397 continuations.c, debug-malloc.c, debug.c, dynwind.c, eq.c, eval.c,
11398 feature.c, filesys.h, gc_os_dep.c, gh_data.c, gh_eval.c,
11399 gh_funcs.c, gh_io.c, gh_list.c, gh_predicates.c, hash.c,
11400 hashtab.c, iselect.c, keywords.c, list.c, load.c, mallocs.c,
11401 net_db.c, numbers.c, objprop.c, objprop.h, options.c, pairs.c,
11402 print.c, procprop.c, procs.c, properties.c, ramap.c,
11403 regex-posix.c, root.c, scmsigs.c, simpos.c, socket.c, srcprop.c,
11404 stackchk.c, stacks.c, strings.c, strop.c, strorder.c, struct.c,
11405 symbols.c, tag.c, threads.c, variable.c, vectors.c, weaks.c:
11406 Remove #include <stdio.h>
11407 * gc.c, gdbint.c, root.c, sort.c, unif.c: Add #include <string.h>.
11408
11409 * procs.c (scm_make_subr_opt): Init symcell to avoid warning.
11410
11411 2001-03-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11412
11413 * posix.c (scm_gethostname): Set initial name length to 256 for
11414 Solaris.
11415
11416 2001-03-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11417
11418 * posix.h (scm_crypt, scm_chroot, scm_getlogin, scm_cuserid),
11419 (scm_getpriority, scm_setpriority, scm_getpass, scm_flock),
11420 (scm_sethostname, scm_gethostname): New prototypes.
11421
11422 * posix.c: Added inclusion of <crypt.h>, <sys/resource.h> and
11423 <sys/file.h>, if present.
11424 (scm_init_posix): [PRIO_PROCESS, PRIO_PGRP, PRIO_USER, LOCK_SH,
11425 LOCK_EX, LOCK_UN, LOCK_NB]: New variables.
11426 (scm_crypt, scm_chroot, scm_getlogin, scm_cuserid),
11427 (scm_getpriority, scm_setpriority, scm_getpass, scm_flock),
11428 (scm_sethostname, scm_gethostname): New procedures.
11429
11430 2001-03-08 Neil Jerram <neil@ossau.uklinux.net>
11431
11432 * ports.c (scm_port_column): Docstring fixes: (i) port-line arg is
11433 not optional (ii) "recommend" spelling correction.
11434
11435 2001-03-08 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11436
11437 * ramap.c (racp): Removed optimization which caused array copying
11438 to fail if the two arrays shared storage. Re-inserted the IVDEP
11439 macros removed in the change of 2000-03-09. (Don't really have a
11440 complete grasp of what they are for, but they seem to be necessary
11441 on Crays. This needs testing!) Thanks to Miroslav Silovic.
11442
11443 * hash.c (scm_string_hash): Don't downcase characters.
11444
11445 2001-03-07 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11446
11447 * symbols.c (scm_symbols_prehistory): Changed symbol hash table
11448 size from 277 --> 1009.
11449
11450 * symbols.c, symbols.h (scm_sys_symbols): New function GUILE_DEBUG
11451 function.
11452
11453 * coop-threads.c: Fixed change of 2001-03-06.
11454
11455 * validate.h: Code formatting.
11456
11457 2001-03-07 Keisuke Nishida <kxn30@po.cwru.edu>
11458
11459 * Makefile.am (*.x): Add dependency on snarf.h and guile-doc-snarf.in.
11460 (*.doc): Add dependency on guile-snarf.awk.in.
11461
11462 * guile-snarf.awk.in: Neglect spaces at the end of
11463 SCM_SNARF_DOCSTRING_END. Skip lines "# NN ..." in the
11464 middle of docstrings. (To avoid the problem with gcc-2.96.)
11465
11466 2001-03-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
11467
11468 * coop-threads.c (scm_call_with_new_thread), load.c
11469 (scm_primitive_load, scm_sys_search_load_path), random.c
11470 (scm_c_default_rstate), struct.c (scm_make_struct_layout,
11471 scm_struct_ref, scm_struct_set_x): Don't use SCM_ASSERT to
11472 (potentially) issue a scm-misc-error or wrong-num-args error
11473 message.
11474
11475 * load.c (scm_search_path): Use SCM_ASSERT_TYPE to give details
11476 about the expected type with the wrong-type-arg error message.
11477
11478 * smob.c (scm_make_smob): Abort on misuse of smob - it indicates
11479 a C level bug that can't be fixed from scheme anyway.
11480
11481 2001-03-05 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11482
11483 * eval.c (scm_m_letstar): Removed check for duplicate bindings.
11484 Duplicate bindings are OK in a let* since a let* is semantically
11485 equivalent to a nested set of let:s.
11486
11487 2001-03-05 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11488
11489 * print.c (scm_print_options): Fixed texinfo in docstring.
11490
11491 * net_db.c (scm_getserv, scm_getproto, scm_getnet): Return #f if
11492 the underlying functions getservent, getprotoent or getnetent
11493 return NULL instead of signalling an error.
11494
11495 2001-03-04 Gary Houston <ghouston@arglist.com>
11496
11497 * socket.c (scm_fill_sockaddr): don't allow buffer overflows when
11498 taking an unexpectedly large filename for an AF_UNIX socket from
11499 bind/connect/sendto (thanks to Martin Grabmueller).
11500
11501 * socket.c (scm_sock_fd_to_port, SCM_SOCK_FD_TO_PORT): removed the
11502 former and adjusted the latter.
11503 (scm_socket, scm_socketpair): cosmetic changes.
11504 (scm_getsockopt, scm_setsockopt): declare optlen as int, not
11505 size_t as socklen_t substitute. don't restrict args/return values
11506 to INUM: allow full range of int or size_t.
11507 (scm_fill_sockaddr): check arguments before allocating memory, to
11508 avoid leakage. use malloc, not scm_must_malloc.
11509 (scm_connect, scm_bind, scm_sendto): use int, not size_t as socklen_t
11510 substitute. free the sockaddr structure before throwing an error.
11511 (scm_init_add_buffer): procedure removed, together with its static
11512 buffer scm_addr_buffer, which wouldn't be thread safe. instead,
11513 define a macro MAX_ADDR_SIZE and declare the buffer where needed.
11514 (scm_accept, scm_getpeername, scm_getsockname, scm_recvfrom,
11515 scm_sendto): use a local buffer instead of scm_addr_buffer.
11516 adjust for new SCM_SOCK_FD_TO_PORT. use int for address size,
11517 not size_t.
11518 (scm_recvfrom): set addr->sa_family to AF_UNSPEC before the recvfrom
11519 call to detect whether recvfrom could be bothered to set the address.
11520 (scm_init_socket): don't call scm_init_addr_buffer.
11521
11522 2001-03-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
11523
11524 * debug.c (scm_procedure_source, scm_procedure_environment),
11525 print.c (scm_get_print_state), ramap.c (scm_array_fill_int,
11526 scm_array_index_map_x), sort.c (scm_sort_x, scm_sort,
11527 scm_stable_sort_x, scm_stable_sort), stacks.c (scm_make_stack,
11528 scm_last_stack_frame), symbols.c (scm_sym2vcell, scm_sym2ovcell),
11529 unif.c (scm_list_to_uniform_array, scm_uniform_vector_length,
11530 scm_transpose_array, scm_enclose_array, scm_array_in_bounds_p,
11531 scm_uniform_vector_ref, scm_array_set_x, scm_uniform_array_read_x,
11532 scm_uniform_array_write, scm_bit_set_star_x, scm_bit_count_star,
11533 scm_array_to_list, scm_array_prototype), validate.h
11534 (SCM_VALIDATE_NUMBER_COPY): Don't call function scm_wta, call
11535 scm_misc_error or scm_wrong_type_arg instead.
11536
11537 * validate.h (SCM_WTA, RETURN_SCM_WTA): Deprecated.
11538
11539 2001-03-04 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11540
11541 * goops.c, goops.h (scm_sys_pre_expand_closure_x): Removed.
11542 (scm_sys_tag_body): Added.
11543
11544 2001-03-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
11545
11546 * continuations.c (continuation_apply), eval.c (scm_m_lambda,
11547 scm_m_letstar, scm_m_letrec1, scm_m_let, SCM_APPLY), eval.h
11548 (SCM_EVALIM2), evalext.c (scm_m_generalized_set_x), gc.c
11549 (get_bvec, MARK), goops.c (scm_primitive_generic_generic),
11550 options.c (scm_options), ports.c (scm_remove_from_port_table),
11551 ramap.c (scm_ramapc), read.c (skip_scsh_block_comment, scm_lreadr,
11552 scm_lreadparen, scm_lreadrecparen), script.c (script_get_octal,
11553 script_get_backslash, script_read_arg), unif.c (scm_cvref): Don't
11554 call function scm_wta, call scm_misc_error or scm_wrong_type_arg
11555 instead.
11556
11557 2001-03-04 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11558
11559 * goops.c (scm_sys_pre_expand_closure_x): New procedure.
11560
11561 2001-03-04 Marius Vollmer <mvo@zagadka.ping.de>
11562
11563 * eval.c (scm_s_duplicate_bindings): New error message.
11564 (scm_m_letrec1, scm_m_letstar): Check for duplicate bindings.
11565
11566 2001-03-03 Marius Vollmer <mvo@zagadka.ping.de>
11567
11568 * eval.h (SCM_EVALIM2): New macro. Use it when a
11569 immediate, literal constant should be evaluated.
11570 * eval.c (scm_s_duplicate_formals): New error message string.
11571 (scm_c_improper_memq): New function.
11572 (scm_m_lambda): Check for duplicate arguments.
11573 (scm_ceval, scm_deval): When executing a body: only cons a new
11574 toplevel environment frame when it is different from the
11575 existing one; use EVALCAR instead of SIDEVAL so that we can properly
11576 check for empty combinations; use SCM_EVALIM2 for the same reason
11577 in the non-toplevel loop.
11578 (nontoplevel_cdrxnoap, nontoplevel_cdrxbegin, nontoplevel_begin):
11579 New labels with the meaning of their non-"nontoplevel" partners,
11580 but they are used when it is known that the body is not evaluated at
11581 top-level.
11582 (scm_apply, scm_dapply): use SCM_EVALIM2 to get proper error
11583 reporting for empty combinations.
11584
11585 2001-03-02 Keisuke Nishida <kxn30@po.cwru.edu>
11586
11587 * Remove dump facilities.
11588 * dump.c, dump.h: Removed.
11589 * Makefile.am: Remove dump.c, dump.h, dump.x, dump.doc.
11590 * init.c: Remove #include "libguile/dump.h".
11591 (scm_init_guile_1): Remove scm_init_dump.
11592 * smob.h (scm_smob_descriptor): Remove slots: dump, undump.
11593 (scm_set_smob_dump, scm_set_smob_undump): Remove declaration.
11594 * smob.c (scm_make_smob_type): Remove initialization: dump, undump.
11595 (scm_set_smob_dump, scm_set_smob_undump): Removed.
11596
11597 * keywords.c: Remove #include "libguile/dump.h".
11598 (keyword_dump, keyword_undump): Removed.
11599 (scm_init_keywords): Remove scm_set_smob_dump and scm_set_smob_undump.
11600
11601 2001-03-02 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11602
11603 * vectors.c (s_scm_vector_p, list->vector, scm_vector)
11604 (scm_vector_ref, scm_vector_set_x, scm_vector_to_list)
11605 (scm_vector_fill_x), strorder.c (scm_string_equal_p)
11606 (scm_string_ci_equal_p, scm_string_less_p, scm_string_leq_p)
11607 (scm_string_gr_p, scm_string_geq_p, scm_string_ci_less_p)
11608 (scm_string_ci_geq_p), symbols.c (scm_symbol_p)
11609 (scm_symbol_to_string, scm_string_to_symbol): Changed use of @t{}
11610 to @code{} as the texinfo manual recommends, converted the
11611 examples to use a @lisp{}-environment.
11612
11613 * strports.c (scm_eval_string): Cleaned up the docstring.
11614
11615 * struct.c (scm_struct_p, scm_struct_vtable_p): Added texinfo
11616 markup.
11617
11618 * numbers.c (scm_exact_p, scm_odd_p, scm_even_p)
11619 (scm_number_to_string, scm_string_to_number, scm_number_p)
11620 (scm_real_p, scm_integer_p, scm_inexact_p, scm_make_rectangular)
11621 (scm_make_polar, scm_inexact_to_exact): Added texinfo markup.
11622 (scm_ash): Added texinfo markup and removed obsolete @refill.
11623 (scm_gr_p): Corrected comment.
11624 (scm_gr_p, scm_leq_p, scm_geq_p): Added texinfo markup to (future
11625 docstring) comments.
11626 (scm_positive_p, scm_less_p, scm_num_eq_p, scm_real_p)
11627 (scm_number_p, scm_negative_p, scm_max, scm_min, scm_sum)
11628 (scm_difference, scm_product, scm_divide, scm_asinh, scm_acosh)
11629 (scm_atanh, scm_truncate, scm_round, scm_exact_to_inexact)
11630 (floor, ceiling, $sqrt, $abs, $exp, $log, $sin, $cos, $tan, $asin)
11631 ($acos, $atan, $sinh, $cosh, $tanh, scm_real_part, scm_imag_part)
11632 (scm_magnitude, scm_angle, scm_abs, scm_quotient, scm_remainder)
11633 (scm_modulo, scm_gcd, scm_lcm): Added (future docstring) comments.
11634
11635 2001-02-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
11636
11637 * __scm.h (SCM_ASSERT_TYPE): Add missing macro parameter.
11638 (Obviously nobody compiles with SCM_RECKLESS defined...)
11639
11640 * validate.h (SCM_ASSERT_RANGE): Use the argument number.
11641
11642 2001-02-23 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11643
11644 * ports.c, ports.h (scm_c_read, scm_c_write): New functions.
11645
11646 * ports.h (SCM_READ_BUFFER_EMPTY_P): New macro.
11647
11648 2001-02-24 Neil Jerram <neil@ossau.uklinux.net>
11649
11650 * numbers.c (scm_two_doubles, scm_sys_expt, scm_sys_atan2,
11651 scm_make_polar): Rename arguments `z1' and `z2' to `x' and `y',
11652 since use of `z' suggests that the arguments may be complex.
11653
11654 * goops.c (scm_make), numbers.c (scm_sys_expt): Fix docstring
11655 typos.
11656
11657 2001-02-23 Neil Jerram <neil@ossau.uklinux.net>
11658
11659 * dump.c (scm_binary_write, scm_binary_read), eval.c
11660 (scm_primitive_eval), guardians.c (scm_guardian_destroyed_p,
11661 scm_guardian_greedy_p, scm_make_guardian), fports.c
11662 (scm_file_port_p): Minor docstring fixes.
11663
11664 2001-02-22 Marius Vollmer <mvo@zagadka.ping.de>
11665
11666 * load.c (load): Use scm_primitive_eval_x instead of scm_i_eval_x.
11667
11668 * goops.c (scm_add_method, DEFVAR): Use scm_eval instead of
11669 scm_i_eval.
11670 (make_class_from_template): Do not bother to set the current
11671 module around the call to DEFVAR, scm_eval takes care of that.
11672 (scm_init_goops): Make scm_module_goops and
11673 scm_goops_lookup_closure permanent objects.
11674
11675 * eval.c (scm_ceval, scm_deval): When evaluating expressions on
11676 top level, create a fresh top-level environment for each
11677 expression instead of mutating the exisint frame. This is
11678 important when that frame is closed over.
11679
11680 * numbers.c (s_scm_logior) [SCM_DIGSTOOBIG]: Also use
11681 SCM_DIGSPERLONG instead of DIGSPERLONG.
11682
11683 2001-02-21 Marius Vollmer <mvo@zagadka.ping.de>
11684
11685 * eval.c (scm_ceval, scm_deval): Check for wrong number of args
11686 before applying arrow procedure in `cond' and before applying
11687 receiver procedure in call-with-current-continuation.
11688 (scm_i_eval): Do not invoke scm_copy_tree in argument in SCM_XEVAL
11689 macro. The argument is expanded more than one time.
11690
11691 * numbers.c (scm_logior) [SCM_DIGSTOOBIG]: Correctly use
11692 SCM_BIGDIG instead of BIGDIG. Thanks to Steven G. Johnson!
11693
11694 2001-02-20 Marius Vollmer <mvo@zagadka.ping.de>
11695
11696 * guile-doc-snarf.in, guile-func-name-check.in: Added copyright
11697 notice and license.
11698
11699 2001-02-17 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11700
11701 * variable.c (scm_make_variable, scm_make_undefined_variable)
11702 (scm_variable_ref, scm_variable_set_x, scm_builtin_variable)
11703 (scm_variable_bound_p), values.c (scm_values)
11704 (scm_call_with_values), unif.c (scm_bit_count)
11705 (scm_bit_set_star_x), symbols.c (scm_gentemp)
11706 (scm_gensym), strings.c (scm_string_p, scm_make_string)
11707 (scm_read_only_string_p, scm_string_length, scm_string_ref)
11708 (scm_string_set_x, scm_substring, scm_string_append), stime.c
11709 (scm_strptime, scm_mktime), random.c (scm_seed_to_random_state)
11710 (scm_copy_random_state, scm_random), print.c (scm_newline)
11711 (scm_write_char, scm_simple_format), debug-malloc.c
11712 (scm_malloc_stats), environments.c (scm_environment_p)
11713 (scm_environment_bound_p, scm_environment_ref)
11714 (scm_environment_fold, scm_environment_define)
11715 (scm_environment_undefine, scm_environment_set_x)
11716 (scm_environment_cell, scm_environment_observe)
11717 (scm_environment_observe_weak, scm_environment_unobserve)
11718 (scm_make_eval_environment, scm_eval_environment_p)
11719 (scm_eval_environment_set_local_x, scm_eval_environment_local)
11720 (scm_eval_environment_imported)
11721 (scm_eval_environment_set_imported_x, scm_make_import_environment)
11722 (scm_import_environment_p, scm_import_environment_imports)
11723 (scm_import_environment_set_imports_x, scm_make_export_environment)
11724 (scm_export_environment_p, scm_export_environment_private)
11725 (scm_export_environment_set_private_x)
11726 (scm_export_environment_signature)
11727 (scm_export_environment_set_signature_x, scm_leaf_environment_p):
11728 Added texinfo markup.
11729
11730 * ports.c (scm_drain_input): Lowercased argument to @var.
11731 (scm_current_input_port, scm_current_output_port): Filled in
11732 missing explanation.
11733 (scm_current_load_port, scm_set_current_output_port)
11734 (scm_set_current_error_port, scm_port_line, scm_set_port_line_x):
11735 Added texinfo markup.
11736
11737 * arbiters.c (scm_make_arbiter, scm_try_arbiter)
11738 (scm_release_arbiter): Added texinfo markup to docstrings.
11739 Changed `Returns' to `Return'.
11740 (arbiter_print): Changed SCM_CDR to SCM_SMOB_DATA.
11741
11742 2001-02-16 Neil Jerram <neil@ossau.uklinux.net>
11743
11744 * guile-snarf.awk.in: Quote any `@'s that occur in Scheme names,
11745 by doubling them to `@@'.
11746
11747 2001-02-16 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11748
11749 * numbers.c (scm_lognot), random.c (scm_random,
11750 scm_random_normal, scm_random_solid_sphere_x,
11751 scm_random_hollow_sphere_x, scm_random_normal_vector_x,
11752 scm_random_exp), dynwind.c
11753 (scm_dynamic_wind): Removed unnecessary "" from docstrings.
11754
11755 * goops.c (scm_sys_initialize_object, scm_instance_p,
11756 scm_class_name, scm_class_precedence_list, scm_class_slots,
11757 scm_class_environment, scm_generic_function_name,
11758 scm_generic_function_methods, scm_method_generic_function,
11759 scm_method_specializers, scm_method_procedure, scm_make_unbound,
11760 scm_unbound_p, scm_assert_bound, scm_at_assert_bound_ref,
11761 scm_sys_fast_slot_ref, scm_sys_fast_slot_set_x, scm_slot_ref,
11762 scm_slot_set_x, _scm_slot_bound_p, scm_slots_exists_p,
11763 scm_sys_allocate_instance, scm_make, scm_pure_generic_p,
11764 scm_class_direct_supers, scm_class_direct_slots,
11765 scm_class_direct_subclasses, scm_class_direct_methods,
11766 scm_accessor_method_slot_definition, scm_sys_goops_loaded),
11767 debug.c (scm_with_traps, scm_memoized_p, scm_make_gloc,
11768 scm_gloc_p, scm_make_iloc, scm_iloc_p, scm_memcons,
11769 scm_mem_to_proc, scm_proc_to_mem, scm_unmemoize,
11770 scm_memoized_environment, scm_procedure_name,
11771 scm_procedure_source, scm_procedure_environment, scm_debug_hang),
11772 objects.c
11773 (scm_class_of, scm_entity_p, scm_operator_p,
11774 scm_set_object_procedure_x, scm_object_procedure,
11775 scm_make_class_object), hooks.c (scm_make_hook_with_name,
11776 scm_make_hook, scm_hook_p, scm_hook_empty_p, scm_add_hook_x,
11777 scm_remove_hook_x, scm_reset_hook_x, scm_run_hook,
11778 scm_hook_to_list), lang.c
11779 (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null, scm_nil_eq),
11780 numbers.c (scm_sys_expt, scm_sys_atan2), print.c
11781 (scm_print_options, scm_port_with_print_state,
11782 scm_get_print_state), procs.c (scm_make_cclo, scm_procedure_p,
11783 scm_closure_p, scm_thunk_p, scm_procedure_with_setter_p,
11784 scm_make_procedure_with_setter, scm_procedure), throw.c
11785 (scm_lazy_catch), modules.c (scm_standard_eval_closure), load.c
11786 (scm_parse_path, scm_search_path), stacks.c (scm_make_stack,
11787 scm_stack_ref, scm_stack_length, scm_frame_p,
11788 scm_last_stack_frame, scm_frame_number, scm_frame_source,
11789 scm_frame_procedure, scm_frame_arguments, scm_frame_previous,
11790 scm_frame_next, scm_frame_real_p, scm_frame_procedure_p,
11791 scm_frame_evaluating_args_p, scm_frame_overflow_p), filesys.c
11792 (scm_dirname, scm_basename), dynwind.c
11793 (scm_wind_chain), read.c (scm_read_options, scm_read,
11794 scm_read_hash_extend), gc.c
11795 (scm_unhash_name), eval.c (scm_eval_options_interface,
11796 scm_evaluator_traps, s_scm_nconc2last), backtrace.c
11797 (scm_display_error, scm_set_print_params_x,
11798 scm_display_application, scm_display_backtrace, scm_backtrace),
11799 async.c (scm_async, scm_system_async, scm_async_mark,
11800 scm_system_async_mark, scm_run_asyncs, scm_noop,
11801 scm_set_tick_rate, scm_set_switch_rate, scm_unmask_signals,
11802 scm_mask_signals): Added docstrings.
11803
11804 2001-02-15 Keisuke Nishida <kxn30@po.cwru.edu>
11805
11806 * dump.c (scm_undump): Use SCM_CARLOC/SCM_CDRLOC to obtain the
11807 address of car/cdr. (Thanks to Dirk Herrmann)
11808 Use scm_sizet to obtain the length of strings.
11809 (Thanks to Matthias Koeppe)
11810
11811 2001-02-15 Marius Vollmer <mvo@zagadka.ping.de>
11812
11813 * symbols.c (scm_mem2symbol): Put a empty statement after the
11814 next_symbol label. This is mandated by ANSI, appearantly.
11815
11816 2001-02-13 Marius Vollmer <marius.vollmer@uni-dortmund.de>
11817
11818 * gc_os_dep.c: Do not include <linux/version.h>. It makes no
11819 sense to compile for a specific kernel version. Do not include
11820 <asm/signal.h> while defining __KERNEL__. This hack should no
11821 longer be needed and caused problems.
11822
11823 2001-02-13 Marius Vollmer <mvo@zagadka.ping.de>
11824
11825 * eval.c (scm_ceval, scm_deval): use `SIDEVAL' instead of
11826 SCM_CEVAL when evaluating subforms of `begin' forms. SCM_CEVAL
11827 can not deal with immediates.
11828
11829 2001-02-12 Keisuke Nishida <kxn30@po.cwru.edu>
11830
11831 * list.c (scm_list_copy): Validate the first argument.
11832
11833 2001-02-11 Marius Vollmer <mvo@zagadka.ping.de>
11834
11835 Fix evaluator so that top-level expressions are correctly
11836 evaluated with respect to the module system.
11837
11838 * modules.h. modules.c (scm_current_module_lookup_closure): New
11839 function.
11840
11841 * eval.h (scm_primitive_eval, scm_primitive_eval_x): New
11842 prototypes.
11843 (scm_i_eval, scm_i_eval_x, scm_eval, scm_eval_x): Changed argument
11844 names to better reflect their meaning.
11845
11846 * eval.c (scm_ceval, scm_deval): Recognize when `begin' is being
11847 evaluated at top-level and synronize lookup closure before
11848 executing every subform.
11849 (scm_primitve_eval_x, scm_primitive_eval): New functions.
11850 (scm_eval_x, scm_eval): Reimplement in terms of
11851 scm_primitive_eval_x and scm_primitive_eval, respectively.
11852
11853 2001-02-09 Marius Vollmer <mvo@zagadka.ping.de>
11854
11855 * macros.c (scm_macro_name, scm_macro_transformer): Use
11856 SCM_SMOB_DATA instead of SCM_CDR. Provided by Martin Grabmueller.
11857 Thanks!
11858
11859 2001-02-10 Keisuke Nishida <kxn30@po.cwru.edu>
11860
11861 * dump.c (scm_store_bytes): Store data size before data.
11862 (scm_restore_bytes): Restore data size. Takes a pointer to size.
11863 * dump.h (scm_restore_bytes): Updated.
11864
11865 2001-02-09 Keisuke Nishida <kxn30@po.cwru.edu>
11866
11867 * dump.c: Use double cells for update schedule.
11868
11869 2001-02-08 Keisuke Nishida <kxn30@po.cwru.edu>
11870
11871 * ports.c (scm_unread_char): Take an optional argument.
11872
11873 2001-02-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
11874
11875 * modules.h (scm_selected_module, scm_current_module): Renamed
11876 scm_selected_module to scm_current_module to synchronize Scheme
11877 and C names.
11878 (scm_select_module, scm_set_current_module): Likewise. Changed
11879 all uses.
11880
11881 * ports.c (scm_port_for_each): Make a snapshot of the port table
11882 before iterating over it. The table might change while the user
11883 code is running. With the snapshot, the user can depend on the
11884 fact that each port that existed at the start of the iteration is
11885 encountered exactly once. (ice-9 popen) depends on this.
11886
11887 2001-02-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
11888
11889 * strings.h (SCM_STRING_MAX_LENGTH): New macro.
11890
11891 * strings.c (scm_makstr, scm_take_str, scm_make_string): Added
11892 range checking for the size parameter. Thanks to Martin
11893 Grabmueller for the hint.
11894
11895 (scm_makstr): Reordered string initialization to make interrupt
11896 deferring unnecessary.
11897
11898 * vectors.c (scm_make_vector): Fixed range checking.
11899
11900 2001-02-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
11901
11902 * vectors.h (SCM_VECTOR_MAX_LENGTH): New macro.
11903
11904 * vectors.c (scm_make_vector, scm_c_make_vector): Improved the
11905 checking of the size parameter for type correctness and valid
11906 range. Thanks to Rob Browning for reporting the problem. Instead
11907 of deferring interrupts, scm_remember_upto_here_1 is used.
11908
11909 2001-02-05 Keisuke Nishida <kxn30@po.cwru.edu>
11910
11911 * dump.c (scm_store_cell_object, scm_restore_cell_object): Removed.
11912 (scm_dump_cell_update): Removed.
11913 (scm_dump_update): Renamed from scm_dump_object_update.
11914 (scm_restore_string, scm_restore_bytes, scm_restore_word): Takes
11915 a pointer instead of returning a value.
11916 * keywords.c (keyword_undump): Updated.
11917
11918 2001-02-05 Keisuke Nishida <kxn30@po.cwru.edu>
11919
11920 * dump.c, dump.h: Modified a lot.
11921 (SCM_DUMP_COOKIE): Version 0.1
11922 (scm_dump_mark): Removed.
11923 (scm_restore_cell_object, scm_store_cell_object): New functions.
11924
11925 * smob.h (scm_smob_descriptor): Removed slots: dump_mark,
11926 dump_dealloc, dump_store, undump_alloc, undump_restore, undump_init.
11927 New slots: dump, undump.
11928 * smob.c (scm_make_smob_type, scm_set_smob_dump, scm_set_smob_undump):
11929 Updated.
11930
11931 * keywords.c (keyword_dump): Renamed from keyword_dealloc.
11932 (keyword_undump): Renamed from keyword_alloc.
11933 (scm_init_keywords): Set keyword_dump and keyword_undump.
11934
11935 2001-02-03 Michael Livshin <mlivshin@bigfoot.com>
11936
11937 * gc.c (DOUBLECELL_ALIGNED_P): new macro, a better-named analog of
11938 the deprecated SCM_DOUBLE_CELLP.
11939
11940 * tags.h (SCM_DOUBLE_CELLP): deprecated.
11941
11942 2001-02-02 Keisuke Nishida <kxn30@po.cwru.edu>
11943
11944 * dump.c, dump.h: New files.
11945 * Makefile.am: Added dump.c, dump.h, dump.x, dump.doc.
11946 * init.c: #include "libguile/dump.h".
11947 (scm_init_guile_1): Call scm_init_dump.
11948 * smob.h (scm_smob_descriptor): New slots: dump_mark,
11949 dump_dealloc, dump_store, undump_alloc, undump_restore,
11950 undump_init.
11951 * smob.c (scm_make_smob_type): Init the new slots.
11952 (scm_set_smob_dump, scm_set_smob_undump): New functions.
11953 * smob.h (scm_set_smob_dump, scm_set_smob_undump): Declared.
11954
11955 * keywords.c: #include "libguile/dump.h".
11956 (keyword_dealloc, keyword_alloc): New functions.
11957 (scm_init_keywords): Set smob_dump and smob_undump.
11958
11959 2001-02-01 Keisuke Nishida <kxn30@po.cwru.edu>
11960
11961 * vectors.c (scm_c_make_vector): New function.
11962 * vectors.h (scm_c_make_vector): Declared.
11963 * eval.c (scm_copy_tree), filesys.c (scm_stat2scm), fluids.c
11964 (scm_make_initial_fluids, grow_fluids), gc.c (scm_init_storage),
11965 gh_data.c (gh_ints2scm, gh_doubles2scm): goops.c
11966 (scm_make_method_cache, scm_i_vector2list,
11967 scm_compute_applicable_methods, scm_sys_method_more_specific_p),
11968 init.c (start_stack), net_db.c (scm_gethost, scm_getnet,
11969 scm_getproto, scm_return_entry), posix.c (scm_getgroups,
11970 scm_getpwuid, scm_getgrgid, scm_uname), print.c (make_print_state,
11971 grow_ref_stack), regex-posix.c (scm_regexp_exec), scmsigs.c
11972 (scm_init_scmsigs), socket.c (scm_addr_vector, scm_addr_vector),
11973 stime.c (scm_times, filltime), unif.c (scm_make_uve), vectors.c
11974 (scm_vector, scm_make_vector): Use scm_c_make_vector.
11975
11976 * hashtab.c (scm_c_make_hash_table): New function.
11977 * hashtab.h (scm_c_make_hash_table): Declared.
11978 * environments.c (scm_make_leaf_environment,
11979 scm_make_eval_environment), gc.c (scm_init_storage),
11980 keywords.c (scm_init_keywords), symbols.c (scm_builtin_bindings):
11981 Use scm_c_make_hash_table.
11982
11983 2001-01-31 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11984
11985 * unif.c (rapr1): Don't apply scm_uniform_vector_length on arrays.
11986
11987 2001-01-29 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11988
11989 * struct.c (scm_make_vtable_vtable): Removed unnecessary "" from
11990 end of docstring.
11991
11992 * struct.c (scm_struct_set_x, scm_struct_vtable_tag,
11993 scm_struct_vtable_name, scm_set_struct_vtable_name_x), weaks.c
11994 (scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table,
11995 scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
11996 srcprop.c (scm_source_properties, scm_set_source_properties_x,
11997 scm_source_property, scm_set_source_property_x), sort.c
11998 (scm_sort_list_x, scm_restricted_vector_sort_x, scm_sorted_p,
11999 scm_merge, scm_merge_x, scm_sort_x, scm_sort, scm_stable_sort_x,
12000 scm_stable_sort, scm_sort_list_x, scm_sort_list): Added
12001 docstrings.
12002
12003 2001-01-29 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12004
12005 * eval.c (SCM_APPLY): Check that primitives which take 1 arg
12006 really get that arg.
12007
12008 2001-01-26 Keisuke Nishida <kxn30@po.cwru.edu>
12009
12010 * goops.c (s_scm_get_keyword): Bug fix.
12011
12012 2001-01-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
12013
12014 The following patch was sent by Martin Grabmueller. It makes sure
12015 that in case of parameter errors the correct function name is
12016 shown, and that parameter types are only checked once.
12017
12018 * strop.c (string_copy, string_upcase_x, string_downcase_x,
12019 string_capitalize_x): New functions. Each one performs the core
12020 functionality of the corresponding scm_* function.
12021
12022 (scm_string_copy, scm_string_upcase_x, scm_string_upcase,
12023 scm_string_downcase_x, scm_string_downcase,
12024 scm_string_capitalize_x, scm_string_capitalize): Reduced to
12025 parameter checking wrappers of the above functions.
12026
12027 2001-01-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
12028
12029 * continuations.c, dynl.c, keywords.c, load.c: Include
12030 strings.h. Thanks to Bill Schottstaedt for the bug report.
12031
12032 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
12033
12034 * backtrace.c (display_header): Make sure that line and column
12035 information is shown independent of whether the port the code was
12036 read from had an associated filename. Thanks to Martin
12037 Grabmueller for providing this patch.
12038
12039 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
12040
12041 * fports.[ch] (scm_file_port_p): New primitive.
12042
12043 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
12044
12045 * tags.h (scm_tc16_fport, scm_tc16_strport, scm_tc16_sfport):
12046 These are now defined in fports.c, strports.c and vports.c.
12047
12048 * fports.[ch] (scm_tc16_fport), strports.c (scm_tc16_strport),
12049 vports.c (scm_tc16_sfport): Made variables (were macros defined in
12050 tags.h).
12051
12052 fports.c (scm_make_fptob), strports.c (scm_make_stptob), vports.c
12053 (scm_make_sfptob): Made static. These return a type code now.
12054
12055 fports.c (scm_init_fports), strports.c (scm_init_strports),
12056 vports.c (scm_init_vports): Create the corresponding port types.
12057
12058 * fports.h (SCM_FPORTP, SCM_OPFPORTP, SCM_OPINFPORTP,
12059 SCM_OPOUTFPORTP): Redefined in terms of scm_tc16_fport.
12060
12061 * init.c (scm_init_guile_1): Make sure strports are initialized
12062 before gdbint.
12063
12064 * ports.[ch] (scm_make_port_type): Changed the return type to
12065 scm_bits_t.
12066
12067 * ports.c (scm_ports_prehistory): Don't create any port types
12068 here.
12069
12070 * posix.c (scm_ttyname): Use SCM_FPORTP instead of comparing
12071 against scm_tc16_fport directly.
12072
12073 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
12074
12075 * srcprop.c (scm_set_source_property_x): Fix to handle
12076 (set-source-property! <obj> 'copy <datum>) correctly.
12077
12078 2001-01-24 Gary Houston <ghouston@arglist.com>
12079
12080 * filesys.c (scm_link): docstring fix.
12081 * fports.h (scm_setfileno): obsolete declaration removed.
12082 * posix.c: bogus popen declaration removed.
12083
12084 * rdelim.c: new file, split from ioext.c.
12085 * rdelim.h: new file, split from ioext.h
12086 * Makefile.am: add rdelim.c and related files.
12087 * init.c: call scm_init_rdelim. include rdelim.h.
12088
12089 2001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
12090
12091 This patch was sent by Martin Grabmueller and makes sure that
12092 parameter errors are reported correctly by the lexicographic
12093 ordering predicates.
12094
12095 * strorder.c (string_less_p, string_ci_less_p): New functions.
12096
12097 (scm_string_less_p, scm_string_ci_less_p): Extracted the core
12098 functionality into string_less_p, string_ci_less_p respectively.
12099 The remaining code is just a wrapper to do the parameter
12100 checking.
12101
12102 (scm_string_leq_p, scm_string_gr_p, scm_string_geq_p): Check the
12103 parameters and call string_less_p instead of scm_string_less_p.
12104
12105 (scm_string_ci_leq_p, scm_string_ci_gr_p, scm_string_ci_geq_p):
12106 Check the parameters and call string_less_ci_p instead of
12107 scm_string_ci_less_p.
12108
12109 2001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
12110
12111 This patch modifies scm_display_error to perform parameter
12112 checking. Thanks to Neil Jerram for the bug report.
12113
12114 * backtrace.[ch] (scm_i_display_error): New function.
12115
12116 * backtrace.c (scm_display_error): Added parameter check and
12117 extracted the core functionality into function
12118 scm_i_display_error.
12119
12120 * throw.c (handler_message): Call scm_i_display_error to display
12121 the error message.
12122
12123 2001-01-23 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12124
12125 * eval.c (SCM_APPLY): Added # args check for application of
12126 procedures with arity 3. (Thanks to Anders Holst.)
12127
12128 2001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
12129
12130 * filesys.h (SCM_DIR_FLAG_OPEN, SCM_DIR_OPEN_P): Added.
12131
12132 (SCM_OPDIRP): Deprecated.
12133
12134 * filesys.c (scm_opendir): Use SCM_DIR_FLAG_OPEN instead of
12135 SCM_OPN.
12136
12137 (scm_readdir, scm_rewinddir): Don't use SCM_VALIDATE_OPDIR.
12138 Instead, give an explicit error message in case the directory is
12139 closed.
12140
12141 (scm_closedir, scm_dir_print): Rewritten to use SCM_DIR_OPEN_P
12142 instead of SCM_OPENP and SCM_CLOSEDP.
12143
12144 * validate.h (SCM_VALIDATE_OPDIR): Deprecated.
12145
12146 2001-01-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
12147
12148 * eval.c (inner_eval, scm_eval): Move all real functionality into
12149 inner_eval. Avoid to copy the expression twice by inlining some
12150 code from scm_i_eval.
12151
12152 2001-01-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
12153
12154 * eval.c (scm_m_case): The 'else' clause of a 'case' statement
12155 now has to be the last clause, as required by R5RS. Thanks to
12156 Martin Grabmueller for the patch.
12157
12158 2001-01-18 Gary Houston <ghouston@arglist.com>
12159
12160 * ioext.c: further simplify scm_read_string_x_partial by defining
12161 a macro SCM_EBLOCK.
12162
12163 2001-01-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
12164
12165 * gh_data.c (gh_ints2scm): Simplified using SCM_FIXABLE.
12166
12167 2001-01-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
12168
12169 * __scm.h: Added comment about architecture and compiler
12170 properties that are required by guile.
12171
12172 (SCM_FIXNUM_BIT, SCM_MOST_POSITIVE_FIXNUM,
12173 SCM_MOST_NEGATIVE_FIXNUM): Moved to numbers.h.
12174
12175 (SCM_CHAR_BIT, SCM_LONG_BIT): Moved here from numbers.h.
12176
12177 * numbers.h (SCM_CHAR_BIT, SCM_LONG_BIT): Moved to __scm.h.
12178
12179 (SCM_FIXNUM_BIT, SCM_MOST_POSITIVE_FIXNUM,
12180 SCM_MOST_NEGATIVE_FIXNUM): Moved here from __scm.h.
12181
12182 2001-01-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
12183
12184 * __scm.h (SCM_FIXNUM_BIT): Added. The name is chosen in analogy
12185 to the names in limits.h.
12186
12187 * numbers.c (abs_most_negative_fixnum): Added.
12188
12189 (scm_quotient, scm_remainder): Fixed the fixnum-min / (abs
12190 fixnum-min) special case.
12191
12192 (scm_big_and): Fix for negative first parameter.
12193
12194 (scm_bit_extract): Fix for fixnum paramters.
12195 Thanks to Rob Browning for the bug report.
12196
12197 (scm_init_numbers): Initialize abs_most_negative_fixnum.
12198
12199 2001-01-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
12200
12201 * symbols.c (scm_symbol_bound_p): Fixed comment.
12202 Thanks to Chris Cramer.
12203
12204 2001-01-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
12205
12206 * smob.[ch] (scm_make_smob_type): Return type is scm_bits_t now.
12207 Thanks to Bill Schottstaedt.
12208
12209 2001-01-11 Michael Livshin <mlivshin@bigfoot.com>
12210
12211 from Matthias Köppe:
12212
12213 * objects.h (SCM_SET_ENTITY_SETTER): new macro. SCM_ENTITY_SETTER
12214 casts its result, so doesn't yield an lvalue per ANSI C.
12215
12216 * goops.c (s_scm_sys_set_object_setter_x): use
12217 SCM_SET_ENTITY_SETTER.
12218 (clear_method_cache): use SCM_SET_ENTITY_PROCEDURE.
12219
12220 * gc.h (SCM_GC_SET_CARD_BVEC): new macro. SCM_GC_CARD_BVEC casts
12221 its result, so doesn't yield an lvalue per ANSI C.
12222 (SCM_GC_SET_CARD_FLAGS): ditto for SCM_GC_GET_CARD_FLAGS.
12223 (SCM_GC_CLR_CARD_FLAGS): redefined in terms of
12224 SCM_GC_SET_CARD_FLAGS.
12225 (SCM_GC_SET_CARD_FLAG, SCM_GC_CLR_CARD_FLAGS): ditto.
12226
12227 * gc.c (INIT_CARD): use the explicit setter macro to set the bvec.
12228
12229 2001-01-08 Gary Houston <ghouston@arglist.com>
12230
12231 * validate.h (SCM_VALIDATE_SUBSTRING_SPEC_COPY): new macro.
12232 * ioext.c (scm_read_string_x_partial, scm_read_delimited_x),
12233 socket.c (scm_recvfrom): use the new macro, plus minor docstring
12234 changes.
12235 * ioext.c (scm_read_string_x_partial): don't crash if -1 is supplied
12236 for fdes. if current input port is used, check that it's a file
12237 port.
12238
12239 2001-01-06 Gary Houston <ghouston@arglist.com>
12240
12241 * ioext.c (scm_read_string_x_partial): new procedure, implements
12242 read-string!/partial.
12243 * ports.c (scm_take_from_input_buffers): new procedure used by
12244 scm_read_string_x_partial.
12245 (scm_drain_input): use scm_take_from_input_buffers.
12246
12247 2001-01-06 Marius Vollmer <mvo@zagadka.ping.de>
12248
12249 * validate.h (SCM_VALIDATE_NUMBER): New.
12250
12251 2001-01-03 Michael Livshin <mlivshin@bigfoot.com>
12252
12253 * guardians.c (F_GREEDY, F_LISTED, F_DESTROYED, GREEDY_P,
12254 SET_GREEDY, LISTED_P, SET_LISTED, CLR_LISTED, DESTROYED_P,
12255 SET_DESTROYED): new defines/macros.
12256 (GUARDIAN_LIVE, GUARDIAN_ZOMBIES, GUARDIAN_NEXT): deleted.
12257 (add_to_live_list): takes a `guardian_t *' now, not SCM.
12258 (guardian_print): print more info.
12259 (guardian_apply): check if the guardian is destroyed, and throw an
12260 error if so. take one more optional argument `throw_p'.
12261 (scm_guard): depending on the value of `throw_p', return a boolean
12262 result.
12263 (scm_get_one_zombie): remove redundant property test.
12264 (guardian_t): represent the various (currently 3, I hope nothing
12265 more gets added) boolean fields as bit flags.
12266 (scm_guardian_destroyed_p, scm_guardian_greedy_p): new predicates.
12267 (scm_destroy_guardian_x): new procedure.
12268
12269 * guardians.h: added prototypes for `scm_guardian_greedy_p' and
12270 `scm_guardian_destroyed_p'. changed prototype for `scm_guard'.
12271
12272 2001-01-01 Gary Houston <ghouston@arglist.com>
12273
12274 * fports.c (fport_write): bugfix: handle short writes for
12275 unbuffered ports too. optimize the buffered case by minimizing
12276 the number of write/flush calls.
12277 (write_all): new helper procedure.
12278
12279 The ChangeLog continues in the file: "ChangeLog-2000"