*** empty log message ***
[bpt/guile.git] / libguile / ChangeLog
1 2005-03-09 Marius Vollmer <mvo@zagadka.de>
2
3 * script.c (scm_compile_shell_switches): Added 2005 to Copyright
4 years.
5
6 2005-03-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
7
8 * gc-card.c (scm_i_sweep_card): Do not increase/decrease
9 scm_gc_running_p. Sweeping can happen in parallel with
10 allocation.
11
12 * inline.h: Updated comments for current threading implementation.
13
14 * threads.h, threads.c (scm_i_frame_single_threaded): Removed.
15 (scm_i_thread): Removed unused signal_asyncs field.
16 (threads_mark): Do not mark it.
17 (guilify_self_1): Do not initialize it. Do initialize
18 continuation_root field.
19 (do_thread_exit): Do not remove thread from all_threads list.
20 (on_thread_exit): Do it here, after leaving guile mode.
21 (sleep_level): Removed.
22 (scm_i_thread_put_to_sleep): Leave thread_admin_mutex locked when
23 returning. Do not support recursive sleeps.
24 (scm_i_thread_wake_up): Expect thread_admin_mutex to be locked on
25 entry. Do not support recursive sleeps.
26
27 * fluids.c (ensure_state_size, ensure_all_state_sizes,
28 resize_all_states): Collapsed ensure_state_size and
29 ensure_all_state_sizes into one function named resize_all_states.
30 Allocate new vectors outside of single threaded region. Do only
31 simple things inside that region.
32 (scm_make_fluid, scm_make_dynamic_state): Lock fluid_admin_mutex
33 while adding to the global lists.
34
35
36 2005-03-08 Marius Vollmer <mvo@zagadka.de>
37
38 libltdl is no longer distributed. We expect it to be installed
39 already.
40
41 * Makefile.am (INCLUDES): Removed @LTDLINCL@.
42 (libguile_la_LIBADD): Removed @LIBLTDL@.
43
44 2005-03-07 Marius Vollmer <mvo@zagadka.de>
45
46 * threads.h, async.h, threads.c (SCM_CRITICAL_SECTION_START,
47 SCM_CRITICAL_SECTION_END): Moved here from threads.h since now
48 they also block/unblock execution of asyncs and call
49 scm_async_click which is declared in async.h but threads.h can not
50 include async.h since async.h already includes threads.h.
51 (scm_i_critical_section_level): New, for checking mistakes in the
52 use of the SCM_CRITICAL_SECTION_* macros.
53 (scm_i_critical_section_mutex): Make it a recursive mutex so that
54 critical sections can be nested.
55
56 * throw.c (scm_ithrow): Abort when scm_i_critical_section_level is
57 not zero.
58
59 * threads.h, threads.c (scm_frame_lock_mutex): New.
60 (scm_frame_critical_section): Take mutex as argument.
61 (framed_critical_section_mutex): New, used as default for above.
62 (scm_init_threads): Initialize it.
63 (scm_threads_prehistory): Do not initialize thread_admin_mutex and
64 scm_i_critical_section_mutex; both are initialized statically.
65
66 * continuation.c, deprecated.c, goops.c, guardians.c keywords.c,
67 libguile_la-arrays.loT, objprop.c, ports.c, smob.c, sort.s,
68 srcprop.c, stime.c, struct.c, throw.c, regex-posix.c: Include
69 "libguile/async.h" for SCM_CRITICAL_SECTION_START/END.
70
71 * debug.c (scm_debug_options): Replace
72 SCM_CRITICAL_SECTION_START/END with a frame and
73 scm_frame_critical_section.
74
75 * continuations.c (scm_make_continuation): No longer a critical
76 section.
77 (scm_dynthrow): Abort when scm_i_critical_section_level is
78 not zero.
79
80 2005-03-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
81
82 * threads.c (scm_try_mutex): Renamed argument for consistency.
83
84 * root.c (scm_call_with_dynamic_root): New docstring.
85
86 * eval.c: Define _GNU_SOURCE.
87
88 2005-03-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
89
90 Big merge from the mvo-thread-cleanup branch. The main changes
91 are:
92
93 - The dynamic roots functionality has been split into dynamic
94 states and continuations barriers. Fluids have been
95 reimplemented and can now be garbage collected.
96
97 - Initialization of Guile now works in a multi-thread friendly
98 manner. Threads can freely enter and leave guile mode.
99
100 - Blocking on mutexes or condition variables or while selecting
101 can now be reliably interrupted via system asyncs.
102
103 - The low-level threading interface has been removed.
104
105 - Signals are delivered via a pipe to a dedicated 'signal delivery
106 thread'.
107
108 - SCM_DEFER_INTS, SCM_ALLOW_INTS etc have been deprecated.
109
110 * throw.c (scm_handle_by_message): Exit only the current thread,
111 not the whole process.
112 (scm_handle_by_message_noexit): Exit when catching 'quit.
113
114 * scmsigs.c (take_signal, signal_delivery_thread,
115 start_signal_delivery_thread, ensure_signal_delivery_thread,
116 install_handler): Reimplemented signal delivery as explained in
117 the comments.
118
119 * pthreads-threads.h (scm_i_pthread_t, scm_i_pthread_self,
120 scm_i_pthread_create, scm_i_pthread_detach, scm_i_pthread_exit,
121 scm_i_sched_yield, scm_i_pthread_sigmask,
122 SCM_I_PTHREAD_MUTEX_INITIALIZER,
123 SCM_I_PTHREAD_RECURSIVE_MUTEX_INITIALIZER, scm_i_pthread_mutex_t ,
124 scm_i_pthread_mutex_init, scm_i_pthread_mutex_destroy,
125 scm_i_pthread_mutex_trylock, scm_i_pthread_mutex_lock,
126 scm_i_pthread_mutex_unlock, SCM_I_PTHREAD_COND_INITIALIZER,
127 scm_i_pthread_cond_t, scm_i_pthread_cond_init,
128 scm_i_pthread_cond_destroy, scm_i_pthread_cond_signal,
129 scm_i_pthread_cond_broadcast, scm_i_pthread_cond_wait,
130 scm_i_pthread_cond_timedwait, scm_i_pthread_once_t,
131 SCM_I_PTHREAD_ONCE_INIT, scm_i_pthread_once, scm_i_pthread_key_t ,
132 scm_i_pthread_key_create, scm_i_pthread_setspecific,
133 scm_i_pthread_getspecific, scm_i_scm_pthread_mutex_lock,
134 scm_i_frame_pthread_mutex_lock, scm_i_scm_pthread_cond_wait,
135 scm_i_scm_pthread_cond_timedwait): Provide the obvious mapping
136 when using pthreads.
137 * null-threads.c, null-threads.h: Provide dummy definitions for
138 the above symbols when not using pthreads.
139
140 * modules.h, modules.c (scm_frame_current_module): New.
141
142 * load.c (scm_primitive_load): Use scm_i_frame_current_load_port
143 instead of scm_internal_dynamic_wind.
144
145 * init.h, init.c (restart_stack, start_stack): Removed.
146 (scm_boot_guile, invoke_main_func): Simply use scm_with_guile.
147 (scm_boot_guile_1): Removed.
148 (scm_i_init_mutex): New.
149 (really_cleanup_for_exit, cleanup_for_exit): New.
150 (scm_init_guile_1, scm_i_init_guile): Renamed former to latter.
151 Moved around some init funcs. Call
152 scm_init_threads_default_dynamic_state. Register cleanup_for_exit
153 with atexit.
154
155 * hashtab.c (scm_hash_fn_create_handle_x, scm_hash_fn_remove_x):
156 Use "!scm_is_eq" instead of "!=".
157
158 * ge-scmconfig.c, gen-scmconfig.h.in (SCM_I_GSC_USE_COOP_THREADS,
159 SCM_USE_COOP_THREADS): Removed.
160
161 * gc.c (scm_igc): Take care that scm_gc_running_p is properly
162 maintained. Unlock scm_i_sweep_mutex before running
163 scm_after_gc_c_hook.
164 (scm_permanent_object): Allocate outside of critical section.
165 (cleanup): Removed.
166
167 * fluids.h, fluids.c: Reimplemented completely.
168 (SCM_FLUID_NUM, SCM_FAST_FLUID_REF,
169 SCM_FAST_FLUID_SET): Reimplemented as functions.
170 (scm_is_fluid): New.
171 (scm_i_make_initial_fluids, scm_i_copy_fluids): Removed.
172 (scm_make_dynamic_state, scm_dynamic_state_p,
173 scm_is_dynamic_state, scm_current_dynamic_state,
174 scm_set_current_dynamic_state, scm_frame_current_dynamic_state,
175 scm_c_with_dynamic_state, scm_with_dynamic_state,
176 scm_i_make_initial_dynamic_state, scm_fluids_prehistory): New.
177
178 * feature.c (progargs_fluid): New.
179 (scm_program_arguments, scm_set_program_arguments): Use it instead
180 of scm_progargs.
181 (scm_init_feature): Allocate it. Also, only add "threads" feature
182 when SCM_USE_PTHREAD_THREADS is true.
183
184 * eval.c (scm_makprom): Use scm_make_recursive_mutex instead of
185 scm_make_rec_mutex, with all the consequences.
186 (scm_eval_x, scm_eval): Use scm_frame_begin etc instead of
187 scm_internal_dynamic_wind. Handle dynamic states as second
188 argument.
189
190 * threads.h, threads.c (scm_internal_select): Renamed to
191 scm_std_select and discouraged old name.
192 (scm_thread_sleep, scm_thread_usleep): Likewise, as scm_std_sleep
193 and scm_std_usleep.
194 (scm_tc16_fair_mutex, scm_tc16_fair_condvar, SCM_MUTEXP,
195 SCM_FAIR_MUTEX_P, SCM_MUTEX_DATA, SCM_CONDVARP,
196 SCM_FAIR_CONDVAR_P, SCM_CONDVAR_DATA, SCM_THREADP,
197 SCM_THREAD_DATA): Removed.
198 (SCM_I_IS_THREAD, SCM_I_THREAD_DATA): New.
199 (scm_i_thread): New.
200 (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR):
201 Use scm_assert_smob_type.
202 (scm_c_scm2thread, scm_thread_join, scm_thread_detach,
203 scm_thread_self, scm_thread_yield, scm_mutex_init,
204 scm_mutex_destroy, scm_mutex_trylock, scm_mutex_unlock,
205 scm_rec_mutex_init, scm_rec_mutex_destroy, scm_make_rec_mutex,
206 scm_rec_mutex_free, scm_rec_mutex_lock, scm_rec_mutex_trylock,
207 scm_cond_init, scm_cond_destroy, scm_cond_wait,
208 scm_cond_timedwait, scm_cond_signal, scm_cond_broadcast,
209 scm_key_create, scm_key_delete, scm_setspecific, scm_getspecific,
210 scm_thread_select): Removed. Replaced with scm_i_pthread
211 functions as appropriate.
212 (scm_in_guile, scm_outside_guile): Removed.
213 (scm_t_guile_ticket, scm_leave_guile, scm_enter_guile): Return and
214 take a ticket.
215 (scm_with_guile, scm_without_guile, scm_i_with_guile_and_parent):
216 New.
217 (scm_i_frame_single_threaded): New.
218 (scm_init_threads_default_dynamic_state): New.
219 (scm_i_create_thread): Removed.
220 (scm_make_fair_mutex, scm_make_fair_condition_variable): Removed.
221 (scm_make_recursive_mutex): New.
222 (scm_frame_critical_section): New.
223 (SCM_CURRENT_THREAD, SCM_I_CURRENT_THREAD): Renamed former to
224 latter, changed all uses.
225 (scm_i_dynwinds, scm_i_setdynwinds, scm_i_last_debug_frame,
226 scm_i_set_last_debug_frame): New, use them instead of scm_root
227 stuff.
228 (SCM_THREAD_LOCAL_DATA, SCM_SET_THREAD_LOCAL_DATA,
229 scm_i_root_state_key,m scm_i_set_thread_data): Removed.
230 (scm_pthread_mutex_lock, scm_frame_pthread_mutex_lock,
231 scm_pthread_cond_wait, scm_pthread_cond_timedwait).
232 (remqueue): Allow the removal of already removed cells. Indicate
233 whether a real removal has happened.
234 (scm_thread): Removed, replaced with scm_i_thread.
235 (make_thread, init_thread_creatant): Removed.
236 (cur_thread): Removed.
237 (block_self, unblock_from_queue): New.
238 (block, timed_block, unblock): Removed.
239 (guilify_self_1, guilify_self_2, do_thread_exit,
240 init_thread_key_once, init_thread_key,
241 scm_i_init_thread_for_guile, get_thread_stack_base,
242 scm_init_guile): New initialisation method.
243 (scm_call_with_new_thread, scm_spawn_thread): Use it to simplify
244 thread creation.
245 (fair_mutex, fat_mutex, etc, fair_condvar, fat_condvar): Renamed
246 "fair" to fat and implemented new semantics, including reliable
247 interruption.
248 (all_threads): Now a pointer to a scm_i_thread, not a SCM.
249 (scm_threads_mark_stacks): Explicitly mark handle.
250 (scm_std_select): Allow interruption by also selecting on the
251 sleep_pipe.
252 (scm_i_thread_put_to_sleep): Handle recursive requests for
253 single-threadedness.
254 (scm_threads_prehistory, scm_init_threads): Put current thread
255 into guile mode via guileify_self_1 and guileify_self_2,
256 respectively.
257
258 * fluid.h (SCM_FLUIDP): Deprecated.
259
260 * coop-threads.c: Removed.
261
262 * continuations.h, continuations.c (scm_with_continuation_barrier,
263 scm_c_with_continuation_barrier, scm_i_with_continuation_barrier):
264 New.
265
266 * async.h, async.c (scm_i_setup_sleep, scm_i_reset_sleep): New.
267 (async_mutex): New.
268 (scm_async_click): Protected with async_mutex. Do not deal with
269 signal_asyncs, which are gone. Set cdr of handled async cell to
270 #f.
271 (scm_i_queue_async_cell): Protected with async_mutex. Interrupt
272 current sleep.
273 (scm_system_async_mark_for_thread): Do not use scm_current_thread
274 since that might not work during early initialization.
275
276 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS, SCM_REDEFER_INTS,
277 SCM_REALLOW_INTS): Deprecated by moving into deprecated.h and
278 deprecated.c. Replaced all uses with SCM_CRITICAL_SECTION_START
279 and SCM_CRITICAL_SECTION_END.
280 (SCM_ENTER_A_SECTION, SCM_EXIT_A_SECTION): Removed. Replaced with
281 SCM_CRITICAL_SECTION_START/END.
282
283 * Makefile.am (modinclude_HEADER): Removed threads-plugin.h.
284 (libguile_la_SOURCES): Added null-threads.c
285 (EXTRA_libguile_la_SOURCES): Removed pthread-threads.c and
286 threads-plugin.c.
287 * pthread-threads.c, threads-plugin.c, threads-plugin.h: Removed.
288
289 * root.h, root.c (scm_tc16_root, SCM_ROOTP, SCM_ROOT_STATE,
290 scm_root_state, scm_stack_base, scm_save_regs_gc_mark,
291 scm_errjmp_bad, scm_rootcont, scm_dynwinds, scm_progargs,
292 scm_last_debug_frame, scm_exitval, scm_cur_inp, scm_outp,
293 scm_cur_err, scm_cur_loadp, scm_root, scm_set_root,
294 scm_make_root): Removed or deprecated. Replaced with references
295 to the current thread, dynamic state, continuation barrier, or
296 some fluid, as appropriate.
297 (root_mark, root_print): Removed.
298 (scm_internal_cwdr): Reimplemented guts with
299 scm_frame_current_dynamic_state and
300 scm_i_with_continuation_barrier.
301 (scm_dynamic_root): Return current continuation barrier.
302
303
304 2005-02-28 Marius Vollmer <mvo@zagadka.de>
305
306 * socket.c (scm_setsockopt): Handle IP_ADD_MEMBERSHIP and
307 IP_DROP_MEMBERSHIP options. Also, reorganized the code a bit for
308 cleanliness.
309 (scm_init_socket): Define IP_ADD_MEMBERSHIP and
310 IP_DROP_MEMBERSHIP.
311 Thanks to Greg Troxel!
312
313 2005-02-27 Mikael Djurfeldt <djurfeldt@nada.kth.se>
314
315 * gh.h: Bugfix: Include <libguile.h> outside of the extern "C"
316 block.
317
318 2005-02-25 Marius Vollmer <mvo@zagadka.de>
319
320 * hashtab.c (scm_i_rehash): Remove elements from old bucket vector
321 so that no two weak alist vectors share a spine.
322 (scm_hash_fn_create_handle_x): Deal with a possible rehashing
323 during GC before inserting the new alist cell.
324
325 2005-02-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
326
327 * hashtab.c (scm_i_rehash): Cope with the case that a GC modifies
328 the hashtable.
329 (scm_hash_fn_create_handle_x): Likewise.
330 * vectors.h (SCM_I_SET_WVECT_TYPE): New, for use in scm_i_rehash.
331
332 2005-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
333
334 * unif.c (prototype_to_type): Bugfix: Don't compare prototype to
335 the prototypical examples mentioned in the old reference manual.
336 Instead keep the old semantics of dispatching on type. (Yes, this
337 is extremely ugly, but the whole point of keeping the deprecated
338 interface is not to break old code.)
339
340 2005-02-08 Mikael Djurfeldt <djurfeldt@nada.kth.se>
341
342 * deprecated.h (SCM_ARRAY_DIMS): Rename scm_i_attay_dims -->
343 scm_i_array_dims.
344
345 2005-01-28 Kevin Ryde <user42@zip.com.au>
346
347 * numbers.c (scm_ash): Rewrite using shifts, much faster than
348 integer-expt and multiply/divide. Inexacts and fractions no longer
349 supported (they happened to work before for left shifts, but not
350 right). Don't really need inexacts and fractions, since ash is
351 documented as a "bitwise operation", and all the rest of those only
352 take exact integers.
353
354 2005-01-27 Han-Wen Nienhuys <hanwen@xs4all.nl>
355
356 * gc-card.c (scm_i_card_statistics): map structs, closures and
357 subrs to one tag.
358
359 * gc.c (s_scm_gc_live_object_stats): return alist, not hashtable.
360 (tag_table_to_type_alist): ignore unknown types.
361
362 * gc-segment.c (scm_i_all_segments_statistics): new function.
363 (scm_i_heap_segment_statistics): new function
364
365 * gc.c (s_scm_gc_live_object_stats): new GUILE callable: return
366 statistics on the number of live objects of each type.
367
368 * gc-card.c (scm_i_tag_name): new function.
369 (scm_i_card_statistics): new function.
370
371 2005-01-24 Kevin Ryde <user42@zip.com.au>
372
373 * posix.c (scm_setlocale): Force errno=EINVAL for an error, since
374 POSIX and C99 don't document errno being set. Reported by Bruno
375 Haible.
376 (scm_flock): Update docstring from manual.
377
378 * random.c (scm_i_init_rstate): Compare w to -1 not 0xffffffffUL, now
379 that it's an scm_t_int32. Otherwise gcc 3.4 says it's always false on
380 a 64-bit system.
381
382 * scmsigs.c (scm_sigaction_for_thread): Use scm_to_long for
383 sa_handler, needs to be a long on 64-bit systems where int is only 32
384 bits.
385
386 2005-01-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
387
388 * environments.c (obarray_enter, obarray_replace): Call
389 SCM_HASHTABLE_INCREMENT when adding a new entry.
390
391 * objects.c: Include goops.h for the scm_class_of prototype.
392
393 * hashtab.c (hashtable_size, HASHTABLE_SIZE_N): Restrict hashtable
394 sizes to be smaller than the maximum lengths of vectors.
395
396 2005-01-18 Marius Vollmer <marius.vollmer@uni-dortmund.de>
397
398 * ports.c, smob.c: Include "libguile/goops.h".
399
400 * objects.h, objects.c, goops.c, goops.h (scm_class_boolean,
401 scm_class_char, scm_class_pair, scm_class_procedure,
402 scm_class_string, scm_class_symbol,
403 scm_class_procedure_with_setter, scm_class_primitive_generic,
404 scm_class_vector, scm_class_null, scm_class_real,
405 scm_class_complex, scm_class_integer, scm_class_fraction,
406 scm_class_unknown, scm_port_class, scm_smob_class,
407 scm_no_applicable_method, scm_class_of): Moved from objects to
408 goops since they are only useable once goops has been loaded.
409 (scm_classes_initialized): Removed.
410 (scm_class_of): Do not check it.
411 (create_standard_classes): Do not set it.
412
413 2005-01-17 Marius Vollmer <marius.vollmer@uni-dortmund.de>
414
415 * objects.h, objects.c (scm_classes_initialized): New.
416 (scm_class_of): Signal error when scm_classes_initialized is zero.
417 * goops.c (create_standard_classes): Set scm_classes_initialized
418 to one.
419
420 * random.c (scm_random_solid_sphere_x): Use
421 scm_c_generalized_vector_length instead of
422 scm_uniform_vector_length.
423
424 2005-01-16 Marius Vollmer <mvo@zagadka.de>
425
426 * script.c (scm_compile_shell_switches): Removed debugging output.
427
428 2005-01-15 Kevin Ryde <user42@zip.com.au>
429
430 * numbers.c (scm_logtest, scm_logbit_p, scm_integer_expt): Update
431 docstrings from manual.
432 * random.c (scm_random_solid_sphere_x): Update docstring from manual.
433
434 2005-01-14 Marius Vollmer <marius.vollmer@uni-dortmund.de>
435
436 * random.c: Don't check for definedness of SCM_HAVE_T_INT64, check
437 its value.
438
439 Implement u64 and s64 uniform numeric vectors with bignums when
440 scm_t_uint64 and scm_t_int64 are not available.
441
442 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_take_u64vector,
443 scm_array_handle_u64_elements,
444 scm_array_handle_u64_writable_elements, scm_u64vector_elements,
445 scm_u64vector_writable_elements): Do not define when scm_t_uint64
446 is not available.
447 (scm_take_s64vector, scm_array_handle_s64_elements,
448 scm_array_handle_s64_writable_elements, scm_s64vector_elements,
449 scm_s64vector_writable_elements): Likewise for scm_t_int64.
450 (uvec_sizes, uvec_print, uvec_equalp): Use SCM bignums when
451 scm_t_int64/scm_t_uint64 are not available.
452 (uvec_mark): New, to mark the bignums.
453 (alloc_uvec): Initialize bignums.
454 (uvec_fast_ref): Return bignums directly.
455 (scm_uint64_min, scm_uint64_max, scm_int64_min, scm_int64_max,
456 assert_exact_integer): New.
457 (uvec_fast_set): Use them to validate the bignums.
458 (scm_init_srfi_4): Set mark function of smob when needed.
459 Initialize scm_uint64_min, scm_uint64_max, scm_int64_min,
460 scm_int64_max.
461
462 Recognize 1.4 -e syntax.
463
464 * script.c (sym_at, sym_atat, sym_main, all_symbols): New.
465 (scm_compile_shell_switches): Use them to recognize and convert
466 1.4 "-e" syntax.
467
468 2005-01-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
469
470 * deprecated.h, deprecated.c, strings.h, strings.c: Turn all
471 deprecated features that once were macros but are now functions
472 back into macros.
473
474 2005-01-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
475
476 * eval.c, debug.h (SCM_WARN_DEPRECATED): New debug option.
477 * deprecation.c (scm_issue_deprecation_warning,
478 scm_c_issue_deprecation_warning_fmt): Use it.
479 (mode): Removed.
480 (print_summary): New.
481 (scm_init_deprecation): Initialize SCM_WARN_DEPRECATED instead of
482 mode.
483
484 Deprecated SCM_ARRAY* macros.
485
486 * unif.h, unif.c, ramap.c, vectors.c, srfi-4.c, srfi-4.i.c
487 (SCM_ARRAYP, SCM_I_ARRAYP): Renamed former to latter internal
488 version. Changed all uses.
489 (scm_tc16_array, scm_i_tc16_array,
490 scm_tc16_enclosed_array, scm_i_tc16_enclosed_array,
491 SCM_ARRAY_FLAG_CONTIGUOUS, SCM_I_ARRAY_FLAG_CONTIGUOUS,
492 SCM_ENCLOSE_ARRAYP, SCM_I_ENCLOSE_ARRAYP,
493 SCM_ARRAY_NDIM, SCM_I_ARRAY_NDIM,
494 SCM_ARRAY_CONTP, SCM_I_ARRAY_CONTP,
495 SCM_ARRAY_MEM, SCM_I_ARRAY_MEM,
496 SCM_ARRAY_V, SCM_I_ARRAY_V,
497 SCM_ARRAY_BASE, SCM_I_ARRAY_BASE,
498 SCM_ARRAY_DIMS, SCM_I_ARRAY_DIMS,
499 scm_t_array, scm_i_t_array): Likewise.
500 (SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG):
501 Moved from unif.h to unif.c.
502 (scm_c_array_rank): New.
503 (scm_array_rank): Reimplement using it.
504
505 * deprecated.h, deprecated.c (SCM_ARRAYP, SCM_ARRAY_NDIM,
506 SCM_ARRAY_CONTP, SCM_ARRAY_MEM, SCM_ARRAY_V, SCM_ARRAY_BASE,
507 SCM_ARRAY_DIMS, scm_t_array): New deprecated versions.
508
509 2005-01-11 Marius Vollmer <mvo@zagadka.de>
510
511 * ramap.c: Replace uses of scm_make_ra with scm_i_make_ra.
512 (GVREF, GVSET): New abbreviations. Use them everywhere instead of
513 scm_c_generalized_vector_ref and scm_cvref, and
514 scm_c_generalized_vector_set_x, respectively.
515 (RVREF, IVDEP, BINARY_ELTS_CODE, BINARY_PAIR_ELTS_CODE,
516 UNARY_ELTS_CODE, UNARY_PAIR_ELTS_CODE): Removed since unused.
517
518 * unif.h, unif.c (indices_to_pos, scm_array_handle_pos): Renamed
519 former to latter and made public. Changed all uses.
520 (scm_i_make_ra): Made public, changed tag param to enclosed flag.
521 (scm_make_ra): Deprecated, changed all uses to scm_i_make_ra.
522 (scm_i_shap2ra): New internal version of scm_shap2ra.
523 (scm_shap2ra): Deprecated, changed all uses to scm_i_shap2ra.
524 (scm_i_ra_set_contp): New internal version of scm_ra_set_contp.
525 (scm_ra_set_contp): Deprecated, changed all uses to
526 scm_i_ra_set_contp.
527 (scm_cvref, scm_aind, scm_raprin1): Deprecated.
528
529 2005-01-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
530
531 * eval.c (scm_eval): Added example to docstring. Thanks to Issac
532 Trotts!
533
534 * unif.c (scm_list_to_typed_array): Allow the specification of the
535 upper bound as well. This is needed for empty arrays.
536 (l2ra): Give needed number of elements in error message.
537 (scm_i_print_array): Print length information for arrays that need
538 it.
539 (scm_i_read_array): Parse it.
540
541 * deprecated.h, deprecated.c (SCM_CHARS, SCM_UCHARS, SCM_LENGTH,
542 scm_i_object_chars, scm_i_object_length): Brought back from the
543 dead.
544
545 2005-01-10 Marius Vollmer <mvo@zagadka.de>
546
547 * ramap.c: Replaced single-index uses of scm_array_set_x with
548 scm_c_generalized_vector_set_x.
549
550 * unif.c (scm_array_rank, scm_array_dimensions,
551 scm_shared_array_offset, scm_shared_array_increments,
552 scm_array_ref, scm_array_set_x): Use scm_t_array_handle operations
553 to simplify code and make it more general.
554 (scm_shared_array_root): Work with all kinds of arrays, including
555 naked vectors.
556 (indices_to_pos): New.
557 (scm_make_shared_array): Use it instead of scm_aind; use handle
558 for oldra.
559
560 2005-01-10 Kevin Ryde <user42@zip.com.au>
561
562 * posix.c (scm_mkstemp): Update docstring from manual.
563
564 * stime.c (scm_mktime): Missing default errno=EINVAL from prev change.
565
566 2005-01-09 Marius Vollmer <mvo@zagadka.de>
567
568 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_i_uniform_vector_ref_proc,
569 scm_i_uniform_vector_set_proc): New.
570 (u8ref, u8set, s8ref, s8set, etc): New.
571 (uvec_reffers, uvec_setters): New.
572 (uvec_to_list): Use generic scm_array_handle_ref instead of
573 uvec_fast_ref since scm_array_handle_ref should be faster now.
574 (coerce_to_uvec, scm_c_uniform_vector_ref,
575 scm_c_uniform_vector_set_x): Likewise.
576
577 * unif.h, unif.c, inline.h (scm_i_t_array_ref, scm_i_t_array_set):
578 New.
579 (scm_t_array_handle): Added ref, set, elements and
580 writable_elements for fast inline operation of
581 scm_array_handle_ref and scm_array_handle_set.
582 (scm_array_handle_ref, scm_array_handle_set): Moved to inline.h
583 and replaced with inline code that simply calls the ref/set
584 members of the handle.
585 (enclosed_ref, vector_ref, string_ref, bitvector_ref, memoize_ref,
586 enclosed_set, vector_set, string_set, bitvector_set, memoize_set):
587 New.
588 (scm_array_handle_get): Initialize ref/set fields to memoize_ref
589 and memoize_set.
590 (scm_bitvector_fill_x, scm_bitvector_to_list, scm_bit_count,
591 scm_bit_position, scm_bit_set_star_x, scm_bit_count_star,
592 scm_bit_invert_x): Correctly multiply index with increment in the
593 general case.
594
595 * unif.c (scm_array_handle_set): Correctly execute only one
596 alternative. D'Oh!
597 (scm_list_to_typed_array, l2ra): Use scm_t_array_handle to fill
598 the array; this covers all cases with much simpler code.
599
600 * srfi-4.c (scm_uniform_element_size): Deprecated implementation
601 as well.
602
603 2005-01-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
604
605 * srfi-4.c (uvec_type): New.
606 (uvec_to_list, uvec_ref, uvec_set_x, scm_c_uniform_vector_ref,
607 scm_c_uniform_vector_x): Use it to get concrete type.
608
609 * unif.h (scm_t_array_dim): Changed type of members to ssize_t, to
610 fit the docs.
611
612 * unif.c (ra2l): Handle zero rank arrays.
613 (scm_i_print_array): Print zero rank arrays specially.
614 (tag_to_type): Return #t for an empty tag, not the empty symbol.
615 (scm_i_read_array): Allow zero rank arrays.
616
617 2005-01-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
618
619 * hashtab.h, hashtab.c (SCM_HASHTAB_BUCKET_LOC): Removed.
620 (scan_weak_hashtables): Rewrote its use with SCM_HASHTAB_BUCKET
621 and SCM_SET_HASHTAB_BUCKET.
622
623 * print.h, print.c (scm_print_state, SCM_PRINT_STATE_LAYOUT):
624 Removed ref_stack field.
625 (PSTATE_STACK_REF, PSTATE_STACK_SET): New, for accessing the stack
626 of a print state. Use them everywhere instead of ref_stack.
627
628 * srfi-4.h (scm_uniform_element_size): Deprecated for real.
629
630 * srfi-4.c: Include deprecation.h.
631
632 * vectors.h, vectors.c, unif.h, unif.c, deprecated.h,
633 deprecated.c, eq.c
634 (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR): Removed.
635 (scm_vector_elements, scm_vector_writable_elements,
636 scm_generalized_vector_get_handle): Moved to vectors.[hc] from
637 unif.[hc].
638 (SCM_SIMPLE_VECTOR_LOC): Removed.
639 (SCM_VECTOR_MAX_LENGTH, SCM_VECTOR_LENGTH, SCM_VELTS,
640 SCM_WRITABLE_VELTS, SCM_VECTOR_REF, SCM_VECTOR_SET,
641 scm_vector_equal_p): Moved from vectors.[hc] to deprecated.[hc].
642 (scm_vector_equal_p, scm_i_vector_equal_p): Renamed former to
643 latter. Changed use in eq.c.
644
645 2005-01-07 Marius Vollmer <mvo@zagadka.de>
646
647 Make the uniform vector routines also deal with one dimensional
648 arrays.
649
650 * srfi-4.c (SCM_IS_UVEC): New, use it instead of
651 SCM_SMOB_PREDICATE in this file.
652 (is_uvec): Also recognize one-dimensional uniform numeric arrays
653 of the right type.
654 (scm_is_uniform_vector): Likewise.
655 (uvec_fast_ref): Made BASE param const.
656 (uvec_writable_elements, uvec_elements): New.
657 (uvec_to_list, uvec_ref, uvec_set_x, uvec_length,
658 scm_c_uniform_vector_length, scm_c_uniform_vector_ref,
659 scm_c_uniform_set_x): Use them to also deal with one-dimensional
660 arrays.
661 (scm_uniform_vector_ref, scm_uniform_vector_set_x): Deprecate old
662 argument convention.
663 (scm_uniform_vector_to_list): Let uvec_to_list do all the
664 checking.
665 (scm_uniform_vector_length): Use uvec_length.
666
667 2005-01-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
668
669 * srfi-4.h, srfi-4.c (scm_c_uniform_vector_element_size,
670 scm_c_uniform_vector_size): Removed.
671 (scm_array_handle_uniform_element_size): New.
672
673
674 * unif.h (scm_array_handle_ref, scm_array_handle_set): Changed
675 type of POS parameter to be signed, positions can be negative.
676 (scm_array_handle_release): New, changed all uses of
677 scm_t_array_handle to properly call it.
678 (scm_vector_get_handle, scm_generalized_vector_get_handle):
679 Renamed former to latter, changed all uses.
680
681 2005-01-05 Marius Vollmer <mvo@zagadka.de>
682
683 Updated bitvector routines to also use scm_t_array_handles.
684
685 * unif.h (scm_bitvector_elements,
686 scm_bitvector_writable_elements): Use a scm_t_array_handle and
687 deliver offset, length and increment to caller. Changed all uses.
688 (scm_bitvector_release_elements,
689 scm_frame_bitvector_release_elements,
690 scm_bitvector_release_writable_elements,
691 scm_frame_bitvector_release_writable_elements): Removed.
692 (scm_array_handle_bit_elements,
693 scm_array_handle_bit_writable_elements,
694 scm_array_handle_bit_elements_offset): New.
695 (scm_make_typed_array): The special value for non-initialized
696 arrays is now SCM_UNSPECIFIED. The old special value SCM_BOOL_F
697 was a valid value to fill bitvectors with, so it can't really be
698 specialed out.
699
700 2005-01-04 Kevin Ryde <user42@zip.com.au>
701
702 * stime.c (scm_strftime): Free t.tm_zone produced by bdtime2c.
703 Reported by Bill Schottstaedt.
704
705 2005-01-02 Marius Vollmer <mvo@zagadka.de>
706
707 * sort.c (quicksort): Added INC parameter for non-contigous
708 vectors.
709 (quicksort1): New, for contigous vectors. Both functions are
710 generated from the same code by including "quicksort.i.c".
711 (scm_restricted_vector_sort_x): Call one of quicksort and
712 quicksort1, depending on increment of vector.
713 (scm_sort): Simply call scm_sort_x on a copy of the list or
714 vector.
715 (scm_merge_vector_x, scm_merge_vector_step): Changed indices to
716 size_t, added inc parameter.
717 (scm_stable_sort_x): Allocate temporary storage as Scheme vector
718 so that it doesn't leak.
719 (scm_stable_sort): Simply call scm_stable_sort_x on a copy of the
720 list or vector.
721
722 * ramap.c (scm_array_map_x): Do not try to convert fill value
723 before filling, any necessary conversion is done while storing.
724
725 * gc-card.c (scm_i_sweep_card): Call scm_i_vector_free instead of
726 doing it inline.
727
728 * hashtab.c, hashtab.h (SCM_HASHTABLE_BUCKETS): Removed.
729 (SCM_HASHTABLE_BUCKET, SCM_HASHTABLE_BUCKET_LOC): New. Replaced
730 all uses of SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET.
731
732 * tags.h, weaks.c, vports.c, hashtab.c, convert.c, sort.c,
733 convert.c, convert.h, convert.i.c, deprecated.c, environments.c,
734 eval.c, filesys.c, fluids.c, gc-mark.c, gh.h, gh_data.c, goops.c,
735 hash.c, init.c, libguile_la-arrays.loT, modules.c, net_db.c,
736 objects.c, ports.c, posix.c, print.c, random.c, read.c,
737 regex-posix.c, scmsigs.c, socket.c, stime.c, symbols.c: Use new
738 vector elements API or simple vector API, as appropriate. Removed
739 SCM_HAVE_ARRAYS ifdefery. Replaced all uses of
740 SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET.
741
742 * srfi-4.h, srfi-4.c,
743 srfi-4.i.c (scm_array_handle_uniform_elements,
744 scm_array_handle_uniform_writable_elements,
745 scm_uniform_vector_elements,
746 scm_uniform_vector_writable_elements):
747 (scm_<foo>vector_elements, scm_<foo>vector_writable_elements): Use
748 scm_t_array_handle, deliver length and increment.
749 (scm_array_handle_<foo>_elements,
750 scm_array_handle_<foo>_writable_elements): New.
751
752 * gen-scmconfig.h.in (SCM_I_GSC_HAVE_ARRAYS): Removed.
753 * gen-scmconfig.c: Hard code SCM_HAVE_ARRAYS to "1".
754
755 * unif.h, unif.c (scm_t_array_handle, scm_array_get_handle,
756 scm_array_handle_rank, scm_array_handle_dims, scm_array_handle_ref
757 scm_array_handle_set, scm_array_handle_elements
758 scm_array_handle_writable_elements, scm_vector_get_handle): New.
759 (scm_make_uve, scm_array_prototype, scm_list_to_uniform_array,
760 scm_dimensions_to_uniform_array): Deprecated for real.
761 (scm_array_p, scm_i_array_p): Use latter for SCM_DEFINE since
762 snarfing wont allow a mismatch between C and Scheme arglists.
763 (scm_make_shared_array, scm_enclose_array): Correctly use
764 scm_c_generalized_vector_length instead of
765 scm_uniform_vector_length.
766
767 * validate.h (SCM_VALIDATE_VECTOR,
768 SCM_VALIDATE_VECTOR_OR_DVECTOR): use scm_is_simple_vector instead
769 of SCM_VECTORP.
770
771 * weaks.h, weaks.c: Use new internal weak vector API from
772 vectors.h.
773
774 * Makefile.am (libguile_la_SOURCES, DOT_X_FILES, DOT_DOC_FILES,
775 EXTRA_libguile_la_SOURCES): Changed ramap.c and unif.c from being
776 'extra' to being regular sources.
777 (noinst_HEADERS): Added quicksort.i.c.
778 * quicksort.i.c: New file.
779
780 * vectors.h, vector.c (SCM_VECTORP, SCM_VECTOR_LENGTH, SCM_VELTS,
781 SCM_WRITABLE_VELTS, SCM_VECTOR_REF, SCM_VECTOR_SET): Deprecated
782 and reimplemented. Replaced all uses with scm_vector_elements,
783 scm_vector_writable_elements, or SCM_SIMPLE_VECTOR_*, as
784 appropriate.
785 (scm_is_simple_vector, SCM_SIMPLE_VECTOR_LENGTH,
786 SCM_SIMPLE_VECTOR_REF, SCM_SIMPLE_VECTOR_SET,
787 SCM_SIMPLE_VECTOR_LOC): New.
788 (SCM_VECTOR_BASE, SCM_SET_VECTOR_BASE, SCM_VECTOR_MAX_LENGTH,
789 SCM_MAKE_VECTOR_TAG, SCM_SET_VECTOR_LENGTH,
790 SCM_VELTS_AS_STACKITEMS, SCM_SETVELTS, SCM_GC_WRITABLE_VELTS):
791 Removed.
792 (scm_vector_copy): New.
793 (scm_vector_elements, scm_vector_writable_elements): Use
794 scm_t_array_handle, deliver length and increment. Moved to
795 unif.h. Changed all uses.
796 (scm_vector_release_elements,
797 scm_vector_release_writable_elements,
798 (scm_frame_vector_release_elements,
799 scm_frame_vector_release_writable_elements): Removed.
800 (SCM_I_IS_VECTOR, SCM_I_VECTOR_ELTS, SCM_I_VECTOR_WELTS,
801 SCM_I_VECTOR_LENGTH, scm_i_vector_free): New internal API.
802 (SCM_I_WVECTP SCM_I_WVECT_LENGTH SCM_I_WVECT_VELTS
803 SCM_I_WVECT_GC_WVELTS SCM_I_WVECT_TYPE SCM_I_WVECT_GC_CHAIN
804 SCM_I_SET_WVECT_GC_CHAIN, scm_i_allocate_weak_vector): New, for
805 weak vectors.
806
807 2004-12-29 Marius Vollmer <mvo@zagadka.de>
808
809 No longer use creators to specify the type of an array. Creators
810 expose the fact that arrays are wrapped around vectors, but that
811 might change.
812
813 * srfi-4.h (scm_i_proc_make_u8vector, scm_i_proc_make_s8vector,
814 scm_i_proc_make_u16vector, scm_i_proc_make_s16vector,
815 scm_i_proc_make_u32vector, scm_i_proc_make_s32vector,
816 scm_i_proc_make_u64vector, scm_i_proc_make_s64vector,
817 scm_i_proc_make_f32vector, scm_i_proc_make_f64vector,
818 scm_i_proc_make_c32vector, scm_i_proc_make_c64vector,
819 uvec_proc_vars): Removed.
820 (scm_i_generalized_vector_creator): Removed.
821 (scm_i_generalized_vector_type): New.
822
823 * unif.h, unif.c (scm_typed_array_p, scm_make_array,
824 scm_make_typed_array, scm_array_type, scm_list_to_array,
825 scm_list_to_typed_array, scm_is_array, scm_is_typed_array): New.
826 (scm_array_creator): Removed.
827 (scm_array_p): Deprecated second PROT argument.
828 (scm_dimensions_to_uniform_array, scm_list_to_uniform_array):
829 Deprecated, reimplemented in terms of scm_make_typed_array and
830 scm_list_to_typed_array.
831 (scm_i_proc_make_vector, scm_i_proc_make_string,
832 scm_i_proc_make_bitvector): Removed.
833 (type_creator_table, init_type_creator_table, type_to_creator,
834 make_typed_vector): New.
835 (scm_i_convert_old_prototype): Removed.
836 (prototype_to_type): New.
837 (scm_make_uve): Deprecated, reimplemented using make_typed_vector.
838 (scm_array_dimensions): Use scm_list_1 instead of scm_cons for
839 minor added clarity.
840 (scm_make_shared_array, scm_ra2contig): Use make_typed_vector
841 instead of scm_make_uve.
842 (tag_creator_table, scm_i_tag_to_creator): Removed.
843 (tag_to_type): New.
844 (scm_i_read_array): Use scm_list_to_typed_array instead of
845 scm_list_to_uniform_array.
846
847 2004-12-27 Marius Vollmer <mvo@zagadka.de>
848
849 * unif.h, unif.c (scm_bitvector_elements): Made return value "const".
850 (scm_bitvector_writable_elements): New.
851 (scm_bitvector_release, scm_bitvector_release_elements):
852 Renamed former to latter. Added explicit call to
853 scm_remember_upto_here_1.
854 (scm_frame_bitvector_release,
855 scm_frame_bitvector_release_elements): Renamed former to latter.
856 (scm_bitvector_release_writable_elements,
857 scm_bitvector_release_writable_elements): New.
858 Changed all uses as required by the changes above.
859
860 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_uniform_vector_elements,
861 scm_u8vector_elements, etc): Made return value "const".
862 (scm_uniform_vector_writable_elements,
863 scm_u8vector_writable_elements, etc): New.
864 (scm_uniform_vector_release, scm_uniform_vector_release_elements):
865 Renamed former to latter. Added explicit call to
866 scm_remember_upto_here_1.
867 (scm_frame_uniform_vector_release,
868 scm_frame_uniform_vector_release_elements): Renamed former to latter.
869 (scm_uniform_vector_release_writable_elements,
870 scm_frame_uniform_vector_release_writable_elements): New. Takes
871 crown of longest identifier yet.
872 Changed all uses as required by the changes above.
873
874 * vectors.h, vectors.c (scm_c_vector_set_x): Make return type
875 void.
876 (scm_is_vector, scm_vector_p, scm_vector_length,
877 scm_c_vector_length, scm_vector_ref, scm_c_vector_ref,
878 scm_vector_set_x, scm_c_vector_set_x, scm_vector_to_list,
879 scm_vector_move_left_x, scm_vector_move_right_x,
880 scm_vector_fill_x): handle one-dimensional arrays.
881 (scm_vector_elements, scm_vector_release_elements,
882 scm_vector_frame_release_elements, scm_vector_writable_elements,
883 scm_vector_release_writable_elements,
884 scm_vector_frame_release_writable_elements): New.
885 (scm_list_to_vector, scm_vector_to_list, scm_vector_fill,
886 scm_vector_move_left_x, scm_vector_move_right_x): Use them.
887
888 * ramap.c (scm_ramapc, scm_raeql): Use
889 scm_c_generalized_vector_length instead of
890 scm_uniform_vector_length.
891 (scm_ramap, rafe): Use scm_c_vector_ref instead of SCM_VELTS. use
892 scm_c_generalized_vector_ref instead of scm_uniform_vector_ref.
893
894 2004-12-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
895
896 * continuations.h, continuations.c (scm_t_contregs): New 'offset'
897 member for relocating debug frames.
898 (scm_make_continuation): Set it.
899
900 * stacks.c (read_frame, read_frames, scm_make_stack,
901 scm_last_stack_frame, scm_stack_id): Use the new 'offset' member
902 of continuations instead of calculating the offset ourselves.
903 Relocate 'vect' member of scm_t_debug_frame.
904
905 2004-12-16 Kevin Ryde <user42@zip.com.au>
906
907 * ramap.c (scm_array_map_x): Check for at least one source argument.
908
909 2004-12-14 Kevin Ryde <user42@zip.com.au>
910
911 * srfi-13.c (string-any, string-every): Use a scheme wrapper around
912 the C code so for the final call to the predicate procedure is a tail
913 call, per SRFI-13 spec.
914
915 2004-12-10 Kevin Ryde <user42@zip.com.au>
916
917 * eq.c (scm_eq_p, scm_eqv_p, scm_equal_p): Update docstrings from
918 recent revision to the reference manual.
919
920 * numbers.c (scm_modulo): Amend fixme comment about negative divisor
921 with "%", C99 says it's well-defined.
922
923 * socket.c (scm_from_ipv6): Just use mpz_import. Don't bother trying
924 to fit scm_from_ulong_long, since that uses mpz_import anyway. Don't
925 bother trying to fit scm_from_ulong, not really worth the trouble if
926 addresses are more than 4 bytes usually.
927
928 2004-11-30 Kevin Ryde <user42@zip.com.au>
929
930 * gc_os_dep.c (NetBSD): Test __m68k__ and __arm__ as well as m68k and
931 arm32. Reported by Greg Troxel.
932
933 2004-11-14 mvo <mvo@zagadka.de>
934
935 * unif.c, unif.h (scm_i_cvref): Made non-static for ramap.c.
936
937 * Makefile.am (INCLUDES): It is "@LTDLINCL@", not "@LTDLINC@".
938
939 2004-11-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
940
941 Enclosed arrays are now their own smob. This has been done to
942 make the code more explicit about them and to prepare for the time
943 when generalized vectors include arbitrary one-dimensional
944 arrays. (Uptonow, enclosed arrays have been recognized by their
945 use of an array as their storage 'vector'. When all generalized
946 vectors are allowed as storage, including one-dimensional arrays,
947 this will no longer work.)
948
949 * unif.h, unif.c: (scm_tc16_enclosed_array, SCM_ENCLOSED_ARRAYP):
950 New.
951 (exactly_one_third, singp): Removed.
952 (scm_array_p, scm_array_dimensions, scm_shared_array_root,
953 scm_shared_array_offset, scm_shared_array_increments): Handle
954 enclosed arrays explicitely.
955 (scm_array_rank): Likewise. Also, do not return zero for
956 non-arrays, signal an error instead since arrays with rank zero do
957 exist.
958 (scm_i_make_ra): New, for specifying the tag of the new array.
959 (scm_make_enclosed_array): Use it.
960 (scm_make_ra): Reimplemented in terms of scm_i_make_ra.
961 (scm_make_shared_array): Use scm_c_generalized_vector_length
962 instead of scm_uniform_vector_length.
963 (scm_array_in_bounds_p): Rewritten to be much cleaner.
964 (scm_i_cvref): New, doing the job of scm_cvref.
965 (scm_cvref): Use scm_i_cvref.
966 (scm_array_ref): Do not accept non-arrays when no indices are
967 given. Use scm_i_cvref to do the actual access.
968 ("uniform-array-set1"): Do not register.
969 (scm_array_set_x, scm_uniform_array_read_x,
970 scm_uniform_array_write): Handle enclosed arrays explicitly.
971 (ra2l): Use scm_i_cvref instead of scm_uniform_vector_ref to also
972 handle enclosed arrays.
973 (scm_array_to_list): Handle enclosed arrays explicitly.
974 (rapr1): Removed.
975 (scm_i_print_array_dimension): Use scm_i_cvref to also handle
976 enclosed arrays.
977 (scm_i_print_enclosed_array): New.
978 (tag_proto_table, tag_creator_table): Renamed former to latter.
979 Added "a" and "b" for strings and bitvectors, resp.
980 (scm_i_tag_to_prototype, scm_i_tag_to_creator): Renamed former to
981 latter. Tag "a" is in the table now, no need to handle it as a
982 legacy tag.
983 (scm_raprin1): Just call scm_iprin1.
984 (scm_array_creator, scm_array_prototype): Handle enclosed arrays
985 explicitly.
986 (scm_init_unif): Initialize scm_tc16_enclosed_array smob.
987 Use scm_i_print_array as printer for scm_tc16_array.
988
989 2004-11-10 Marius Vollmer <mvo@zagadka.de>
990
991 * ramap.c (cind): Changed second arg to be pointer to long instead
992 of uniform vector.
993 (scm_ramapc): Allocate index vector with scm_malloc and not as
994 uniform vector. Wrap it in a frame so that it gets properly freed.
995 (scm_array_index_map_x): Likewise.
996
997 * unif.c: Changed all uses of scm_array_prototype to
998 scm_array_creator. (scm_i_get_old_prototype): Signal error when no
999 prototype is known.
1000 (scm_uniform_array_read_x, scm_uniform_array_write): Reimplemented
1001 in terms of scm_uniform_vector_read_x and
1002 scm_uniform_vector_write, respectively. Strings and
1003 bitvector support has been dropped.
1004
1005 * srfi-4.h, srfi-4.c: Do not include <libguile.h>, include the
1006 needed files directly. Include config.h, <unistd.h> and <io.h>
1007 when available.
1008 (scm_uniform_vector_read_x, scm_uniform_vector_write): New.
1009
1010 2004-11-09 Marius Vollmer <mvo@zagadka.de>
1011
1012 * gh_data.c (gh_uniform_vector_length): Properly use
1013 scm_c_uniform_vector_length instead of scm_uniform_vector_length.
1014
1015 2004-11-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1016
1017 * srfi-4.h (scm_c_uniform_vector_ref, scm_c_uniform_vector_set_x):
1018 New.
1019 (scm_i_uniform_vector_creator): Removed.
1020 (scm_i_generalized_vector_creator): New.
1021 (scm_uniform_vector_length, scm_uniform_element_size): Do not
1022 handle generalized vectors, only uniform numeric vectors.
1023 (alloc_uvec): Do length check here...
1024 (make_uvec): ...but not here.
1025 (coerce_to_uvec): Use new generalized vector functions to handle
1026 all kinds of vectors in one go.
1027
1028 * tags.h (scm_tc7_bvect): Renamed to scm_tc7_unused7, renaming the
1029 remaining scm_tc7_unused tags to get a neatly ordered list.
1030
1031 * eq.c, evalext.c, gc-card.c, gc-mark.c, objects.c, print.c: Do no
1032 longer handle scm_tc7_bvect bitvectors.
1033
1034 * ramap.c: Use the new generalized vector functions to handle all
1035 vector like things.
1036
1037 * vectors.h, vectors.c (scm_is_vector, scm_c_vector_length,
1038 scm_c_vector_ref, scm_c_vector_set_x, scm_generalized_vector_p,
1039 scm_generalized_vector_length, scm_generalized_vector_ref,
1040 scm_generalized_vector_set_x, scm_generalized_vector_to_list,
1041 scm_is_generalized_vector, scm_c_generalized_vector_length,
1042 scm_c_generalized_vector_ref, scm_c_generalized_vector_set_x):
1043 New.
1044
1045 * unif.h, unif.c (scm_bitvector_p, scm_bitvector,
1046 scm_make_bitvector, scm_bitvector_length, scm_bitvector_ref,
1047 scm_bitvector_set_x, scm_list_to_bitvector, scm_bitvector_to_list,
1048 scm_bitvector_fill_x, scm_is_bitvector, scm_c_make_bitvector,
1049 scm_c_bitvector_length, scm_c_bitvector_ref,
1050 scm_c_bitvector_set_x, scm_bitvector_elements,
1051 scm_bitvector_release, scm_frame_bitvector_release,
1052 scm_tc16_bitvector, bitvector_free, bitvector_print,
1053 bitvector_equalp, count_ones, find_first_one): New.
1054 (scm_bit_count, scm_bit_position, scm_bit_set_star_x,
1055 scm_bit_count_star, scm_bit_invert_x, scm_istr2bve): Rewritten
1056 using the new C API for bitvectors and maybe count_ones or
1057 find_first_one, as appropriate.
1058 (SCM_I_MAX_LENGTH, SCM_BITVECTOR_P, SCM_BITVECTOR_BASE,
1059 SCM_SET_BITVECTOR_BASE, SCM_BITVECTOR_MAX_LENGTH,
1060 SCM_BITVECTOR_LENGTH, SCM_MAKE_BITVECTOR_TAG,
1061 SCM_SET_BITVECTOR_LENGTH): Removed. Replaced all uses with the
1062 new functions from above.
1063 (scm_i_proc_make_vector, scm_i_proc_make_string,
1064 scm_i_proc_make_bitvector): Made non-static for use in
1065 scm_i_generalized_vector_creator.
1066 (scm_make_u1vector): Removed, replaced by scm_make_bitvector.
1067 (scm_make_uve): Validate that the created object is a generalized
1068 vector.
1069 (scm_i_legacy_tag): Removed.
1070 (scm_i_print_array): Do it here.
1071 (scm_raprin1): Only print enclosed arrays.
1072
1073 * Makefile.am (DOT_DOC_FILES): Added srfi-4.doc.
1074
1075 2004-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1076
1077 * srfi-4.c (make_uvec): Use SCM_I_SIZE_MAX instead of SIZE_MAX for
1078 added portability.
1079
1080 * chars.c (scm_charnames, scm_charnums): Added "sp" as an alias
1081 for "space". Thanks to Bruce Korb!
1082
1083 * rw.c (scm_read_string_x_partial): Bugfix, apply offset to dest
1084 only after dest has been set. Thanks to Hyper Division!
1085
1086 * gh_data.c (gh_uniform_vector_length): Use
1087 scm_uniform_vector_length instead of SCM_UVECTOR_LENGTH.
1088
1089 2004-11-03 Marius Vollmer <mvo@zagadka.de>
1090
1091 * unif.h (SCM_UVECTOR_BASE, SCM_SET_UVECTOR_BASE,
1092 SCM_UVECTOR_MAXLENGTH, SCM_UVECTOR_LENGTH, SCM_MAKE_UVECTOR_TAG,
1093 SCM_SET_UVECTOR_LENGTH): Removed.
1094
1095 2004-11-02 Marius Vollmer <mvo@zagadka.de>
1096
1097 Mac OS X and OpenBSD compatibility patches from Andreas Vögele.
1098 Thanks!
1099
1100 * backtrace.c (scm_display_backtrace_with_highlights): Join the
1101 first and the second line of the SCM_DEFINE macro call, since old
1102 preprocessors cannot handle definitions that are split into two
1103 lines.
1104
1105 * inline.h (scm_cell, scm_double_cell): Don't use C99 variable
1106 declarations.
1107
1108 * pairs.c (scm_i_chase_pairs): Replace scm_t_bits with
1109 scm_t_uint32 to fix the mismatch between the function declaration
1110 and definition.
1111
1112 * sort.c (quicksort): Don't use C99 variable declarations.
1113
1114 * srfi-4.c (uvec_fast_ref): Avoid a compiler warning by returning
1115 SCM_BOOL_F if no type matches.
1116
1117 * threads.c (thread_print): Cast a pointer to size_t when printing
1118 with scm_uintprint.
1119
1120 * unif.c (scm_i_tag_to_prototype): Make sure that "instead" gets
1121 defined.
1122 (scm_array_prototype): Deprecated.
1123
1124 2004-11-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1125
1126 * srfi-4.h, srfi-4.c (scm_frame_uniform_vector_release): New.
1127 * unif.c (scm_bit_set_star_x, scm_bit_count_star_x): Use it to get
1128 more efficient access to the u32vector.
1129
1130 * tags.h (scm_tc7_llvect, scm_tc7_uvect, scm_tc7_fvect,
1131 scm_tc7_dvect, scm_tc7_cvect, scm_tc7_svect, scm_tc7_byvect,
1132 scm_tc7_ivect): Renamed to scm_tc7_unused_1 to scm_tc7_unused_8.
1133
1134 * validate.h (SCM_VALIDATE_VECTOR_OR_DVECTOR): Accept f64vectors
1135 instead of the old-style dvectors.
1136
1137 * gh_data.c: Use new-style uniform arrays in place of old-style
1138 ones.
1139
1140 * eq.c, evalext.c, gc-card.c, gc-mark.c, objects.c, print.c,
1141 ramap.c, unif.c: Do no longer handle old-style uniform vectors.
1142
1143 * unif.c (scm_bit_set_star_x, scm_bit_count_star_x): Use u32vectors
1144 instead of old-sytle uvectors.
1145
1146 * convert.c, convert.i.c: Rewritten completely, using
1147 scm_any_to_u8vector, etc and other new-style uniform vector
1148 functions.
1149
1150 * random.c (scm_random_solid_sphere_x,
1151 scm_random_hollow_sphere_x): Do not validate vector argument, this
1152 is already done elsewhere.
1153
1154 * srfi-4.h, srfi-4.i.c, srfi-4.c (coerce_to_uvec,
1155 scm_any_to_u8vector, etc): New.
1156 (scm_uniform_element_size, scm_uniform_vector_length): Do no
1157 longer handle old-style uniform vectors.
1158
1159 * read.c (scm_lreadr): Bugfix: include the last bit in the
1160 bit vector.
1161
1162 2004-10-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1163
1164 * unif.h, unif.c (scm_array_creator): New.
1165 (scm_i_get_old_prototype): New.
1166 (scm_array_prototype): use it to return old-style prototype, never
1167 return creators.
1168 (scm_make_uve): Use scm_call_1 instead of scm_call_2 with a second
1169 arg of SCM_UNDEFINED. The latter is wrong.
1170
1171 * unif.h, unif.c (scm_make_u1vector): New, but only temporary.
1172 (make_uve): Removed.
1173 (scm_i_proc_make_vector, scm_i_proc_make_string,
1174 scm_i_proc_make_u1vector): New.
1175 (scm_init_unif): Initialize them.
1176 (scm_i_convert_old_prototype): New.
1177 (scm_make_uve): Use it to get the creator procedure. Removed all
1178 old code that created old-style uniform vectors.
1179 (scm_array_p): Handle generic vectors.
1180 (scm_dimensions_to_uniform_array): Do not fill new array with
1181 prototype when that is a procedure.
1182 (scm_list_to_uniform_array): Also accept a list of lower bounds as
1183 the NDIM argument.
1184 (scm_i_print_array): Print rank for shared or non-zero-origin
1185 vectors.
1186 (tag_proto_table, scm_i_tag_to_prototype, scm_i_read_array): New.
1187 (scm_raprin1): Do not call scm_i_array_print for enclosed arrays,
1188 which I do not understand yet.
1189 (scm_array_prototype): Explicitely handle generic vectors.
1190
1191 * numbers.c, number.h (scm_i_print_complex, icmplx2str): New.
1192 (iflo2str): Use icmplx2str for complex numbers.
1193
1194 * srfi-4.c, srfi-4.h (scm_i_read_homogenous_vector,
1195 scm_i_uniform_vector_prototype): Removed.
1196 (scm_i_uniform_vector_creator): New.
1197 (SCM_UVEC_C32, scm_c32vector, scm_make_c32vector, etc,
1198 SCM_UVEC_C64, scm_c64vector, scm_make_c64vector, etc): New.
1199 Updated all tables and generic functions to support them.
1200 (scm_i_proc_make_u8vector, scm_i_proc_make_s8vector, etc): New.
1201 (scm_init_srfi_4): Initialize them.
1202
1203 * srfi-4.i.c (scm_take_u8vector, etc): use uvec_sizes instead of
1204 sizeof(CTYPE) as explained in the comment.
1205
1206 * read.c (scm_lreadr): Call scm_i_read_array for all characters
1207 following '#' that can start an array. Explicitely disambiguate
1208 'i' and 'e' between introducing numbers and uniform vectors. Do
1209 not call scm_i_read_homogenous_vector, since that is also handled
1210 by scm_i_read_array now.
1211
1212 2004-10-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1213
1214 First cut at integrating uniform vectors from srfi-4 with the rest
1215 of Guile. This change replaces scm_tc7_byvect with a s8 uniform
1216 vector. The plan is to gradually replace one type after the other
1217 until none is left and then to consider general cleanups and
1218 optimizations.
1219
1220 * srfi-4.h, srfi-4.i.c (scm_u8vector_elements, etc): New.
1221
1222 * srfi-4.h, srfi-4.c (scm_uniform_vector_p,
1223 scm_uniform_vector_ref, scm_uniform_vector_set_x,
1224 scm_uniform_vector_to_list, scm_is_uniform_vector,
1225 scm_c_uniform_vector_lengths, scm_c_uniform_vector_size,
1226 scm_uniform_vector_elements, scm_uniform_vector_element_size,
1227 scm_uniform_vector_release): New.
1228 (scm_i_uniform_vector_prototype, scm_i_uniform_vector_tag): New.
1229 (scm_uniform_element_size, scm_uniform_vector_length): Moved here
1230 from unif.h, unif.c and extended to handle both the old and new
1231 uniform vectors.
1232
1233 * tags.h (scm_tc7_byvect): Commented out.
1234
1235 * unif.h, unif.c (scm_uniform_vector_ref, scm_array_ref): Renamed
1236 the former to the latter.
1237 (scm_uniform_vector_length, scm_uniform_element_size): Moved to
1238 srfi-4.h, srfi-4.c.
1239 (scm_make_uve): Call scm_make_s8vector for #\nul prototype.
1240 (scm_array_p, scm_array_rank, scm_array_dimensions,
1241 scm_transpose_array, scm_enclose_array, scm_array_ref, scm_cvref,
1242 scm_array_set_x, scm_array_contents, scm_uniform_array_read_x,
1243 scm_array_to_list, scm_array_prototype): Handle srfi-4 uniform
1244 vectors. Removed code for scm_tc7_byvect.
1245 (scm_dimensions_to_uniform_array): Fill array with 0 when
1246 prototype is #\nul.
1247 (scm_i_print_array_dimension, scm_i_legacy_tag,
1248 scm_i_print_array): New.
1249 (scm_raprin1): Call scm_i_print_array for arrays. Removed code
1250 for scm_tc7_byvect.
1251
1252 * ramap.c (scm_ra_matchp, scm_array_fill_int, racp,
1253 scm_array_index_map_x, raeql_1, scm_array_equal_p): Handle srfi-4
1254 uniform vectors. Removed code for scm_tc7_byvect
1255
1256 * print.c (iprin1): Removed code for scm_tc7_byvect.
1257 * objects.c (scm_class_of): Likewise.
1258 * gc-mark.c (scm_gc_mark_dependencies): Likewise.
1259 * gc-card.c (scm_i_sweep_card): Likewise.
1260 * evalext.c (scm_self_evaluating_p): Likewise.
1261 * eq.c (scm_equal_p): Likewise.
1262
1263 * gh_data.c (gh_chars2byvect): Reimplemented with
1264 scm_make_s8vector.
1265 (gh_scm2chars): Handle s8vectors, removed code for scm_tc7_byvect.
1266
1267 * srfi-4.c (take_uvec): New.
1268 (alloc_uvec): Use it.
1269 * srfi-4.h, srfi-4.i.c (scm_take_u8vector, etc): New.
1270
1271 * random.c (vector_scale, vector_scale_x): Renamed former to the
1272 latter, since it modifies its argument.
1273 (vector_scale_x, vector_sum_squares, scm_random_normal_vector_x):
1274 Do not use scm_universal_vector_length for non-uniform vectors.
1275 Use scm_f64vector_elements to access innards of uniform vectors.
1276
1277 * convert.i.c: Convert srfi-4 style uniform vectors when
1278 requested.
1279 * convert.c (scm_c_scm2chars, scm_c_chars2scm,
1280 scm_c_chars2byvect): Use a s8vector instead of a scm_tc7_byvect.
1281
1282 2004-10-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1283
1284 * numbers.h, numbers.c (scm_i_print_double): New.
1285
1286 * srfi-4.c, srfi-4.h, srfi-4.i.c: New files, initially from
1287 ../srfi/ but heavily modified.
1288 * Makefile.am: Add them in all the right places.
1289 * init.c (scm_init_guile_1): Call scm_init_srfi_4.
1290 * read.c (scm_lreadr): Call scm_i_read_homogenous_vector for '#f',
1291 '#u', and '#s'.
1292
1293 * read.h, read.c (scm_i_input_error): Renamed from scm_input_error
1294 and made non-static. Changed all uses.
1295
1296 2004-10-22 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1297
1298 * variable.c, threads.c, struct.c, stackchk.c, smob.c, root.c,
1299 print.c, ports.c, mallocs.c, hooks.c, hashtab.c, fports.c,
1300 guardians.c, filesys.c, coop-pthreads.c, continuations.c: Use
1301 scm_uintprint to print unsigned integers, raw heap words, and
1302 adresses, using a cast to scm_t_bits to turn pointers into
1303 integers.
1304
1305 * unif.c: Include "libguile/print.h".
1306
1307 * numbers.h, numbers.c (SCM_T_INTBUFLEN): Increased to cover
1308 scm_t_intmax values.
1309 (scm_uint2str): New, for scm_t_uintmax.
1310 (scm_iint2str): Argument type changed to scm_t_intmax,
1311 reimplemented in terms of scm_uint2str.
1312
1313 * print.c, print.h (scm_uintprint): New, for printing
1314 scm_t_uintmax values.
1315 (scm_intprint): Argument type changed to scm_t_intmax.
1316
1317 * sort.c (quicksort, scm_merge, scm_merge_list_x,
1318 scm_merge_list_step, scm_merge_vector_step): Inserted SCM_TICKs at
1319 strategic places so that the loops can be interrupted.
1320
1321 * Makefile.am (INCLUDES): Use @LTDLINC@ instead of
1322 "-I$(top_srcdir)/libguile-ltdl".
1323 (libguile_la_LIBADD): Use @LIBLTDL@ instead of
1324 "../libguile-ltdl/libguile-ltdl.a".
1325
1326 * guile.c, dynl.c: Switched to using libltdl directly. Replaced
1327 all references to scm_lt_* with just lt_*. Include <ltdl.h>
1328 instead of <libguile-ltdl.h>.
1329
1330 2004-10-20 Marius Vollmer <mvo@zagadka.de>
1331
1332 * sort.c (quicksort): Copy pivot out of the array while
1333 constructing the partitions; it could get overwritten otherwise.
1334 Because of the ultimate insertion sort, this bug did not cause
1335 quicksort to fail, it just put all the burdon on the insertion
1336 sort and was thus very slow. Thanks to Rolan Orre for reporting
1337 the slowness!
1338
1339 2004-10-19 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1340
1341 * numbers.c (scm_i_range_error): New.
1342 * conv-integer.i.c, conv-uinteger.i.c: Use it instead of
1343 scm_out_of_range.
1344
1345 * sort.c (scm_restricted_vector_sort_x): Validate startpos <=
1346 endpos. State inclusiveness/exclusiveness of bounds in docstring.
1347
1348 * unif.c (scm_array_p): When no prototype is given, explicitely
1349 test for allowable types, do not simply return true. Thanks to
1350 Roland Orre for reporting this!
1351
1352 * private-gc.h (SCM_DEFAULT_MAX_SEGMENT_SIZE): Increase to 20 Mib.
1353
1354 * gc-segment.c (scm_i_get_new_heap_segment): Limit size of new
1355 segment to scm_max_segment_size.
1356
1357 2004-10-08 Han-Wen Nienhuys <hanwen@xs4all.nl>
1358
1359 * gc.c (scm_igc): put scm_gc_running-- before running hooks.
1360
1361 * inline.h (scm_double_cell): abort if GC running.
1362 (scm_cell): idem.
1363
1364 2004-10-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1365
1366 * error.c (scm_wrong_type_arg): Do not talk about "argument" for
1367 pos == 0.
1368
1369 Keywords no longer store a 'dash symbol'. Instead, they store a
1370 symbol with their real name.
1371
1372 * keywords.h, keywords.c, deprecated.h, deprecated.c
1373 (SCM_KEYWORDP, SCM_KEYWORDSYM): Deprecated and implemented in
1374 terms of scm_is_keyword and scm_keyword_dash_symbol.
1375
1376 * keywords.h, keywords.c, discouraged.h, discouraged.c
1377 (scm_make_keyword_from_dash_symbol, scm_keyword_dash_symbol,
1378 scm_c_make_keyword): Discouraged.
1379
1380 * keywords.h, keywords.c (scm_symbol_to_keyword,
1381 scm_keyword_to_symbol): Implemented in C.
1382 (scm_is_keyword, scm_from_locale_keyword,
1383 scm_from_locale_keywordn): New.
1384
1385 * goops.c: Replaced SCM_KEYWORDP with scm_is_keyword.
1386
1387 * snarf.h (SCM_KEYWORD, SCM_GLOBAL_KEYWORD): Use
1388 scm_from_locale_keyword instead of scm_c_make_keyword.
1389
1390 * keywords.c (scm_symbol_to_keyword): Use SCM_ASSERT_TYPE for a
1391 better error message.
1392
1393 * deprecated.c: Include discouraged.h and keywords.h.
1394
1395 * read.c (scm_lreadr): Simply do (symbol->keyword (read)) after
1396 reading '#:' or ':'. See NEWS for consequences.
1397
1398 2004-09-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1399
1400 * read.c (scm_lreadr): Revert change from 2004-09-22: string
1401 literals are now read-write again (until SCM_STRING_CHARS is
1402 removed).
1403
1404 * strings.c (SCM_STRING_CHARS): Explicitely reject read-only
1405 strings with an error message that blames SCM_STRING_CHARS.
1406
1407 * options.c (change_option_setting): Use scm_car instead of
1408 explicit type check plus SCM_CAR.
1409
1410 * print.h, print.c (SCM_PRINT_HIGHLIGHT_PREFIX,
1411 SCM_PRINT_HIGHLIGHT_SUFFIX): New printer options.
1412 (scm_iprin1): Use them instead of the previoulsy hardcoded
1413 strings.
1414 (scm_init_print): Initialize them.
1415
1416 * backtrace.c (display_frame_expr): Do not remove control
1417 characters from the final string. Print it directly using
1418 scm_display.
1419
1420 * ramap.c (scm_array_equal_p): Include scm_tc7_svect in switch.
1421 Thanks to Roland Orre!
1422
1423 2004-09-29 Kevin Ryde <user42@zip.com.au>
1424
1425 * regex-posix.c (scm_regexp_exec): Correction to last change, should
1426 be whole original string in match struct, not offsetted substring.
1427
1428 2004-09-24 Han-Wen Nienhuys <hanwen@xs4all.nl>
1429
1430 * gc.c (scm_gc_unprotect_object): abort if called during GC.
1431
1432 2004-09-24 Marius Vollmer <mvo@zagadka.de>
1433
1434 * Makefile.am (EXTRA_DIST): Added gettext.h.
1435
1436 * smob.c, smob.h (scm_assert_smob_type): New.
1437
1438 * Makefile.am (guile_CFLAGS, guile_LDFLAGS, libguile_la_CFLAGS):
1439 Include GUILE_CFLAGS.
1440 (libguile_la_LIBADD): Removed THREAD_LIBS_LOCAL, which is unused
1441 now.
1442 (libpath.h): Put GUILE_CFLAGS in the build-info.
1443
1444 2004-09-23 Marius Vollmer <mvo@zagadka.de>
1445
1446 * print.h (scm_print_state): Added highlight_objects.
1447 * print.c (make_print_state, scm_free_print_state): Initialize it
1448 to SCM_EOL.
1449 (scm_iprin1): Wrap output in '{...}' when object is contained in
1450 highlight_objects.
1451
1452 * backtrace.h, backtrace.c (scm_display_backtrace_with_highlights,
1453 scm_backtrace_with_highlights): New. Set highlight_objects of
1454 printstate.
1455
1456 * error.c (scm_error_scm): Document new meaning of data/rest
1457 argument for out-of-range and wrong-type-arg errors.
1458 (scm_out_of_range, scm_out_of_range_pos, scm_wrong_type_arg,
1459 scm_wrong_type_arg_msg): Pass bad_value in rest argument of
1460 exception so that it gets highlighted in the backtrace.
1461 Don't talk about "argument" when not giving a position.
1462
1463 * throw.c (handler_message): The rest argument is the fourth
1464 argument, not everything after the third. Call
1465 scm_display_backtrace_with_highlights, passing the rest argument
1466 when appropriate.
1467
1468 2004-09-22 Marius Vollmer <mvo@zagadka.de>
1469
1470 From Jan Nieuwenhuizen <janneke@gnu.org> and Bruno Haible
1471 <bruno@clisp.org>:
1472
1473 * i18n.c: Handle --disable-nls (thanks Bruno).
1474
1475 * posix.c (scm_init_posix): Add LC_PAPER, LC_NAME, LC_ADDRESS,
1476 LC_TELEPHONE, LC_MEASUREMENT, LC_IDENTIFICATION.
1477
1478 * i18n.c (scm_i_to_lc_category): New name and export. Support all
1479 LC categories.
1480 * posix.c (scm_setlocale): Use it.
1481
1482 * i18n.h, i18n.c (scm_textdomain, scm_bindtextdomain,
1483 scm_bind_textdomain_codeset): Make wrappers similar to C function
1484 they wrap.
1485
1486 * i18n.h: New file.
1487 * i18n.c: New file.
1488 * gettext.h: New file, taken from GNU gettext.
1489 * init.c: Include libguile/i18n.h.
1490 (scm_init_guile_1): Add call to scm_init_i18n().
1491 * Makefile.am (libguile_la_SOURCES): Add i18n.c.
1492 (DOT_X_FILES): Add i18n.x.
1493 (DOT_DOC_FILES): Add i18n.doc.
1494 (libguile_la_LDFLAGS): Add @LTLIBINTL@.
1495 (modinclude_HEADERS): Add i18n.h.
1496
1497 2004-09-22 Marius Vollmer <mvo@zagadka.de>
1498
1499 * gh_list.c: Replaced SCM_CAR, etc with scm_car, etc.
1500
1501 * discouraged.h, tags.h (SCM_CONSP, SCM_NCONSP): Moved to
1502 discouraged.h. Replaced all uses with scm_is_pair.
1503 (SCM_I_CONSP): New name for SCM_CONSP.
1504
1505 * pairs.h, pairs.c (scm_is_pair, scm_is_null, scm_car, scm_cdr,
1506 scm_i_chase_pairs, SCM_I_A_PAT, SCM_I_D_PAT, etc, scm_caar,
1507 scm_cadr, etc): New.
1508 (SCM_NULLP, SCM_NNULLP): Moved to discouraged.h. Replaced all
1509 uses with scm_is_null.
1510
1511 * eval.c (scm_eval, scm_apply, call_cxr_1): Use scm_i_chase_pairs
1512 instead of explicit code.
1513
1514 2004-09-22 Marius Vollmer <mvo@zagadka.de>
1515
1516 * srfi-13.c (scm_string_contains, scm_string_contains_ci):
1517 Reworded logic a bit so that #f is returned immediately when s1 is
1518 too short to contain s2.
1519
1520 * regex-posix.c (scm_regexp_exec): Convert string to
1521 zero-terminated locale string before matching against it.
1522
1523 * strings.h, strings.c (scm_substring_read_only,
1524 scm_c_substring_read_only, scm_i_substring_read_only): New.
1525 (RO_STRING_TAG, IS_RO_STRING): New.
1526 (scm_i_string_writable_chars): Bail on read-only strings.
1527
1528 * read.c (scm_lreadr): use scm_c_substring_read_only for string
1529 literals, thus making them read-only as specified by R5RS.
1530
1531 2004-09-22 Marius Vollmer <mvo@zagadka.de>
1532
1533 * eq.c (scm_equal_p): Allow smobs with different flags to be equal
1534 by testing for smobs before insisting on equal SCM_CELL_TYPES.
1535
1536 2004-09-21 Marius Vollmer <mvo@zagadka.de>
1537
1538 * numbers.h, numbers.c: Include <gmp.h> in numbers.h, not in
1539 numbers.c.
1540 (scm_to_mpz, scm_from_mpz): New.
1541 Thanks to Andreas Vögele!
1542
1543 * read.c (skip_scsh_block_comment): Recognize "!#" everywhere, not
1544 just on a line of its own.
1545
1546 * srfi-13.c (scm_string_any, scm_string_every,
1547 scm_string_tabulate, string_upcase_x, string_down_case_x,
1548 string_titlecase_x, string_reverse_x, scm_string_tokenize): Use
1549 size_t instead of int for indices into strings. Make sure that no
1550 over- or underflow occurs. Thanks to Andreas Vögele!
1551 (scm_xsubstring, scm_string_xcopy_x): Use ints for 'extended'
1552 indices, which can also be negative.
1553
1554 2004-09-20 Marius Vollmer <mvo@zagadka.de>
1555
1556 * gc-mark.c (SCM_MARK_BACKING_STORE): Removed, it was unused.
1557
1558 * threads.c (scm_threads_mark_stacks): Call
1559 SCM_MARK_BACKING_STORE. Also, do not use stack_len local, it was
1560 only used once.
1561
1562 2004-09-13 Jan Nieuwenhuizen <janneke@gnu.org>
1563
1564 * srfi-13.c (scm_string_contains, scm_string_contains_ci):
1565 Bugfix: when subtracting unsigned values, make sure that result
1566 does not wrap.
1567
1568 2004-09-09 Kevin Ryde <user42@zip.com.au>
1569
1570 * filesys.c, stime.c (_POSIX_C_SOURCE): Use this only on hpux, it
1571 causes too many problems elsewhere (glibc, freebsd, mingw). Reported
1572 by Andreas Vögele.
1573
1574 2004-09-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1575
1576 * Makefile.am (EXTRA_libguile_la_SOURCES): Removed "alloca.c".
1577
1578 * eq.c (real_eqv): Pretend that all NaNs are equal.
1579
1580 * numbers.c (scm_integer_expt): Do not accept inexact integers.
1581
1582 2004-09-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1583
1584 * srfi-13.c (scm_string_trim_right, scm_string_xcopy_x): Correctly
1585 use size_t for some locals instead of int.
1586
1587 * read.c (scm_flush_ws): Detect "#!"-style comments here.
1588 (scm_lreadr): Abort on seeing "#!", which should no longer happen.
1589 (skip_scsh_block_comment): Use scm_input_error instead of
1590 scm_misc_error in case of EOF.
1591
1592 2004-09-07 Kevin Ryde <user42@zip.com.au>
1593
1594 * numbers.c (scm_integer_expt): Reject exponent +/-inf.
1595 Bug report by Bill Schottstaedt.
1596
1597 * ports.c (scm_getc, scm_lfwrite): Recognise \a \b and \r for port
1598 column.
1599 * ports.h (SCM_ZEROCOL, SCM_DECCOL): New macros.
1600
1601 * posix.c (scm_access): Update docstring per manual.
1602
1603 * posix.c (scm_nice): Correction to error detection. Reported by
1604 Matthias Koeppe.
1605
1606 * stime.c (scm_current_time, scm_gettimeofday, scm_strptime): Don't
1607 throw error before unlocking mutex with SCM_ALLOW_INTS.
1608
1609 2004-09-06 Kevin Ryde <user42@zip.com.au>
1610
1611 * stime.h (SCM_TIME_UNITS_PER_SECOND): Use sysconf(_SC_CLK_TCK) when
1612 available. This also gets around CLK_TCK being absent when
1613 _GNU_SOURCE and _POSIX_C_SOURCE are defined in stime.c.
1614
1615 2004-09-03 Stefan Jahn <stefan@lkcc.org>
1616
1617 * threads.c (scm_threads_mark_stacks): Fixed local variable
1618 definitions.
1619
1620 * strings.c (scm_i_substring_copy, scm_string_append): Fixed
1621 local variable definitions.
1622
1623 * stime.c (_POSIX_C_SOURCE): Do not define this item on
1624 MinGW32 because it conflicts with its pthread headers.
1625 (scm_mktime): Consider the HAVE_STRUCT_TM_TM_ZONE define.
1626 (scm_strftime): Using scm_from_locale_string() instead of
1627 scm_makfrom0str().
1628
1629 * posix.c (scm_putenv): Fixed typo in the !HAVE_UNSETENV
1630 part.
1631
1632 * numbers.c (scm_init_numbers): Removed check_sanity() call
1633 inside GUILE_DEBUG. The function has been removed somewhen...
1634
1635 * filesys.c (_POSIX_C_SOURCE): Do not define this item on
1636 MinGW32 because it conflicts with its pthread headers.
1637
1638 2004-08-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1639
1640 * strings.c (SCM_STRINGP): Accept all strings.
1641 (SCM_STRING_CHARS): Reject shared substrings here.
1642
1643 * script.c (scm_compile_shell_switches): Added 2003 and 2004 to
1644 the Copyright years.
1645
1646 2004-08-27 Kevin Ryde <user42@zip.com.au>
1647
1648 * socket.c (scm_fill_sockaddr): Use HAVE_STRUCT_SOCKADDR_SIN_LEN and
1649 HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN for sockaddr fields, SIN_LEN and
1650 SIN_LEN6 are not defined on all systems. Reported by Michael Tuexen.
1651
1652 2004-08-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1653
1654 * strings.h, strings.c (scm_i_make_symbol): Added FLAGS parameter.
1655 * symbols.h, symbols.c (SCM_I_F_SYMBOL_UNINTERNED,
1656 scm_i_symbol_is_interned, scm_i_mem2symbol,
1657 scm_i_mem2uninternedsymbol): Use it to store uninternedness flag.
1658
1659 2004-08-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1660
1661 * srfi-13.c: First cut at thread-safeness and proper use of
1662 scm_i_string_chars et al. Copious scm_remember_upto_heres have
1663 been inserted. Made sure that no internal string pointer is used
1664 across a SCM_TICK or a possible GC.
1665
1666 * script.c (scm_compile_shell_switches): Use
1667 scm_from_locale_string instead of scm_makfrom0str.
1668
1669 * srfi-13.c (scm_string_rindex): Export to Scheme, as it has
1670 always been.
1671
1672 2004-08-25 Marius Vollmer <mvo@zagadka.de>
1673
1674 Moved SRFI-13 and SRFI-14 into the core, taking over the role of
1675 strop.c.
1676
1677 * srfi-13.c, srfi-13.h, srfi-14.c, srfi-14.h: New files.
1678 * strop.h, strop.c: Removed, they are now empty.
1679 * Makefile.am: Updated for new and removed files.
1680
1681 * symbols.h, symbols.c (scm_string_ci_to_symbol): Moved here, next
1682 to scm_string_to_symbol.
1683
1684 * chars.c (scm_char_alphabetic_p, scm_char_numeric_p,
1685 scm_char_whitespace_p, scm_upper_case_p, scm_lower_case_p,
1686 scm_char_is_both_p): Use scm_char_set_contains_p with the proper
1687 charset instead of libc functions.
1688
1689 * strorder.c (scm_string_equal_p, scm_string_ci_equal_p,
1690 scm_string_less_p, scm_string_leq_p, scm_string_gr_p,
1691 scm_string_geq_p, scm_string_ci_less_p, scm_string_ci_leq_p,
1692 scm_string_ci_gr_p, scm_string_ci_geq_p): Use scm_string_eq, etc
1693 instead of explicit code.
1694
1695 * deprecated.c, load.c, posix.c, unif.c, symbols.c: Include
1696 "srfi-13.h" instead of "strop.h".
1697
1698 * init.c (scm_init_guile_1): Call scm_init_srfi_13 and
1699 scm_init_srfi_14. Do not call scm_init_strop.
1700
1701 2004-08-24 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1702
1703 * numbers.c (scm_inf_p): Synced docstring back from manual.
1704
1705 2004-08-22 Marius Vollmer <mvo@zagadka.de>
1706
1707 * strings.c (get_str_buf_start): New helper function.
1708 (scm_i_substring, scm_i_substring_copy, scm_i_substring_shared,
1709 scm_i_string_char, scm_i_string_writable_chars): Use it.
1710 (scm_i_substring_copy): Make START argument optional for C
1711 callers, for upcoming SRFI-13 integration.
1712
1713 2004-08-21 Marius Vollmer <mvo@zagadka.de>
1714
1715 From Richard Todd, Thanks!
1716
1717 * script.c (scm_compile_shell_switches): added '-L' switch to add
1718 to the %load-path.
1719
1720 2004-08-21 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
1721
1722 * eval.c (unmemoize_exprs): When dropping internal body markers
1723 from the output during unmemoization, also drop those that are not
1724 immediately at the beginning of a body.
1725
1726 2004-08-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1727
1728 * eval.c (scm_lookupcar1): Report "Variable used before given a
1729 value" insetad of an "Unbound" one for variables that are found
1730 but still contain SCM_UNDEFINED.
1731
1732 * posix.c (scm_mkstemp): Correction to the correction, mkstemp
1733 expects a null-terminated string in the locale encoding, but
1734 scm_i_string_writable_chars doesn't give that. Fixed by letting
1735 mkstemp modify a locale version of the tmpl argument and copying
1736 the result back into tmpl.
1737
1738 * strop.c (scm_substring_move_x): Store into str2, not str1.
1739
1740 2004-08-20 Kevin Ryde <user42@zip.com.au>
1741
1742 * posix.c (scm_mkstemp): Correction to new locale_string stuff, need
1743 to modify the input string.
1744
1745 2004-08-19 Marius Vollmer <mvo@zagadka.de>
1746
1747 * deprecated.c (SCM_SYMBOL_CHARS): Cast away const in return.
1748 (SCM_SYMBOL_LENGTH): It's scm_i_symbol_length, not
1749 scm_c_symbol_length.
1750
1751 2004-08-19 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1752
1753 New string implementation, with copy-on-write strings and
1754 mutation-sharing substrings, and a new internal string API.
1755 Symbols can now share memory with strings.
1756
1757 * tags.h (scm_tc7_stringbuf): New tag.
1758
1759 * strings.h, strings.c: (scm_i_string_chars, scm_i_string_length,
1760 scm_i_string_writable_chars, scm_i_string_stop_writing): New, to
1761 replace SCM_I_STRING_CHARS and SCM_I_STRING_LENGTH. Updated all
1762 uses.
1763 (scm_i_make_string, scm_c_make_string): New, to replace
1764 scm_allocate_string. Updated all uses.
1765 (SCM_STRINGP, SCM_STRING_CHARS, SCM_STRING_UCHARS,
1766 SCM_STRING_LENGTH): Deprecated.
1767 (scm_allocate_string, scm_take_str, scm_take0str, scm_mem2string,
1768 scm_str2string, scm_makfrom0str, scm_makfrom0str_opt):
1769 Discouraged. Replaced all uses with scm_from_locale_string or
1770 similar, as appropriate.
1771 (scm_c_string_length, scm_c_string_ref, scm_c_string_set_x,
1772 scm_c_substring, scm_c_substring_shared, scm_c_substring_copy,
1773 scm_substring_shared, scm_substring_copy): New.
1774
1775 * symbols.c, symbols.h (SCM_SYMBOLP, SCM_SYMBOL_FUNC,
1776 SCM_SET_SYMBOL_FUNC, SCM_SYMBOL_PROPS, SCM_SET_SYMBOL_PROPS,
1777 SCM_SYMBOL_HASH, SCM_SYMBOL_INTERNED_P, scm_mem2symbol,
1778 scm_str2symbol, scm_mem2uninterned_symbol): Discouraged.
1779 (SCM_SYMBOL_LENGTH, SCM_SYMBOL_CHARS, scm_c_symbol2str):
1780 Deprecated.
1781 (SCM_MAKE_SYMBOL_TAG, SCM_SET_SYMBOL_LENGTH, SCM_SET_SYMBOL_CHARS,
1782 SCM_PROP_SLOTS, SCM_SET_PROP_SLOTS): Removed.
1783 (scm_is_symbol, scm_from_locale_symbol, scm_from_locale_symboln):
1784 New, to replace scm_str2symbol and scm_mem2symbol, respectively.
1785 Updated all uses.
1786 (scm_gensym): Generate only the number suffix in the buffer, just
1787 string-append the prefix.
1788
1789 * error.c (scm_memory_error): Do not try to throw, just abort.
1790 Throwing will not work anyway.
1791
1792 * gh.h, gh-data.c (gh_set_substr): Made src const.
1793
1794 * ports.c (scm_i_mode_bits_n): New, for counted strings.
1795 (scm_mode_bits): Use it.
1796 (scm_c_port_for_each): Blocking GC does not seem to work, allocate
1797 a vector normally and fill that instead of consing a list with a
1798 blocked GC.
1799
1800 * read.c (scm_i_casei_streq): New, for counted strings.
1801
1802 * threads.c (gc_section_count): Removed, thread-sleeping can not
1803 be nested.
1804 (scm_i_thread_put_to_sleep): Call scm_i_leave_guile before locking
1805 admin mutex so that we can be put to sleep by other threads while
1806 blocking on that mutex. Lock all the heap mutex of all threads,
1807 including ourselves.
1808 (scm_i_thread_wake_up): Unlock all threads, including ourselves,
1809 call scm_i_enter_guile.
1810 (scm_thread_mark_stacks): Expect all threads to be suspended.
1811
1812 * gc.h, gc.c (scm_i_gc_admin_mutex): New, to protect
1813 scm_gc_mallocated, for now.
1814 (scm_init_storage): Initialize it.
1815 * gc-malloc.c (descrease_mtrigger, increase_mtrigger): Use it.
1816
1817 * gc-mark.c (scm_gc_mark_dependencies): Call scm_i_string_mark,
1818 scm_i_stringbuf_mark and scm_i_symbol_mark, as appropriate.
1819 * gc-card.c (scm_i_sweep_card): Call scm_i_string_free,
1820 scm_i_stringbuf_free and scm_i_symbol_free, as appropriate.
1821
1822 * strop.c (scm_string_copy): Use scm_c_substring to get a
1823 copy-on-write string.
1824
1825 2004-08-18 Kevin Ryde <user42@zip.com.au>
1826
1827 * arbiters.c (FETCH_STORE): New macro.
1828 (SCM_LOCK_VAL, SCM_UNLOCK_VAL): New constants.
1829 (SCM_LOCK_ARB, SCM_UNLOCK_ARB): Remove, effectively absorbed into
1830 scm_try_arbiter and scm_release_arbiter.
1831 (scm_try_arbiter, scm_release_arbiter): Use FETCH_STORE to get xchg
1832 for speed on i386, otherwise using mutex.
1833
1834 * eq.c (scm_equal_p): Remove real==fraction and fraction==real, they
1835 must be #f according to R5RS. (equal? follows eqv?, and for eqv? an
1836 exact and inexact is #f.)
1837
1838 * fports.c (fport_print): Use scm_ttyname instead of ttyname directly,
1839 to get thread safety of scm_ttyname.
1840
1841 * ports.c (ttyname): Remove prototype, unused.
1842
1843 * socket.c (scm_init_socket): Add SOCK_SEQPACKET and SOCK_RDM.
1844 Reported by Michael Tuexen.
1845
1846 2004-08-13 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1847
1848 * load.c (scm_init_load_path): Do not pass NULL to
1849 scm_to_locale_string, which would happen when GUILE_LOAD_PATH is
1850 not set. Thanks to Bill Schottstaedt.
1851
1852 2004-08-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1853
1854 * socket.c (scm_inet_aton, scm_inet_pton): Convert SCM strings to
1855 locale strings instead of accessing their internals.
1856 (scm_recv, scm_send, scm_recvfrom, scm_sendto): Use
1857 SCM_I_STRING_CHARS and SCM_I_STRING_LENGTH instead of
1858 SCM_STRING_CHARS and SCM_STRING_LENGTH.
1859
1860 * simpos.c (scm_system): Convert SCM strings to locale strings
1861 instead of accessing their internals.
1862
1863 * script.c (scm_compile_shell_switches): Convert version to locale
1864 string before printing it.
1865
1866 * rdelim.c (scm_read_delimited_x): Avoid
1867 SCM_VALIDATE_SUBSTRING_SPEC_COPY and use scm_from_size_t instead
1868 of scm_from_long for the returned number of read characters.
1869
1870 * ioext.c (scm_fdopen): Use scm_i_fdes_to_port together with
1871 scm_i_mode_bits to avoid accessing internals of SCM string from C.
1872
1873 * filesys.c (STRING_SYSCALL, STRING2_SYSCALL): New helper macros.
1874 Use them instead of SCM_SYSCALL when one or two strings need to be
1875 converted into locale strings.
1876 (my_rename): New, gathers platform dependent code for renaming.
1877 (scm_rename): Use it.
1878 (scm_readlink, scm_copy_file): Convert SCM strings to locale
1879 strings instead of accessing their internals.
1880 (scm_basename, scm_dirname): Use SCM_I_STRING_CHARS and
1881 SCM_I_STRING_LENGTH instead of SCM_STRING_CHARS and
1882 SCM_STRING_LENGTH.
1883
1884 * extensions.c (load_extension): Convert lib and init to locale
1885 strings instead of accessing the internals directly.
1886 (scm_c_load_extension): Use scm_from_locale_string instead of
1887 scm_makfrom0str.
1888
1889 * fports.h, fports.c (scm_i_fdes_to_port): New, like
1890 scm_fdes_to_port, but take mode bits directly instead of as a C
1891 string.
1892 (scm_i_fdes_to_port): Implement using above.
1893 (scm_open_file): Use scm_i_fdes_to_port together with
1894 scm_i_mode_bits to avoid accessing internals of SCM string from C.
1895 * vports.c (scm_make_soft_port): Use scm_i_fdes_to_port together
1896 with scm_i_mode_bits to avoid accessing internals of SCM string
1897 from C.
1898
1899 * ports.h (scm_i_mode_bits): New, same as scm_mode_bits but with a
1900 SCM string as argument.
1901
1902 * ports.c (scm_i_void_port): New, like scm_void_port but take mode
1903 bits directly instead of C string.
1904 (scm_void_port): Implement using above.
1905 (scm_sys_make_void_port): Use scm_i_void_port together with
1906 scm_i_mode_bits to avoid accessing internals of SCM string.
1907
1908 * strings.h, strings.c (scm_i_get_substring_spec): New.
1909
1910 * socket.c, rw.c, deprecated.h, validate.h
1911 (SCM_VALIDATE_STRING_COPY): Deprecated. Replaced all uses with
1912 SCM_VALIDATE_STRING plus SCM_I_STRING_CHARS or
1913 scm_to_locale_string, etc.
1914 (SCM_VALIDATE_SUBSTRING_SPEC_COPY): Deprecated. Replaced as
1915 above, plus scm_i_get_substring_spec.
1916
1917 * regex-posix.c, read.c, random.c, ramap.c, print.c, numbers.c,
1918 hash.c, gc.c, gc-card.c, convert.i.c, backtrace.c, strop.c,
1919 strorder.c, strports.c, struct.c, symbols.c, unif.c, ports.c: Use
1920 SCM_I_STRING_CHARS, SCM_I_STRING_UCHARS, and SCM_I_STRING_LENGTH
1921 instead of SCM_STRING_CHARS, SCM_STRING_UCHARS, and
1922 SCM_STRING_LENGTH, respectively. Also, replaced scm_return_first
1923 with more explicit scm_remember_upto_here_1, etc, or introduced
1924 them in the first place.
1925
1926 * posix.c (WITH_STRING): New helper macro. Use it where one
1927 locale string is needed for a short piece of code.
1928 (STRING_SYSCALL): New helper macro. Use it instead of SCM_SYSCALL
1929 when one locale string is needed.
1930 (scm_mkstemp): Convert tmpl to a locale string.
1931 (scm_putenv): Rewritten to use only C strings.
1932 (scm_setlocale, scm_crpt): Convert argument strings to locale
1933 strings.
1934
1935 2004-08-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1936
1937 * load.c (scm_primitive_load_path): Do not check for absolute
1938 filenames when scm_sys_search_load_path returns false, which will
1939 return absolute filenames unchanged.
1940
1941 2004-08-11 Marius Vollmer <mvo@zagadka.de>
1942
1943 * gc.c, procprop.c (scm_init_storage, scm_stand_in_procs,
1944 scm_stand_in_proc): Use a hastable for scm_stand_in_procs instead
1945 of an alist. Thanks to Matthias Koeppe!
1946
1947 2004-08-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1948
1949 * strings.h, deprecated.h (SCM_STRING_COERCE_0TERMINATION_X):
1950 Moved from string.h to deprecated.h.
1951
1952 * deprecated.c, deprecated.h (SCM_CHARS, SCM_LENGTH): Removed.
1953
1954 * strings.h, strings.c (SCM_MAKE_STRING_TAG): Renamed to
1955 SCM_I_MAKE_STRING_TAG, changed all uses.
1956 (SCM_STRING_CHARS, SCM_STRING_UCHARS, SCM_STRING_LENGTH): Renamed
1957 to SCM_I_STRING_CHARS, SCM_I_STRING_UCHARS, and SCM_I_LENGTH
1958 respectively. For a short time, the old names are still there as
1959 aliases. Not all uses have been changed yet, but the ones in
1960 strings.c have.
1961 (SCM_STRING_MAX_LEN): Do not hardcode to 24 bits, compute from
1962 SCM_T_BITS_MAX.
1963 (scm_is_string, scm_from_locale_string, scm_from_locale_stringn,
1964 scm_take_locale_string, scm_take_locale_stringn,
1965 scm_to_locale_string, scm_to_locale_stringn,
1966 scm_to_locale_stringbuf): New.
1967 (scm_c_string2str, scm_c_substring2str): Deprecated by moving to
1968 deprecated.[hc]. Implemented in terms of the new functions above.
1969 (scm_take_str, scm_take0str, scm_mem2string, scm_str2string,
1970 scm_makfrom0str): Reimplemented in terms of the new functions from
1971 above. They will be discouraged shortly.
1972 (scm_substring): Do not use scm_mem2string.
1973 (scm_i_allocate_string_pointers, scm_i_free_string_pointers): New,
1974 to replace similar code from posix.c, simpos.c, and dynl.c.
1975 (scm_string_append): Use memcpy instead of explicit loop. Do not
1976 use register keyword. Use plain 'char' instead of 'unsigned
1977 char'.
1978
1979 * strports.c (scm_mkstrport): Use SCM_I_STRING_UCHARS instead of
1980 SCM_STRING_UCHARS. Use SCM_I_STRINGP instead of SCM_STRINGP.
1981
1982 * strop.c (scm_i_index): Replaced SCM_STRINGP, SCM_STRING_CHARS,
1983 and SCM_STRING_LENGTH with SCM_I_STRINGP, SCM_I_STRING_CHARS, and
1984 SCM_I_STRING_LENGTH, respectively. Pass string object directly,
1985 not as a pointer. Use scm_remember_upto_here_1 to protect it.
1986
1987 * read.c (scm_input_error): Use a SCM value for 'fn', not a C
1988 string. This avoids a conversion round-trip.
1989
1990 * gh_data.c: Replaced SCM_STRINGP, SCM_STRING_CHARS, and
1991 SCM_STRING_LENGTH with SCM_I_STRINGP, SCM_I_STRING_CHARS, and
1992 SCM_I_STRING_LENGTH, respectively.
1993 (gh_scm2newstr): Implement in terms of scm_to_locale_string.
1994
1995 * environments.c: Instead calling scm_puts on the SCM_STRING_CHARS
1996 of a string, call scm_display on the string itself.
1997
1998 * dynwind.c, dynwind.h (scm_frame_free): New.
1999
2000 * stime.c, socket.c, simpos.c, procs.c, posix.c, ports.c,
2001 net_db.c, fports.c, filesys.c, eval.c, deprecation.c, dynl.c:
2002 Replaced uses of SCM_STRING_CHARS with proper uses of
2003 scm_to_locale_string. Replaced SCM_STRINGP with scm_is_string.
2004 Replaced scm_mem2string with scm_from_locale_string.
2005
2006 * simpos.c, posix.c (allocate_string_pointers, environ_list_to_c):
2007 Removed, replaced all uses with scm_i_allocate_string_pointers.
2008
2009 * load.h, load.c (scm_internal_parse_path): Removed.
2010 (scm_parse_path): Use scm_string_split to do the work.
2011 (scm_init_load_path): Use scm_parse_path instead of
2012 scm_internal_parse_path.
2013 (scm_search_path): Rewritten string handling part of the code in
2014 terms of scm_to_locale_stringbuf and so that it is thread safe.
2015
2016 * error.c (scm_error_scm): Throw directly instead of calling
2017 scm_error, this avoids the back and forth conversion of SUBR and
2018 MESSAGE and also plugs a memory leak.
2019 (scm_error): Call scm_error_scm.
2020
2021 * backtrace.c: Replaced SCM_STRINGP with scm_is_string.
2022 (display_header): Print FNAME when it is true, not
2023 merely when it is a string.
2024
2025 * strings.h (SCM_SET_STRING_LENGTH, SCM_SET_STRING_CHARS): Removed
2026 unceremoniously. They were unused by Guile itself, and external
2027 use should stop immediately.
2028
2029
2030 2004-08-10 Marius Vollmer <mvo@zagadka.de>
2031
2032 * numbers.h, number.c, deprecated.h, deprecated.c (scm_round,
2033 scm_truncate): Renamed to scm_c_round and scm_c_truncate;
2034 deprecated versions installed in deprecated.h and deprecated.c.
2035 Changed all uses.
2036
2037 2004-08-06 Rob Browning <rlb@defaultvalue.org>
2038
2039 * net_db.c (scm_resolv_error): don't cause an exception while
2040 trying to throw an exception -- call scm_misc_error with correct
2041 arguments. The previous arguments needed a format escape that
2042 wasn't in any of the format strings.
2043
2044 2004-08-06 Kevin Ryde <user42@zip.com.au>
2045
2046 * ramap.c (scm_array_fill_x): For byvect char fill, force signed char
2047 so as not to depend on signedness of plain char. For byvect range
2048 check, throw out-of-range rather than wrong-type-arg.
2049
2050 * unif.c (scm_uniform_vector_ref, scm_array_set_x): For byvect, force
2051 signed byte range checks by using scm_to_schar and scm_from_schar,
2052 don't want to depend on signedness of C char.
2053
2054 2004-08-05 Kevin Ryde <user42@zip.com.au>
2055
2056 * arbiters.c (scm_try_arbiter): Use scm_i_misc_mutex instead of
2057 SCM_DEFER_INTS.
2058 (scm_release_arbiter): Use scm_i_misc_mutex so return value can be
2059 guaranteed if multiple threads compete to unlock.
2060 Update docstrings per doc/ref/api-scheduling.texi.
2061
2062 * filesys.c (scm_copy_file): Use fstat on the input fd rather than
2063 stat on the filename, to be certain a file rename can't mean we get
2064 info on one filesystem object but open another. This fstat usage is
2065 similar to Emacs copy-file.
2066
2067 * posix.c (scm_setgroups): Enhance docstring, per doc/ref/posix.texi.
2068
2069 * simpos.c (scm_system_star): Change scm_from_long to scm_from_int on
2070 SIGINT and SIGQUIT, since those values are ints.
2071
2072 2004-08-03 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2073
2074 * num2integral.i.c, num2float.i.c: Removed.
2075 * Makefile.am (noinst_HEADERS): Updated.
2076
2077 * numbers.h. numbers.c (scm_make_ratio): Renamed to
2078 scm_i_make_ratio and made static, replaced uses with scm_divide.
2079 (scm_complex_p): New, export as "complex?" to Scheme.
2080 (scm_number_p): Export as "number?" to Scheme.
2081 (scm_is_complex, scm_is_number): New.
2082 (scm_c_make_rectangular, scm_c_make_polar): New.
2083 (scm_make_rectangular, scm_make_polar): Use above.
2084 (scm_c_real_part, scm_c_imag_part, scm_c_magnitude, scm_c_angle):
2085 New.
2086 (scm_make_complex): Discouraged by moving to discouraged.h and
2087 discouraged.c. Replaced all uses with scm_c_make_rectangular.
2088
2089 * discouraged.h, discouraged.c, numbers.c, numbers.h
2090 (scm_is_rational): New.
2091 (scm_i_short2big, scm_i_int2big, scm_i_uint2big, scm_i_size2big,
2092 scm_i_ptrdiff2big, scm_i_long_long2big, scm_i_ulong_long2big):
2093 Removed prototypes.
2094 (scm_make_real, scm_num2dbl, scm_float2num, scm_double2num):
2095 Discouraged by moving to discouraged.h and discouraged.c.
2096 Replaced all uses with scm_from_double.
2097 (scm_num2float, scm_num2double): Discouraged by moving prototype
2098 to discouraged.h and rewriting in terms of scm_to_double.
2099 Replaced all uses with scm_to_double.
2100 (scm_to_double): Do not implement in terms of scm_num2dbl, use
2101 explicit code.
2102 (scm_from_double): Do not implement in terms of scm_make_real, use
2103 explicit code.
2104
2105 2004-08-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2106
2107 * init.c (scm_init_guile_1): Call scm_i_init_discouraged.
2108
2109 * gen-scmconfig.h.in (SCM_I_GSC_ENABLE_DISCOURAGED): New.
2110 * gen-scmconfig.c (SCM_ENABLE_DISCOURAGED): Emit based on above.
2111
2112 * eval.c (SCM_EVALIM, SCM_EVALIM2, SCM_XEVAL, SCM_XEVALCAR):
2113 Renamed to SCM_I_* in order to avoid collisions with the versions
2114 defined in deprecated.h.
2115
2116 * discouraged.h, discouraged.c: New files.
2117
2118 * deprecated.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_EQ_P,
2119 SCM_NEGATE_BOOL, SCM_BOOL, SCM_BOOT_NOT): Promoted from being
2120 deprecated to being discouraged by moving to discouraged.h.
2121
2122 * numbers.h, numbers.c, discouraged.h, discouraged.c
2123 (scm_short2num, scm_ushort2num, scm_int2num, scm_uint2num,
2124 scm_long2num, scm_ulong2num, scm_size2num, scm_ptrdiff2num,
2125 scm_num2short, scm_num2ushort, scm_num2int, scm_num2uint,
2126 scm_num2long, scm_num2ulong, scm_num2size, scm_num2ptrdiff,
2127 scm_long_long2num, scm_ulong_long2num, scm_num2long_long,
2128 scm_num2ulong_long): Discouraged by moving to discouraged.h and
2129 discouraged.c and reimplementing in terms of scm_from_* and
2130 scm_to_*. Changed all uses to the new scm_from_* and scm_to_*
2131 functions.
2132
2133 * numbers.h, numbers.c: Removed GUILE_DEBUG code.
2134 (scm_i_short2big, scm_i_ushort2big, scm_i_int2big, scm_i_uint2big,
2135 scm_i_size2big, scm_i_ptrdiff2big): Removed.
2136 (scm_i_long2big, scm_i_ulong2big): New, explicit definitions.
2137 * conv-integer.i.c, conv-uinteger.i.c: Use them instead of
2138 explicit code.
2139
2140 2004-08-02 Kevin Ryde <user42@zip.com.au>
2141
2142 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Add comments about past
2143 and current usage and migration.
2144
2145 2004-07-31 Kevin Ryde <user42@zip.com.au>
2146
2147 * error.c (scm_strerror): Use scm_i_misc_mutex around strerror since
2148 it's not thread safe.
2149 (scm_syserror): Use scm_strerror rather than SCM_I_STRERROR, to take
2150 advantage of this.
2151 * fports.c (scm_open_file): Use scm_strerror likewise.
2152 * filesys.c (scm_stat, scm_lstat): Ditto.
2153
2154 * filesys.c (scm_copy_file): Avoid fd leak when destination file
2155 cannot be opened.
2156
2157 * symbols.c (scm_gensym): Use scm_i_misc_mutex around gensym_counter
2158 update, for thread safety.
2159 (gensym_counter): Move into scm_gensym which is its only user.
2160 (scm_init_symbols): No need to explicitly initialize gensym_counter.
2161
2162 2004-07-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2163
2164 * numbers.h (scm_to_schar, scm_to_uchar, scm_to_char,
2165 scm_to_short, scm_to_ushort, scm_to_int, scm_to_uint, scm_to_long,
2166 scm_to_ulong, scm_to_long_long, scm_to_ulong_long, scm_to_intmax,
2167 scm_to_uintmax, scm_to_size_t, scm_to_ssize_t scm_from_schar,
2168 scm_from_uchar, scm_from_char, scm_from_short, scm_from_ushort,
2169 scm_from_int, scm_from_uint, scm_from_long, scm_from_ulong,
2170 scm_from_long_long, scm_from_ulong_long, scm_from_intmax,
2171 scm_from_uintmax, scm_from_size_t, scm_from_ssize_t): No longer
2172 defined in terms of scm_to_signed_integer, etc, but in terms of
2173 scm_to_int8, etc.
2174
2175 * gen-scmconfig.c (SCM_SIZEOF_INTMAX, SCM_SIZEOF_SIZE_T): New.
2176
2177 * gen-scmconfig.h.in: Removed SCM_I_GSC_*_LIMITS macros, they are
2178 no longer used.
2179
2180 * __scm.h (SCM_I_UTYPE_MAX, SCM_I_TYPE_MAX, SCM_I_TYPE_MIN,
2181 SCM_I_SIZE_MAX, SCM_I_SSIZE_MIN, SCM_I_SSIZE_MAX): New.
2182
2183 * __scm.h, gen-scmconfig.c (SCM_I_LLONG_MAX, SCM_I_LLONG_MIN,
2184 SCM_I_ULLONG_MAX, SCM_T_INT8_MIN, SCM_T_INT8_MAX, SCM_T_UINT8_MAX,
2185 SCM_T_INT16_MIN, SCM_T_INT16_MAX, SCM_T_UINT16_MAX,
2186 SCM_T_INT32_MIN, SCM_T_INT32_MAX, SCM_T_UINT32_MAX,
2187 SCM_T_INT64_MIN, SCM_T_INT64_MAX, SCM_T_UINT64_MAX,
2188 SCM_T_INTMAX_MIN, SCM_T_INTMAX_MAX, SCM_T_UINTMAX_MAX): Moved
2189 definition into __scm.h, using new SCM_I_TYPE_MIN, etc.
2190
2191 * conv-integer.i.c, conv-uinteger.i.c: New files, used to generate
2192 the functions below.
2193
2194 * Makefile.am (noinst_HEADERS): Added conv-integer.i.c and
2195 conv-uinteger.i.c.
2196
2197 * numbers.c, numbers.h (scm_to_int8, scm_to_uint8, scm_to_int16,
2198 scm_to_uint16, scm_to_int32, scm_to_uint32, scm_to_int64,
2199 scm_to_uint64, scm_from_int8, scm_from_uint8, scm_from_int16,
2200 scm_from_uint16, scm_from_int32, scm_from_uint32, scm_from_int64,
2201 scm_from_uint64): Turned from macros into proper functions.
2202 (scm_to_signed_integer, scm_to_unsigned_integer,
2203 scm_from_signed_integer, scm_from_unsigned_integer): Generate via
2204 conv-integer.i.c and conv-uinteger.i.c, as well.
2205
2206 * number.h (scm_to_ssize_t, scm_to_size_t): Use the new
2207 SCM_I_SSIZE_MIN, SCM_I_SSIZE_MAX, and SCM_I_SIZE_MAX macros for
2208 the limits. Those are always defined.
2209
2210 2004-07-29 Kevin Ryde <user42@zip.com.au>
2211
2212 * posix.c (scm_ttyname): Use scm_i_misc_mutex for thread safety.
2213
2214 2004-07-28 Kevin Ryde <user42@zip.com.au>
2215
2216 * posix.c (scm_ctermid): Use an L_ctermid buf on the stack, for thread
2217 safety.
2218
2219 * unif.c (scm_array_set_x): For svect, use scm_num2short for
2220 consistency with other vector types and to get arg and func name into
2221 error message.
2222
2223 2004-07-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2224
2225 * deprecated.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_BOOL):
2226 Reimplement using scm_is_false, scm_is_true, scm_is_bool, and
2227 scm_from_bool, respectively.
2228 (SCM_NINUMP): Added.
2229
2230 * tags.h, deprecated.h (SCM_EQ_P): Deprecated by moving it into
2231 deprecated.h. Replaced all uses with scm_is_eq.
2232
2233 2004-07-24 Kevin Ryde <user42@zip.com.au>
2234
2235 * threads.c, threads.h (scm_i_misc_mutex): New SCM_GLOBAL_MUTEX.
2236 * posix.c (scm_crypt): Use it to protect static data in crypt().
2237
2238 2004-07-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2239
2240 * deprecated.h, deprecated.c, numbers.h (SCM_INUMP, SCM_NINUMP,
2241 SCM_INUM): Deprecated by renaming them to SCM_I_INUMP,
2242 SCM_I_NINUMP and SCM_I_INUM, respectively and adding deprecated
2243 versions to deprecated.h and deprecated.c. Changed all uses to
2244 either use the SCM_I_ variants or scm_is_*, scm_to_*, or
2245 scm_from_*, as appropriate.
2246
2247 * dynwind.c (scm_i_dowinds): Removed unused code that would call
2248 the unexisting scm_cross_dynwind_binding_scope for inums on the
2249 windlist.
2250
2251 2004-07-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2252
2253 * socket.c (ipv6_net_to_num, scm_from_ipv6): Renamed
2254 ipv6_net_to_num to scm_from_ipv6, for converting from an IPv6
2255 byte-wise address to a SCM integer. Changed all uses.
2256 (ipv6_num_to_net, scm_to_ipv6): Renamed ipv6_num_to_net to
2257 scm_to_ipv6 and added type and range checking, for converting from
2258 an IPv& byte-wise address to a SCM integer. Changed all uses.
2259 (bignum_in_ipv6_range_p, VALIDATE_INET6): Removed, their function
2260 is now done by scm_to_ipv6.
2261
2262 * numbers.c (scm_to_signed_integer, scm_to_unsigned_integer): dot
2263 not accept inexact integers.
2264
2265 * validate.h, deprecated.h (SCM_VALIDATE_INUM,
2266 SCM_VALIDATE_INUM_COPY, SCM_VALIDATE_BIGINT,
2267 SCM_VALIDATE_INUM_MIN, SCM_VALIDATE_INUM_MIN_COPY,
2268 SCM_VALIDATE_INUM_MIN_DEF_COPY,SCM_VALIDATE_INUM_DEF,
2269 SCM_VALIDATE_INUM_DEF_COPY, SCM_VALIDATE_INUM_RANGE,
2270 SCM_VALIDATE_INUM_RANGE_COPY): Deprecated because they make the
2271 fixnum/bignum distinction visible. Changed all uses to
2272 scm_to_size_t or similar.
2273
2274 2004-07-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2275
2276 * cpp_cnvt.awk: Use scm_from_int instead of SCM_MAKINUM.
2277
2278 2004-07-10 Kevin Ryde <user42@zip.com.au>
2279
2280 * hash.c (scm_hashq, scm_hashv, scm_hash): Restrict to size>=1 rather
2281 than size>=0, since 0<=hash<size cannot be satisfied for size==0, and
2282 such a size causes divide-by-zeros in scm_hasher.
2283
2284 * regex-posix.c (scm_make_regexp): Free rx on error, to avoid memory
2285 leak.
2286
2287 2004-07-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2288
2289 * numbers.c (scm_is_signed_integer, scm_is_unsigned_integer):
2290 Rewritten using the same logic as scm_to_signed_integer and
2291 scm_to_unsigned_integer, respectively, which is better(tm). Also,
2292 use CHAR_BIT instead of hardcoding 8.
2293 (LLONG_MIN, LLONG_MAX, ULLONG_MAX): Removed and used
2294 SCM_I_LLONG_MIN etc. instead.
2295
2296 * numbers.h (SCM_MAKINUM, SCM_I_MAKINUM): Renamed SCM_MAKINUM to
2297 SCM_I_MAKINUM and changed all uses.
2298 * deprecated.h, deprecated.c (SCM_MAKINUM): Newly deprecated.
2299
2300 * gen-scmconfig.c (SCM_I_LLONG_MIN, SCM_I_LLONG_MAX,
2301 SCM_I_ULLONG_MAX): Instead of hard-coding the numbers, compute
2302 them by assuming twos-complement.
2303
2304 2004-07-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2305
2306 * gen-scmconfig.h.in: Added all the new SCM_I_GSC_*_LIMITS that
2307 configure now produces.
2308 * gen-scmconfig.c: Use them to output SCM_T_INT8_MIN, etc
2309 definitions, giving the limits of the integer types defined by
2310 Guile. Also, output a hard coded SCM_I_LLONG_MIN, etc since
2311 LLONG_MIN or LONG_LONG_MIN is hard to get at.
2312
2313 * numbers.h (scm_to_short, scm_to_ushort): It's SHRT_MIN, etc, not
2314 SHORT_MIN.
2315 (scm_to_size_t): Use SIZE_MAX instead of cooking our own.
2316 (scm_to_long_long, scm_to_ulong_long, scm_to_int8, scm_to_uint8,
2317 scm_to_int16, scm_to_uint16, scm_to_int32, scm_to_uint32,
2318 scm_to_int64, scm_to_uint64, scm_to_intmax, scm_to_uintmax,
2319 scm_from_long_long, scm_from_ulong_long, scm_from_int8,
2320 scm_from_uint8, scm_from_int16, scm_from_uint16, scm_from_int32,
2321 scm_from_uint32, scm_from_int64, scm_from_uint64, scm_from_intmax,
2322 scm_from_uintmax): New.
2323
2324 2004-07-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2325
2326 * tags.h (scm_is_eq): New.
2327
2328 * deprecated.h, boolean.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOL,
2329 SCM_NEGATE_BOOL, SCM_BOOLP): Deprecated by moving into
2330 "deprecated.h". Replaced all uses with scm_is_false, scm_is_true,
2331 scm_from_bool, and scm_is_bool, respectively.
2332
2333 * boolean.h (scm_is_bool): Fix bug in prototype.
2334 (scm_from_bool): The argument is "x" not "f", stupid.
2335
2336 * boolean.c (scm_is_bool): Fix typo.
2337
2338 * numbers.h, numbers.c (scm_is_integer, scm_is_signed_integer,
2339 scm_is_unsigned_integer, scm_to_signed_integer,
2340 scm_to_unsigned_integer, scm_to_schar, scm_to_uchar, scm_to_char,
2341 scm_to_short, scm_to_ushort, scm_to_long, scm_to_ulong,
2342 scm_to_size_t, scm_to_ssize_t, scm_from_schar, scm_from_uchar,
2343 scm_from_char, scm_from_short, scm_from_ushort, scm_from_int,
2344 scm_from_uint, scm_from_long, scm_from_ulong, scm_from_size_t,
2345 scm_from_ssize_t, scm_is_real, scm_to_double, scm_from_double):
2346 New.
2347
2348 2004-07-05 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2349
2350 * boolean.h, boolean.c (scm_is_true, scm_is_false, scm_from_bool,
2351 scm_to_bool): New.
2352
2353 2004-06-27 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2354
2355 * backtrace.c (display_expression, display_frame): Call
2356 scm_i_unmemoize_expr for unmemoizing a memoized object holding a
2357 single memoized expression.
2358
2359 * debug.c (memoized_print): Don't try to unmemoize the memoized
2360 object, since we can't know whether it holds a single expression
2361 or a body.
2362
2363 (scm_mem_to_proc): Removed check for lambda expression, since it
2364 was moot anyway. Whoever uses these functions for debugging
2365 purposes should know what they do: Creating invalid memoized code
2366 will cause crashes, independent of whether this check is present
2367 or not.
2368
2369 (scm_proc_to_mem): Take the closure's code as it is and don't
2370 append a SCM_IM_LAMBDA isym. To allow easier debugging, the
2371 memoized code should not be modified.
2372
2373 * debug.[ch] (scm_unmemoize, scm_i_unmemoize_expr): Removed
2374 scm_unmemoize from public use, but made scm_i_unmemoize_expr
2375 available as a guile internal function instead. However,
2376 scm_i_unmemoize_expr will only work on memoized objects that hold
2377 a single memoized expression. It won't work with bodies.
2378
2379 * debug.c (scm_procedure_source), macros.c (macro_print), print.c
2380 (scm_iprin1): Call scm_i_unmemocopy_body for unmemoizing a body,
2381 i. e. a list of expressions.
2382
2383 * eval.c (unmemoize_exprs): Drop internal body markers from the
2384 output during unmemoization.
2385
2386 * eval.[ch] (scm_unmemocopy, scm_i_unmemocopy_expr,
2387 scm_i_unmemocopy_body): Removed scm_unmemocopy from public use,
2388 but made scm_i_unmemocopy_expr and scm_i_unmemocopy_body available
2389 as guile internal functions instead. scm_i_unmemoize_expr will
2390 only work on a single memoized expression, while
2391 scm_i_unmemocopy_body will only work on bodies.
2392
2393 2004-06-21 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2394
2395 * eval.c (unmemoize_exprs): Handle semi-memoized code.
2396
2397 (scm_cons_source, scm_primitive_eval): Prefer higher level
2398 predicate SCM_FALSEP over SCM_IMP.
2399
2400 2004-06-15 Rob Browning <rlb@defaultvalue.org>
2401
2402 * script.c (scm_shell_usage): minor phrasing change.
2403
2404 * gc_os_dep.c: update ifdefery for macosx.
2405 (scm_get_stack_base): separate result initialization from
2406 declaration to slience warnings with macosx and hp-ux using gcc
2407 3.3. Thanks to Andreas Vögele.
2408
2409 2004-06-13 Han-Wen Nienhuys <hanwen@xs4all.nl>
2410
2411 * eval.c (unmemoize_exprs): use SCM_CONSP for the loop condition.
2412
2413 2004-06-06 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2414
2415 * list.[ch] (scm_i_finite_list_copy): New internal function to
2416 copy lists that are known to be finite (though not necessarily
2417 proper).
2418
2419 * debug.c (scm_procedure_source): Don't have scm_unmemocopy treat
2420 a closure's argument list like an expression of a body.
2421
2422 * eval.c (unmemoize_expression, unmemoize_exprs, unmemoize_and,
2423 unmemoize_begin, unmemoize_case, unmemoize_cond, unmemoize_delay,
2424 unmemoize_do, unmemoize_if, unmemoize_lambda, unmemoize_let,
2425 unmemoize_letrec, unmemoize_letstar, unmemoize_or,
2426 unmemoize_set_x, unmemoize_apply, unmemoize_atcall_cc,
2427 unmemoize_at_call_with_values, unmemoize_future, sym_atslot_ref,
2428 unmemoize_atslot_ref, sym_atslot_set_x, unmemoize_atslot_set_x,
2429 unmemoize_builtin_macro): New static functions and symbols.
2430
2431 (scm_unmemocopy): Rewritten in terms of the above. scm_unmemocopy
2432 now has a slightly different meaning: The memoized form that is
2433 receives as its argument is now interpreted as a sequence of
2434 expressions from a body.
2435
2436 (unmemocar, scm_unmemocar): Since the whole functionality of
2437 unmemocar and scm_unmemocar is not needed any more, scm_unmemocar
2438 has its old content back and is deprecated, while unmemocar has
2439 been removed.
2440
2441 (SCM_BIT7): Removed.
2442
2443 (CEVAL): For unmemoizing a single expression, call
2444 unmemoize_expression instead of scm_unmemocopy, which now expects
2445 a sequence of body expressions. Eliminated unnecessary empty
2446 environment frame when executing let* forms. Eliminated
2447 unmemoization step from evaluator.
2448
2449 2004-06-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2450
2451 * eval.c (scm_macroexp, macroexp): Renamed scm_macroexp to
2452 macroexp and made static. Added new version of scm_macroexp that
2453 emits a deprecation warning and then calls macroexp.
2454 (scm_m_undefine): Issue deprecation warning.
2455
2456 2004-05-30 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2457
2458 * eval.c (lookup_global_symbol, literal_p, try_macro_lookup):
2459 Modified to make set! work on symbols that represent syntactic
2460 keywords.
2461
2462 2004-05-26 Han-Wen Nienhuys <hanwen@xs4all.nl>
2463
2464 * gc.h (SCM_CELL_OBJECT_LOC): use SCM_GC_CELL_OBJECT to prevent
2465 compound expression as lvalue errors.
2466
2467 2004-05-24 Marius Vollmer <mvo@zagadka.de>
2468
2469 * dynwind.c (winder_mark): Use SCM_PACK to correctly convert the
2470 WINDER_DATA to a SCM.
2471
2472 2004-05-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2473
2474 * goops.c (compute_getters_n_setters, create_standard_classes,
2475 scm_add_slot): Compute closures by calling scm_i_eval_x on a
2476 lambda expression rather than creating them with scm_closure.
2477
2478 2004-05-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2479
2480 * eval.c (s_macro_keyword, scm_m_set_x): Remove checking for
2481 misplaced syntactic keywords. This will not work unless guile's
2482 defmacro feature is deprecated.
2483
2484 (scm_m_case): Fixed a bug that caused the list of labels to grow
2485 with every case form.
2486
2487 2004-05-19 Kevin Ryde <user42@zip.com.au>
2488
2489 * numbers.c (scm_round_number): For inum and big, just return x. For
2490 real, use scm_round for 2^54-1 etc problems covered there.
2491
2492 * numbers.c (trunc): Remove #define to scm_truncate when the C library
2493 doesn't provide trunc. This was for when `truncate' was done as a
2494 scm_tc7_dsubr, no longer required.
2495
2496 * threads.c (scm_threads_mark_stacks) [SCM_STACK_GROWS_UP]: Correction
2497 to stack marking call, two parameters and no cast on t->base.
2498
2499 2004-05-18 Marius Vollmer <mvo@zagadka.de>
2500
2501 * hashtab.c (rehash_after_gc): Bug fix: properly link the
2502 processed hashtables back into the weak_hashtables list. Thanks
2503 to Bill Schottstaedt!
2504
2505 2004-05-16 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2506
2507 * eval.c (unmemoize_quote): New static function.
2508
2509 (scm_m_quote, scm_m_atslot_ref, SCM_CEVAL): Changed the byte code
2510 representation of 'quote' and '@slot-ref' to an improper list.
2511 This reduces execution time, the number of cells used to hold the
2512 memoized code, and thus also reduces garbage collection time.
2513
2514 (scm_unmemocopy): Use unmemoize_quote for quote expressions.
2515
2516 (SCM_CEVAL): Changed macro handling to also work with macros that
2517 return improper lists. Added an assertion, that the code returned
2518 by a macro transformer will not lead to cycles in the memoized
2519 code.
2520
2521 2004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2522
2523 No functional change, just rearrangements of functions within the
2524 file.
2525
2526 * eval.c (scm_ilookup, scm_unbound_variable_key,
2527 error_unbound_variable, scm_lookupcar1, scm_lookupcar): Moved to
2528 the definitions used for execution, since that's where they will
2529 belong to later.
2530
2531 2004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2532
2533 * numbers.h (SCM_SLOPPY_FRACTIONP): Removed. It was not used
2534 throughout guile, has not been part of an official release yet,
2535 and the concept of sloppy predicates has never been a good idea.
2536
2537 (SCM_FRACTION_NUMERATOR, SCM_FRACTION_DENOMINATOR,
2538 SCM_FRACTION_SET_NUMERATOR, SCM_FRACTION_SET_DENOMINATOR):
2539 Simplified.
2540
2541 2004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2542
2543 * throw.c (SETJBJMPBUF, SCM_SETJBDFRAME): Add cast to scm_t_bits
2544 to make explicit what happens.
2545
2546 2004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2547
2548 * dynl.c (SET_DYNL_HANDLE): Add cast to scm_t_bits to make
2549 explicit what happens.
2550
2551 * guardians.c (TCONC_IN): Use SCM_SET_CELL_OBJECT_x rather than
2552 SCM_SET_CELL_WORD_x when writing scheme objets to cell elements.
2553
2554 2004-05-11 Marius Vollmer <mvo@zagadka.de>
2555
2556 * scmsigs.c (scm_sigaction_for_thread): Validate that the handler
2557 is indeed a procedure when it isn't a number.
2558
2559 2004-05-10 Marius Vollmer <mvo@zagadka.de>
2560
2561 Convert floating point numbers into strings with an arbitrary
2562 radix. Thanks to Richard Todd!
2563
2564 * numbers.c (FLOBUFLEN): Increase so that radix 2 strings will
2565 fit.
2566 (fx): Removed.
2567 (scm_dblprec, fx_per_radix, init_dblprec, init_fx_radix,
2568 number_chars): New, to support variable radices.
2569 (idbl2str): Use above instead of the old base-10 only tables.
2570 (iflo2str): Pass on new RADIX argument to idbl2str.
2571 (scm_number_to_string): Pass radix to iflo2str.
2572 (scm_print_real, scm_print_complex): Explicitly pass radix 10 to
2573 iflo2str.
2574 (scm_init_numbers): Call init_dblprec and init_fx_radix for all
2575 possible radices.
2576
2577 2004-05-10 Kevin Ryde <user42@zip.com.au>
2578
2579 * numbers.c (scm_logbit_p): Correction to test above the end of an
2580 inum. Reported by Jan Konecny.
2581
2582 2004-05-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2583
2584 * gc.h (scm_t_cell): Fields are now of type SCM instead of
2585 scm_t_bits. Updated all users.
2586 (SCM_GC_CARD_SIZE_MASK): Use SCM_GC_SIZEOF_CARD instead of
2587 duplicating the code.
2588 (SCM_CELL_OBJECT_LOC): New.
2589 (SCM_CARLOC, SCM_CDRLOC): Use it instead of SCM_CELL_WORD_LOC.
2590 (SCM_CELL_WORD_LOC): Moved to "deprecated.h".
2591
2592 * smob.h (SCM_SMOB_DATA_2, SCM_SMOB_DATA_3, SCM_SMOB_FLAGS,
2593 SCM_SET_SMOB_DATA_2, SCM_SET_SMOB_DATA_3, SCM_SET_SMOB_FLAGS,
2594 SCM_SMOB_OBJECT, SCM_SMOB_OBJECT_2, SCM_SMOB_OBJECT_3,
2595 SCM_SET_SMOB_OBJECT, SCM_SET_SMOB_OBJECT_2, SCM_SET_SMOB_OBJECT_3,
2596 SCM_SMOB_OBJECT_LOC, SCM_SMOB_OBJECT_2_LOC,
2597 SCM_SMOB_OBJECT_3_LOC): New.
2598 * smob.c (scm_i_set_smob_flags): New function.
2599
2600 * dynl.c, dynwind.c, eval.h, fluids.h, futures.h, hashtab.h,
2601 hooks.h, keywords.h, macros.h, macros.c, mallocs.c, mallocs.h,
2602 random.h, regex-posix.h, root.h, srcprop.h, srcprop.c, threads.h:
2603 Use SCM_SMOB_* instead of SCM_CELL_* as appropriate. Use
2604 SCM_SMOB_FLAGS and SCM_SET_SMOB_FLAGS instead of accessing the
2605 zeroth word directly. Use SCM_SMOB_PREDICATE as appropriate.
2606
2607 * numbers.h (SCM_I_BIG_MPZ): Use SCM_CELL_OBJECT_LOC instead of
2608 taking the address of SCM_CELL_WORD_1, the latter being no longer
2609 an lvalue.
2610
2611 * variable.h (SCM_VARIABLE_LOC): Use SCM_CELL_OBJECT_LOC instead
2612 of casting SCM_CELL_WORD_LOC.
2613
2614 2004-05-02 Kevin Ryde <user42@zip.com.au>
2615
2616 * eval.c (scm_macroexp): Add prototype, since it's not in eval.h under
2617 --disable-deprecated. Reported by Andreas Vögele.
2618
2619 * filesys.c (_POSIX_C_SOURCE): Define to 199506L to get readdir_r (in
2620 particular on HP-UX). Reported by Andreas Vögele.
2621
2622 * list.c (varargs.h): Remove, leave just stdarg.h which is all the
2623 code has support for. Fixes building with AIX cc, which is ansi but
2624 doesn't define __STDC__. Reported by Keith Crane.
2625 (var_start): Remove macro, this variation no longer required.
2626 (scm_list_n): Use va_start directly.
2627
2628 2004-05-01 Kevin Ryde <user42@zip.com.au>
2629
2630 * continuations.c (scm_dynthrow): Use >= instead of SCM_PTR_GE which
2631 is now gone. Reported by Andreas Vögele.
2632
2633 2004-04-28 Kevin Ryde <user42@zip.com.au>
2634
2635 * backtrace.c (display_frame_expr), numbers.c (XDIGIT2UINT,
2636 mem2uinteger, mem2decimal_from_point, mem2ureal): Cast char to int for
2637 ctype.h tests, to avoid warnings from gcc on HP-UX about char as array
2638 subscript. Reported by Andreas Vögele.
2639 Also cast through unsigned char to avoid passing negatives to those
2640 macros if input contains 8-bit values.
2641
2642 * num2integral.i.c (NUM2INTEGRAL): Under non-BIGMPZ_FITSP case,
2643 corrections to range check for signed numbers. Remove
2644 scm_remember_upto_here_1(num) from these checks, since num is used
2645 subsequently anyway.
2646
2647 * num2integral.i.c (NUM2INTEGRAL): Test BIGMPZ_FITSP with "!= 0" to
2648 avoid warning from gcc 3.4. Reported by Hyperdivision.
2649
2650 * numbers.c (scm_bit_extract): Use min instead of MIN.
2651 (MIN): Remove, this conflicts with similar macro defined by limits.h
2652 on HP-UX. Reported by Andreas Vögele.
2653
2654 * stime.c (_POSIX_C_SOURCE): Define to 199506L to get gmtime_r (in
2655 particular on HP-UX). Reported by Andreas Vögele.
2656
2657 * threads.c (scm_threads_mark_stacks): Correction sizet -> size_t.
2658 Reported by Andreas Vögele.
2659
2660 * threads-plugin.h (SCM_MUTEX_MAXSIZE): Increase to 25*sizeof(long),
2661 for the benefit of hpux11 where pthread_mutex_t is 88 bytes. Reported
2662 by Andreas Vögele.
2663
2664 2004-04-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2665
2666 * eval.c (s_macro_keyword): New static identifier.
2667
2668 (scm_m_define): Change order to first create binding and
2669 evaluating the expression afterwards.
2670
2671 (scm_m_set_x): Memoize complete set! expression. Only leave
2672 symbols if no binding exists at memoization time. Throw error if
2673 assigning to a syntactic keyword.
2674
2675 (lazy_memoize_variable): New function.
2676
2677 (CEVAL): When execution set!, perform lazy memoization if
2678 unmemoized symbol is detected.
2679
2680 * modules.c (module_variable): Return variables with unbound
2681 value.
2682
2683 * tags.h: Fix comment.
2684
2685 2004-04-25 Kevin Ryde <user42@zip.com.au>
2686
2687 * chars.c (scm_char_upcase, scm_char_downcase, scm_c_upcase,
2688 scm_c_downcase): Use ctype.h toupper and tolower. This will be useful
2689 in 8-bit locales, and ensures consistency with char-upper-case? and
2690 char-lower-case? which already use ctype.h.
2691 (scm_c_upcase_table, scm_c_downcase_table, scm_lowers, scm_uppers):
2692 Remove.
2693 * chars.c, chars.h, init.c (scm_tables_prehistory): Remove.
2694
2695 * socket.c (VALIDATE_INET6): Correction to bignum_in_ipv6_range_p
2696 call. Reported by Hyperdivision.
2697
2698 * threads.c (scm_yield): Correction, actually call scm_thread_yield.
2699 Reported by Hyperdivision.
2700
2701 * unif.c (s_scm_make_uve): Remove unused local variable. Reported by
2702 Hyperdivision.
2703
2704 2004-04-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2705
2706 Hide the implementation of ilocs and isyms in eval.c.
2707
2708 * deprecated.h (SCM_IFRINC, SCM_ICDR, SCM_IFRAME, SCM_IDIST,
2709 SCM_ICDRP), eval.c (SCM_IFRINC, SCM_ICDR, SCM_IFRAME, SCM_IDIST,
2710 SCM_ICDRP), eval.h (SCM_ICDR, SCM_IFRINC, SCM_IFRAME, SCM_IDIST,
2711 SCM_ICDRP): Deprecated and added to deprecated.h. Moved from
2712 eval.h to eval.c.
2713
2714 * deprecated.c (scm_isymnames), deprecated.h (scm_isymnames,
2715 SCM_ISYMNUM, SCM_ISYMCHARS), eval.c (SCM_ISYMNUM, isymnames,
2716 scm_unmemocopy, CEVAL), print.c (scm_isymnames), tags.h
2717 (SCM_ISYMNUM, scm_isymnames, SCM_ISYMCHARS): Deprecated
2718 scm_isymnames, SCM_ISYMNUM and SCM_ISYMCHARS and added to
2719 deprecated.[hc]. Moved scm_isymnames from print.c to eval.c and
2720 renamed to isymnames. Moved SCM_ISYMNUM from tags.h to eval.c and
2721 renamed to ISYMNUM.
2722
2723 * eval.c (scm_i_print_iloc, scm_i_print_isym), eval.h
2724 (scm_i_print_iloc, scm_i_print_isym), print.c (scm_iprin1):
2725 Extracted printing of ilocs and isyms to guile internal functions
2726 scm_i_print_iloc, scm_i_print_isym of eval.c.
2727
2728 2004-04-22 Kevin Ryde <user42@zip.com.au>
2729
2730 * numbers.c (scm_bit_extract): Use SCM_SRS for signed right shift.
2731
2732 * numbers.c (scm_round): Test for x already an integer, to avoid bad
2733 rounding in x+0.5 when x is a big value already an integer. In
2734 certain hardware rounding cases x+0.5 can give an adjacent integer,
2735 leading to that as the result, when we really just wanted x itself.
2736
2737 2004-04-19 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2738
2739 * eval.c (scm_unmemocopy): Fixed unmemoization of let*.
2740
2741 (deval_args, CEVAL): Minor improvements: Reduced variable scopes,
2742 added const qualifiers, cast intentionally unused expressions to
2743 void for emphasis, improved comment.
2744
2745 2004-04-18 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2746
2747 * tags.h (scm_tags, scm_tc8_tags, scm_tc9_flag, scm_tc8_flag,
2748 scm_tc8_isym): Renamed scm_tags to scm_tc8_tags. Renamed
2749 scm_tc9_flag to scm_tc8_flag. Introduced new identifier
2750 scm_tc8_isym. Defined tc8-tags relative to scm_tc3_imm24.
2751 Defined the tc8-tag for flags to be 0x04, which will mean that
2752 SCM_BOOL_F will also have the value 0x04 instead of 0x013c. Due
2753 to the reduced number of bits and the simpler bit pattern for
2754 SCM_BOOL_F, certain machines may be able to use more efficient
2755 processor instructions to deal with SCM_BOOL_F.
2756
2757 (SCM_ITAG9, SCM_MAKE_ITAG9, SCM_ITAG9_DATA): Removed. These have
2758 never been defined in a released version, thus no need to
2759 deprecate them.
2760
2761 (SCM_IFLAGP, SCM_MAKIFLAG, SCM_IFLAGNUM): Flags now use tc8
2762 instead of tc9 tags.
2763
2764 (SCM_ISYMP, SCM_MAKISYM, SCM_ISYMNUM): Isyms now use tc8 instead
2765 of tc9 tags.
2766
2767 (SCM_MAKSPCSYM): Removed. It is almost impossible that user code
2768 could have used this definition.
2769
2770 (SCM_IM_AND, SCM_IM_BEGIN, SCM_IM_CASE, SCM_IM_COND, SCM_IM_DO,
2771 SCM_IM_IF, SCM_IM_LAMBDA, SCM_IM_LET, SCM_IM_LETSTAR,
2772 SCM_IM_LETREC, SCM_IM_OR, SCM_IM_QUOTE, SCM_IM_SET_X): Now encoded
2773 as isyms, as special isyms don't exist any more.
2774
2775 2004-04-18 Kevin Ryde <user42@zip.com.au>
2776
2777 * filesys.c (scm_readdir): Use readdir_r when available, for thread
2778 safety.
2779
2780 * numbers.c (scm_max, scm_min): For big/real, use SCM_SWAP rather than
2781 explicit swapping code.
2782
2783 2004-04-15 Kevin Ryde <user42@zip.com.au>
2784
2785 * cpp_sig_symbols.in: Add SIGSYS.
2786
2787 * list.c (scm_append_x): Use iterative style, to avoid non-tail
2788 recursion.
2789
2790 * numbers.c (scm_max, scm_min): For inum/frac, frac/inum, big/frac,
2791 frac/big and frac/frac, use scm_less_p for exact comparison.
2792
2793 * numbers.c (scm_gcd): For inum/big, use mpz_gcd_ui by sharing code
2794 with big/inum.
2795
2796 * numbers.c (xisinf): Add a comment about solaris 7 lacking isinf.
2797
2798 2004-04-06 Han-Wen Nienhuys <hanwen@xs4all.nl>
2799
2800 * inline.h (scm_cell): use SCM_GC_CELL_WORD for checking tag.
2801
2802 * chars.h (scm_init_chars): change scm_{upcase,downcase} to
2803 scm_c_{up,down}case.
2804 (SCM_MAKE_CHAR): add (unsigned char) cast. This prevents havoc
2805 when hi-bit ASCII is subjected to SCM_MAKE_CHAR().
2806
2807 2004-04-06 Kevin Ryde <user42@zip.com.au>
2808
2809 * numbers.c (scm_ash): Remove stray "}" in docstring.
2810
2811 * numbers.c (scm_make_ratio): For inum/bignum integer detection, use
2812 x==SCM_MOST_NEGATIVE_FIXNUM explicitly, for clarity and to avoid
2813 calling mpz_cmp_ui in most cases.
2814
2815 * numbers.c (scm_quotient, scm_remainder): In inum/big, use mpz_cmp_ui
2816 for big == abs(most-negative-fixnum) special case.
2817 (abs_most_negative_fixnum): Remove, no longer used.
2818
2819 * scmsigs.c (scm_sigaction_for_thread): Correction to signum range
2820 test, avoids SCM_VECTOR_REF outside bounds of signal_handlers on
2821 calling (sigaction NSIG).
2822
2823 * simpos.c (scm_system_star): Fix execargv memory leak, merge parent
2824 and fork error cases to do this.
2825
2826 2004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2827
2828 * eval.c (CEVAL): Don't distinguish between short and long
2829 instructions when dispatching - just always dispatch on the
2830 instruction code, which is common for short and long instructions.
2831 Further, removed unnecessary goto statements and added comment.
2832
2833 2004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2834
2835 * eval.c (scm_unmemocopy): Don't distinguish between short and
2836 long instructions when dispatching - just always dispatch on the
2837 instruction code, which is common for short and long instructions.
2838 Further, removed unnecessary goto statements, fixed indentation
2839 and replaced SCM_IMP predicates by SCM_NULLP.
2840
2841 2004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2842
2843 * eval.c (scm_lookupcar1, CEVAL): Use SCM_ILOCP instead of
2844 comparison with SCM_ILOC00. In CEVAL, eliminate goto-label
2845 'checkmacro'.
2846
2847 2004-03-31 Kevin Ryde <user42@zip.com.au>
2848
2849 * simpos.c: Include <signal.h> for SIG_IGN and friends.
2850
2851 2004-03-29 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2852
2853 Introduce scm_debug_mode_p as a replacement for scm_debug_mode and
2854 SCM_DEBUGGINGP:
2855
2856 * debug.h (scm_debug_mode_p, scm_debug_mode, SCM_DEBUGGINGP),
2857 eval.c (scm_debug_mode_p): Deprecated scm_debug_mode and
2858 SCM_DEBUGGINGP. Provided scm_debug_mode_p instead, to have one
2859 single interface that also matches the naming conventions.
2860 Probably scm_debug_mode_p should be part of the private interface
2861 anyway.
2862
2863 * debug.h (scm_debug_mode_p), backtrace.c (display_error_body),
2864 eval.c (SCM_APPLY, scm_trampoline_0, scm_trampoline_1,
2865 scm_trampoline_2): Change uses of scm_debug_mode or SCM_DEBUGGINGP
2866 to scm_debug_mode_p.
2867
2868
2869 Deprecate direct access to scm_ceval, scm_deval and scm_ceval_ptr:
2870
2871 * eval.h (scm_ceval, scm_deval, scm_ceval_ptr), debug.h
2872 (scm_ceval_ptr): Deprecated. Moved declaration of scm_ceval_ptr
2873 from debug.h to eval.h.
2874
2875 * debug.h (SCM_RESET_DEBUG_MODE): Don't access scm_ceval_ptr any
2876 more, just leave it with setting scm_debug_mode_p, which is
2877 equivalent for practical purposes.
2878
2879 * deprecated.h (SCM_XEVAL, SCM_XEVALCAR): Call scm_i_eval_x
2880 instead of *scm_ceval_ptr. Leave all evaluating to scm_i_eval_x.
2881
2882 * gdbint.c (gdb_eval): Call scm_i_eval_x instead of scm_ceval.
2883
2884 * eval.c (ceval, deval, scm_ceval, scm_deval): Made scm_ceval
2885 static and renamed it to ceval throughout. Provide a new exported
2886 but deprecated function scm_ceval as a wrapper for backwards
2887 compatibility. The same is done for the deval/scm_deval pair of
2888 functions.
2889
2890 * eval.c (CEVAL, SCM_CEVAL): Renamed SCM_CEVAL to CEVAL
2891 throughout. Defined CEVAL to ceval or deval, based on compilation
2892 phase.
2893
2894 * eval.c (SCM_XEVAL, SCM_XEVALCAR): Dispatch on scm_debug_mode_p
2895 to ceval and deval instead of calling *scm_ceval_ptr.
2896
2897 * eval.c (dispatching_eval): New deprecated static function.
2898
2899 * eval.c (scm_ceval_ptr): Initialized to dispatching_eval in order
2900 to emulate its old behaviour as closely as possible.
2901
2902
2903 Change the evaluator such that only expressions for which pair? is
2904 true are passed to CEVAL, and such that all other expressions are
2905 evaluated outside of CEVAL:
2906
2907 * eval.c (EVAL): New, provided in analogy to EVALCAR. Evaluate an
2908 expression that is assumed to be memoized already. All but
2909 expressions of the form '(<form> <form> ...)' are evaluated inline
2910 without calling an evaluator.
2911
2912 * eval.c (SCM_XEVAL, SCM_XEVALCAR, EVALCAR): Evaluate all but
2913 expressions of the form '(<form> <form> ...)' inline without
2914 calling an evaluator.
2915
2916 * eval.c (scm_i_eval_x, scm_i_eval, scm_ceval, scm_deval): Handle
2917 the special case of unmemoized symbols passed on the top level.
2918
2919 * eval.c (CEVAL): Change calls to CEVAL to EVAL, except where it
2920 is known that the expression passed to CEVAL is of the form
2921 '(<form> <form> ...)'. Remove handling of the tc7-objects, since
2922 now it is known that the input expression of CEVAL is a pair.
2923
2924 2004-03-29 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2925
2926 * eval.c (is_self_quoting_p): New static function.
2927
2928 (scm_m_quote): Use is_self_quoting_p.
2929
2930 (copy_tree): Corrected typo in comment.
2931
2932 2004-03-28 Han-Wen Nienhuys <hanwen@xs4all.nl>
2933
2934 * eval.c (s_scm_copy_tree): idem.
2935
2936 * list.c (s_scm_filter): remove "pointer" from doc string.
2937
2938 * gc.h (SCM_GC_CELL_TYPE): SCM_GC_CELL_TYPE uses SCM_GC_CELL_OBJECT.
2939
2940 * goops.h (SCM_NUMBER_OF_SLOTS): don't SCM_UNPACK the result.
2941
2942 * backtrace.c ("display_backtrace_body"): SCM_PACK before SCM_EQ_P
2943 (display_frame): idem.
2944 (display_backtrace_file_and_line): idem.
2945
2946 * tags.h (SCM_UNPACK): stricter typechecking on SCM_UNPACK
2947 arguments.
2948
2949 2004-03-26 Kevin Ryde <user42@zip.com.au>
2950
2951 * filesys.c (scm_getcwd, scm_readlink): Avoid memory leak on errors.
2952
2953 * numbers.c (scm_modulo): For inum/big and big/big, remove test of
2954 big==0 since that never occurs.
2955
2956 * numbers.c, numbers.h (scm_modulo_expt): Renamed from
2957 scm_modular_expt, matching scheme level name `modulo-expt'.
2958
2959 * numbers.c (scm_modular_expt): Return a negative remainder for a
2960 negative divisor, the same as `modulo' does.
2961
2962 2004-03-26 Eric Hanchrow <offby1@blarg.net>
2963
2964 * numbers.c, numbers.h (scm_modular_expt): New function.
2965
2966 2004-03-25 Kevin Ryde <user42@zip.com.au>
2967
2968 * numbers.c (scm_min, scm_max): Correction to big/real and real/big,
2969 return inexact as required by r5rs.
2970
2971 2004-03-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2972
2973 * eval.c: Separated some definitions relevant for execution from
2974 the memoization part of the file.
2975
2976 (copy_tree): New static function
2977
2978 (scm_copy_tree): Rewritten to fix two kinds or bugs: First, cyclic
2979 structures are detected now and will lead to an exception instead
2980 of forcing guile to run in an endless loop, using up all the
2981 system's memory. Second, arrays in the cdr of an improper list
2982 are now copied. See the new test cases in eval.test.
2983
2984 2004-03-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2985
2986 * posix.c (scm_gethostname): Make sure len is initialised before
2987 it is used. Restructured to (hopefully) represent possible
2988 configurations more clearly in the code. Added unwind handler.
2989
2990 2004-03-23 Kevin Ryde <user42@zip.com.au>
2991
2992 * posix.c (scm_gethostname): Use sysconf(_SC_HOST_NAME_MAX) and/or
2993 MAXHOSTNAMELEN when available.
2994
2995 2004-03-21 Marius Vollmer <mvo@zagadka.de>
2996
2997 * read.c (skip_scsh_block_comment): Also recognize '\r' as a line
2998 terminator. Rewritten the logic as a state machine, I must have
2999 been doing too much VHDL lately...
3000
3001 * eval.c (scm_ceval, scm_deval): Explicitely evaluate ports to
3002 themselves. Thanks to Han-Wen Nienhuys!
3003
3004 * list.c: Changed docstrings so that they no longer talk about
3005 returning 'pointers' to something.
3006
3007 2004-03-20 Han-Wen Nienhuys <hanwen@xs4all.nl>
3008
3009 * gc.c: remove set_debug_cell_accesses! when
3010 SCM_DEBUG_CELL_ACCESSES is not defined. Scheme source code should
3011 use (if (defined? 'set-debug-cell-accesses!) .. ) to switch on
3012 debugging conditionally.
3013
3014 2004-03-21 Kevin Ryde <user42@zip.com.au>
3015
3016 * stime.c (scm_gmtime): Use gmtime_r when available, for thread safety.
3017
3018 2004-03-20 Kevin Ryde <user42@zip.com.au>
3019
3020 * posix.c (scm_gethostname): Preserve errno across free() call.
3021
3022 2004-03-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
3023
3024 * gc-card.c (sweep_card): use SCM_GC_SET_CELL_WORD for setting
3025 free cells.
3026
3027 2004-03-14 Kevin Ryde <user42@zip.com.au>
3028
3029 * stime.c: Define _GNU_SOURCE for strptime prototype from glibc.
3030 (strptime): Use HAVE_DECL_STRPTIME for when to give own prototype.
3031
3032 2004-03-07 Kevin Ryde <user42@zip.com.au>
3033
3034 * stime.c (scm_gmtime): Return bd_time->tm_zone when available, rather
3035 than "GMT" always.
3036 (filltime): Make zname parameter "const".
3037
3038 2004-03-03 Mikael Djurfeldt <mdj@chunk.mit.edu>
3039
3040 * threads.c, threads.h (scm_c_scm2thread): New function.
3041
3042 2004-02-29 Kevin Ryde <user42@zip.com.au>
3043
3044 * numbers.c (guile_ieee_init): Use C99 INFINITY and NAN when
3045 available. Test HAVE_DINFINITY and HAVE_DQNAN for those globals, in
3046 particular don't assume "defined (__alpha__) && ! defined (linux)"
3047 means OSF. Remove "SCO" code, which was not really SCO specific and
3048 which John W. Eaton advises should be long past being needed.
3049
3050 * posix.c (scm_execl, scm_execlp, scm_execle): Avoid memory leak under
3051 error throw.
3052
3053 2004-02-24 Kevin Ryde <user42@zip.com.au>
3054
3055 * posix.c (scm_cuserid): Use a private result buffer, for thread safe.
3056
3057 2004-02-22 Kevin Ryde <user42@zip.com.au>
3058
3059 * numbers.c (scm_max, scm_min): For one arg, dispatch to generic for
3060 complex, same as for two args. (Handle only inum, big, real, frac).
3061
3062 2004-02-21 Kevin Ryde <user42@zip.com.au>
3063
3064 * posix.c (scm_crypt): Use new HAVE_CRYPT.
3065 (<crypt.h>): Remove HAVE_LIBCRYPT condition.
3066 Reported by Andreas Voegele.
3067
3068 2004-02-20 Neil Jerram <neil@ossau.uklinux.net>
3069
3070 * list.c (scm_list_n): Add #if SCM_DEBUG_CELL_ACCESSES_P around
3071 validation.
3072
3073 * read.c (scm_lreadparen): Removed.
3074 (scm_lreadparen1): Renamed scm_i_lreadparen.
3075
3076 2004-02-20 Han-Wen Nienhuys <hanwen@xs4all.nl>
3077
3078 * list.c (scm_list_n): validate non-immediate arguments;
3079 this will catch forgotten a SCM_UNDEFINED.
3080
3081 2004-02-18 Marius Vollmer <mvo@zagadka.de>
3082
3083 * gc.h (scm_gc_cells_collected): Removed duplicated declaration.
3084 Thanks to Bill Schottstaedt!
3085
3086 * socket.h (scm_gethost): Removed prototype it is already in
3087 "net_db.h". Thanks to Bill Schottstaedt!
3088
3089 2004-02-18 Kevin Ryde <user42@zip.com.au>
3090
3091 * num2integral.i.c (INTEGRAL2BIG): WORDS_BIGENDIAN not right for word
3092 order parameter to mpz_import, in fact with just one word there's no
3093 order to worry about at all.
3094
3095 * numbers.c (scm_num_eq_p): For real==frac, complex==frac, frac==real
3096 and frac==complex, make an exact comparison rather than converting
3097 with fraction2double.
3098
3099 * posix.c, putenv.c, stime.c (environ): Use _NSGetEnviron in Darwin
3100 shared library, since environ is not directly available there.
3101
3102 * script.c (scm_shell_usage): Print to stdout for --help, per GNU
3103 standard.
3104
3105 * stime.c (scm_localtime, scm_gmtime, scm_mktime): Provide a default
3106 errno EINVAL in case localtime and gmtime don't set it.
3107 (scm_mktime, scm_strptime): Forcibly use errno EINVAL for our
3108 SCM_SYSERROR, since mktime and strptime generally don't set errno.
3109
3110 2004-02-16 Kevin Ryde <kevin@swox.se>
3111
3112 * gc-malloc.c (scm_done_malloc, scm_done_free): Allow negative sizes,
3113 which were permitted in the past for these.
3114
3115 * num2float.i.c (NUM2FLOAT): Expand isfinite to !xisinf, as per
3116 previous change to numbers.c.
3117
3118 * script.c (scm_shell_usage): Print bug-guile email address, as per
3119 GNU standard. Reported by Han-Wen Nienhuys.
3120
3121 2004-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
3122
3123 * unif.c (scm_make_uve): Removed local variable and simplified
3124 code in order to avoid compiler used uninitialized warnings.
3125
3126 * hashtab.c, hashtab.h (scm_hash_map_to_list): Renamed from
3127 scm_hash_map.
3128 (scm_hash_fold): Use scm_call_3 directly in the call to
3129 scm_internal_hash_fold instead of going via fold_proc (which is
3130 now removed).
3131 (scm_hash_for_each): Use a trampoline +
3132 scm_internal_hash_for_each_handle.
3133 (scm_internal_hash_for_each_handle, scm_hash_for_each_handle): New
3134 functions.
3135
3136 2004-02-12 Kevin Ryde <user42@zip.com.au>
3137
3138 * ports.c (scm_port_line): In docstring, note first line is 0.
3139 (scm_set_port_line_x): In docstring, note first line is 0.
3140 (scm_port_column): In docstring, there's no default to current input
3141 port, and remove shared port-line @defun.
3142 (scm_set_port_column_x): In docstring, there's no default to current
3143 input port, note first column is 0, remove shared set-port-line!
3144 @defun.
3145
3146 * ramap.c (scm_array_fill_x): For fvect and dvect, use scm_num2dbl to
3147 convert args the same way that array-set! does.
3148
3149 * unif.c (scm_make_uve, scm_array_p): Allow fraction 1/3 as prototype
3150 for dvect.
3151 (scm_array_p): Add missing "break"s in switch, fix llvect test look
3152 for "l" not "s", fix dvect to be false for singp(prot) since such a
3153 value is for fvect.
3154 (scm_array_prototype): Return 1/3 for dvect, rather than 0.33..33.
3155 (exactly_one_third): New variable.
3156 (scm_init_unif): Initialize it.
3157
3158 2004-02-10 Neil Jerram <neil@ossau.uklinux.net>
3159
3160 * read.c (scm_read_opts): Change `escaped-parens' to
3161 `elisp-strings'.
3162
3163 2004-02-08 Neil Jerram <neil@ossau.uklinux.net>
3164
3165 * read.c (scm_read_opts): New opts `elisp-vectors' and
3166 `escaped-parens'.
3167 (s_vector): New.
3168 (scm_lreadr): Use scm_lreadparen1 instead of scm_lreadparen. Make
3169 handling of elisp vector syntax dependent on SCM_ENABLE_ELISP and
3170 `elisp-vectors' option instead of SCM_ELISP_READ_EXTENSIONS.
3171 Allow "\(" and "\)" in strings when SCM_ENABLE_ELISP defined and
3172 `escaped-parens' option set.
3173 (scm_read_token): If elisp vector syntax active, disallow [ and ]
3174 in tokens.
3175 (scm_lreadparen): Rewrite as interface to scm_lreadparen1.
3176 (scm_lreadparen1): New.
3177
3178 * read.h: Remove conditionally compiled last arg to
3179 scm_lreadparen.
3180 (SCM_ELISP_VECTORS_P, SCM_ESCAPED_PARENS_P): New.
3181
3182 2004-01-23 Han-Wen Nienhuys <hanwen@xs4all.nl>
3183
3184 * eval.c (m_expand_body): remove stray variable new_body.
3185
3186 2004-01-22 Marius Vollmer <mvo@zagadka.de>
3187
3188 * eval.c (m_expand_body): Rewrite the expression in place (by
3189 overwriting FORMS) also when a letrec is constructed, not only
3190 when no definitions are found. Do not return rewritten expression
3191 to emphasize the in-place rewriting. Changed all users.
3192
3193 2004-01-19 Han-Wen Nienhuys <hanwen@xs4all.nl>
3194
3195 * gc.c: add protected_object_count, a number that is dumped from
3196 gc_stats()
3197
3198 2004-01-11 Marius Vollmer <mvo@zagadka.de>
3199
3200 * dynwind.h, dynwind.c (scm_frame_unwind,
3201 scm_frame_unwind_handler): Renamed and changed all uses.
3202 (scm_frame_rewind, scm_frame_rewind_handler): Likewise.
3203
3204 2004-01-11 Kevin Ryde <user42@zip.com.au>
3205
3206 * unif.c (scm_bit_count, scm_bit_position, s_scm_bit_set_star_x,
3207 s_scm_bit_count_star, s_scm_bit_invert_x): Clarify docstrings, as per
3208 changes made to scheme-compound.texi.
3209
3210 2004-01-10 Marius Vollmer <mvo@zagadka.de>
3211
3212 * print.c (scm_print_symbol_name): Handle #{`foo}#, #{,foo}#,
3213 #{.}#, and all numeric strings specially. Thanks to Paul Jarc!
3214
3215 * guile-snarf.in: Use mkdir to create a unique temporary directory
3216 that we can safely use. Thanks to Stefan Nordhausen!
3217
3218 2004-01-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3219
3220 * dynwind.h, dynwind.c (scm_i_dowinds): Removed 'explicit'
3221 argument since it is always zero now. Changed all callers.
3222 Removed code for handling fluids.
3223
3224 * fluids.c (scm_c_with_fluids): Use frames instead of adding to
3225 the wind chain explicitely. Use scm_c_with_fluid for the common
3226 case of only one fluid.
3227 (scm_with_fluid): New.
3228 (scm_c_with_fluid): Use frames instead of scm_c_with_fluids.
3229
3230 * fluids.h, fluids.c (scm_frame_fluid): New.
3231 (scm_with_fluid): New.
3232 (scm_i_swap_fluids, scm_i_swap_fluids_reverse): Removed.
3233
3234 * dynwind.c (scm_frame_end): Do not use scm_i_dowinds. Instead,
3235 do the unwinding directly. It is simple enough.
3236
3237 * dynwind.h, dynwind.c: Did the following renamings:
3238 scm_begin_frame -> scm_frame_begin,
3239 scm_end_frame -> scm_frame_end,
3240 scm_on_unwind -> scm_frame_unwind,
3241 scm_on_rewind -> scm_frame_rewind,
3242 scm_on_unwind_with_scm -> scm_frame_unwind_with_scm,
3243 scm_on_rewind_with_scm -> scm_frame_rewind_with_scm.
3244 Changed all uses.
3245
3246 * aync.h, async.c: Did the follwing renamings:
3247 scm_with_blocked_asyncs -> scm_frame_block_asyncs,
3248 scm_with_unblocked_asyncs -> scm_frame_unblock_asyncs.
3249 Changed all uses.
3250
3251 * ports.h, ports.c: Did the follwing renamings:
3252 scm_with_current_input_port -> scm_frame_current_input_port,
3253 scm_with_current_output_port -> scm_frame_current_output_port,
3254 scm_with_current_error_port -> scm_frame_current_error_port.
3255 Changed all uses.
3256
3257 2004-01-07 Kevin Ryde <user42@zip.com.au>
3258
3259 * numbers.c (s_bignum): Remove, not used since gmp bignums.
3260 Reported by Richard Todd.
3261
3262 * threads-plugin.h (SCM_MUTEX_MAXSIZE): Increase to 12*sizeof(long),
3263 for the benefit of powerpc-apple-darwin5.5. Reported by Richard Todd.
3264
3265 * unif.c (scm_aind): Test SCM_CONSP rather than !SCM_NULLP while
3266 traversing the args list, fixes segv if an improper list is given.
3267 Reported by Rouben Rostamian.
3268
3269 2004-01-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3270
3271 * ports.c (swap_ports, scm_with_current_foo_port): Do not allocate
3272 swap_data on stack, use a 'malloc obj'.
3273
3274 * fluids.h, fluids.c (scm_make_initial_fluids, scm_copy_fluids,
3275 scm_swap_fluids, scm_swap_fluids_reverse): Renamed to
3276 scm_i_... since they are internal. Changed all uses.
3277
3278 * dynwind.c (frame_print): Removed, use the default printer.
3279 (WINDER_F_MARK, WINDER_MARK_P, winder_mark): New.
3280 (scm_on_unwind_with_scm, scm_on_rewind_with_scm): New. Use above
3281 to protect SCM values.
3282
3283 * dynwind.h (SCM_F_WIND_EXPLICITELY,
3284 SCM_F_WIND_EXPLICITLY): It's "explicitly" not "explicitely", damn.
3285 Changed all uses.
3286 (scm_on_unwind_with_scm, scm_on_rewind_with_scm): New.
3287
3288 2004-01-05 Marius Vollmer <mvo@zagadka.de>
3289
3290 * ports.h, ports.c (scm_with_current_input_port,
3291 scm_with_current_output_port, scm_with_current_error_port): New.
3292
3293 * async.h, async.c (scm_with_blocked_asyncs,
3294 scm_with_unblocked_asyncs): New.
3295
3296 2004-01-03 Marius Vollmer <mvo@zagadka.de>
3297
3298 * dynwind.h, scm_dynwind.c (scm_t_frame_flags, scm_t_wind_flags,
3299 scm_begin_frame, scm_end_frame, scm_on_unwind, scm_on_rewind):
3300 New.
3301 (scm_dowinds, scm_i_dowinds): scm_dowinds has been renamed to
3302 scm_i_dowinds and extended to handle frames and to invoke a 'turn'
3303 function when the outermost wind point has been reached. The
3304 latter is used to copy a continuation stack at the right time.
3305 scm_dowinds remains available.
3306 (SCM_GUARDSP, SCM_BEFORE_GUARD, SCM_AFTER_GUARD, SCM_GUARD_DATA,
3307 tc16_guard, guards_print): Removed.
3308 (scm_internal_dynamic_wind): Reimplemented using frames.
3309
3310 * continuations.c (copy_stack): New, do only the stack copying
3311 part of copy_stack_and_call.
3312 (copy_stack_and_call): Copy the stack after unwinding and before
3313 rewinding.
3314 (scm_dynthrow): Do not call scm_dowinds, this is now done by
3315 copy_stack_and_call.
3316
3317 2004-01-04 Kevin Ryde <user42@zip.com.au>
3318
3319 * numbers.c (scm_less_p): Don't convert frac to float for compares,
3320 can give bad results due to rounding.
3321
3322 * stime.c (scm_current_time, scm_gettimeofday): Add a comment about
3323 setzone/restorezone protection for DOS.
3324
3325 2003-12-26 Marius Vollmer <mvo@zagadka.de>
3326
3327 * gen-scmconfig.h.in, gen-scmconfig.c: Arrange for scm_t_intmax
3328 and scm_t_uintmax to be defined in scmconfig.h
3329
3330 2003-12-03 Kevin Ryde <user42@zip.com.au>
3331
3332 * numbers.c (scm_less_p): Remove spurious xisnan from frac+big case.
3333
3334 * numbers.c (scm_make_ratio): Check for numerator equal to
3335 SCM_MOST_NEGATIVE_FIXNUM and bignum denominator the negative of that,
3336 giving integer -1.
3337
3338 * numbers.c (scm_real_part): Return fraction unchanged rather than
3339 converting to flonum.
3340
3341 2003-11-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
3342
3343 * modules.c (module_variable): Fixed (and thus simplified) the
3344 definition of SCM_BOUND_THING_P to reflect the fact that since
3345 after the 1.4 series of guile, obarrays only hold variable
3346 objects.
3347
3348 2003-11-30 Marius Vollmer <mvo@zagadka.de>
3349
3350 * numbers.c (scm_logand): It's "#b...", not "#\b...".
3351
3352 From Paul Jarc:
3353
3354 * read.c (scm_lreadr): Signal an error for invalid escape
3355 sequences in strings. Code cleanups too.
3356
3357 * print.c (scm_iprin1): use \xNN hexadecimal sequences when
3358 writing control characters in strings.
3359
3360 2003-11-21 Marius Vollmer <mvo@zagadka.de>
3361
3362 * ports.c (scm_drain_input): Bug fix: only access the port after
3363 checking that it indeed is one.
3364
3365 2003-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
3366
3367 * eval.c (s_bad_define): New static identifier.
3368
3369 (m_body): Fixed comment.
3370
3371 (scm_m_define): Don't generate memoized code for definitions that
3372 are not on the top level. As a consequence, no memoized code at
3373 all is generated for definitions any more: Top level definitions
3374 are executed immediately during memoization and internal
3375 definitions are handled separately in m_expand_body.
3376
3377 (scm_unmemocopy, unmemocopy): Removed code for unmemoizing
3378 definitions. Consequently, there is no unmemoizing code any more
3379 that might modify the environment. Thus, the old scm_unmemocopy
3380 is removed and the old unmemocopy is renamed to scm_unmemocopy.
3381
3382 (SCM_CEVAL): The SCM_IM_DEFINE keyword can no longer occur in
3383 memoized code. Call EVALCAR for continuations. Prefer !SCM_NULLP
3384 over SCM_NIMP in places, where the argument is known to be part of
3385 a proper list.
3386
3387 2003-11-21 Kevin Ryde <user42@zip.com.au>
3388
3389 * numbers.c (scm_abs): Allocate a new real only for negatives, as done
3390 for bignums.
3391
3392 * numbers.c (scm_bit_extract): Use mpz functions, rearrange inum case
3393 to share some shifting.
3394
3395 * numbers.c (scm_integer_expt): Don't mpz_init after scm_i_clonebig or
3396 scm_i_mkbig, since they do so already. Don't mpz_clear a bignum SCM,
3397 since gc does this.
3398
3399 2003-11-19 Marius Vollmer <mvo@zagadka.de>
3400
3401 * numbers.c (scm_make_ratio): Rewritten to have a simpler
3402 structure. Previously, not all cases with a negative denominator
3403 were covered.
3404
3405 * numbers.c (mem2decimal_from_point): use scm_divide instead of
3406 scm_divide2real when forming the fractional part. This allows
3407 "#e1.2" to yield 6/5.
3408
3409 * numbers.c (scm_i_fraction_equalp): Do not treat the return value
3410 of scm_equal_p as a C boolean, use SCM_FALSEP. Previously, all
3411 fractions were equal to each other regardless of value. Ooops.
3412
3413 * numbers.c (scm_rationalize): Return an inexact result when given
3414 inexact arguments.
3415
3416 * numbers.c (scm_exact_p, scm_inexact_p): Throw error for
3417 non-numbers.
3418
3419 2003-11-18 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3420
3421 Support for exact fractions from Bill Schottstaedt! Thanks!
3422
3423 * print.c (scm_iprin1): Handle fractions.
3424
3425 * objects.h (scm_class_fraction): New.
3426 * objects.c (scm_class_fraction): New.
3427 (scm_class_of): Handle fractions.
3428
3429 * hash.c (scm_hasher): Handle fractions.
3430
3431 * numbers.c: New code for handling fraction all over the place.
3432 (scm_odd_p, scm_even_p): Handle inexact integers.
3433 (scm_rational_p): New function, same as scm_real_p.
3434 (scm_round_number, scm_truncate_number, scm_ceiling, scm_floor):
3435 New exact functions that replace the inexact 'dsubr'
3436 implementations.
3437 (scm_numerator, scm_denominator): New.
3438
3439 * numbers.h (SCM_NUMP): Recognize fractions.
3440 (SCM_FRACTIONP, SCM_SLOPPY_FRACTIONP, SCM_FRACTION_NUMERATOR,
3441 SCM_FRACTION_DENOMINATOR, SCM_FRACTION_SET_NUMERATOR,
3442 SCM_FRACTION_SET_DENOMINATOR, SCM_FRACTION_REDUCED_BIT,
3443 SCM_FRACTION_REDUCED_SET, SCM_FRACTION_REDUCED_CLEAR,
3444 SCM_FRACTION_REDUCED): New.
3445 (scm_floor, scm_ceiling, scm_truncate_number, scm_round_number):
3446 New prototypes.
3447 (scm_make_ratio, scm_rationalize, scm_numerator, scm_denominator,
3448 scm_rational_p): New prototypes.
3449 (scm_i_dbl2num, scm_i_fraction2double, scm_i_fraction_equalp,
3450 scm_i_print_fraction): New prototypes.
3451
3452 * goops.c (create_standard_classes): Create "<fraction>" class.
3453
3454 * gc-mark.c (scm_gc_mark_dependencies): Handle fractions.
3455
3456 * gc-card.c (scm_i_sweep_card): Include scm_tc16_fraction as a
3457 case in the switch, but do nothing for now.
3458
3459 * eval.c (SCM_CEVAL, SCM_APPLY, call_dsubr_1): Convert fractions
3460 to doubles when calling 'dsubr' functions.
3461
3462 * eq.c (scm_eqv_p, scm_equal_p): Handle fractions.
3463
3464 2003-11-18 Rob Browning <rlb@defaultvalue.org>
3465
3466 * gen-scmconfig.c (main): remove public definition of
3467 SCM_SIZEOF___INT64 and SCM_SIZEOF_UNSIGNED___INT64 and add
3468 direct typedef of long_long and ulong_long inside deprecated block
3469 when appropriate.
3470
3471 * deprecated.h: move long_long and ulong_long definitions to
3472 gen-scmconfig.c so that we don't need to add SCM_SIZEOF___INT64
3473 and SCM_SIZEOF_UNSIGNED___INT64 to the public namespace.
3474
3475 2003-11-17 Marius Vollmer <mvo@zagadka.de>
3476
3477 * hash.c (scm_string_hash): New hashing algorithm that takes the
3478 complete string into account.
3479
3480 * eval.c (scm_m_generalized_set_x): Macroexpand the target when it
3481 is a list. This allows (@ ...) to work with set!.
3482 (scm_m_generalized_set_x): Use ASSERT_SYNTAX_2 instead of
3483 SCM_ASSYNT.
3484
3485 * script.c (scm_compile_shell_switches): Use scm_c_read_string for
3486 the "-e" option instead of scm_str2symbol. This allows things
3487 like (@ ...) to be specified for the entry point.
3488
3489 2003-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
3490
3491 * eval.c (scm_m_letstar): Create memoized code in place to
3492 minimize consing.
3493
3494 2003-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
3495
3496 * eval.c (s_splicing): Commented and reformulated.
3497
3498 (lookup_global_symbol, lookup_symbol): New static functions.
3499
3500 (s_test, s_bindings, s_duplicate_bindings, s_variable): Removed.
3501
3502 (try_macro_lookup, literal_p): Use lookup_symbol instead of
3503 creating a temporary pair for scm_lookupcar.
3504
3505 (scm_unmemocar, unmemocar): Renamed scm_unmemocar to unmemocar,
3506 created deprecated wrapper function scm_unmemocar.
3507
3508 (SCM_VALIDATE_NON_EMPTY_COMBINATION, scm_sym_else,
3509 scm_sym_unquote, scm_sym_uq_splicing, scm_sym_enter_frame,
3510 scm_sym_apply_frame, scm_sym_exit_frame, scm_sym_trace, f_apply,
3511 undefineds, sym_three_question_marks): Moved around without
3512 modifications.
3513
3514 * eval.c, eval.h (scm_macroexp, scm_unmemocar): Deprecated.
3515
3516 2003-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
3517
3518 * eval.c (try_macro_lookup, expand_user_macros, is_system_macro_p,
3519 m_expand_body, scm_m_expand_body): Grouped together with m_body.
3520 No further modifications.
3521
3522 2003-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
3523
3524 * eval.c (s_mixed_body_forms): New static identifier.
3525
3526 (canonicalize_define, scm_m_define): The check for a bad
3527 expression is performed in canonicalize_define now.
3528
3529 (try_macro_lookup, expand_user_macros, is_system_macro_p): New
3530 static helper functions for m_expand_body.
3531
3532 (m_expand_body): Use ASSERT_SYNTAX to signal syntax errors. Only
3533 expand user defined macros. Fixed handling of the definition/
3534 expression boundary. Fixed handling of definitions grouped with
3535 'begin. Use canonicalize_define to expand definitions.
3536
3537 2003-11-13 Marius Vollmer <mvo@zagadka.de>
3538
3539 * read.c (scm_lreadr): detect EOF after backslash, and interpret
3540 \xNN hexadecimal sequences. From Paul Jarc, thanks!
3541
3542 * snarf.h (SCM_SMOB, SCM_GLOBAL_SMOB, SCM_SMOB_MARK,
3543 SCM_GLOBAL_SMOB_MARK, SCM_SMOB_FREE, SCM_GLOBAL_SMOB_FREE,
3544 SCM_SMOB_PRINT, SCM_GLOBAL_SMOB_PRINT, SCM_SMOB_EQUALP,
3545 SCM_GLOBAL_SMOB_EQUALP, SCM_SMOB_APPLY, SCM_GLOBAL_SMOB_APPLY):
3546 New macros from Paul Jarc. Thanks!
3547
3548 * gc_os_dep.c (scm_get_stack_base): Provide a definition that
3549 return NULL when the machine type is unknown. Previously,
3550 gc_os_dep.c would refuse to compile.
3551
3552 2003-11-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
3553
3554 * eval.c (scm_m_body, m_body, scm_m_lambda, memoize_named_let,
3555 scm_m_let, scm_m_letrec, m_expand_body): Renamed static function
3556 scm_m_body to m_body.
3557
3558 2003-11-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
3559
3560 * eval.c, eval.h (scm_m_expand_body, m_expand_body): Deprecated
3561 public use of scm_m_expand_body in eval.h. In eval.c, renamed
3562 scm_m_expand_body to m_expand_body and made it static. Added
3563 deprecated wrapper scm_m_expand_body.
3564
3565 (scm_eval_body, SCM_CEVAL, SCM_APPLY): Use m_expand_body instead
3566 of scm_m_expand_body.
3567
3568 2003-11-09 Kevin Ryde <user42@zip.com.au>
3569
3570 * dynl.c (scm_dynamic_unlink): Need scm_list_1 on error message
3571 argument. Reported by Mike Gran.
3572
3573 2003-11-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
3574
3575 * eval.c (s_missing_body_expression): New static identifier.
3576
3577 (s_body): Removed.
3578
3579 (scm_m_expand_body): Fixed core dump when passing a body with
3580 defines, but without expressions (see additions to syntax.test).
3581 Use ASSERT_SYNTAX to signal syntax errors.
3582
3583 2003-11-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
3584
3585 * eval.c (canonicalize_define): New static helper function.
3586
3587 (memoize_define, canonicalize_define): Extract handling of
3588 function currying to canonicalize_define.
3589
3590 2003-11-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
3591
3592 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
3593 Make sure that error checking in debug mode is not worse than in
3594 standard mode.
3595
3596 2003-11-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
3597
3598 * eval.c (scm_m_body, scm_m_lambda): Documentation strings are not
3599 handled in scm_m_body any more, but rather in scm_m_lambda.
3600
3601 (scm_m_body, memoize_named_let, scm_m_let, scm_m_letstar,
3602 scm_m_letrec, scm_m_expand_body): Check for validity is done by
3603 calling functions of scm_m_body.
3604
3605 (scm_m_lambda): Avoid unnecessary consing when creating the
3606 memoized code.
3607
3608 2003-11-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
3609
3610 * eval.c (s_expression): Added comment.
3611
3612 (s_empty_combination, error_unbound_variable): New static
3613 identifiers.
3614
3615 (SCM_VALIDATE_NON_EMPTY_COMBINATION, SCM_EVALIM2, scm_lookupcar1):
3616 Use ASSERT_SYNTAX, syntax_error or error_unbound_variable to
3617 signal syntax errors.
3618
3619 (SCM_CEVAL): Separated handling of evaluator bytecodes and other
3620 scheme objects.
3621
3622 2003-10-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
3623
3624 * eval.c (unmemocar, sym_three_question_marks, scm_unmemocar):
3625 Grouped together with unmemocopy, without modifications.
3626
3627 (build_binding_list, unmemocopy): Renamed names of list arguments
3628 and variables to reflect the actual order of the list elements.
3629
3630 2003-10-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
3631
3632 * eval.c (s_defun): New static identifier.
3633
3634 (scm_m_nil_cond, scm_m_atfop, scm_m_undefine): Add comments. Use
3635 ASSERT_SYNTAX to signal syntax errors. Avoid unnecessary consing
3636 when creating the memoized code.
3637
3638 2003-10-19 Kevin Ryde <user42@zip.com.au>
3639
3640 * numbers.c (scm_ash): Revise docstring as per recent update to manual.
3641
3642 * numbers.c (scm_i_big2dbl): Rewrite, carefully rounding to "closest"
3643 in accordance with R5RS, which just mpz_get_d doesn't really give.
3644
3645 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
3646
3647 * eval.c (s_bad_slot_number): New static identifier.
3648
3649 (scm_m_atslot_ref, scm_m_atslot_set_x): Use ASSERT_SYNTAX to
3650 signal syntax errors. Avoid unnecessary consing when creating the
3651 memoized code.
3652
3653 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
3654
3655 * eval.c (scm_m_cont, scm_m_at_call_with_values,
3656 scm_m_generalized_set_x): Use ASSERT_SYNTAX to signal syntax
3657 errors. Avoid unnecessary consing when creating the memoized
3658 code.
3659
3660 (scm_m_generalized_set_x): Let scm_m_set_x handle the R5RS
3661 standard case. Make sure line and file information are copied to
3662 every created expression.
3663
3664 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
3665
3666 * eval.c (scm_m_set_x, scm_m_apply, scm_m_atbind): Use
3667 ASSERT_SYNTAX to signal syntax errors. Avoid unnecessary consing
3668 when creating the memoized code.
3669
3670 (scm_m_atbind): Reversed the order, in which the init expressions
3671 are stored and executed. The order of execution is now equal to
3672 the order in which the initializers of the let-forms are executed.
3673 Use check_bindings and transform_bindings.
3674
3675 (SCM_CEVAL): Eliminated SCM_NIMP in favor of more appropriate
3676 !SCM_NULLP. Added some comments.
3677
3678 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
3679
3680 * eval.c: Sorted include files alphabetically.
3681
3682 (scm_m_begin): Added comment.
3683
3684 (scm_m_or): Use ASSERT_SYNTAX to signal syntax errors. Avoid
3685 unnecessary consing when creating the memoized code.
3686
3687 (iqq, scm_m_quasiquote, scm_m_quote): Use ASSERT_SYNTAX to signal
3688 syntax errors. Be more specific about the kind of error that was
3689 detected.
3690
3691 (scm_m_quote, unmemocopy): As an optimization, vector constants
3692 are now inserted unquoted into the memoized code. During
3693 unmemoization the quotes are added again to provide syntactically
3694 correct code.
3695
3696 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
3697
3698 * eval.c (scm_m_let, scm_m_letstar, scm_m_letrec,
3699 scm_m_expand_body, check_bindings): Extracted syntax checking of
3700 bindings to new static function check_bindings.
3701
3702 (scm_m_let, memoize_named_let): Extracted handling of named let to
3703 new static function memoize_named_let.
3704
3705 (transform_bindings, scm_m_let, scm_m_letstar, scm_m_letrec): Use
3706 ASSERT_SYNTAX to signal syntax errors. Be more specific about the
3707 kind of error that was detected. Avoid use of SCM_CDRLOC. Avoid
3708 unnecessary consing when creating the memoized code.
3709
3710 2003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
3711
3712 * eval.c (s_bad_formals, s_bad_formal, s_duplicate_formal): New
3713 static identifiers.
3714
3715 (s_clauses, s_formals, s_duplicate_formals): Removed.
3716
3717 (scm_m_lambda): Use ASSERT_SYNTAX to signal syntax errors. Be more
3718 specific about the kind of error that was detected. Prepare for
3719 easier integration of changes for separated memoization.
3720
3721 2003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
3722
3723 * eval.c (s_duplicate_binding): New static identifier.
3724
3725 (scm_m_case): Call scm_c_memq instead of implementing it inline.
3726
3727 (scm_m_define): Added comment about how we check for duplicate
3728 formals.
3729
3730 (scm_m_do): Added check for duplicate bindings.
3731
3732 (scm_m_if): Use ASSERT_SYNTAX to signal syntax errors. Avoid
3733 unnecessary consing when creating the memoized code.
3734
3735 (scm_c_improper_memq, c_improper_memq, scm_m_lambda): Renamed
3736 scm_c_improper_memq to c_improper_memq, since it is not exported.
3737
3738 (transform_bindings): Call scm_c_memq rather than
3739 scm_c_improper_memq.
3740
3741 (SCM_CEVAL): Simplified handling of SCM_IM_IF forms.
3742
3743 2003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
3744
3745 * eval.c (s_bad_bindings, s_bad_binding, s_bad_exit_clause): New
3746 static identifiers.
3747
3748 (scm_m_do): Use ASSERT_SYNTAX to signal syntax errors. Be more
3749 specific about the kind of error that was detected. Avoid use of
3750 SCM_CDRLOC. Avoid unnecessary consing when creating the memoized
3751 code, this way also making sure that file name, line number
3752 information etc. remain available.
3753
3754 2003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
3755
3756 * eval.c (memoize_as_thunk_prototype): New static function.
3757
3758 (scm_m_delay, scm_m_future): Use memoize_as_thunk_prototype.
3759 Avoid unnecessary consing when creating the memoized code.
3760
3761 2003-10-12 Kevin Ryde <user42@zip.com.au>
3762
3763 * list.c (scm_append): Track argument number and use in error.
3764
3765 2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
3766
3767 * eval.c (s_missing_expression, s_bad_variable): New static
3768 identifiers.
3769
3770 (scm_m_define): Use ASSERT_SYNTAX to signal syntax errors. Prefer
3771 R5RS terminology for the naming of variables. Be more specific
3772 about the kind of error that was detected. Make sure file name,
3773 line number etc. are added to all freshly created expressions.
3774 Avoid unnecessary consing when creating the memoized code.
3775
3776 2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
3777
3778 * eval.c (s_extra_expression, s_misplaced_else_clause,
3779 s_bad_cond_clause, s_missing_recipient): New static identifiers.
3780
3781 (s_extra_case_clause): Removed.
3782
3783 (scm_m_case, scm_m_cond): If a clause appears after an else
3784 clause, report a misplaced else clause.
3785
3786 (scm_m_cond): Use ASSERT_SYNTAX to signal syntax errors. Be more
3787 specific about the kind of error that was detected. Handle bound
3788 'else and '=>. Avoid unnecessary consing when creating the
3789 memoized code.
3790
3791 (scm_m_cond, unmemocopy, SCM_CEVAL): Use SCM_IM_ELSE to memoize
3792 the syntactic keyword 'else and SCM_IM_ARROW to memoize the
3793 syntactic keyword '=>.
3794
3795 2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
3796
3797 * eval.c (scm_m_case): Allow empty lists of case labels.
3798
3799 2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
3800
3801 * tags.h (SCM_IM_ELSE, SCM_IM_ARROW): New memoizer codes.
3802
3803 * print.c (scm_isymnames): Add names for the new memoizer codes.
3804
3805 * eval.c (s_missing_clauses, s_bad_case_clause,
3806 s_extra_case_clause, s_bad_case_labels, s_duplicate_case_label,
3807 literal_p): New static identifiers.
3808
3809 (scm_m_case): Use ASSERT_SYNTAX to signal syntax errors. Be more
3810 specific about the kind of error that was detected. Check for
3811 duplicate case labels. Handle bound 'else. Avoid unnecessary
3812 consing when creating the memoized code.
3813
3814 (scm_m_case, unmemocopy, SCM_CEVAL): Use SCM_IM_ELSE to memoize
3815 the syntactic keyword 'else.
3816
3817 2003-10-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
3818
3819 * eval.c (s_bad_expression, syntax_error_key, syntax_error,
3820 ASSERT_SYNTAX, ASSERT_SYNTAX_2): New static identifiers.
3821
3822 (scm_m_and): Use ASSERT_SYNTAX to signal syntax errors. Avoid
3823 unnecessary consing when creating the memoized code.
3824
3825 2003-10-09 Kevin Ryde <user42@zip.com.au>
3826
3827 * numbers.c (scm_inexact_to_exact): Don't depend on what double->long
3828 cast gives for values bigger than a long, or for nan or inf.
3829
3830 2003-10-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
3831
3832 * smob.h (scm_make_smob_type): Made the declaration match the
3833 definition.
3834
3835 2003-10-07 Marius Vollmer <mvo@zagadka.de>
3836
3837 * goops.c, objects.h, smob.c, smob.h: Make type names char
3838 const * instead of char *. Thanks to Paul Jarc!
3839
3840 2003-10-02 Kevin Ryde <user42@zip.com.au>
3841
3842 * strports.c (scm_call_with_output_string): scm_get_output_string
3843 rather than scm_strport_to_string, so as to guard against the port
3844 having been closed by the called procedure. Reported by Nic Ferrier.
3845
3846 2003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
3847
3848 * numbers.h (SCM_INEXACTP): Removed uses of SCM_TYP16S.
3849
3850 * tags.h, deprecated.h (SCM_TYP16S): Deprecated and moved from
3851 tags.h to deprecated.h.
3852
3853 2003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
3854
3855 This set of patches introduces a new tc7 code scm_tc7_number for
3856 numbers. Bignums, reals and complex numbers are turned from smobs
3857 into subtypes of scm_tc7_number.
3858
3859 * tags.h (scm_tc7_number): New.
3860
3861 * eq.c (scm_equal_p), eval.c (SCM_CEVAL), evalext.c
3862 (scm_self_evaluating_p), gc-card.c (scm_i_sweep_card), gc-mark.c
3863 (scm_gc_mark_dependencies), goops.c (create_smob_classes), hash.c
3864 (scm_hasher), numbers.c, numbers.h (SCM_NUMP), objects.c
3865 (scm_class_of), print.c (scm_iprin1), smob.c
3866 (scm_smob_prehistory): Don't handle bignums, reals and complex
3867 numbers as subtypes of scm_tc7_smob any more.
3868
3869 * numbers.h, tags.h (scm_tc16_big, scm_tc16_real,
3870 scm_tc16_complex): Moved definitions from tags.h to numbers.h.
3871
3872 2003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
3873
3874 * numbers.c (scm_make_complex), gc-card.c (scm_i_sweep_card): Use
3875 sizeof (scm_t_complex) to determine the memory size of the
3876 malloc'd area for complex numbers.
3877
3878 2003-09-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
3879
3880 * numbers.c (scm_bigequal): Fixed.
3881
3882 2003-09-16 Marius Vollmer <mvo@zagadka.de>
3883
3884 * stime.c (scm_current_time): 'time' does not set errno so don't
3885 use SCM_SYSERROR for reporting errors.
3886
3887 2003-09-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
3888
3889 This set of patches eliminates the dependency between the
3890 implementation of evaluator specific memoization codes and special
3891 constants like #f, '() etc. ('flags'), which are not evaluator
3892 specific. The goal is to remove definitions of evaluator
3893 memoization codes completely from the public interface. This will
3894 make it possible to experiment more freely with optimizations of
3895 guile's internal representation of memoized code.
3896
3897 * objects.c (scm_class_of): Eliminate dependency on SCM_ISYMNUM.
3898
3899 * print.c (iflagnames): New array, holding the printed names of
3900 guile's special constants ('flags').
3901
3902 (scm_isymnames): Now holds only the printed names of the
3903 memoization codes.
3904
3905 (scm_iprin1): Separate the handling of memoization codes and
3906 guile's special constants.
3907
3908 * tags.h (scm_tc9_flag, SCM_ITAG9, SCM_MAKE_ITAG9, SCM_ITAG9_DATA,
3909 SCM_IFLAGNUM): new
3910
3911 (scm_tc8_char, scm_tc8_iloc, SCM_BOOL_F, SCM_BOOL_T,
3912 SCM_UNDEFINED, SCM_EOF_VAL, SCM_EOL, SCM_UNSPECIFIED, SCM_UNBOUND,
3913 SCM_ELISP_NIL, SCM_IM_DISPATCH, SCM_IM_SLOT_REF,
3914 SCM_IM_SLOT_SET_X, SCM_IM_DELAY, SCM_IM_FUTURE,
3915 SCM_IM_CALL_WITH_VALUES, SCM_IM_NIL_COND, SCM_IM_BIND): Changed
3916 values.
3917
3918 (SCM_IFLAGP): SCM_IFLAGP now only tests for flags.
3919
3920 (SCM_IFLAGP, SCM_MAKIFLAG, SCM_IFLAGNUM): Generalized to use the
3921 tc9 macros and scm_tc9_flag.
3922
3923 2003-09-15 Marius Vollmer <mvo@zagadka.de>
3924
3925 * posix.c (scm_setgroups): Check that the gid list is not too
3926 long. Thanks to Paul Jarc!
3927
3928 2003-09-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
3929
3930 * tags.h: Reduced the number of short instructions from 14 to 13.
3931 The typecode of the former 14th short instruction is now used to
3932 represent long instructions. Changed some comments to reflect
3933 this fact.
3934
3935 (SCM_MAKISYM): ISYMs get a new tc7 code, namely the one that was
3936 previously used by SCM_IM_DEFINE.
3937
3938 (SCM_IM_DEFINE): Turned into a long instruction.
3939
3940 * eval.c (unmemocopy, SCM_CEVAL): Treat SCM_IM_DEFINE as a long
3941 instruction.
3942
3943 * eval.c (SCM_CEVAL): Since characters and iflags have now a tc7
3944 code that is separate from all instructions, one level of dispatch
3945 for long instructions can be eliminated.
3946
3947 * print.c (scm_isymnames): Removed some commented code.
3948
3949 2003-09-12 Marius Vollmer <mvo@zagadka.de>
3950
3951 * __scm.h (SCM_FENCE): Use __memory_barrier with the Intel
3952 compiler on IA64.
3953
3954 * hashtab.h (scm_tc16_hashtable): Added "extern" declaration.
3955
3956 * modules.c (scm_module_reverse_lookup): Check that the obarray
3957 really is a hashtable and do nothing if not.
3958
3959 * inline.h: Use "extern inline" only with GCC. Use "static
3960 inline" else.
3961
3962 2003-09-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
3963
3964 * numbers.h (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Removed uses
3965 of SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
3966
3967 * numbers.h, deprecated.h (SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP,
3968 SCM_SLOPPY_COMPLEXP): Deprecated and moved from numbers.h to
3969 deprecated.h.
3970
3971 2003-09-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
3972
3973 * eq.c (scm_eqv_p, scm_equal_p): Removed uses of
3974 SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
3975
3976 * eq.c (scm_eqv_p, scm_equal_p): Reordered comparisons from
3977 0.0==some_expression to some_expression==0.0. The latter is
3978 better readable. The former is preferred by some people, since it
3979 leads to a compiler error when confusing == with =. However, when
3980 using gcc, a warning will be issued if in an if-statement an
3981 assigment appears. Since many Guile developers are using gcc,
3982 such errors will not remain unnoticed anyway. We can therefore
3983 focus on better readability.
3984
3985 2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
3986
3987 * tags.h: Added description of Guile's type system. Removed some
3988 old and misleading comments.
3989
3990 2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
3991
3992 * unit.c (scm_cvref): Eliminate unnecessary uses of SCM_NIMP,
3993 SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
3994
3995 2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
3996
3997 * numbers.h (SCM_MAKINUM): Define in terms of scm_tc2_int.
3998
3999 (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Define in terms of the
4000 respective SLOPPY macro.
4001
4002 2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
4003
4004 * eq.c (scm_equal_p): Use SCM_TYP7 to check if an object is of
4005 type string, not SCM_TYP7S.
4006
4007 2003-09-03 Kevin Ryde <user42@zip.com.au>
4008
4009 * numbers.c (scm_lognot): Correction to docstring, ones-complement not
4010 2s-complement.
4011
4012 * stime.c (scm_strptime): Add comment about glibc strptime %s and
4013 current timezone requiring SCM_DEFER_INTS.
4014
4015 2003-08-30 Neil Jerram <neil@ossau.uklinux.net>
4016
4017 * script.c (scm_compile_shell_switches): Make -s switch optional
4018 if file to be loaded does not begin with a `-'. (Thanks to Aaron
4019 VanDevender for the patch!)
4020
4021 2003-08-30 Kevin Ryde <user42@zip.com.au>
4022
4023 * numbers.c (scm_lognot): Rewrite using ~ and mpz_com, for directness
4024 and to have non-integer types rejected as per other logical funcs.
4025
4026 2003-08-28 Kevin Ryde <user42@zip.com.au>
4027
4028 * gc.h (scm_remember_upto_here_1): Revise comments on the asm form.
4029
4030 2003-08-23 Kevin Ryde <user42@zip.com.au>
4031
4032 * simpos.c (scm_system): Remove SCM_DEFER_INTS, system() should be
4033 thread safe, and could take a long time too.
4034
4035 2003-08-22 Kevin Ryde <user42@zip.com.au>
4036
4037 * numbers.c (scm_difference): Correction to bignum - negative inum.
4038
4039 2003-08-14 Kevin Ryde <user42@zip.com.au>
4040
4041 * gc.h (scm_remember_upto_here_1, scm_remember_upto_here_2)
4042 [__GNUC__]: Use volatile asm macros rather than a function call.
4043 * gc.c (scm_remember_upto_here_1, scm_remember_upto_here_2): Undefine
4044 macros while defining functions.
4045
4046 * simpos.c (getenv): Use <stdlib.h> for prototype.
4047 (scm_system): In docstring, refer to status:exit-val rather than
4048 "functions above".
4049
4050 2003-08-09 Kevin Ryde <user42@zip.com.au>
4051
4052 * srcprop.c (scm_source_properties): Return plist from hash if it's a
4053 list set by source-properties! rather than an SRCPROPS object,
4054
4055 2003-07-29 Kevin Ryde <user42@zip.com.au>
4056
4057 * properties.c (scm_primitive_property_ref): In docstring, note
4058 parameters to not-found-proc, use hyphens rather than underscores for
4059 that parameter name.
4060 (scm_primitive_property_set_x): In docstring, VAL is the value
4061 parameter not CODE.
4062
4063 2003-07-27 Marius Vollmer <mvo@zagadka.de>
4064
4065 * print.c (scm_print_symbol_name): handle more weird characters by
4066 escaping the symbol name properly. Thanks to Paul Jarc!
4067
4068 * posix.h (scm_setgroups): New prototype.
4069 * posix.c (scm_setgroups): New. Thanks to Paul Jarc!
4070 (scm_getgroups): Handle groups ids that don't fit into a fixnum.
4071 Don't use SCM_WRITABLE_VELTS.
4072
4073 * gc.h (SCM_GC_SET_CELL_BVEC): New.
4074 * gc-card.c (scm_i_init_card_freelist): Use it. Thanks to
4075 Matthias Koeppe!
4076
4077 * __scm.h (SCM_C_INLINE_KEYWORD): New.
4078 * numbers.c: Use it in place of SCM_C_INLINE so that the code
4079 compiles when SCM_C_INLINE is undefined.
4080
4081 2003-07-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
4082
4083 * __scm.h: Reformulated the architecture and compiler properties
4084 in terms of properties of scm_t_bits and SCM variables rather than
4085 in terms of c standard types. This is since it is not known which
4086 of the standard types scm_t_bits and SCM variables will be defined
4087 to.
4088
4089 2003-07-24 Kevin Ryde <user42@zip.com.au>
4090
4091 * numbers.c (scm_angle): Use scm_flo0 for non-negative inum, bignum
4092 and real.
4093
4094 2003-07-18 Kevin Ryde <user42@zip.com.au>
4095
4096 * numbers.c (scm_product): In complex * bignum, correction to
4097 REAL/IMAG fetch, x is the complex, not y.
4098
4099 2003-07-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4100
4101 * numbers.c (scm_odd_p, scm_even_p): Bugfix: Treat result of
4102 scm_inf_p test as Scheme values.
4103 (scm_sum): Bugfix: Normalize bignum created from a negative bignum
4104 and a positive inum.
4105 Use GNU indentation style.
4106
4107 2003-07-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
4108
4109 * values.c (scm_values): Build lists of length 1 by using
4110 scm_list_1 instead of using scm_cons.
4111
4112 2003-07-10 Kevin Ryde <user42@zip.com.au>
4113
4114 * deprecation.c (scm_c_issue_deprecation_warning_fmt): Add va_end.
4115 * list.c (scm_list_n): Ditto.
4116
4117 * gc-malloc.c (scm_gc_realloc): Define "ptr" at start of function.
4118
4119 2003-07-08 Matthias Koeppe <mkoeppe@merkur.math.uni-magdeburg.de>
4120
4121 * tags.h (scm_t_bits, scm_t_signed_bits, etc): Avoid solaris empty
4122 defines of INTPTR_MAX and UINTPTR_MAX, combine conditionals for
4123 scm_t_bits and scm_t_signed_bits to avoid any chance of one and not
4124 the other using intptr_t.
4125
4126 2003-07-08 Kevin Ryde <user42@zip.com.au>
4127
4128 * numbers.c (scm_make_polar): Use sincos, when available.
4129 (scm_magnitude): Use hypot.
4130
4131 * ports.c (scm_char_ready_p, scm_peek_char): In docstrings, don't use
4132 @footnote since it doesn't go through to guile-procedures.txt.
4133
4134 * threads.c (scm_call_with_new_thread): In docstring, use "( )"
4135 outside @var to quieten makeinfo, and use @code.
4136
4137 2003-07-06 Han-Wen Nienhuys <hanwen@cs.uu.nl>
4138
4139 * gc-malloc.c (decrease_mtrigger): new function
4140 (increase_mtrigger): new function, separate debug registering and
4141 mtrigger administration.
4142 (scm_gc_realloc): bugfix: do mtrigger administration before the
4143 actual realloc, for the realloc might invalidate a GC-d segment of
4144 memory. Thanks to Sam Hocevar for pointing this out.
4145 (scm_gc_realloc): use scm_malloc_reregister instead of
4146 unregistering and registering in sequence.
4147
4148 2003-07-03 Han-Wen Nienhuys <hanwen@cs.uu.nl>
4149
4150 * __scm.h (SCM_ASSERT): change "else" expansion to "do { } while (0)"
4151
4152 2003-07-02 Han-Wen Nienhuys <hanwen@cs.uu.nl>
4153
4154 * __scm.h (SCM_ASRTGO): add "else" to macro expansions with if
4155 clauses.
4156
4157 2003-06-29 Marius Vollmer <mvo@zagadka.de>
4158
4159 * deprecated.h (SCM_OPDIRP, scm_fport, scm_option, scm_srcprops,
4160 scm_srcprops_chunk, scm_info_frame, scm_stack, scm_array,
4161 scm_array_dim, SCM_ARRAY_CONTIGUOUS, SCM_FUNC_NAME, SCM_WTA,
4162 RETURN_SCM_WTA, SCM_VALIDATE_NUMBER_COPY,
4163 SCM_VALIDATE_NUMBER_DEF_COPY, SCM_VALIDATE_OPDIR): Re-added from
4164 the release_1_6 branch.
4165
4166 2003-06-25 Stefan Jahn <stefan@lkcc.org>
4167
4168 * continuations.c: Redeclaration of getcontext() via the
4169 __asm__ ("getcontext") directive.
4170
4171 * continuations.h: Include <ucontext.h> instead of
4172 <sys/ucontext.h>.
4173
4174 2003-06-21 Kevin Ryde <user42@zip.com.au>
4175
4176 * numbers.c (_GNU_SOURCE): #define, to get C99 things.
4177 (scm_asinh, scm_acosh, scm_atanh, scm_truncate, $asinh, $acosh,
4178 $atanh, truncate): Use C library asinh, acosh, atanh and trunc, when
4179 available.
4180 (scm_inexact_to_exact): Expand isfinite to its definition !xisinf.
4181 (isfinite): Remove, conflicts with C99 isfinite().
4182
4183 2003-06-19 Marius Vollmer <mvo@zagadka.de>
4184
4185 * deprecated.h, deprecated.c (scm_strhash, scm_sym2ovcell_soft,
4186 scm_sym2ovcell, scm_intern_obarray_soft, scm_intern_obarray,
4187 scm_symbol_value0, scm_string_to_obarray_symbol scm_intern_symbol,
4188 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned_p,
4189 scm_symbol_bound_p, scm_symbol_set_x, scm_gentemp): Re-added from
4190 the release_1_6 branch.
4191
4192 2003-06-14 Stefan Jahn <stefan@lkcc.org>
4193
4194 * threads.h: Redefined scm_getspecific() and scm_setspecific()
4195 to be functions instead of macros.
4196
4197 * threads.c: Conditionalized inclusion of <sys/time.h> and
4198 <unistd.h>.
4199 (scm_getspecific, scm_setspecific): Made these two function
4200 real part of the API.
4201
4202 * posix.c (s_scm_putenv): Added some code to make a
4203 (putenv "FOO="), i.e. setting an empty string, work also on
4204 Win32 systems. Thanks to Kevin Ryde for the proposal.
4205
4206 2003-06-12 Kevin Ryde <user42@zip.com.au>
4207
4208 * posix.c (scm_putenv): Free temporary ptr in mingw unset. Add
4209 freebsd to comment about need to use unsetenv.
4210
4211 2003-06-02 Marius Vollmer <mvo@zagadka.de>
4212
4213 * ports.c (scm_peek_char): Safe the column of the port around the
4214 getc/ungetc calls. Thanks to Dr. Peter Ivanyi!
4215
4216 2003-06-07 Kevin Ryde <user42@zip.com.au>
4217
4218 * tags.h: Use inttypes.h and stdint.h when available, for INTPTR_MAX
4219 and friends required by scm_t_bits setups.
4220
4221 2003-06-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
4222
4223 * tags.h (scm_tc2_int): Added.
4224
4225 * tags.h (scm_tc3_int_1, scm_tc3_int_2): Expressed in terms of
4226 scm_tc2_int.
4227
4228 * tags.h (scm_tcs_cons_imcar, scm_tcs_cons_nimcar, scm_tcs_struct,
4229 scm_tcs_closures): Hard coded values replaced by symbolic ones.
4230
4231 2003-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
4232
4233 * eval.c: Partially undid my patch from 2003-05-31. This patch
4234 caused the segfault referenced in the previous changelog entry.
4235
4236 2003-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
4237
4238 * tags.h: Fixed comment about the immediate type code layout.
4239
4240 * eval.c: Fixed handling of non-special instructions. Without
4241 this patch, guile will segfault on (#\0) and similar instructions.
4242
4243 2003-06-05 Kevin Ryde <user42@zip.com.au>
4244
4245 * numbers.c (scm_max, scm_min): For inum, bignum and real, if other
4246 operand is NaN, then return NaN. Also avoid passing NaN to mpz_cmp_d.
4247
4248 * read.c (scm_input_error): Pass arg list parameter to scm_error_scm,
4249 rather than SCM_EOL. Needed by "Unknown # object" case in scm_lreadr.
4250
4251 2003-06-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
4252
4253 * __scm.h, gc-card.c (SCM_DEBUG_DEBUGGER_SUPPORT,
4254 SCM_DEBUG_DEBUGGING_SUPPORT): Renamed macro
4255 SCM_DEBUG_DEBUGGER_SUPPORT to SCM_DEBUG_DEBUGGING_SUPPORT and
4256 generalized it to apply not only to C level functions but also to
4257 scheme level functions.
4258
4259 * debug.c, debug.h, eval.c (make-iloc, scm_make_iloc, iloc?,
4260 scm_iloc_p, dbg-make-iloc, scm_dbg_make_iloc, dbg-iloc?,
4261 scm_dbg_iloc_p): Moved functions scm_make_iloc, scm_iloc_p to
4262 eval.c, made them available under SCM_DEBUG_DEBUGGING_SUPPORT == 1
4263 only and renamed them to scm_dbg_make_iloc, scm_dbg_iloc_p,
4264 respectively.
4265
4266 * deprecated.h, eval.c, eval.h (SCM_ILOC00, SCM_IDINC,
4267 SCM_IDSTMSK): Deprecated. The macro definitions are moved from
4268 eval.h into eval.c and a copy is placed into deprecated.h.
4269
4270 * eval.c, eval.h (SCM_MAKE_ILOC): Removed from eval.h and placed
4271 into eval.c. This definition was not part of the API in any
4272 officially released version of guile and thus does not need to go
4273 through a phase of deprecation.
4274
4275 2003-06-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
4276
4277 * deprecated.c, deprecated.h, eval.c, eval.h (scm_s_expression,
4278 scm_s_test, scm_s_body, scm_s_bindings, scm_s_variable,
4279 scm_s_clauses, scm_s_formals): Deprecated. In eval.c the
4280 definitions are make static and renamed from scm_s_xxx to s_xxx.
4281 In deprecated.c the original definitions are copied.
4282
4283 * deprecated.h, eval.c, eval (SCM_EVALIM2, SCM_EVALIM, SCM_XEVAL,
4284 SCM_XEVALCAR): Deprecated. The macro definitions are moved from
4285 eval.h into eval.c and a copy (slightly modified to work in user
4286 code) is placed into deprecated.h.
4287
4288 * eval.c: Use the local static s_xxx definitions instead of the
4289 scm_s_xxx definitions throughout.
4290
4291 2003-06-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
4292
4293 This set of patches separates the representation of the cxr family
4294 of functions (car, cdr etc.) from the dsubr family of functions
4295 (i. e. functions that take a double precision floating point
4296 argument). Further, the algorithm for handling the cxr function
4297 is improved.
4298
4299 * eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_1), numbers.c
4300 (scm_asinh, scm_acosh, scm_atanh, scm_truncate, scm_round, floor,
4301 ceil, sqrt, fabs, exp, log, sin, cos, tan, asin, acos, atan, sinh,
4302 cosh, tanh), objects.c (scm_class_of), procprop.c
4303 (scm_i_procedure_arity), ramap.c (scm_array_map_x), tags.h
4304 (scm_tc7_dsubr, scm_tcs_subrs): Introduce scm_tc7_dsubr as new
4305 typecode for the dsubr family of functions.
4306
4307 * ramap.c (ramap_cxr, ramap_dsubr): Renamed ramap_cxr to
4308 ramap_dsubr.
4309
4310 * eval.c (SCM_CEVAL, SCM_APPLY, call_cxr_1), pairs.c
4311 (scm_init_pairs): Make use of the (now usable) second cell element
4312 of a scm_tc7_cxr function to implement the cxr family of functions
4313 more efficiently.
4314
4315 2003-05-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
4316
4317 * eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_0,
4318 scm_trampoline_1, scm_trampoline_2): Postpone error cases to the
4319 end of an if-else-if-sequence of checks.
4320
4321 2003-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
4322
4323 * eval.c (SCM_CEVAL): Improved readability of call-with-values
4324 execution. Generalize apply_closure to apply_proc and use that
4325 for call-with-values.
4326
4327 2003-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
4328
4329 * eval.c (SCM_CEVAL): Avoid one level of indirection when applying
4330 a non closure.
4331
4332 2003-05-30 Stefan Jahn <stefan@lkcc.org>
4333
4334 * posix.c (s_scm_putenv): Use the new HAVE_UNSETENV
4335 appropriately for mingw32 hosts.
4336
4337 * numbers.h: Defining copysign(), isnan() and finite() to
4338 be prefixed by a single '_' for mingw32 hosts.
4339
4340 2003-05-30 Kevin Ryde <user42@zip.com.au>
4341
4342 * numbers.c (z_negative_one): New variable.
4343 (scm_init_numbers): Initialize it.
4344 (scm_logcount): Use it and mpz_hamdist to count zeros for negatives.
4345
4346 2003-05-29 Stefan Jahn <stefan@lkcc.org>
4347
4348 * win32-dirent.c: Use malloc() instead of scm_malloc().
4349
4350 * stime.c (s_scm_strftime): Add a type cast to avoid compiler
4351 warning.
4352
4353 * posix.c (s_scm_putenv): Disable use of unsetenv() for the
4354 mingw32 build.
4355
4356 * modules.c (s_scm_module_import_interface): Renamed local
4357 variable interface to _interface. Seems like 'interface'
4358 is a special compiler directive for the mingw32 compiler.
4359
4360 * mkstemp.c: Provide prototype to avoid compiler warning.
4361
4362 * load.c (s_scm_search_path): Fixed absolute and relative
4363 path detections for native Windows platforms.
4364
4365 * gc.h, threads.h: Export some more symbols using SCM_API (necessary
4366 to build on mingw32).
4367
4368 * gc-freelist.c ("s_scm_map_free_list",
4369 "s_scm_gc_set_debug_check_freelist_x"): Fixed use of FUNC_NAME.
4370
4371 * fports.c (fport_fill_input): Disable use of
4372 fport_wait_for_input() on Win32 platforms.
4373
4374 * filesys.c (s_scm_basename): Fixed __MINGW32__ code.
4375
4376 * Makefile.am: Modified some rules for cross compiling.
4377
4378 2003-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
4379
4380 * eval.c (SCM_CEVAL): In case of an application, all checks for a
4381 proper function object and the correct number of arguments are now
4382 performed in the application part of SCM_CEVAL.
4383
4384 (scm_badformalsp): Removed.
4385
4386 2003-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
4387
4388 * deprecated.c (scm_read_and_eval_x): Fixed C99-ism.
4389
4390 2003-05-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4391
4392 * num2integral.i.c (NUM2INTEGRAL): Avoid warning about conditional
4393 always being false by inserting preprocessor conditional. (Thanks
4394 to Bruce Korb.)
4395
4396 * __scm.h (SCM_STACK_PTR): New macro. (Cast argument through
4397 (void *) in order to avoid an aliasing warning; thanks to Bruce
4398 Korb.)
4399
4400 * stackchk.h (SCM_STACK_OVERFLOW_P): Use SCM_STACK_PTR.
4401
4402 * threads.c (suspend, launch_thread, scm_threads_mark_stacks): Use
4403 SCM_STACK_PTR.
4404
4405 * threads.c (scm_threads_mark_stacks): Bugfix: Changed
4406 thread->base --> t->base.
4407
4408 * eval.c (SCM_CEVAL): Don't cast argument of SCM_STACK_OVERFLOW_P.
4409
4410 2003-05-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4411
4412 * deprecated.h, deprecated.c (scm_makstr, scm_makfromstr,
4413 scm_variable_set_name_hint, scm_builtin_variable,
4414 scm_internal_with_fluids, scm_make_gsubr,
4415 scm_make_gsubr_with_generic, scm_create_hook, SCM_LIST0,
4416 SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5, SCM_LIST6,
4417 SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify, scm_sloppy_memq,
4418 scm_sloppy_memv, scm_sloppy_member, scm_read_and_eval_x,
4419 scm_subr_entry, SCM_SUBR_DOC, scm_make_subr,
4420 scm_make_subr_with_generic, scm_make_subr_opt,
4421 scm_call_catching_errors, scm_make_smob_type_mfpe,
4422 scm_set_smob_mfpe, scm_strprint_obj, scm_read_0str, scm_eval_0str,
4423 SCM_CHARS, SCM_UCHARS, SCM_LENGTH): Re-added from the release_1_6
4424 branch. Some have been slightly rewritten.
4425 (scm_i_object_chars, scm_i_object_length): New, to support
4426 SCM_CHARS, SCM_UCHARS, and SCM_LENTH.
4427
4428 2003-05-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
4429
4430 * eval.c (scm_m_do, unmemocopy, SCM_CEVAL): Reversed order of
4431 names and inits in the memoized code of do.
4432
4433 2003-05-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4434
4435 * c-tokenize.lex (yyget_lineno, yyget_in, yyget_out, yyget_leng,
4436 yyget_text, yyset_lineno, yyset_in, yyset_out, yyget_debug,
4437 yyset_debug, yylex_destroy): Added prototypes (otherwise we'll get
4438 a compilation error if error-on-warning is enabled).
4439
4440 2003-05-17 Marius Vollmer <mvo@zagadka.de>
4441
4442 * c-tokenize.lex: Gobble up complete lines after a '#'. This
4443 removes preprocessor directives from the snarfage that might
4444 otherwise confuse us. These directives appear when compiling with
4445 "-g3", for example.
4446
4447 2003-05-16 Han-Wen Nienhuys <hanwen@cs.uu.nl>
4448
4449 * ChangeLog: add my surname
4450
4451 * srcprop.c (scm_finish_srcprop): use
4452 scm_gc_register_collectable_memory()
4453 (scm_make_srcprops): idem.
4454
4455 2003-05-14 Han-Wen Nienhuys <hanwen@cs.uu.nl>
4456
4457 * gc-malloc.c (scm_gc_register_collectable_memory): avoid
4458 wrap-around for scm_mtrigger
4459 (scm_gc_register_collectable_memory): abort on overflowing
4460 scm_mallocated().
4461
4462 2003-05-13 Kevin Ryde <user42@zip.com.au>
4463
4464 * numbers.c (xmpz_cmp_d): New macro, handling infs if gmp doesn't.
4465 (scm_num_eq_p, scm_less_p, scm_max, scm_min): Use it.
4466
4467 2003-05-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4468
4469 * backtrace.c (scm_display_error_message): Introduced fancy
4470 printing with max level 7 and length 10. (Purpose: avoid printing
4471 gigantic objects in error messages.)
4472
4473 * print.c, print.h (scm_i_port_with_print_state): New function.
4474
4475 * print.c (scm_iprin1, scm_printer_apply,
4476 scm_port_with_print_state): Use scm_i_port_with_print_state.
4477 (scm_simple_format): Modified not to destroy print states.
4478 (print_state_mutex): New mutex.
4479 (scm_make_print_state, scm_free_print_state, scm_prin1):
4480 Lock/unlock print_state_mutex.
4481
4482 * deprecated.h (SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK):
4483 Use current names in definitions.
4484
4485 2003-05-10 Kevin Ryde <user42@zip.com.au>
4486
4487 * numbers.c (scm_num_eq_p, scm_less_p): Don't pass NaN to mpz_cmp_d.
4488
4489 * numbers.c (scm_integer_length): On negative bignums, adjust
4490 mpz_sizeinbase to account for it looking at absolute value where we
4491 want ones-complement.
4492
4493 * numbers.c (scm_gcd): In bignum/inum, don't pass yy==0 to mpz_gcd_ui
4494 since we're only using the ulong return value, and x might not fit.
4495
4496 2003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
4497
4498 * eval.c, eval.h, read.c, read.h (scm_sym_dot): Moved from eval to
4499 read. This will allow to make the definition in read.c static.
4500
4501 2003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
4502
4503 * eval.c, eval.h, evalext.c, evalext.h (scm_m_undefine): Moved
4504 from evalext to eval. This will allow to make some of the
4505 definitions in eval.c static.
4506
4507 2003-05-06 Kevin Ryde <user42@zip.com.au>
4508
4509 * numbers.c (scm_difference): In inum - bignum, handle negative inum.
4510 (scm_logcount): Use mpz_com, not mpz_neg.
4511
4512 2003-05-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
4513
4514 The purpose of this patch is to make guile's internal memoizers
4515 distinguishable from memoizing macros created on the scheme level
4516 or from user provided primitive memoizing macros. The reason is,
4517 that the internal memoizers are the only ones that are allowed to
4518 transform their scheme input into memoizer byte code, while all
4519 other memoizing macros may only transform scheme code into new
4520 scheme code.
4521
4522 To achieve this, a new macro type 'builtin-macro!' is introduced.
4523 Currently, 'builtin-macro!'s are handled as memoizing macros, but
4524 this will change when the memoizer and executor are separated.
4525
4526 * macros.[ch] (scm_i_makbimacro): New.
4527
4528 * macros.h (SCM_BUILTIN_MACRO_P): New.
4529
4530 * macros.c (macro_print, scm_macro_type): Support builtin-macro!s.
4531
4532 * eval.c, goops.c: All of guile's primitive memoizing macros are
4533 primitive builtin-macros now.
4534
4535 * eval.c (scm_macroexp, SCM_CEVAL): Make sure the primitive
4536 builtin-macros are handled equally to memoizing macros.
4537
4538 2003-05-04 Marius Vollmer <mvo@zagadka.de>
4539
4540 * throw.c (scm_ithrow): Remove "asm volatile" hack. It used to
4541 work around a bug in GCC 2.95.2 but is now a bug in itself.
4542
4543 2003-05-02 Marius Vollmer <mvo@zagadka.de>
4544
4545 * deprecated.h (scm_rstate, scm_rng, SCM_SLOPPY_CONSP,
4546 SCM_SLOPPY_NCONSP, scm_tc7_ssymbol, scm_tc7_msymbol,
4547 scm_tcs_symbols): New.
4548
4549 2003-04-30 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4550
4551 * deprecated.h, deprecated.c (scm_protect_object,
4552 scm_unprotect_object, SCM_SETAND_CAR, SCM_SETOR_CAR,
4553 SCM_SET_AND_CDR, SCM_SET_OR_CDR, SCM_FREEP, SCM_NFREEP,
4554 SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16,
4555 SCM_GCCDR, scm_remember, scm_the_root_module, scm_make_module,
4556 scm_ensure_user_module, scm_load_scheme_module, scm_port,
4557 scm_ptob_descriptor, scm_port_rw_active,
4558 scm_close_all_ports_except): New.
4559
4560 * ports.c (scm_c_port_for_each): New function, mostly copied from
4561 scm_port_for_each.
4562 (scm_port_for_each): Reimplemented using scm_c_port_for_each.
4563 * ports.h (scm_c_port_for_each): New prototype.
4564
4565 2003-04-28 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4566
4567 * eval.c (scm_m_atdispatch): Removed until actually needed. (This
4568 macro was introduced in anticipation of GOOPS method compilation
4569 code.)
4570
4571 * goops.c: Removed binding of @dispatch.
4572
4573 2003-04-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
4574
4575 * eval.c, goops.c (@dispatch, @slot-ref, @slot-set!): Move the
4576 instructions that bind the macros on the scheme level back to
4577 goops.c in order to make sure again that the bindings go into the
4578 (oop goops) module and are not visible from the outside.
4579
4580 2003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
4581
4582 * eval.c: Non functional change: Separated R5RS and non-R5RS
4583 macros into different sections of the file and ordered the
4584 memoizers alphabetically.
4585
4586 2003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
4587
4588 * eval.c (scm_ilookup): Rewritten to improve readability.
4589
4590 2003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
4591
4592 * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2):
4593 Partially reverted patch from 2003-04-23 in oder to find a better
4594 compromise between readability and debuggability.
4595
4596 2003-04-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
4597
4598 * eval.c, eval.h, goops.c, goops.h (scm_m_atslot_ref,
4599 scm_m_atslot_set_x, scm_m_atdispatch): Move the declarations and
4600 definitions of the special goops memoizers from goops.[ch] to
4601 eval.[ch]. Hmm... it seems that scm_m_atdispatch is not used
4602 throughout guile.
4603
4604 2003-04-24 Mikael Djurfeldt <mdj@kvast.blakulla.net>
4605
4606 * ports.c, ports.h (scm_i_port_table_mutex): New mutex.
4607
4608 * fports.c (scm_evict_ports): Lock/unlock scm_i_port_table_mutex.
4609
4610 * ports.c (scm_close_port, scm_flush_all_ports): Ditto.
4611
4612 * ioext.c (scm_fdes_to_ports): Ditto.
4613
4614 * vports.c (scm_make_soft_port): Changed SCM_DEFER/ALLOW_INTS into
4615 lock/unlock scm_i_port_table_mutex.
4616
4617 * strports.c (scm_mkstrport): Ditto.
4618
4619 * ports.c (scm_void_port, scm_port_for_each): Ditto.
4620
4621 * fports.c (scm_fdes_to_port): Ditto.
4622
4623 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
4624
4625 This set of patches contains no functional changes, only debatable
4626 minor stylistic ones. Still, in order to prepare a patch between
4627 my local copy and the CVS version, I decided to submit the changes
4628 below. Then, the patch will hopefully only contain relevant
4629 modifications :-)
4630
4631 * eval.c (iqq): Added const specifier.
4632
4633 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
4634 Use NULL instead of 0 to indicate that a pointer is returned.
4635 Removed some misleading 'fall through' comments.
4636
4637 * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2):
4638 Split up long expressions into smaller ones to be more debugging
4639 friendly.
4640
4641 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
4642
4643 * eval.h (SCM_ENTER_FRAME_HDLR, SCM_APPLY_FRAME_HDLR,
4644 SCM_EXIT_FRAME_HDLR): Use SCM_PACK to convert data to a SCM value
4645 rather than casting to SCM.
4646
4647 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
4648
4649 * sort.c, pairs.h: Removed unnecessary includes.
4650
4651 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
4652
4653 * sort.c: Replaced hand-made trampline code by the new official
4654 mechanism from eval.c. This fixes a segfault in the new test file
4655 sort.test.
4656
4657 (quicksort, compare_function, scm_restricted_vector_sort_x,
4658 scm_sorted_p, scm_merge, scm_merge_list_x, scm_merge_x,
4659 scm_merge_list_step, scm_sort_x, scm_sort, scm_merge_vector_x,
4660 scm_merge_vector_step, scm_stable_sort_x, scm_stable_sort,
4661 scm_sort_list_x, scm_sort_list): Use trampoline mechanism from
4662 eval.c.
4663
4664 (subr2less, lsubrless, closureless, applyless, scm_cmp_function,
4665 cmp_fun_t): Removed.
4666
4667 (compare_function): Added.
4668
4669 * sort.c (quicksort, SWAP, stack_node): Replaced pointer
4670 arithmetics with index arithmetics. Changed quicksort to work on
4671 an array of SCM values instead of an array of characters. Avoid
4672 bytewise copying of SCM elements. Avoid allocating memory on the
4673 stack with alloca. Fixed some comments.
4674
4675 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
4676
4677 * eval.c (EXTEND_ENV): Eliminated.
4678
4679 (unmemocopy, SCM_CEVAL, SCM_APPLY): Use SCM_EXTEND_ENV instead of
4680 EXTEND_ENV.
4681
4682 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
4683
4684 * __scm.h (SCM_DEBUG_DEBUGGER_SUPPORT): New compile-time option.
4685
4686 * gc.card.c (scm_gc_marked_p): Fixed compiler warning when
4687 compiling with SCM_DEBUG==1 by moving definition behind prototype.
4688
4689 * gc.card.c (scm_dbg_t_list_cell, scm_dbg_t_double_cell,
4690 scm_dbg_gc_marked_p, scm_dbg_gc_get_card, scm_dbg_gc_get_bvec,
4691 scm_t_list_cell_struct, scm_t_list_cell, scm_t_double_cell,
4692 scm_gc_marked_p, scm_gc_get_card, scm_gc_get_bvec): Fixed
4693 functions such that they check if the object is a non-immediate.
4694 Further, renamed identifiers to use the scm_dbg_ prefix and made
4695 their inclusion into the lib dependent of the
4696 SCM_DEBUG_DEBUGGER_SUPPORT compile time option.
4697
4698 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
4699
4700 * __scm.h: Fixed comment about the SCM_DEBUG_TYPING_STRICTNESS
4701 debug option.
4702
4703 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
4704
4705 * list.c (scm_ilength, scm_last_pair), unif.c (l2ra): Prefer
4706 !SCM_CONSP over SCM_NCONSP. Now, guile itself does not include
4707 any calls to SCM_NCONSP any more.
4708
4709 * unif.c (l2ra): Eliminate redundant check.
4710
4711 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
4712
4713 * list.c (scm_cons_star), ramap.c (scm_ra_sum, scm_ra_product,
4714 scm_array_map_x), unif.c (l2ra): Prefer !SCM_NULLP over
4715 SCM_NNULLP. Now, guile itself does not include any calls to
4716 SCM_NNULLP any more.
4717
4718 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
4719
4720 * eval.c (unmemocopy, SCM_APPLY, scm_map, scm_for_each,
4721 scm_copy_tree): Place assignment expressions which are part of
4722 other expressions into an expression of their own.
4723
4724 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
4725
4726 * goops.c (TEST_CHANGE_CLASS, scm_sys_initialize_object): Don't
4727 compare SCM values with !=.
4728
4729 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
4730
4731 * eval.c, eval.h, evalext.c, evalext.h (scm_sym_setter,
4732 scm_m_generalized_set_x, scm_init_evalext): Move the declaration
4733 and definition of the memoizer for the generalized set! macro from
4734 evalext.[ch] to eval.[ch]. Use the SCM_SYNTAX snarfer macro to
4735 define the macro object.
4736
4737 * eval.c, eval.h (s_set_x, scm_s_set_x, scm_m_set_x,
4738 scm_m_generalized_set_x): Since now scm_s_set_x is only used in
4739 eval.c, it is made static and renamed to s_set_x.
4740
4741 * evalext.c (scm_defined_p, scm_m_undefine): Prefer !SCM_<foo>
4742 over SCM_N<foo>.
4743
4744 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
4745
4746 * eval.c, root.h (scm_undefineds, SCM_NUM_PROTECTS, undefineds,
4747 scm_init_eval): Made scm_undefineds static in eval.c, renamed it
4748 to undefineds and registered the object as a permanent object.
4749
4750 * eval.c, eval.h (scm_f_apply, scm_init_eval): Made scm_f_apply
4751 static in eval.c, renamed it to f_apply and registered the object
4752 as a permanent object.
4753
4754 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
4755
4756 * eval.c (SCM_BIT7, SCM_BIT8, unmemocopy, SCM_CEVAL): Renamed
4757 file-local macro SCM_BIT8 to SCM_BIT7, which is more appropriate.
4758
4759 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
4760
4761 * numbers.c (scm_logtest): Fixed argument bug in the call to
4762 mpz_and, which showed up when compiling with SCM_DEBUG defined.
4763
4764 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
4765
4766 * gc-card.c (scm_i_sweep_card, scm_i_init_card_freelist): Fixed
4767 type errors that showed up when compiling with SCM_DEBUG defined.
4768
4769 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
4770
4771 * continuations.c, continuations.h, eval.c, eval.h, extensions.c,
4772 gsubr.c, guile.c, init.c, read.c, root.c, root.h, stackchk.h,
4773 throw.c: Removed uses of DEBUG_EXTENSIONS and DYNAMIC_LINKING to
4774 fix compile errors with --disable-deprecated.
4775
4776 2003-04-17 Rob Browning <rlb@defaultvalue.org>
4777
4778 * numbers.c (scm_integer_expt): fix case where we were declaring
4779 vars in the middle of a statement block. Thanks to Thamer
4780 Al-Harbash.
4781
4782 2003-04-17 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4783
4784 * goops.c (TEST_CHANGE_CLASS): Update variable class after class
4785 change.
4786
4787 * eq.c (scm_eqv_p): Turned into a primitive generic.
4788
4789 2003-04-16 Rob Browning <rlb@defaultvalue.org>
4790
4791 * gc_os_dep.c: Added patch for UnixWare and OpenUNIX support.
4792 Thanks to Boyd Gerber.
4793 Added check for __arm__ in addition to arm for LINUX and copied
4794 __s390__ defines from upstream libgc. Thanks to James Treacy for
4795 reporting the problems.
4796
4797 * numbers.c (PTRDIFF_MIN): use SCM_CHAR_BIT.
4798
4799 * socket.c: use SCM_CHAR_BIT.
4800
4801 * random.c (scm_c_random_bignum): use SCM_CHAR_BIT.
4802
4803 * num2integral.i.c (NUM2INTEGRAL): use SCM_CHAR_BIT.
4804
4805 2003-04-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
4806
4807 * feature.c (scm_init_feature): Always add threads feature.
4808
4809 2003-04-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4810
4811 * goops.c (scm_sys_fast_slot_ref): Use SCM_SLOT instead of
4812 scm_at_assert_bound_ref. (We don't want the unbound check. See
4813 oop/goops/active-slot.scm.)
4814
4815 2003-04-14 Rob Browning <rlb@defaultvalue.org>
4816
4817 * tags.h: scm_t_intptr should have been intptr_t.
4818
4819 2003-04-13 Rob Browning <rlb@defaultvalue.org>
4820
4821 * __scm.h (SCM_FLUSH_REGISTER_WINDOWS): don't just rely on "sparc"
4822 test. Instead use
4823 #if defined (sparc) || defined (__sparc__) || defined (__sparc)
4824 as gc_os_dep.c suggests is appropriate.
4825
4826 * goops.c (prep_hashsets): make static to match prototype.
4827 (scm_sym_args): SCM_SYMBOL -> SCM_GLOBAL_SYMBOL. Thanks to Albert
4828 Chin.
4829
4830 * c-tokenize.lex: remove trailing comma from enum. Thanks to
4831 Albert Chin.
4832
4833 * gc_os_dep.c: add NetBSD powerpc config info. Thanks to Thomas
4834 Klausner.
4835
4836 2003-04-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4837
4838 * goops.c (scm_sys_prep_layout_x): Instance allocation is now
4839 indicated through extra fields in getters-n-setters.
4840 (scm_add_slot): Adapted to new format of getters_n_setters slot.
4841 (Thanks to Andy Wingo.)
4842
4843 2003-02-25 Han-Wen Nienhuys <hanwen@cs.uu.nl>
4844
4845 * gc-segment.c: add comment
4846
4847 2003-04-07 Rob Browning <rlb@defaultvalue.org>
4848
4849 * debug.h: change "id" arg name to "info_id" to avoid objective-c
4850 clash.
4851
4852 * num2integral.i.c (NUM2INTEGRAL): fix bug pointed out by Mikael
4853 and add regression test to standalone/.
4854
4855 2003-04-06 Rob Browning <rlb@defaultvalue.org>
4856
4857 * strings.c (scm_mem2string): use memcpy rather than by-hand loop.
4858 Thanks to Dale P. Smith.
4859
4860 * random.c: #include gmp.h.
4861 (scm_c_random_bignum): normalize result on return.
4862
4863 * init.c: #include gmp.h.
4864
4865 * numbers.h: remove the gmp.h #include (not needed now).
4866
4867 * posix.h: change occurences of "id" to something else so we don't
4868 cause trouble when included via objective-c (can't hurt, might
4869 help). Still have usage in debug.h, though.
4870
4871 2003-04-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4872
4873 * random.c (scm_c_random_bignum): Don't generate a random number
4874 equal to m (the second argument of scm_c_random_bignum); only
4875 generate numbers in the range 0 <= r < m.
4876 (scm_c_default_rstate): Use SCM_VARIABLE_REF to access
4877 scm_var_random_state.
4878
4879 * num2integral.i.c (INTEGRAL2BIG): Put negation of n inside then
4880 clause.
4881
4882 2003-04-05 Rob Browning <rlb@defaultvalue.org>
4883
4884 * modules.c (scm_module_import_interface): move declaration of
4885 uses before any code.
4886
4887 2003-04-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4888
4889 * Makefile.am (scmconfig.h): Look for config.h in top_builddir,
4890 not top_srcdir.
4891
4892 * hashtab.c (rehash_after_gc): Clear to_rehash list before
4893 processing it in order to avoid an infinite loop.
4894
4895 * print.c (scm_prin1): Remember old state of pstate->writingp.
4896
4897 2003-04-05 Marius Vollmer <mvo@zagadka.de>
4898
4899 * Changed license terms to the plain LGPL thru-out.
4900
4901 2003-04-04 Rob Browning <rlb@defaultvalue.org>
4902
4903 * socket.c (FLIPCPY_NET_HOST_128): new macro.
4904 (ipv6_net_to_num, ipv6_num_to_net, bignum_in_ipv6_range_p):
4905 rewrite to handle GMP bignums.
4906
4907
4908 * random.c (scm_c_random_bignum): rewrite to handle GMP bignums.
4909
4910 * ports.c (scm_getc): minor tweak.
4911
4912 * numbers.h: remove SCM_BIGDIG conditionals, reorganize, and
4913 rewrite to handle GMP bignums.
4914
4915 * numbers.c: rewrite *many* functions to handle GMP bignums.
4916
4917 * num2integral.i.c (NUM2INTEGRAL, INTEGRAL2NUM, INTEGRAL2BIG):
4918 handle GMP bignums.
4919
4920 * num2float.i.c (NUM2FLOAT): handle GMP bignums.
4921
4922 * init.c (check_config): remove SCM_BIGDIG conditionals.
4923 (scm_init_guile_1): test to make sure mpz_t fits in a double_cell.
4924
4925 * gc-card.c ("sweep_card"): handle new mpz_t bignums.
4926
4927 * eval.c: remove SCM_BIGDIG conditionals.
4928
4929 * eq.c (s_scm_eqv_p): scm_i_bigcomp -> scm_i_bigcmp.
4930
4931 2003-03-31 Rob Browning <rlb@defaultvalue.org>
4932
4933 * Makefile.am (scmconfig.h): change srcdir to builddir. (Thanks
4934 to Kevin Ryde.)
4935
4936 2003-03-27 Rob Browning <rlb@defaultvalue.org>
4937
4938 * threads.h: fix various preprocessor usages of new public
4939 symbols to expect 0 or 1 values rather than 1 or undefined.
4940 i.e. change #ifdef to #if, etc.
4941
4942 * threads.c: fix various preprocessor usages of new public
4943 symbols to expect 0 or 1 values rather than 1 or undefined.
4944 i.e. change #ifdef to #if, etc.
4945
4946 * tags.h: fix various preprocessor usages of new public
4947 symbols to expect 0 or 1 values rather than 1 or undefined.
4948 i.e. change #ifdef to #if, etc.
4949
4950 * stacks.c: fix various preprocessor usages of new public
4951 symbols to expect 0 or 1 values rather than 1 or undefined.
4952 i.e. change #ifdef to #if, etc.
4953
4954 * stackchk.h: fix various preprocessor usages of new public
4955 symbols to expect 0 or 1 values rather than 1 or undefined.
4956 i.e. change #ifdef to #if, etc.
4957
4958 * stackchk.c: fix various preprocessor usages of new public
4959 symbols to expect 0 or 1 values rather than 1 or undefined.
4960 i.e. change #ifdef to #if, etc.
4961
4962 * sort.c: fix various preprocessor usages of new public
4963 symbols to expect 0 or 1 values rather than 1 or undefined.
4964 i.e. change #ifdef to #if, etc.
4965
4966 * read.c: fix various preprocessor usages of new public
4967 symbols to expect 0 or 1 values rather than 1 or undefined.
4968 i.e. change #ifdef to #if, etc.
4969
4970 * random.c: fix various preprocessor usages of new public
4971 symbols to expect 0 or 1 values rather than 1 or undefined.
4972 i.e. change #ifdef to #if, etc.
4973
4974 * print.c: fix various preprocessor usages of new public
4975 symbols to expect 0 or 1 values rather than 1 or undefined.
4976 i.e. change #ifdef to #if, etc.
4977
4978 * objects.c: fix various preprocessor usages of new public
4979 symbols to expect 0 or 1 values rather than 1 or undefined.
4980 i.e. change #ifdef to #if, etc.
4981
4982 * numbers.h: fix various preprocessor usages of new public
4983 symbols to expect 0 or 1 values rather than 1 or undefined.
4984 i.e. change #ifdef to #if, etc.
4985
4986 * null-threads.c: fix various preprocessor usages of new public
4987 symbols to expect 0 or 1 values rather than 1 or undefined.
4988 i.e. change #ifdef to #if, etc.
4989
4990 * lang.c: fix various preprocessor usages of new public
4991 symbols to expect 0 or 1 values rather than 1 or undefined.
4992 i.e. change #ifdef to #if, etc.
4993
4994 * lang.h: fix various preprocessor usages of new public
4995 symbols to expect 0 or 1 values rather than 1 or undefined.
4996 i.e. change #ifdef to #if, etc.
4997
4998 * iselect.h: fix various preprocessor usages of new public
4999 symbols to expect 0 or 1 values rather than 1 or undefined.
5000 i.e. change #ifdef to #if, etc.
5001
5002 * init.c: fix various preprocessor usages of new public
5003 symbols to expect 0 or 1 values rather than 1 or undefined.
5004 i.e. change #ifdef to #if, etc.
5005
5006 * gh_data.c: fix various preprocessor usages of new public
5007 symbols to expect 0 or 1 values rather than 1 or undefined.
5008 i.e. change #ifdef to #if, etc.
5009
5010 * gh.h: fix various preprocessor usages of new public
5011 symbols to expect 0 or 1 values rather than 1 or undefined.
5012 i.e. change #ifdef to #if, etc.
5013
5014 * gen-scmconfig.c: change most new public symbols to be defined to
5015 0 or 1 rather than being either 1 or undefined.
5016
5017 * gc_os_dep.c: fix various preprocessor usages of new public
5018 symbols to expect 0 or 1 values rather than 1 or undefined.
5019 i.e. change #ifdef to #if, etc.
5020 (STACK_GROWS_DOWN): define to 0 or 1 rather than 1 or undef.
5021
5022 * gc.h: fix various preprocessor usages of new public
5023 symbols to expect 0 or 1 values rather than 1 or undefined.
5024 i.e. change #ifdef to #if, etc.
5025
5026 * gc-card.c: fix various preprocessor usages of new public
5027 symbols to expect 0 or 1 values rather than 1 or undefined.
5028 i.e. change #ifdef to #if, etc.
5029
5030 * gc-mark.c: fix various preprocessor usages of new public
5031 symbols to expect 0 or 1 values rather than 1 or undefined.
5032 i.e. change #ifdef to #if, etc.
5033
5034 * feature.c: fix various preprocessor usages of new public
5035 symbols to expect 0 or 1 values rather than 1 or undefined.
5036 i.e. change #ifdef to #if, etc.
5037
5038 * evalext.c: fix various preprocessor usages of new public
5039 symbols to expect 0 or 1 values rather than 1 or undefined.
5040 i.e. change #ifdef to #if, etc.
5041
5042 * eval.h: fix various preprocessor usages of new public
5043 symbols to expect 0 or 1 values rather than 1 or undefined.
5044 i.e. change #ifdef to #if, etc.
5045
5046 * eval.c: fix various preprocessor usages of new public
5047 symbols to expect 0 or 1 values rather than 1 or undefined.
5048 i.e. change #ifdef to #if, etc.
5049
5050 * eq.c: fix various preprocessor usages of new public
5051 symbols to expect 0 or 1 values rather than 1 or undefined.
5052 i.e. change #ifdef to #if, etc.
5053
5054 * coop.c: fix various preprocessor usages of new public
5055 symbols to expect 0 or 1 values rather than 1 or undefined.
5056 i.e. change #ifdef to #if, etc.
5057
5058 * coop-threads.c: fix various preprocessor usages of new public
5059 symbols to expect 0 or 1 values rather than 1 or undefined.
5060 i.e. change #ifdef to #if, etc.
5061
5062 * coop-pthreads.c: fix various preprocessor usages of new public
5063 symbols to expect 0 or 1 values rather than 1 or undefined.
5064 i.e. change #ifdef to #if, etc.
5065
5066 * coop-defs.h: fix various preprocessor usages of new public
5067 symbols to expect 0 or 1 values rather than 1 or undefined.
5068 i.e. change #ifdef to #if, etc.
5069
5070 * convert.i.c: fix various preprocessor usages of new public
5071 symbols to expect 0 or 1 values rather than 1 or undefined.
5072 i.e. change #ifdef to #if, etc.
5073
5074 * continuations.c: fix various preprocessor usages of new public
5075 symbols to expect 0 or 1 values rather than 1 or undefined.
5076 i.e. change #ifdef to #if, etc.
5077
5078 * _scm.h: fix various preprocessor usages of new public symbols to
5079 expect 0 or 1 values rather than 1 or undefined. i.e. change
5080 #ifdef to #if, etc.
5081
5082 2003-03-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
5083
5084 * init.c (scm_init_guile_1): Call scm_i_init_deprecated.
5085
5086 * deprecated.c, deprecated.h: New files, to collect deprecated
5087 things in one place.
5088 * Makefile.am: Added them in all the right places.
5089
5090 * Makefile.am (EXTRA_DIST): Added "scmconfig.h.top".
5091 (scmconfig.h): Get "scmconfig.h.top" from $(srcdir) so that VPATH
5092 builds work.
5093 (DOT_X_FILES): Removed "iselect.x".
5094 (DOT_DOC_FILES): Removed "iselect.doc".
5095
5096 2003-03-25 Rob Browning <rlb@defaultvalue.org>
5097
5098 * win32-socket.h: #include "libguile/__scm.h". Replace usage of
5099 HAVE_WINSOCK2_H with SCM_HAVE_WINSOCK2_H.
5100
5101 * win32-socket.c: #include <config.h> if HAVE_CONFIG_H.
5102
5103 * vports.c: #include <config.h> if HAVE_CONFIG_H.
5104
5105 * unif.c: #include <config.h> if HAVE_CONFIG_H. Replace usage of
5106 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
5107
5108 * threads.h: replace usage of struct timespect with
5109 scm_t_timespec. Replace usage of USE_PTHREAD_THREADS with
5110 SCM_USE_PTHREAD_THREADS. Remove typedef for struct timespec in
5111 favor of scm_t_timespec from scmconfig.h.
5112
5113 * threads.c: move libguile/_scm.h include to the top so we pick up
5114 any critical defines like _GNU_SOURCE early. Replace usage of
5115 struct timespect with scm_t_timespec. Replace usage of
5116 STACK_GROWS_UP with SCM_STACK_GROWS_UP. Replace usage of
5117 USE_PTHREAD_THREADS with SCM_USE_PTHREAD_THREADS.
5118
5119 * threads-plugin.h: replace usage of struct timespect with
5120 scm_t_timespec.
5121
5122 * threads-plugin.c: #include <config.h> if HAVE_CONFIG_H. Replace
5123 usage of struct timespect with scm_t_timespec.
5124
5125 * tags.h: move HAVE_STDINT_H handling to scmconfig.h. Move
5126 HAVE_INTTYPES_H handling to scmconfig.h. #include
5127 "libguile/__scm.h". Rework handling for scm_t_bits,
5128 scm_t_signed_bits, SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
5129 SCM_T_SIGNED_BITS_MIN, and SIZEOF_SCM_T_BITS to use scm_t_intptr,
5130 scm_t_uintptr, SCM_SIZEOF_INTPTR_T, and SCM_SIZEOF_UINTPTR_T, and
5131 SCM_SIZEOF_UNSIGNED_LONG. Rename usage of HAVE_ARRAYS to
5132 SCM_HAVE_ARRAYS.
5133
5134 * symbols.c: #include <config.h> if HAVE_CONFIG_H.
5135
5136 * struct.c: #include <config.h> if HAVE_CONFIG_H.
5137
5138 * strports.c: #include <config.h> if HAVE_CONFIG_H.
5139
5140 * strop.c: #include <config.h> if HAVE_CONFIG_H.
5141
5142 * stime.h: move handling of time related headers to scmconfig.h.
5143
5144 * stime.c: #include <config.h> if HAVE_CONFIG_H.
5145
5146 * stacks.c: replace usage of STACK_GROWS_UP with
5147 SCM_STACK_GROWS_UP.
5148
5149 * sort.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
5150 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5151
5152 * socket.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
5153 of uint32 and HAVE_UINT_32 with scm_t_int32.
5154
5155 * smob.c: #include <config.h> if HAVE_CONFIG_H.
5156
5157 * simpos.c: #include <config.h> if HAVE_CONFIG_H.
5158
5159 * script.c: #include <config.h> if HAVE_CONFIG_H.
5160
5161 * scmsigs.c: #include <config.h> if HAVE_CONFIG_H.
5162
5163 * scmconfig.h.top: new file -- preamble for scmconfig.h.
5164
5165 * rw.c: #include <config.h> if HAVE_CONFIG_H.
5166
5167 * regex-posix.c: #include <config.h> if HAVE_CONFIG_H.
5168
5169 * read.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5170
5171 * rdelim.c: #include <config.h> if HAVE_CONFIG_H.
5172
5173 * random.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
5174 of LONG32, LONG64, SIZEOF_LONG, and HAVE_LONG_LONGS with
5175 scm_t_int32, scm_t_int64, and SCM_HAVE_T_INT64. Rename usage of
5176 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5177
5178 * ramap.c: replace usage of HAVE_LONG_LONGS with
5179 "SCM_SIZEOF_LONG_LONG != 0".
5180
5181 * putenv.c: #include <config.h> if HAVE_CONFIG_H. #include
5182 "libguile/scmconfig.h".
5183
5184 * pthread-threads.c: #include <config.h> if HAVE_CONFIG_H.
5185
5186 * print.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5187 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
5188
5189 * posix.c: #include <config.h> if HAVE_CONFIG_H.
5190
5191 * ports.c: #include <config.h> if HAVE_CONFIG_H.
5192
5193 * objects.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5194
5195 * numbers.h: replace usage of HAVE_FLOATINGPOINT_H with
5196 SCM_HAVE_FLOATINGPOINT_H. Replace usage of HAVE_IEEEFP_H with
5197 SCM_HAVE_IEEEFP_H. Replace usage of HAVE_NAN_H with
5198 SCM_HAVE_NAN_H. Replace usage of STDC_HEADERS with
5199 SCM_HAVE_STDC_HEADERS. Replace usage of ptrdiff_t with
5200 scm_t_ptrdiff. Replace usage of HAVE_LONG_LONGS with
5201 "SCM_SIZEOF_LONG_LONG != 0".
5202
5203 * numbers.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
5204 of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0". Replace
5205 usage of ptrdiff_t with scm_t_ptrdiff. Replace usage of
5206 SIZEOF_PTRDIFF_T with SCM_SIZEOF_SCM_T_PTRDIFF.
5207
5208 * num2integral.i.c: #include <config.h> if HAVE_CONFIG_H.
5209
5210 * null-threads.h: replace usage of struct timespect with
5211 scm_t_timespec.
5212
5213 * net_db.c: #include <config.h> if HAVE_CONFIG_H.
5214
5215 * mkstemp.c: #include <config.h> if HAVE_CONFIG_H. #include
5216 "libguile/__scm.h". Remove definition of gcc_uint64_t in favor of
5217 scm_t_uint64 and rename usages.
5218
5219 * mallocs.c: #include <config.h> if HAVE_CONFIG_H.
5220
5221 * load.c: #include <config.h> if HAVE_CONFIG_H.
5222
5223 * iselect.h: move handling of time related headers to scmconfig.h.
5224 Rename usage of HAVE_SYS_SELECT_H to SCM_HAVE_SYS_SELECT_H.
5225 Rename usage of HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Rename
5226 usage of USE_COOP_THREADS to SCM_USE_COOP_THREADS.
5227
5228 * iselect.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
5229 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
5230 USE_NULL_THREADS to SCM_USE_NULL_THREADS.
5231
5232 * ioext.c: #include <config.h> if HAVE_CONFIG_H.
5233
5234 * inline.h: #include "libguile/__scm.h" at the top. Change code
5235 to use SCM_C_INLINE and SCM_INLINE_C_INCLUDINT_INLINE_H to decide
5236 what to do instead of creating a new public #define. Rename usage
5237 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
5238 USE_NULL_THREADS to SCM_USE_NULL_THREADS. Rename usage of
5239 USE_COPT_THREADS to SCM_USE_COPT_THREADS.
5240
5241 * inline.c: rearrange handling -- now we just #define
5242 SCM_INLINE_C_INCLUDING_INLINE_H to 1 and #include
5243 "libguile/inline.h". scmconfig.h will define SCM_C_INLINE as
5244 appropriate, and we use that in inline.h along with the above
5245 define to determine how to respond.
5246
5247 * init.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
5248 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5249
5250 * guile.c: #include <config.h> if HAVE_CONFIG_H.
5251
5252 * gh_data.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
5253 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5254
5255 * gh.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5256
5257 * gen-scmconfig.h.in: new file -- see gen-scmconfig.c for details.
5258
5259 * gen-scmconfig.c: new file -- see comments in file for details.
5260
5261 * gdbinit.c: #include <config.h> if HAVE_CONFIG_H.
5262
5263 * gc_os_dep.c: #include <config.h> if HAVE_CONFIG_H. Replace
5264 usage of STACK_GROWS_UP with SCM_STACK_GROWS_UP.
5265
5266 * gc.h: replace usage of SIZEOF_LONG with
5267 SCM_SIZEOF_UNSIGNED_LONG. Replace usage of USE_PTHREAD_THREADS
5268 with SCM_USE_PTHREAD_THREADS. Remove SCM_SIZEOF_LONG definition
5269 since we handle that in scmconfig.h now.
5270
5271 * gc.c: #include <config.h> if HAVE_CONFIG_H.
5272
5273 * gc-mark.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
5274 of HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of
5275 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
5276
5277 * gc-malloc.c: #include <config.h> if HAVE_CONFIG_H.
5278
5279 * gc-card.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5280 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
5281
5282 * fports.c: #include <config.h> if HAVE_CONFIG_H.
5283
5284 * filesys.c: #include <config.h> if HAVE_CONFIG_H.
5285
5286 * feature.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
5287 of USE_NULL_THREADS to SCM_USE_NULL_THREADS.
5288
5289 * extensions.c: #include <config.h> if HAVE_CONFIG_H.
5290
5291 * evalext.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5292 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
5293
5294 * eval.c: #include <config.h> if HAVE_CONFIG_H. #include
5295 "libguile/__scm.h" rather than scmconfig.h. Rename usage of
5296 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
5297 with "SCM_SIZEOF_LONG_LONG != 0".
5298
5299 * error.c: #include <config.h> if HAVE_CONFIG_H.
5300
5301 * eq.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
5302 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
5303 with "SCM_SIZEOF_LONG_LONG != 0".
5304
5305 * deprecation.c: #include <config.h> if HAVE_CONFIG_H.
5306
5307 * coop.c: replace usage of struct timespect with scm_t_timespec.
5308 #include <config.h> if HAVE_CONFIG_H.
5309
5310 * coop-threads.c: #include "libguile/_scm.h" early. Replace
5311 usage of struct timespect with scm_t_timespec. Replace usage of
5312 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
5313
5314 * coop-pthreads.c: #include "libguile/_scm.h" early. Replace
5315 usage of struct timespect with scm_t_timespec. Replace usage of
5316 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
5317
5318 * coop-defs.h: move handling of time related headers to
5319 scmconfig.h. Add #include "libguile/__scm.h". Rename usage of
5320 HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Replace usage of struct
5321 timespect with scm_t_timespec.
5322
5323 * convert.i.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5324
5325 * convert.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5326
5327 * convert.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
5328 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5329
5330 * continuations.c: move libguile/_scm.h include to the top so we
5331 pick up any critical defines like _GNU_SOURCE early.
5332
5333 * backtrace.c: #include <config.h> if HAVE_CONFIG_H.
5334
5335 * async.c: #include <config.h> if HAVE_CONFIG_H.
5336
5337 * alloca.c: #include <config.h> if HAVE_CONFIG_H.
5338
5339 * _scm.h: #include <config.h> if HAVE_CONFIG_H.
5340 Rename usage of USE_PTHREAD_THREADS to SCM_USE_PTHREAD_THREADS.
5341
5342 * __scm.h: move libguile/scmconfig.h include up to the top, so
5343 we're sure to pick up any critical defines like _GNU_SOURCE early.
5344 #include <limits.h> removed in favor of scmconfig.h inclusion when
5345 appropriate. STDC_HEADERS based inclusion of stdlib.h,
5346 sys/types.h, stddef.h, and sys/stdtypes.h removed in favor of
5347 scmconfig.h inclusion when appropriate. Various Win32 related
5348 definitions removed in favor of scmconfig.h inclusion when
5349 appropriate.
5350 (HAVE_UINTPTR_T): definition removed (see NEWS).
5351 (SIZEOF_PTRDIFF_T): definition removed (see NEWS).
5352 (HAVE_LONG_LONGS): definition removed (see NEWS).
5353 (HAVE_LONG_LONG): definition removed (see NEWS).
5354 (HAVE_PTRDIFF_T): definition removed (see NEWS).
5355
5356 * Makefile.am: scmconfig.h is now generated by building and
5357 running gen-scmconfig.h and capturing its output. gen-scmconfig
5358 uses config.h and the configure.in generated gen-scmconfig.h to
5359 decide what to output. See gen-scmconfig.c for details.
5360 (noinst_PROGRAMS): add gen-scmconfig.
5361 (gen_scmconfig_SOURCES): new variable.
5362 (gen-scmconfig.$(OBJEXT)): new target - be careful to handle
5363 cross-compiling right.
5364 (scmconfig.h): build scmconfig.h from gen-scmconfig's output.
5365 (BUILT_SOURCES): add scmconfig.h.
5366
5367 2003-03-19 Marius Vollmer <mvo@zagadka.de>
5368
5369 * gc_os_dep.c: Added defines for sparc-unknown-netbsdelf1.5 from
5370 Adrian Bunk. Thanks!
5371
5372 2003-03-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5373
5374 * goops.c (make_class_from_template): New fourth arg:
5375 applicablep.
5376 (scm_class_extended_generic_with_setter, scm_class_self): Fixed
5377 cpls.
5378
5379 * smob.c (scm_set_smob_apply): Call scm_i_inherit_applicable.
5380
5381 * goops.c, objects.c, objects.h (scm_make_extended_class): New
5382 second arg: applicablep.
5383 (scm_i_inherit_applicable): New function.
5384
5385 * goops.c, goops.h (scm_class_applicable,
5386 scm_class_extended_accessor): New classes.
5387
5388 2003-03-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5389
5390 * procs.c (scm_procedure_documentation): Removed redundant
5391 SCM_NIMP test and replaced other calls to SCM_IMP by more explicit
5392 predicates.
5393
5394 2003-03-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5395
5396 * list.c, list.h (scm_filter, scm_filter_x): New functions.
5397
5398 * modules.c (scm_module_import_interface): New function.
5399
5400 * goops.c, goops.h (scm_class_accessor_method): Renamed from
5401 scm_class_accessor.
5402 (scm_class_accessor): New class.
5403
5404 2003-03-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5405
5406 * goops.c (scm_primitive_generic_generic): Enable primitive
5407 generic if not enabled.
5408 (scm_sys_goops_loaded): Setup unextended primitive generics.
5409
5410 * goops.c, goops.h (scm_c_extend_primitive_generic): New function.
5411
5412 * snarf.h (SCM_PRIMITIVE_GENERIC, SCM_PRIMITIVE_GENERIC_1): New
5413 snarf macros.
5414
5415 * numbers.c (scm_abs): Use SCM_PRIMITIVE_GENERIC. (This is only a
5416 testing example. All uses of SCM_GPROC should be converted.)
5417
5418 * procprop.c (scm_stand_in_scm_proc): Use scm_assq instead of
5419 scm_assoc.
5420
5421 * eq.c (scm_equal_p): Turned into a primitive generic.
5422
5423 2003-02-27 Rob Browning <rlb@defaultvalue.org>
5424
5425 * Makefile.am (scmconfig.h): new target -- generate file from
5426 ../config.h.
5427 (modinclude_HEADERS): remove version.h.
5428 (nodist_modinclude_HEADERS): add version.h.
5429
5430 2003-02-24 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5431
5432 This fixes a serious GC bug, introduced during the latest
5433 reorganization of the GC, which disabled freeing of structs and
5434 GOOPS objects:
5435
5436 * struct.c (scm_struct_prehistory): Init scm_i_structs_to_free to
5437 SCM_EOL.
5438 (scm_struct_prehistory): Move scm_free_structs to
5439 scm_before_mark_c_hook.
5440
5441 * gc-card.c (sweep_card): Check that we haven't swept structs on
5442 this card before. That can happen if scm_i_sweep_all_segments has
5443 been called from some other place than scm_igc.
5444
5445 2003-02-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5446
5447 * environments.c (DEFAULT_OBARRAY_SIZE): Changed from 137 to 31
5448 (since hash tables now adapt their size).
5449
5450 * modules.c (scm_modules_prehistory): Changed from 2001 to 1533
5451 (current number of prehistory bindings; hashtable code will select
5452 a prime which is greater than this value).
5453
5454 * symbols.c (scm_symbols_prehistory): Changed from 1009 to 2139
5455 (current number of initial symbols).
5456
5457 * properties.c (scm_init_properties): Don't specify size of
5458 scm_properties_whash.
5459
5460 * objprop.c (scm_init_objprop): Don't specify size of
5461 scm_object_whash.
5462
5463 * keywords.c (scm_init_keywords): Don't specify a hash table size.
5464
5465 * hooks.c (scm_c_hook_add): Fixed bug in append mode.
5466
5467 The following changes introduce the use of resizable hash tables
5468 throughout Guile. It also renames the old *-hash-table* functions
5469 to *-alist-vector* and places them, together with the rest of the
5470 weak vector support, in the module (ice-9 weak-vector). We should
5471 probably introduce a new, better, API for weak references, for
5472 example "weak pairs" a la MIT-Scheme. (In Chez scheme, they even
5473 look like and are used like ordinary pairs.)
5474
5475 * environments.c (obarray_enter, obarray_retrieve, obarray_remove,
5476 leaf_environment_fold, obarray_remove_all): Use hashtable
5477 accessors.
5478
5479 * gc.c (scm_init_storage): Moved hook initialization to
5480 scm_storage_prehistory.
5481 (scm_storage_prehistory): New function.
5482 (scm_igc): Added commentary about placement of
5483 scm_after_sweep_c_hook.
5484
5485 * gc-mark.c (scm_mark_all): Use hashtable accessors.
5486 (scm_gc_mark_dependencies): Use SCM_WVECT_WEAK_KEY_P and
5487 SCM_WVECT_WEAK_VALUE_P.
5488
5489 * hashtab.c, hashtab.h (scm_hash_for_each, scm_hash_map): New
5490 functions.
5491 (scm_vector_to_hash_table, scm_c_make_resizing_hash_table):
5492 Removed.
5493 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table,
5494 scm_make_doubly_weak_hash_table): Moved here from weaks.c.
5495
5496 * init.c (scm_init_guile_1): Removed call to scm_init_weaks; Added
5497 calls to scm_storage_prehistory and scm_hashtab_prehistory.
5498
5499 * modules.c (module-reverse-lookup): Use hashtable accessors.
5500
5501 * symbols.c, symbols.h (scm_i_hash_symbol): New function.
5502
5503 * weaks.c, weaks.h (scm_make_weak_key_alist_vector,
5504 scm_make_weak_value_alist_vector,
5505 scm_make_doubly_weak_alist_vector): New functions.
5506
5507 * weaks.c (scm_init_weaks_builtins): New function.
5508
5509 * weaks.h (SCM_WVECTF_WEAK_KEY, SCM_WVECTF_WEAK_VALUE,
5510 SCM_WVECTF_NOSCAN, SCM_WVECT_WEAK_KEY_P, SCM_WVECT_WEAK_VALUE_P,
5511 SCM_WVECT_NOSCAN_P): New macros.
5512
5513 * weaks.c (scm_scan_weak_vectors): Use SCM_WVECT_WEAK_KEY_P
5514 and SCM_WVECT_WEAK_VALUE_P.
5515
5516 * weaks.c, weaks.h (scm_i_allocate_weak_vector): Renamed from
5517 allocate_weak_vector and exported.
5518
5519 2003-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5520
5521 * hashtab.c: Undid thread safety. (We decided that it's better to
5522 let the user explicitly protect the tables (or not) according what
5523 is suitable for the application.)
5524
5525 2003-02-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5526
5527 * hashtab.c (scm_hash_fn_remove_x, scm_internal_hash_fold): Made
5528 thread safe and handle resizing tables.
5529 (scm_ihashx, scm_sloppy_assx, scm_delx_x): Removed
5530 SCM_DEFER/ALLOW_INTS.
5531
5532 2003-02-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5533
5534 * hashtab.c (scm_vector_to_hash_table,
5535 scm_c_make_resizing_hash_table, scm_make_hash_table): New
5536 functions.
5537 (scm_hash_fn_get_handle, scm_hash_fn_create_handle_x): Made thread
5538 safe and handle resizing tables.
5539
5540 * weaks.c (scm_make_weak_key_hash_table,
5541 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
5542 Size argument made optional. Return resizable table if not
5543 specified.
5544
5545 2003-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5546
5547 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
5548 Fixed formals tests for closures. (Thanks to Kevin Ryde.)
5549
5550 2003-02-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5551
5552 * debug.c (scm_procedure_source): Handle all objects for which
5553 procedure? is #t. (Thanks to Bill Schottstaedt.)
5554
5555 2003-01-23 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5556
5557 * futures.c (mark_futures): Don't need to mark data of recycled
5558 futures.
5559 (scan_futures, cleanup_undead): Be smarter about marking
5560 futures---avoid unnecessary passes through future lists.
5561
5562 * futures.h, futures.c: New files; Introduced recycling of
5563 futures. For fine-grained threading this lifts performance to
5564 another level. We can now use parallelization in inner loops of
5565 Guile programs without impossible overhead.
5566
5567 * threads.h, threads.c: Moved futures to their own file.
5568
5569 * Makefile.am (libguile_la_SOURCES): Added futures.c.
5570 (DOT_X_FILES): Added futures.x.
5571 (DOT_DOC_FILES): Added futures.doc.
5572 (modinclude_HEADERS): Added futures.h.
5573
5574 * threads.c, threads.h (scm_i_create_thread): Renamed from
5575 create_thread and made global.
5576
5577 * futures.c (scm_make_future): New procedure.
5578
5579 * eval.c: #include "libguile/futures.h".
5580
5581 * init.c: #include "futures.h"
5582 (scm_init_guile_1): Call scm_init_futures.
5583
5584 * stime.c (SCM_TIME_UNITS_PER_SECOND): Renamed from CLKTCK.
5585
5586 * stime.h (SCM_TIME_UNITS_PER_SECOND): Definition moved here.
5587
5588 * eval.c, eval.h (scm_trampoline_0, scm_i_call_closure_0): New
5589 functions.
5590
5591 * eval.c (scm_trampoline_1): Fixed arguments test for closures.
5592
5593 2003-01-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5594
5595 * threads.c (create_thread): Don't unwind dynwind chain of parent
5596 thread before creation. Just start the new thread with an empty
5597 dynwind chain.
5598
5599 2003-01-20 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5600
5601 * evalext.c, evalext.h (scm_self_evaluating_p): New function.
5602
5603 2003-01-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5604
5605 * threads.c (scm_timed_wait_condition_variable): Support timed
5606 waiting also for simple condition variables.
5607
5608 * goops.c (TEST_CHANGE_CLASS): Use scm_change_object_class instead
5609 of calling the procedure change-object-class.
5610
5611 2003-01-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5612
5613 * ramap.c (scm_ramapc): Typo in error message.
5614
5615 2003-01-08 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5616
5617 * goops.c (scm_sys_prep_layout_x): Bugfix: Only create layout for
5618 slots with instance allocation.
5619
5620 * goops.c, goops.h (scm_class_extended_generic_with_setter): New
5621 class.
5622 (scm_compute_applicable_methods): Use scm_generic_function_methods.
5623
5624 * goops.c (scm_generic_function_methods): Support extended
5625 generic functions.
5626
5627 2002-12-29 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5628
5629 * eval.c (unmemocopy): Bugfix: scm_sym_delay --> scm_sym_future.
5630 Thanks to Neil for pointing this out!
5631
5632 2002-12-29 Neil Jerram <neil@ossau.uklinux.net>
5633
5634 * lang.h: Remove declarations matching definitions removed from
5635 lang.c (just below).
5636
5637 2002-12-28 Neil Jerram <neil@ossau.uklinux.net>
5638
5639 * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null,
5640 scm_m_while, scm_nil_eq): Remove definitions that were superfluous
5641 and already commented out.
5642
5643 * read.h (scm_lreadparen), read.c (scm_lreadr, scm_read_token,
5644 scm_lreadparen): Support reading vectors with Elisp syntax if
5645 SCM_ELISP_READ_EXTENSIONS is defined. (SCM_ELISP_READ_EXTENSIONS
5646 is not currently defined, and there isn't even a configure switch
5647 to enable it yet.)
5648
5649 2002-12-26 Marius Vollmer <mvo@zagadka.ping.de>
5650
5651 * Makefile.am (c-tokenize.o): Refer to source via $< so that vpath
5652 builds work.
5653 (EXTRA_DIST): Added version.h.in.
5654
5655 2002-12-21 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5656
5657 This change makes it possible for one thread to do lazy sweeping
5658 while other threads are running. Now only the mark phase need to
5659 have all threads asleep. We should look further into this issue.
5660 Presently, I've put the locking of scm_i_sweep_mutex at
5661 "conservative" places due to my current lack of knowledge about
5662 the garbage collector. Please feel free to restrict these regions
5663 further to allow for maximal parallelism!
5664
5665 * gc.c, gc.h (scm_i_sweep_mutex): New mutex.
5666
5667 * gc.c (scm_gc_for_newcell), gc-malloc.c (scm_realloc,
5668 scm_gc_register_collectable_memory): Substitute locking of
5669 scm_i_sweep_mutex for calls to scm_i_thread_put_to_sleep.
5670 (scm_igc): Lock sweep mutex here instead of in callers; Calls to
5671 scm_i_thread_put_to_sleep/scm_i_thread_wake_up used to demarkate
5672 the single-thread section (which now only contains the mark
5673 phase).
5674 (scm_gc): Don't lock sweeo mutex here since scm_igc locks it;
5675 Removed SCM_DEFER/ALLOW_INTS. Simply call scm_igc directly.
5676
5677 * threads.c (gc_section_mutex): Removed.
5678
5679 2002-12-19 Mikael Djurfeldt <mdj@kvast.blakulla.net>
5680
5681 * threads.c (create_thread): Clear parent field in root state in
5682 order not to unnecessarily remember dead threads.
5683
5684 * eval.c (call_subr2o_1, call_lsubr2_2): New functions.
5685 (scm_trampoline_1, scm_trampoline_2): Use them.
5686
5687 2002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
5688
5689 Partial introduction of real plugin interface.
5690
5691 * Makefile.am (modinclude_HEADERS): Added threads-plugin.h.
5692 (EXTRA_DIST): Added threads-plugin.c.
5693
5694 * threads-plugin.h, threads-plugin.c: New files.
5695
5696 * threads.h: #include "libguile/threads-plugin.h".
5697
5698 * threads.c: #include "libguile/threads-plugin.c".
5699
5700 * pthread-threads.c: Temporarily remove debugging functions.
5701
5702 * threads.c, threads.h (scm_yield): Added back.
5703
5704 2002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
5705
5706 * threads.c (really_launch): Detach before unlocking
5707 thread_admin_mutex in order not to risk being joined.
5708 (scm_i_thread_put_to_sleep, scm_i_thread_wake_up): Keep
5709 thread_admin_mutex locked during GC.
5710
5711 * pthread-threads.c, pthread-threads.h: Improvements to debugging
5712 functions.
5713
5714 2002-12-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
5715
5716 * pthread-threads.c, pthread-threads.h (SCM_DEBUG_THREADS): Added
5717 support for debugging mutex operations.
5718
5719 * threads.c (scm_thread): Removed filed joining_threads.
5720 (thread_print): Print thread number as well as address of thread
5721 structure.
5722 (scm_join_thread): Bugfix.
5723 (scm_lock_mutex, scm_try_mutex, scm_unlock_mutex,
5724 scm_timed_wait_condition_variable, scm_signal_condition_variable,
5725 scm_broadcast_condition_variable): Use the low-level API.
5726 (scm_all_threads): Return copy of thread list (to prevent
5727 unintended destruction).
5728 (scm_threads_prehistory): Initialize heap_mutex of fake thread.
5729
5730 * pthread-threads.c, pthread-threads.h, threads.c: Fixes to
5731 pthread "native" recursive mutex support.
5732
5733 2002-12-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5734
5735 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): New definitions.
5736 Simply lock a thread C API recursive mutex.
5737 (SCM_NONREC_CRITICAL_SECTION_START,
5738 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
5739 SCM_REC_CRITICAL_SECTION_END): Removed.
5740
5741 * eval.c: Replaced SOURCE_SECTION_START / SOURCE_SECTION_END with
5742 direct calls to scm_rec_mutex_lock / unlock around the three calls
5743 to scm_m_expand_body.
5744
5745 * eval.c, eval.h (promise_free): New function.
5746 (scm_force): Rewritten; Now thread-safe; Removed
5747 SCM_DEFER/ALLOW_INTS.
5748
5749 * pthread-threads.h: Added partially implemented plugin interface
5750 for recursive mutexes. These are, for now, only intended to be
5751 used internally within the Guile implementation.
5752
5753 * pthread-threads.c: New file.
5754
5755 * threads.c: Conditionally #include "pthread-threads.c".
5756
5757 * eval.c, eval.h (scm_makprom, scm_force): Rewritten to be
5758 thread-safe;
5759
5760 * snarf.h (SCM_MUTEX, SCM_GLOBAL_MUTEX, SCM_REC_MUTEX,
5761 SCM_GLOBAL_REC_MUTEX): New macros.
5762
5763 * eval.c, threads.c, threads.h, snarf.h: Rewrote critical section
5764 macros---use mutexes instead.
5765
5766 * tags.h (SCM_IM_FUTURE): New tag.
5767
5768 * eval.c (scm_m_future): New primitive macro.
5769 (SCM_CEVAL): Support futures.
5770 (unmemocopy): Support unmemoization of futures.
5771
5772 * print.c (scm_isymnames): Name of future isym.
5773
5774 * version.c: Unmade some changes to my private copy that got
5775 committed by mistake.
5776
5777 2002-12-11 Mikael Djurfeldt <mdj@kvast.blakulla.net>
5778
5779 * gc-malloc.c, gc.h, init.c: Reverted gc-malloc change of
5780 2002-12-10.
5781
5782 * gc.c (scm_igc): Don't call scm_i_thread_invalidate_freelists.
5783
5784 * gc.c (scm_gc_sweep): Call it here instead, which is a more
5785 logical place.
5786
5787 * threads.c (create_thread): Remember root object until the handle
5788 of the new thread is on all_threads list.
5789
5790 * root.c (scm_make_root): Moved copying of fluids until after
5791 creation of root handle so that the fluids are GC protected. Also
5792 removed the critical section.
5793
5794 2002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
5795
5796 * gc-malloc.c, gc.h (scm_gc_malloc_prehistory): New function.
5797
5798 * gc-malloc.c (malloc_mutex): New mutex.
5799 (scm_gc_malloc_prehistory): Initialize it.
5800 (scm_realloc): Serialize call to realloc
5801 (scm_calloc): Same for calloc.
5802 Thanks to Wolfgang Jaehrling!
5803 (Now we have to make sure all calls to malloc/realloc are made
5804 through scm_malloc.)
5805
5806 * init.c (scm_init_guile_1): Call scm_gc_malloc_prehistory.
5807
5808 * threads.c (really_launch): Release heap (to prevent deadlock).
5809 (create_thread): Release heap before locking thread admin mutex.
5810
5811 2002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
5812
5813 * threads.c (scm_i_thread_invalidate_freelists): New
5814 function.
5815
5816 * gc.c (scm_igc): Call scm_i_thread_invalidate_freelists.
5817
5818 * modules.c (scm_export): Inserted a return statement.
5819
5820 2002-12-10 Han-Wen Nienhuys <hanwen@cs.uu.nl>
5821
5822 * modules.c (scm_export): new function
5823
5824 * gc-card.c: add a note about malloc()/free() overhead.
5825
5826 2002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
5827
5828 * Makefile.am (c-tokenize.$(OBJEXT)): Don't look for c-tokenize.c
5829 in srcdir.
5830
5831 2002-12-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5832
5833 These changes remove scm_ints_disabled (which hasn't has any
5834 effect in Guile for quite some time).
5835
5836 * async.c, error.h (scm_ints_disabled): Removed.
5837
5838 * gc.c (scm_gc_for_newcell), init.c (scm_init_guile_1),
5839 root.c (scm_internal_cwdr), gdbint.c (SCM_BEGIN_FOREIGN_BLOCK,
5840 SCM_END_FOREIGN_BLOCK): Don't touch scm_ints_disabled.
5841 (old_ints): Removed.
5842
5843 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Define as a recursive
5844 critical section.
5845 (SCM_REDEFER_INTS, SCM_ALLOW_INTS): Define as SCM_DEFER_INTS and
5846 SCM_ALLOW_INTS.
5847
5848 2002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5849
5850 * threads.c (scm_mutex_lock, scm_cond_wait, scm_cond_timedwait):
5851 Removed accidental #if 0 around these functions.
5852
5853 These changes are the start of support for preemptive
5854 multithreading. Marius and I have agreed that I commit this code
5855 into the repository although it isn't thoroughly tested and surely
5856 introduces many bugs. The bugs should only be exposed when using
5857 threads, though. Signalling and error handling for threads is
5858 very likely broken. Work on making the implementation cleaner and
5859 more efficient is needed.
5860
5861 * __scm.h (SCM_ALLOW_INTS_ONLY): Removed.
5862 (SCM_NONREC_CRITICAL_SECTION_START,
5863 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
5864 SCM_REC_CRITICAL_SECTION_END): New macros.
5865 (SCM_CRITICAL_SECTION_START/END): Defined here.
5866
5867 * eval.c: Insert SOURCE_SECTION_START / SOURCE_SECTION_END around
5868 the three calls to scm_m_expand_body.
5869
5870 * gc.h: #include "libguile/pthread-threads.h";
5871 (SCM_FREELIST_CREATE, SCM_FREELIST_LOC): New macros.
5872
5873 * gc.c (scm_i_freelist, scm_i_freelist2): Defined to be of type
5874 scm_t_key;
5875
5876 * gc.c, gc-freelist.c, inline.h: Use SCM_FREELIST_LOC for freelist
5877 access.
5878
5879 * gc-freelist.c (scm_gc_init_freelist): Create freelist keys.
5880
5881 * gc-freelist.c, threads.c (really_launch): Use
5882 SCM_FREELIST_CREATE.
5883
5884 * gc-malloc.c (scm_realloc, scm_gc_register_collectable_memory):
5885
5886 * gc.c (scm_i_expensive_validation_check, scm_gc,
5887 scm_gc_for_newcell): Put threads to sleep before doing GC-related
5888 heap administration so that those pieces of code are executed
5889 single-threaded. We might consider rewriting these code sections
5890 in terms of a "call_gc_code_singly_threaded" construct instead of
5891 calling the pair of scm_i_thread_put_to_sleep () and
5892 scm_i_thread_wake_up (). Also, we would want to have as many of
5893 these sections eleminated.
5894
5895 * init.c (scm_init_guile_1): Call scm_threads_prehistory.
5896
5897 * inline.h: #include "libguile/threads.h"
5898
5899 * pthread-threads.h: Macros now conform more closely to the
5900 pthreads interface. Some of them now take a second argument.
5901
5902 * threads.c, threads.h: Many changes.
5903
5904 2002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5905
5906 * Makefile.am (version.h): Changed $^ --> $< in rule for
5907 version.h.
5908
5909 2002-12-08 Rob Browning <rlb@defaultvalue.org>
5910
5911 * version.h.in (SCM_MICRO_VERSION): use @--@ substitution now.
5912 (SCM_MINOR_VERSION): use @--@ substitution now.
5913 (SCM_MICRO_VERSION): use @--@ substitution now.
5914 (scm_effective_version): new function prototype.
5915
5916 * version.c (scm_effective_version): new function, also add
5917 effective-version.
5918
5919 * Makefile.am (schemelibdir): VERSION -> GUILE_EFFECTIVE_VERSION.
5920 (libpath.h): use GUILE_EFFECTIVE_VERSION to compute
5921 SCM_LIBRARY_DIR.
5922 (version.h): generate this here rather than configure.in. This
5923 approach tracks source edits better (i.e. more immediately).
5924 Might be worth considering for other .in files too.
5925
5926 2002-12-02 Marius Vollmer <mvo@zagadka.ping.de>
5927
5928 Reorganized thread package selection. A thread package now only
5929 implements a small set of pthread like functions and Guile
5930 implements the rest on top of that. Guile's implementation is
5931 what the "coop-pthreads" package has been previously. Support for
5932 "coop" threads has been removed until I get time to add it again.
5933
5934 * Makefile.am (libguile_la_SOURCES): Removed iselect.c.
5935 (noinst_HEADERS): Removed coop-threads.c, coop-threads.h, coop.c,
5936 null-threads.c, coop-pthreads.c.
5937 (modinclude_HEADERS): Removed coop-defs.h, coop-pthreads.h. Added
5938 pthread-threads.h.
5939
5940 * validate.h (SCM_VALIDATE_THREAD): Moved to threads.h.
5941
5942 * threads.h: Do not include "libguile/coop-defs.h". Include
5943 "libguile/pthread-threads.h" for USE_COPT_THREADS. Removed
5944 (previously deprecated) C level thread API prototypes. They are
5945 now in the thread package specific headers, "null-threads.h" and
5946 "pthread-threads.h".
5947 (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR):
5948 New.
5949 (scm_threads_init): Removed.
5950 (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END,
5951 SCM_THREAD_SWITCHING_CODE, scm_i_switch_counter,
5952 SCM_I_THREAD_SWITCH_COUNT): Define here.
5953 (scm_single_thread_p): Removed.
5954 (scm_call_with_new_thread): Take two args directly instead of list
5955 of two args.
5956 (scm_i_thread_data, scm_i_set_thread_data, SCM_THREAD_LOCAL_DATA,
5957 SCM_SET_THREAD_LOCAL_DATA): Define here.
5958
5959 * threads.c: Merged with "coop-pthreads.c".
5960
5961 * null-threads.h: Implement pthread-like API as a set of macros.
5962
5963 * pthread-threads.h: New, implement pthread-like API by deferring
5964 to pthread itself.
5965
5966 * init.c (scm_init_guile_1): Do not call scm_init_iselect, which
5967 has been lost in the reorganization.
5968
5969 2002-12-01 Mikael Djurfeldt <mdj@linnaeus>
5970
5971 The following change makes it possible to move procedure
5972 application dispatch outside inner loops. The motivation was
5973 clean implementation of efficient replacements of R5RS primitives
5974 in SRFI-1.
5975
5976 The semantics is clear: scm_trampoline_N returns an optimized
5977 version of scm_call_N (or NULL if the procedure isn't applicable
5978 on N args).
5979
5980 Applying the optimization to map and for-each increases efficiency
5981 noticeably. For example, (map abs ls) is 8 times faster than
5982 before.
5983
5984 * eval.h (scm_t_trampoline_1, scm_t_trampoline_2): New types.
5985
5986 * eval.c, eval.h (scm_trampoline_1, scm_trampoline_2): New functions.
5987
5988 * eval.c (call_subr2_2, call_lsubr_2, call_closure_2): New functions;
5989 (map, for-each): Handle also application on two args as a special
5990 case; Use trampolines.
5991
5992 Other changes:
5993
5994 * sort.c (scm_cmp_function): Choose subr2less for scm_tc7_subr_2o;
5995 (subr2oless): Removed.
5996 (scm_restricted_vector_sort_x): Use scm_return_first to keep the
5997 vector GC protected.
5998
5999 * eval.c (check_map_args): Use scm_out_of_range_pos instead of
6000 scm_out_of_range.
6001
6002 2002-11-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
6003
6004 * evalext.[ch] (scm_m_undefine, undefine): Deprecated.
6005
6006 2002-11-17 Mikael Djurfeldt <mdj@linnaeus>
6007
6008 * debug.c (scm_make_iloc): Added missing "return".
6009
6010 2002-11-17 Marius Vollmer <mvo@zagadka.ping.de>
6011
6012 * strports.c (scm_eval_string_in_module): Validate second arg to
6013 be a module. Thanks to Arno Peters!
6014
6015 2002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
6016
6017 * .cvsignore: remove goops.c
6018
6019 2002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
6020
6021 * modules.c (scm_env_top_level, scm_lookup_closure_module,
6022 module_variable, scm_module_lookup_closure,
6023 scm_module_transformer, scm_sym2var, scm_module_reverse_lookup,
6024 scm_system_module_env_p): Don't compare SCM values with C
6025 operators == or !=. Avoid SCM_IMP predicates. Prefer !SCM_FALSEP
6026 over SCM_NFALSEP.
6027
6028 2002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
6029
6030 * eval.h (SCM_MAKE_ILOC): New macro.
6031
6032 * debug.c (scm_make_iloc): Use SCM_MAKE_ILOC instead of computing
6033 the iloc bitpattern here.
6034
6035 2002-11-14 Mikael Djurfeldt <mdj@linnaeus>
6036
6037 * coop-pthreads.c, coop-pthreads.h: scm_internal_select should be
6038 part of the API, otherwise it's difficult to write Guile
6039 extensions using non-blocking I/O => moved #include
6040 "libguile/iselect.h" from coop-pthreads.c --> coop-pthreads.h.
6041
6042 * coop-pthreads.c (scm_unlock_mutex): Changed s_lock_mutex -->
6043 s_unlock_mutex.
6044
6045 2002-11-10 Marius Vollmer <mvo@zagadka.ping.de>
6046
6047 * __scm.h (USE_THREADS, GUILE_ISELECT): Do not define here. They
6048 are defined in configure.in.
6049
6050 * threads.c: Removed SCM_API from function definitions. SCM_API
6051 is only for declarations.
6052
6053 2002-11-07 Mikael Djurfeldt <mdj@linnaeus>
6054
6055 * coop-pthreads.h: Added support for thread specific data to the
6056 generic C API for the coop-pthreads case.
6057
6058 * threads.c, threads.h (scm_cond_init): Undo unintentional API
6059 change.
6060 (scm_cond_broadcast): Added missing function.
6061
6062 2002-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6063
6064 * coop.c (coop_next_runnable_thread): Removed, wich should have
6065 happened when GUILE_ISELECT was hard-wired.
6066
6067 2002-11-03 Marius Vollmer <mvo@zagadka.ping.de>
6068
6069 * Makefile.am (libguile_la_SOURCES): Added threads.c
6070 (DOT_DOC_FILES): Added threads.doc.
6071 (DOT_X_FILES): Added threads.x.
6072 (EXTRA_libguile_la_SOURCES): Removed threads.c.
6073 (noinst_HEADERS): Added coop-pthreads.c.
6074 (modinclude_HEADERS): Added coop-pthreads.h.
6075
6076 * __scm.h (USE_THREADS, GUILE_ISELECT): Define when
6077 SCM_DEBUG_DEPRECATED. Removed their use thru-out Guile.
6078
6079 * iselect.c: Include "_scm.h" before testing HAVE_UNISTD_H.
6080 Thanks to Bill Schottstaedt!
6081
6082 * numbers.c (scm_integer_expt): Make 0^z == 0 for z != 0.
6083
6084 * _scm.h (HAVE_RESTARTABLE_SYSCALLS): Do define even when
6085 SCM_COPT_THREADS is defined.
6086 (SCM_SYSCALL): Use EINTR-expection version when SCM_COPT_THREADS
6087 is defined.
6088
6089 * coop-pthreads.c: Some harmless renamings of internal stuff.
6090 (create_thread): New, generalized version of
6091 scm_call_with_new_thread.
6092 (scm_call_with_new_thread): Use it.
6093 (scm_spawn_thread): New, use create_thread.
6094
6095 2002-11-02 Marius Vollmer <mvo@zagadka.ping.de>
6096
6097 * coop-pthreads.c, coop-pthreads.h: Redone completely, you might
6098 start testing it now.
6099
6100 * _scm.h: Include <errno.h< so that SCM_SYSCALL is correctly
6101 defined when HAVE_RESTARTABLE_SYSCALLS is not defined.
6102 (HAVE_RESTARTABLE_SYSCALLS): Do not define when USE_COPT_THREADS
6103 is defined.
6104
6105 2002-10-27 Marius Vollmer <mvo@zagadka.ping.de>
6106
6107 * scmsigs.c (signal_cell_handlers, install_handler_data,
6108 scm_delq_spine_x, really_install_handler, install_handler): New
6109 scheme for triggering signal handlers, to simplify take_signal.
6110 (take_signal): Simplified, to avoid race conditions.
6111 (scm_sigaction_for_thread): Use new Scheme. Validate that thread
6112 hasn't exited yet.
6113
6114 * async.c (scm_async_click): Reset pending_asyncs, handle
6115 signal_asyncs. Don't set cdr of a non-signal async to #f.
6116 (scm_i_queue_async_cell): Do not check cdr of cell for #f, queue
6117 always. Set pending_asyncs.
6118 (scm_system_async_mark_for_thread): Check that thread has not
6119 exited.
6120 (scm_unmask_signals, decrease_block): Call scm_async_click after
6121 block_asyncs becomes zero.
6122
6123 * __scm.h (SCM_ASYNC_CLICK): Check pending_asyncs instead of
6124 active_asyncs.
6125
6126 * root.h (scm_root_state): Added pending_asyncs and signal_asyncs
6127 fields.
6128 * root.c (root_mark): Mark them.
6129 (make_root): Initialize them.
6130
6131 * iselect.c, iselect.h: Replaced GUILE_ISELECT with
6132 USE_COOP_THREADS.
6133 (scm_internal_select): Define one version for USE_COOP_THREADS and
6134 one for USE_NULL_THREADS.
6135 (scm_init_iselect): Likewise.
6136
6137 * inline.h (scm_cell, scm_double_cell): Also allow
6138 USE_COPT_THREADS to not protect the slot initializers.
6139
6140 * init.c (scm_init_guile_1): Call scm_init_thread_procs. This is
6141 because threads need to be initialized before the stack, but
6142 gsubrs such as scm_timed_condition_variable_wait can only be
6143 created later.
6144
6145 * threads.h: Include "coop-pthreads.h" when requested.
6146 (scm_threads_make_mutex, scm_threads_lock_mutex,
6147 scm_threads_unlock_mutex, scm_threads_monitor): Removed, they were
6148 not implemented anyway.
6149 (scm_init_thread_procs, scm_try_mutex,
6150 scm_timed_condition_variable_wait,
6151 scm_broadcast_condition_variable, scm_c_thread_exited_p,
6152 scm_thread_exited_p): New prototypes.
6153 (struct timespec): Define if not already defined.
6154 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
6155 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
6156 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
6157 scm_cond_broadcast, scm_cond_destroy): Declarations moved here and
6158 deprecated.
6159
6160 * threads.c: Include <errno.h>. Include "coop-pthreads.c" when
6161 requested.
6162 (scm_thread_exited_p): New.
6163 (scm_try_mutex, scm_broadcast_condition_variable): Newly
6164 registered procedures.
6165 (scm_wait_condition_variable, scm_timed_wait_condition_variable):
6166 Use the latter as the procedure for "wait-condition-variable",
6167 thus offering a optional timeout parameter to Scheme.
6168 (scm_wait_condition_variable): Implement in terms of
6169 scm_timed_wait_condition_variable.
6170 (scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
6171 scm_mutex_unlock, scm_mutex_destroy, scm_cond_init,
6172 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
6173 scm_cond_broadcast, scm_cond_destroy): Implement in terms of
6174 scm_make_mutex, etc, and deprecate.
6175 (scm_init_threads): Do not create smobs, leave this to
6176 scm_threads_init. Do not include "threads.x" file.
6177 (scm_init_thread_procs): New, include "threads.x" here.
6178
6179 * null-threads.h (scm_null_mutex, scm_null_mutex_init,
6180 scm_null_mutex_lock, scm_null_mutex_unlock,
6181 scm_null_mutex_destroy, scm_null_condvar, scm_null_condvar_init,
6182 scm_null_condvar_wait, scm_null_condvar_signal,
6183 scm_null_condvar_destroy): Removed.
6184 (scm_mutex_init, scm_mutex_lock, scm_mutex_unlock, scm_cond_init,
6185 scm_cond_wait, scm_cond_signal, scm_cond_broadcast,
6186 scm_cond_destory): Do not define, they are now deprecated and
6187 handled by threads.{h,c}.
6188
6189 * null-threads.c (scm_null_mutex, scm_null_cond): Define here.
6190 (scm_threads_init): Create smobs here, using the appropriate
6191 sizes.
6192 (block): Removed, now unused.
6193 (scm_c_thread_exited_p): New.
6194 (scm_null_mutex_init, scm_null_mutex_lock, scm_null_mutex_unlock,
6195 scm_null_mutex_destroy, scm_null_condvar_init,
6196 scm_null_condvar_wait, scm_null_condvar_signal,
6197 scm_null_condvar_destroy): Removed and updated users to do their
6198 task directly.
6199 (scm_try_mutex, timeval_subtract,
6200 scm_timed_wait_condition_variable,
6201 scm_broadcast_condition_variable): New.
6202 (scm_wait_condition_variable): Removed.
6203
6204 * coop-defs.h (coop_m): Added 'level' field.
6205 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
6206 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
6207 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
6208 scm_cond_broadcast, scm_cond_destroy, struct timespec): Do not
6209 define.
6210 (coop_condition_variable_broadcast): New.
6211
6212 * coop-threads.c (scm_threads_init): Create smobs here, using the
6213 appropriate sizes.
6214 (scm_c_thread_exited_p, scm_try_mutex,
6215 scm_timed_wait_condition_variable,
6216 scm_broadcast_condition_variable): New.
6217 (scm_wait_condition_variable): Removed.
6218
6219 * coop.c (coop_new_mutex_init): Initialize level.
6220 (coop_mutex_trylock, coop_mutex_lock, coop_mutex_unlock): maintain
6221 level.
6222 (coop_condition_variable_signal): Renamed to
6223 coop_condition_variable_broadcast and reimplemented in terms of
6224 that. Thus...
6225 (coop_condition_variable_broadcast): New.
6226
6227 * goops.c (hell_mutex): Reimplemented using scm_make_mutex, etc.
6228
6229 * coop-pthreads.h, coop-pthreads.c: New, but unfinished.
6230
6231 2002-10-21 Marius Vollmer <mvo@zagadka.ping.de>
6232
6233 * null-threads.c: Include <time.h>. Also, use <...> for inclusion
6234 of system headers.
6235
6236 * async.c, goops.h, modules.h, validate.h (SCM_MAKE_VALIDATE_MSG):
6237 New. Use it instead of SCM_MAKE_VALIDATE in lots of places to
6238 give better error messages. Thanks to Bill Schottstaedt!
6239
6240 2002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
6241
6242 * evalext.h, evalext.c (scm_definedp, scm_defined_p): Renamed
6243 scm_definedp to scm_defined_p and deprecated scm_definedp.
6244
6245 2002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
6246
6247 * async.h, async.c (scm_system_async): Fixed deprecation to work
6248 correctly when deprecated features are excluded.
6249
6250 2002-10-16 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6251
6252 * async.c (scm_system_async_mark_for_thread): Validate thread
6253 argument.
6254
6255 * coop-threads.c (scm_i_thread_root): Do not validate argument.
6256
6257 * feature.c (scm_init_feature): Don't add 'threads' for
6258 USE_NULL_THREADS.
6259
6260 * inline.h (scm_cell, scm_double_cell): Also allow
6261 USE_NULL_THREADS to not protect the slot initializers.
6262
6263 * scmsigs.c (scm_sigaction_for_thread): It's "USE_THREADS" not
6264 "USE_THREAD".
6265
6266 * Makefile.am (noinst_HEADERS): Added null-threads.c.
6267 (modinclude_HEADERS): Added null-threads.h.
6268
6269 * threads.h: Include null-threads.h when !USE_COOP_THREADS.
6270 * threads.c: Include null-threads.c when !USE_COOP_THREADS.
6271 (scm_init_threads): Use generic type names scm_t_mutex and
6272 scm_t_cond instead of coop_m and coop_c.
6273
6274 * null-threads.c, null-threads.h: New files.
6275
6276 2002-10-15 Marius Vollmer <mvo@zagadka.ping.de>
6277
6278 * Makefile.am: Replaced "$<" in non-pattern rules with its value.
6279 This is to support makes that know about "$<" only in pattern
6280 rules, like Sun's make.
6281
6282 2002-10-13 Marius Vollmer <mvo@zagadka.ping.de>
6283
6284 * Makefile.am (libpath.h): Fixed typo in top_srcdir_absolute
6285 substitution. Thanks to David Allouche!
6286
6287 2002-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
6288
6289 * evalext.h: Replaced SCM_DEBUG_DEPRECATED with
6290 !SCM_ENABLE_DEPRECATED.
6291
6292 2002-10-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6293
6294 * async.c (scm_system_async_mark_for_thread): Only call
6295 scm_i_thread_root when USE_THREADS is defined. Use scm_root
6296 otherwise.
6297
6298 * scmsigs.c (take_signal): Only call scm_i_thread_root when
6299 USE_THREADS is defined. Use scm_root otherwise.
6300 (scm_sigaction_for_thread): Ignore THREAD argument when
6301 USE_THREADS is not defined. Also, move THREAD argument defaulting
6302 out of HAVE_SIGACTION section, which was a bug.
6303
6304 2002-10-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6305
6306 * scmsigs.c (scm_sigaction_for_thread): Store original handler in
6307 signal_handlers, not the closure that is used as the async.
6308 The closure is stored in signal_handler_cells, as previously.
6309
6310 2002-10-10 Marius Vollmer <mvo@zagadka.ping.de>
6311
6312 * root.h (scm_root_state): Added 'block_async' slot.
6313 (scm_active_asyncs): Removed abbrev.
6314 * root.c (scm_make_root): Initialize 'block_asyncs' slot.
6315
6316 * __scm.h (SCM_ASYNC_TICK): Do without the scm_active_asyncs
6317 abbrev.
6318
6319 * async.h (scm_call_with_blocked_asyncs,
6320 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
6321 scm_c_call_with_unblocked_asyncs): New prototypes.
6322 (scm_mask_signals, scm_unmask_signals): Deprecated.
6323 (scm_mask_ints): Turned into a macro.
6324 * async.c (scm_mask_ints): Removed.
6325 (scm_run_asyncs): Do not set scm_mask_ints while running an async.
6326 this should not be necessary.
6327 (scm_async_click): Test block_asyncs instead of scm_mask_ints.
6328 (scm_mask_signals, scm_unmask_signals): Deprecated. Emit
6329 deprecation warning and check for errornous use. Set block_asyncs
6330 instead of scm_mask_ints.
6331 (increase_block, decrease_block, scm_call_with_blocked_asyncs,
6332 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
6333 scm_c_call_with_unblocked_asyncs): New.
6334
6335 * script.c (scm_compile_shell_switches): Do not set scm_mask_ints.
6336 Asyncs are enabled by default.
6337
6338 2002-10-09 Neil Jerram <neil@ossau.uklinux.net>
6339
6340 * vports.c (scm_make_soft_port): Allow vector argument to carry a
6341 6th element: an input waiting thunk.
6342 (sf_input_waiting): New.
6343
6344 2002-10-05 Marius Vollmer <mvo@zagadka.ping.de>
6345
6346 * root.c (root_mark): Mark active_asyncs slot.
6347
6348 * async.c (scm_async_click): Set the cdr of a executed handler
6349 cell to SCM_BOOL_F, not SCM_EOL.
6350 (scm_i_queue_async_cell): Queue the cell at the end of the list,
6351 and only if the handler procedure is not already present.
6352 (scm_system_async_mark_for_thread): Initialize cdr of handler cell
6353 with SCM_BOOL_F.
6354 * scmsigs.c (scm_sigaction_for_thread): Likewise.
6355
6356 2002-10-04 Rob Browning <rlb@defaultvalue.org>
6357
6358 * guile.c (main): switch to scm_lt_dlset_preloaded_symbols;
6359
6360 * dynl.c (sysdep_dynl_link): switch to scm_lt_dlhandle,
6361 scm_lt_dlopenext, and scm_lt_dlerror.
6362 (sysdep_dynl_unlink): switch to scm_lt_dlhandle, scm_lt_dlclose,
6363 and scm_lt_dlerror.
6364 (sysdep_dynl_func): switch to scm_lt_dlhandle, scm_lt_dlsym,
6365 and scm_lt_dlerror.
6366 (sysdep_dynl_init): switch to scm_lt_dlinit();
6367
6368 * Makefile.am (libguile_la_LIBADD): switch to use
6369 libguile-ltdl.la.
6370
6371 * numbers.c (scm_integer_expt): (expt 0 1) should be 1.
6372
6373 2002-10-04 Marius Vollmer <mvo@zagadka.ping.de>
6374
6375 * scmsigs.h (scm_sigaction_for_thread): New prototype.
6376 * scmsigs.c (got_signal): Removed.
6377 (signal_handler_cells, signal_handler_threads): New.
6378 (take_signal): Queue the cell of the signal for the specified
6379 thread. Reset the signal handler on systems that don't have
6380 sigaction.
6381 (sys_deliver_signals): Removed.
6382 (close_1): New.
6383 (scm_sigaction_for_thread): Renamed from scm_sigaction and
6384 extended to also set the thread of a signal and allocate a cell
6385 for it. Keep the Scheme name "sigaction". Check that signum is
6386 within range. Also, use SCM_VECTOR_REF instead of SCM_VELTS.
6387 (scm_sigaction): Implement in terms of scm_sigaction_for_thread.
6388 (scm_init_scmsigs): Allocate signal_handler_cells and
6389 signal_handler_threads vectors.
6390
6391 * async.c: Removed GUILE_OLD_ASYNC_CLICK code. Reorganized so
6392 that system asnycs and user asyncs are separated. Reimplemented
6393 system asyncs to work per-thread.
6394
6395 * gc.c (scm_init_gc): Do not use scm_system_async.
6396
6397 * async.h (scm_asyncs_pending, scm_set_tick_rate,
6398 scm_set_switch_rate, scm_system_async_mark_from_signal_handler):
6399 Removed prototypes.
6400 (scm_i_queue_async_cell): New.
6401
6402 * __scm.h (scm_asyncs_pending_p): Removed.
6403 (SCM_ASYNC_CLICK): Check scm_active_asyncs instead of
6404 scm_asyncs_pending_p.
6405
6406 * async.h (scm_system_async_mark_for_thread): New prototype.
6407
6408 * __scm.h: Removed GUILE_OLD_ASYNC_CLICK code.
6409
6410 * root.h (scm_root_state): Added new "active_asyncs" slot.
6411 * root.c (scm_make_root): Initialize it to SCM_EOL.
6412
6413 * coop-defs.h (coop_t): Added new "handle" slot.
6414 * coop-threads.c (all_threads, scm_current_thread,
6415 scm_all_threads, scm_i_thread_root): New.
6416 (scm_threads_init): Add main thread to all_threads.
6417 (scheme_launch_thread): Remove thread from all_threads when it
6418 terminates.
6419 (scm_call_with_new_thread): Initialize handle slot of coop_t
6420 structure and add new thread to all_threads.
6421 (scm_spawn_thread): Likewise.
6422
6423 * threads.h (scm_current_thread, scm_all_threads): New prototypes.
6424 * threads.c (scm_current_thread, scm_all_threads): Register as
6425 primitives.
6426
6427 * dynl.c: Use scm_lt_ prefix for libltdl functions.
6428
6429 2002-09-29 Neil Jerram <neil@ossau.uklinux.net>
6430
6431 * script.c (scm_compile_shell_switches): Fix bad spelling of
6432 `explicitly' in comment.
6433
6434 2002-09-28 Neil Jerram <neil@ossau.uklinux.net>
6435
6436 * posix.c (scm_geteuid, scm_getegid, scm_seteuid, scm_setegid):
6437 Refer to provided? in doc string rather than deprecated feature?.
6438
6439 2002-09-24 Gary Houston <ghouston@arglist.com>
6440
6441 * inline.h (scm_double_cell): prevent reordering of statements
6442 with any following code (for GCC 3 strict-aliasing).
6443 * numbers.c (scm_make_real), num2float.i.c (FLOAT2NUM): removed
6444 the earlier version of the reordering prevention.
6445
6446 2002-09-19 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6447
6448 * inline.h (scm_double_cell): move SET_GCMARK set out of if body.
6449
6450 2002-09-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6451
6452 * gc-malloc.c (scm_gc_register_collectable_memory): more overflow
6453 protection.
6454
6455 2002-09-08 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6456
6457 * inline.h: include stdio.h
6458
6459 * smob.c (free_print): abort if scm_debug_cell_accesses_p is set
6460
6461 2002-09-05 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6462
6463 * gc-segment.c (scm_i_make_initial_segment): check user settings
6464 for sanity.
6465
6466 * gc-malloc.c (scm_gc_init_malloc): check user settings for
6467 sanity.
6468
6469 * gc-freelist.c (scm_init_freelist): check user settings for sanity.
6470
6471 * struct.h: change scm_structs_to_free to scm_i_structs_to_free
6472
6473 * gc-malloc.c (scm_gc_register_collectable_memory): use floats;
6474 these won't ever wrap around with high memory usage. Thanks to
6475 Sven Hartrumpf for finding this.
6476
6477 * gc-freelist.c: include <stdio.h>
6478
6479 * gc-malloc.c: add DEBUGINFO for mtrigger GCs.
6480
6481 2002-09-01 Marius Vollmer <mvo@zagadka.ping.de>
6482
6483 * vectors.h (SCM_VECTOR_REF): New.
6484
6485 * snarf.h (SCM_DEFINE_PUBLIC): New.
6486
6487 2002-08-30 Marius Vollmer <mvo@zagadka.ping.de>
6488
6489 * socket.c (scm_addr_vector): Added size of address to arguments.
6490 Use it to avoid accessing a non-existent path in a sockaddr_un.
6491 Changed all callers.
6492
6493 2002-08-29 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6494
6495 * gc.h: remove DOUBLECELL card flags.
6496
6497 * gc-malloc.c (scm_calloc): try to use calloc() before calling
6498 scm_realloc().
6499
6500 * gc-segment.c (scm_i_initialize_heap_segment_data): remove card
6501 init loop; handle this from scm_init_card_freelist()
6502
6503 * gc-card.c (scm_init_card_freelist): init bit vector here.
6504
6505 * numbers.c (scm_make_real): prevent reordering of statements
6506 num2float.i.c (FLOAT2NUM): idem
6507
6508 2002-08-27 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6509
6510 * eval.h: prepend libguile/ to include path
6511
6512 2002-08-26 Marius Vollmer <mvo@zagadka.ping.de>
6513
6514 * script.c (scm_compile_shell_switches): Added "2002" to Copyright
6515 years. Thanks to Martin Grabmüller!
6516
6517 2002-08-25 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6518
6519 * gc-segment.c (scm_i_get_new_heap_segment): use float in stead of
6520 unsigned numbers for computing minimum heap increment. This
6521 prevents weird results when a a negative minimum increment is
6522 computed.
6523
6524 2002-08-24 Marius Vollmer <mvo@zagadka.ping.de>
6525
6526 * gc_os_dep.c: When we have __libc_stack_end, use that directly
6527 instead of the old tricks.
6528
6529 * guile-snarf.in: Do not expect the input file to be the first
6530 argument after the optional "-o" option, just pass everything to
6531 the pre-processor without extracting the input file name.
6532
6533 2002-08-23 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6534
6535 * gc-segment.c (scm_i_get_new_heap_segment): Oops. We want segment
6536 length *at* least SCM_MIN_HEAP_SEG_SIZE, not at most.
6537
6538 2002-08-22 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6539
6540 * gc.h, gc.c: make scm_cells_allocated unsigned again. Thanks to
6541 Bill Schottstaedt for the bug report
6542
6543 2002-08-20 Marius Vollmer <mvo@zagadka.ping.de>
6544
6545 * print.c (scm_iprin1): Print primitives generics always as
6546 "primitive-generic" even when they have no primitive methods yet.
6547
6548 2002-08-17 Gary Houston <ghouston@arglist.com>
6549
6550 * coop.c (coop_create): removed bogus 2nd argument in scm_malloc
6551 call.
6552
6553 2002-08-17 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6554
6555 * ports.c (scm_add_to_port_table): small bugfix.
6556
6557 * mallocs.c (scm_malloc_obj): use scm_gc_malloc in stead of
6558 malloc.
6559
6560 * gc-segment.c (scm_i_get_new_heap_segment): remove cluster cruft:
6561 only use SCM_MIN_HEAP_SEG_SIZE.
6562
6563 * ports.c (scm_add_to_port_table): add backwards compatibility
6564 function
6565
6566 * ports.h: use scm_i_ prefix for port table and port table size.
6567
6568 2002-08-15 Mikael Djurfeldt <mdj@linnaeus>
6569
6570 * vports.c (scm_make_soft_port): Initialize pt variable.
6571
6572 2002-08-13 Marius Vollmer <mvo@zagadka.ping.de>
6573
6574 * strports.h (scm_c_eval_string_in_module,
6575 scm_eval_string_in_module): New prototypes.
6576 * strports.c (scm_eval_string_in_module): New, but use
6577 "eval-string" as the Scheme name and make second parameter
6578 optional.
6579 (scm_eval_string): Implement using scm_eval_string_in_module.
6580 (scm_c_eval_string_in_module): New.
6581 Thanks to Ralf Mattes for the suggestion!
6582
6583 2002-08-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6584
6585 * gc-card.c ("sweep_card"): remove SCM_MISC_ERROR messages: print
6586 message and abort.
6587
6588 * gc-mark.c ("scm_gc_mark_dependencies"): idem.
6589
6590 * ports.c ("scm_new_port_table_entry"): return a boxed SCM in
6591 stead of scm_t_port*. The function now takes a tag argument.
6592
6593 2002-08-08 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6594
6595 * gc.h: add scm_debug_cells_gc_interval to public interface
6596
6597 * gc-card.c ("sweep_card"): set scm_gc_running while sweeping.
6598
6599 * gc.c (scm_i_expensive_validation_check): separate expensive
6600 validation checks from cheap ones.
6601
6602 2002-08-06 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6603
6604 * read.c (scm_input_error): new function: give meaningful error
6605 messages, and throw read-error
6606
6607 * gc-malloc.c (scm_calloc): add scm_calloc.
6608
6609 2002-08-05 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6610
6611 * tags.h: remove GC bits documentation from the tags table.
6612
6613 * read.c (INPUT_ERROR): Prepare for file:line:column error
6614 messages for errors in scm_lreadr() and friends.
6615
6616 2002-08-04 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6617
6618 * gc-malloc.c (scm_malloc): use scm_realloc() (simplifies
6619 implementation).
6620 (scm_gc_calloc): new function
6621
6622 2002-08-04 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6623
6624 * ports.c (scm_new_port_table_entry): init port entry to 0
6625 completely.
6626
6627 * ports.c (scm_new_port_table_entry): change function from
6628 scm_add_to_port_table. This prevents cells with null-pointers from
6629 being exposed to GC.
6630
6631 * vports.c (scm_make_soft_port) strports.c (scm_mkstrport),
6632 fports.c (scm_fdes_to_port): Use scm_new_port_table_entry().
6633
6634 * gc.c (scm_gc_stats): add cell-yield and malloc-yield statistic
6635 to gc-stats.
6636
6637 * numbers.c (big2str): return "0" for 0 iso. ""
6638
6639 * gc-segment.c, gc-malloc.c gc-mark.c, gc-freelist.c, gc-card.c,
6640 private-gc.h: new file
6641
6642 * gc.c: completely revised and cleaned up the GC. It now uses lazy
6643 sweeping. More documentation in workbook/newgc.text
6644
6645 2002-07-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6646
6647 * random.c (rstate_free): Return zero.
6648
6649 2002-07-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
6650
6651 * environments.c (remove_key_from_alist): Removed.
6652
6653 (obarray_remove): Simplified.
6654
6655 2002-07-24 Stefan Jahn <stefan@lkcc.org>
6656
6657 * continuations.h: ia64: Include <signal.h> before
6658 <sys/ucontext.h>.
6659
6660 2002-07-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6661
6662 * modules.c (scm_sym2var): Don't compare SCM values with ==.
6663
6664 2002-07-21 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6665
6666 * goops.c (scm_compute_applicable_methods): use
6667 scm_remember_upto_here_1 iso scm_remember_upto_here
6668
6669 * macros.c: include deprecation.h
6670
6671 * vectors.c (scm_vector_move_right_x): remove side effect in
6672 macro arg.
6673 (scm_vector_move_left_x): idem.
6674
6675 * net_db.c, posix.c, socket.c: variable naming: change ans to
6676 result.
6677
6678 * sort.c (scm_merge_vector_x): accept vector as argument
6679 iso. SCM*. This is needed for full GC correctness.
6680
6681 * gc.h: undo previous undocumented changes related to #ifdef
6682 GENGC.
6683
6684 2002-07-20 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6685
6686 * *.c: add space after commas everywhere.
6687
6688 * *.c: use SCM_VECTOR_SET everywhere, where a vector is written.
6689 Document cases where SCM_WRITABLE_VELTS() is used.
6690
6691 * vectors.h (SCM_VELTS): prepare for write barrier, and let
6692 SCM_VELTS() return a const pointer
6693 (SCM_VECTOR_SET): add macro.
6694
6695 2002-07-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
6696
6697 * eval.c (SCM_CEVAL), macros.c (macro_print, scm_makmacro,
6698 scm_sym_macro, scm_macro_type), macros.h (scm_makmacro):
6699 Deprecated the special kind of built-in dynamic syntax transformer
6700 that was inaccurately named "macro". Note: The built-in syntax
6701 transformers that are named "mmacro" or "memoizing-macro" still
6702 exist, and it is these which come much closer to what one would
6703 call a macro.
6704
6705 2002-07-13 Neil Jerram <neil@ossau.uklinux.net>
6706
6707 * eval.c (unmemocopy): Fix for
6708 1001-local-eval-error-backtrace-segfaults (unmemoization crash
6709 with internal definitions and local-eval).
6710
6711 2002-07-12 Gary Houston <ghouston@arglist.com>
6712
6713 * dynl.c: Don't define stub procedures if DYNAMIC_LINKING is not
6714 defined. They don't do anything useful, especially since the
6715 only case where DYNAMIC_LINKING is undefined seems to be
6716 when --with-modules=no is given to configure, which is basically
6717 requesting that the "dynamic linking module" be omitted.
6718
6719 * Makefile.am (libguile_la_SOURCES): move dynl.c from
6720 libguile_la_SOURCES to EXTRA_libguile_la_SOURCES.
6721
6722 * extensions.c (load_extension): check DYNAMIC_LINKING for
6723 scm_dynamic_call.
6724 * init.c (scm_init_guile_1): check DYNAMIC_LINKING for
6725 scm_init_dynamic_linking.
6726
6727 2002-07-10 Marius Vollmer <mvo@zagadka.ping.de>
6728
6729 * guile.c, iselect.h, net_db.c, posix.c, socket.c: No need to
6730 check for Cygwin when including <winsock2.h>, this is already
6731 check for by configure. Thus, revert change from 2002-07-07.
6732
6733 2002-07-10 Gary Houston <ghouston@arglist.com>
6734
6735 * eq.c: include <string.h>
6736 * dynl.c: docstring editing.
6737
6738 2002-07-09 Gary Houston <ghouston@arglist.com>
6739
6740 * dynl.c (scm_dynamic_call): docstring editing.
6741
6742 2002-07-08 Rob Browning <rlb@defaultvalue.org>
6743
6744 * gc_os_dep.c: HURD fixes.
6745
6746 2002-07-07 Marius Vollmer <mvo@zagadka.ping.de>
6747
6748 Crosscompiling and Cygwin fixes by Jan Nieuwenhuizen. Thanks!
6749
6750 * Makefile.am: Override default rule for c-tokenize.$(OBJECT);
6751 this should be compiled for BUILD host.
6752 Override default rule for
6753 guile_filter_doc_snarfage$(EEXECT); this should run on BUILD host.
6754 Add missing $(EXEEXT) to guile_filter_doc_snarfage invocation.
6755 (snarf2checkedtexi): Use GUILE_FOR_BUILD instead of preinstguile.
6756
6757 * guile.c, iselect.h, net_db.c, posix.c, socket.c: Do not include
6758 <winsock2.h> on Cygwin even when we have it.
6759
6760 2002-07-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
6761
6762 * __scm.h (SCM_CAUTIOUS), eval.c (scm_eval_args, deval_args,
6763 SCM_CEVAL): Removed compile time option SCM_CAUTIOUS to clean up
6764 the code. Full number of arguments checking of closures is
6765 mandatory now. However, the option to disable the checking has
6766 most probably not been used anyway.
6767
6768 2002-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
6769
6770 * __scm.h (SCM_RECKLESS), backtrace.c (SCM_ASSERT), debug.c
6771 (scm_debug_options), eval.c (scm_lookupcar, scm_lookupcar1,
6772 scm_badargsp, SCM_CEVAL, SCM_APPLY, scm_map, scm_for_each),
6773 feature.c (scm_init_feature), gsubr.c (scm_gsubr_apply), numbers.c
6774 (scm_logand, scm_logior, scm_logxor, scm_i_dbl2big), srcprop.c
6775 (scm_source_properties, scm_set_source_properties_x,
6776 scm_source_property): Removed compile time option SCM_RECKLESS to
6777 clean up the code. Full number of arguments checking of closures
6778 is mandatory now. However, the option to disable the checking has
6779 most probably not been used anyway.
6780
6781 * srcprop.c (scm_source_properties, scm_set_source_properties_x,
6782 scm_source_property): Use !SCM_CONSP instead of SCM_NCONSP.
6783
6784 2002-06-30 Gary Houston <ghouston@arglist.com>
6785
6786 * dynl.c: Removed all SCM_DEFER_INTS/SCM_ALLOW_INTS, which won't
6787 do anything useful. Added a comment about need for a mutex if
6788 pre-emptive threading is supported.
6789
6790 * posix.c (scm_convert_exec_args), dynl.c
6791 (scm_make_argv_from_stringlist): static procs: 1) renamed both to
6792 allocate_string_pointers. 2) simplified: don't reallocate the
6793 strings, just make an array of pointers 3) avoid memory leaks on
6794 error 4) let the procedure report errors in its own name.
6795 Consequences: 1) the procedures now assume that SCM strings are
6796 nul-terminated, which should always be the case. 2) Since strings
6797 are not reallocated, it's now possible for strings passed to
6798 dynamic-args-call to be mutated.
6799
6800 2002-06-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
6801
6802 * __scm.h, eval.c, eval.h: Removed compile time option
6803 MEMOIZE_LOCALS to clean up the code. Now, caching of local
6804 variable positions during memoization is mandatory. However, the
6805 option to disable the caching has most probably not been used
6806 anyway.
6807
6808 2002-06-18 Marius Vollmer <mvo@zagadka.ping.de>
6809
6810 * print.c (scm_simple_format): Print missing part of format before
6811 ~% control. Thanks to Daniel Skarda!
6812
6813 2002-06-01 Marius Vollmer <mvo@zagadka.ping.de>
6814
6815 * mkstemp.c: Added exception notice to license statement.
6816
6817 2002-05-22 Marius Vollmer <mvo@zagadka.ping.de>
6818
6819 * numbers.c (mem2ureal): When returning an inexact zero, make sure
6820 it is represented as a floating point value so that we can change
6821 its sign.
6822
6823 From John W. Eaton <jwe@bevo.che.wisc.edu>
6824
6825 * numbers.c (idbl2str): Don't omit sign when printing negative zero.
6826
6827 2002-05-14 Thien-Thi Nguyen <ttn@giblet.glug.org>
6828
6829 * gc_os_dep.c: For I386/OPENBSD, allow for `__i386__'
6830 in addition to `i386'. Thanks to Dale P. Smith.
6831
6832 2002-05-08 Marius Vollmer <mvo@zagadka.ping.de>
6833
6834 * eq.c (real_eqv): New.
6835 (scm_eqv_p): Use it when comparing reals and complexes.
6836
6837 * numbers.c: Include <string.h>, for strncmp.
6838 (mem2complex): Do not create negative NaNs.
6839 (scm_leq_p, scm_geq_p): Explicitely return #f when comparing a
6840 NaN.
6841 (scm_inexact_to_exact): Signal error when converting a NaN.
6842
6843 2002-05-06 Marius Vollmer <mvo@zagadka.ping.de>
6844
6845 * posix.c (scm_putenv): Handle removing variables explicitely by
6846 calling unsetenv.
6847
6848 From John W. Eaton.
6849
6850 * numbers.h: Conditionally include floatingpoint.h, ieeefp.h, and
6851 nan.h. Provide declarations for scm_inf_p, scm_nan_p, scn_inf,
6852 and scm_nan.
6853 * numbers.c: [SCO && ! HAVE_ISNAN] (isnan): New function.
6854 [SCO && ! HAVE_ISINF] (isinf): New function.
6855 (xisinf, xisnan): New functions.
6856 (IS_INF): Delete.
6857 (isfinite): Define in terms of xisinf.
6858 (scm_inf_p, scm_nan_p): New functions.
6859 (guile_Inf, guile_NaN): New file-scope vars.
6860 (guile_ieee_init): New function.
6861 (scm_inf, scm_nan): New functions.
6862 (idbl2str): Handle Inf and NaN. Remove funny label and
6863 corresponding gotos.
6864 (ALLOW_DIVIDE_BY_ZERO): New macro.
6865 (scm_divide): Allow division by zero to occur if
6866 ALLOW_DIVIDE_BY_ZERO is defined.
6867 Handle bignums and ints as special cases.
6868
6869 Additional stuff by me:
6870
6871 numbers.c (mem2ureal): Recognize "inf.0" and "nan.xxx".
6872 (scm_even_p, scm_odd_p): Treat infinity as even and odd.
6873 (iflo2str): Don't output a '+' for negative numbers or for Inf and
6874 NaN. They will provide their own sign.
6875 (scm_divide): Only allow divides by inexact zeros. Dividing by
6876 exact zeros still signals an errors.
6877
6878 2002-04-22 Thien-Thi Nguyen <ttn@giblet.glug.org>
6879
6880 * goops.h (scm_slot_exists_p): Rename from scm_slots_exists_p.
6881 * goops.c (scm_slot_exists_p): Rename from scm_slots_exists_p.
6882 (scm_slot_exists_p): Rename from scm_slots_exists_p.
6883 Thanks to Andreas Rottmann.
6884
6885 2002-04-20 Gary Houston <ghouston@arglist.com>
6886
6887 * removal of unused fields in root state (thanks to Christopher
6888 Cramer for pointing out the disuse.)
6889 * root.h (scm_root_state): removed def_inp, def_outp, def_errp.
6890 (scm_def_inp, scm_def_outp, scm_def_errp): removed.
6891
6892 * root.c (root_mark): don't mark them.
6893 (scm_make_root): don't set them to #f.
6894 * init.c (scm_init_standard_ports): don't initialise with the
6895 default ports.
6896
6897 2002-04-17 Marius Vollmer <mvo@zagadka.ping.de>
6898
6899 * Makefile.am (EXTRA_DIST): Added cpp_err_symbols.c and
6900 cpp_sig_symbols.c.
6901
6902 2002-04-16 Marius Vollmer <mvo@zagadka.ping.de>
6903
6904 * guile-snarf.in: Do not clean input file. This would write to
6905 the $(srcdir) during a VPATH build, which is not allowed. It also
6906 isn't needed since it only works when an output filename has been
6907 specified and in that case we don't need to clean the input file
6908 because the output file will already exist.
6909
6910 2002-03-31 Marius Vollmer <mvo@zagadka.ping.de>
6911
6912 * guile-snarf: Install the trap for removing $cleanfile only when
6913 the value of $cleanfile is actually known.
6914
6915 2002-04-10 Rob Browning <rlb@defaultvalue.org>
6916
6917 * .cvsignore: add versiondat.h and *.c.clean.c.
6918
6919 2002-03-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
6920
6921 * srcprop.[ch] (scm_c_source_property_breakpoint_p): New
6922 function, replaces macro SRCBRKP.
6923
6924 (SRCBRKP): Deprecated.
6925
6926 * eval.c (SCM_CEVAL): Replaced use of SRCBRKP by call to
6927 scm_c_source_property_breakpoint_p. Removed some use of arg1 as
6928 temporary variable.
6929
6930 2002-03-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
6931
6932 * debug.h, eval.c: Deprecated CHECK_ENTRY, CHECK_APPLY and
6933 CHECK_EXIT and removed all references to them.
6934
6935 2002-03-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
6936
6937 * debug.h (scm_ready_p, debug_print): Removed declarations.
6938
6939 * eval.c (EVALCELLCAR): Removed.
6940
6941 (SCM_CEVAL): Eliminated label loopnoap. Removed side-effecting
6942 operation from condition.
6943
6944 2002-03-24 Marius Vollmer <mvo@zagadka.ping.de>
6945
6946 * guile-snarf.in: When the output filename is "-", write to
6947 stdout. When no "-o" option is given, use "-" as the output
6948 filename (i.e., stdout). Only 'clean' the inputfile or remove the
6949 output file on error when the output file name is not "-". Define
6950 the preprocessor macro SCM_MAGIC_SNARFER while snarfing.
6951
6952 * Makefile.am (.c.x): Pass "-o $@" to guile-snarf.
6953
6954 2002-03-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
6955
6956 * eval.c (SCM_CEVAL, SCM_APPLY): Eliminated labels wrongnumargs
6957 and the corresponding goto statements. Removed redundant code.
6958
6959 2002-03-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6960
6961 * eval.c (SCM_CEVAL): Minimized scope of variable arg2.
6962 Eliminated redundant SCM_IMP check. Exlined call to EVALCAR.
6963 Re-enabled handing of rpsubrs and asubrs.
6964
6965 2002-03-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6966
6967 * eval.c (SIDEVAL): Removed.
6968
6969 (SCM_CEVAL): Minimized scope of variable orig_sym. Eliminated
6970 goto-labels cdrxnoap, cdrxbegin and nontoplevel_cdrxnoap. Changed
6971 argument checking order for set! to locals, variables and symbols.
6972 Improvements to control structure. Removed some uses of arg1 and
6973 arg2 as temporary variables.
6974
6975 2002-03-15 Thien-Thi Nguyen <ttn@giblet.glug.org>
6976
6977 * guile-snarf.in: Remove "--compat=1.4" support.
6978 Add "-d" and "-D" support.
6979
6980 (deprecated_list): New var.
6981 (compat_mode_clean_xxx): Delete.
6982 (grep_deprecated): New func.
6983 ("main"): If "-d" or "-D", call `grep_deprecated'.
6984
6985 2002-03-15 Neil Jerram <neil@ossau.uklinux.net>
6986
6987 * hooks.h: Change scm_t_c_hookype_t everywhere to
6988 scm_t_c_hook_type.
6989
6990 Docstring fixes:
6991
6992 * strings.c (scm_string_p): Change unnecessary `iff' to `if'.
6993
6994 * ports.c (scm_sys_make_void_port): Use `@file'.
6995
6996 * numbers.c (scm_number_p, scm_real_p): Use `otherwise' rather
6997 than `else'.
6998
6999 * macros.c (scm_makmacro): Don't say that the form replaces its
7000 source, because it doesn't.
7001 (scm_makmmacro): Clarify difference between this and scm_makmacro.
7002
7003 * backtrace.c (scm_display_error), filesys.c (scm_umask,
7004 scm_select, scm_basename), goops.c (scm_method_generic_function),
7005 numbers.c (scm_integer_length), posix.c (scm_getgroups, scm_execl,
7006 scm_setlocale, scm_flock), socket.c (scm_shutdown): Correct
7007 spelling mistakes.
7008
7009 * debug.c (scm_debug_options), eval.c
7010 (scm_eval_options_interface), read.c (scm_read_options): Change
7011 incorrect @var in docstring to @code.
7012
7013 2002-03-14 Marius Vollmer <mvo@zagadka.ping.de>
7014
7015 * unif.c (singp): Use SCM_REALP instead of SCM_SLOPPY_REALP.
7016
7017 * snarf.h (SCM_SNARF_INIT): Add "^:^" after code so that
7018 guile-snarf can remove trailing non-init code.
7019
7020 * guile-snarf.in (modern_snarf): Remove everything following and
7021 including "^:^" from the output.
7022
7023 2002-03-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
7024
7025 * eval.c (SCM_CEVAL), srcprop.h (SRCBRKP): Eliminated union 't'.
7026
7027 * eval.c (SCM_CEVAL): Exlined call to EVALCAR.
7028
7029 2002-03-13 Thien-Thi Nguyen <ttn@giblet.glug.org>
7030
7031 * guile-snarf.in: Update copyright.
7032 Rewrite to internalize error handling.
7033 Add "--compat=1.4" handling.
7034 Add commentary.
7035
7036 * Makefile.am (libpath.h): Use @top_srcdir_absolute@.
7037 (snarfcppopts): New var.
7038 (.c.x): Use $(snarfcppopts). Rework guile-snarf usage.
7039 (.c.doc): Use $(snarfcppopts).
7040
7041 * alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,
7042 continuations.c, debug-malloc.c, debug.c, deprecation.c, dynl.c,
7043 dynwind.c, environments.c, eq.c, error.c, eval.c, evalext.c,
7044 extensions.c, feature.c, filesys.c, fluids.c, fports.c, gc.c,
7045 goops.c, gsubr.c, guardians.c, hash.c, hashtab.c, hooks.c,
7046 ioext.c, iselect.c, keywords.c, lang.c, list.c, load.c, macros.c,
7047 modules.c, net_db.c, numbers.c, objects.c, objprop.c, options.c,
7048 pairs.c, ports.c, posix.c, print.c, procprop.c, procs.c,
7049 properties.c, ramap.c, random.c, rdelim.c, read.c, regex-posix.c,
7050 root.c, rw.c, scmsigs.c, script.c, simpos.c, socket.c, sort.c,
7051 srcprop.c, stackchk.c, stacks.c, stime.c, strings.c, strop.c,
7052 strorder.c, strports.c, struct.c, symbols.c, threads.c, throw.c,
7053 unif.c, values.c, variable.c, vectors.c, version.c, vports.c,
7054 weaks.c: Retire inclusion guard macro SCM_MAGIC_SNARFER.
7055
7056 2002-03-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
7057
7058 * eval.c (SCM_CEVAL): Got rid of the last reference to t.lloc.
7059 The next step will be to remove the union 't' and simplify the
7060 code of SCM_CEVAL that way.
7061
7062 2002-03-12 Neil Jerram <neil@ossau.uklinux.net>
7063
7064 * iselect.c (collisionp, gnfds, greadfds, gwritefds, gexceptfds,
7065 rreadfds, rwritefds, rexceptfds): Made static.
7066
7067 * gc.c (terminating), fports.c (terminating): Renamed
7068 scm_i_terminating.
7069
7070 2002-03-11 Marius Vollmer <mvo@zagadka.ping.de>
7071
7072 * numbers.c (scm_divide): Adapt code from libstdc++/f2c to void
7073 potential overflow problems. Thanks to John W Eaton!
7074
7075 * strop.c (string_capitalize_x): Treat characters as unsigned so
7076 that 8-bit chars work. Thanks to David Pirotte!
7077
7078 2002-03-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
7079
7080 * eval.c (SCM_CEVAL): Cleaned up the handling of 'slot-ref',
7081 'slot-set!' and 'nil-cond'. Removed some uses of t.arg1, arg2 and
7082 proc as temporary variables. Introduced temporary variables with
7083 hopefully descriptive names for clarification. Replaced SCM_N?IMP
7084 by a more explicit predicate in some places.
7085
7086 2002-03-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
7087
7088 * eval.c (SCM_CEVAL): Cleaned up the handling of #@dispatch.
7089 Added lots of comments regarding the implementation of #@dispatch.
7090 Changed intra-procedure communication to use t.arg1 instead of
7091 arg2. Removed some uses of t.arg1, t.lloc and proc as temporary
7092 variables. Introduced temporary variables with hopefully
7093 descriptive names for clarification. Replaced SCM_N?IMP by a more
7094 explicit predicate in some places. Use SCM_INSTANCE_HASH instead
7095 of computing the expression explicitly. Eliminate now unused
7096 label nontoplevel_cdrxbegin.
7097
7098 * goops.h (SCM_INSTANCE_HASH): New macro.
7099
7100 * objects.h (SCM_CMETHOD_FORMALS, SCM_CMETHOD_BODY): New macros.
7101
7102 2002-03-08 Thien-Thi Nguyen <ttn@giblet.glug.org>
7103
7104 * Makefile.am (bin_SCRIPTS): Revive this decl, w/ initial element
7105 "guile-snarf" moved back from `noinst_SCRIPTS'.
7106
7107 2002-03-08 Neil Jerram <neil@ossau.uklinux.net>
7108
7109 * srcprop.c (scm_set_source_property_x): If SRCPROPS obj already
7110 exists when adding a source property other than those that are
7111 handled explicitly, add the new property to the SRCPROPS obj's
7112 plist.
7113
7114 * debug.h (SCM_MAX_FRAME_SIZE): Remove incorrect comment about use
7115 of SCM_MAX_FRAME_SIZE as a bit mask; it isn't used like this.
7116
7117 * eval.c (SCM_CEVAL): Don't store scm_debug_eframe_size in
7118 debug.status. It isn't needed, and it can overflow the bits
7119 reserved for it (which may lead to a segv or a GC abort).
7120
7121 2002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
7122
7123 * eval.c (SCM_CEVAL): Cleaned up the handling of 'apply'. Removed
7124 side-effecting operations from conditions and macro calls.
7125 Replaced SCM_N?IMP by a more explicit predicate in some places.
7126 Minimized the scope of some variables.
7127
7128 2002-03-02 Stefan Jahn <stefan@lkcc.org>
7129
7130 * convert.i.c: Fixed int <-> long conversions which would have
7131 failed if their sizes were different.
7132
7133 2002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
7134
7135 * eval.c (SCM_CEVAL): Cleaned up the handling of 'if', 'let',
7136 'letrec' and 'set*': Removed some uses of t.arg1, t.lloc and proc
7137 as temporary variables. Removed side-effecting operations from
7138 conditions and macro calls. Introduced temporary variables with
7139 hopefully descriptive names for clarification. Replaced SCM_N?IMP
7140 by a more explicit predicate in some places. Removed code that
7141 was conditionally compiled if SICP was defined - which it never
7142 is.
7143
7144 2002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
7145
7146 * eval.c (SCM_CEVAL): Cleaned up the handling of 'cons' and 'do':
7147 Removed some uses of t.arg1 and proc as temporary variables.
7148 Removed side-effecting operations from conditions and macro calls.
7149 Introduced temporary variables with hopefully descriptive names
7150 for clarification. Replaced SCM_N?IMP by a more explicit
7151 predicate in some places.
7152
7153 2002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
7154
7155 * eval.c (scm_badargsp, SCM_CEVAL): Replaced SCM_N?IMP by a more
7156 explicit predicate in some places.
7157
7158 (CHECK_EQVISH): Removed.
7159
7160 (SCM_CEVAL): Removed some uses of t.arg1 and proc as temporary
7161 variables. Removed side-effecting operations from conditions and
7162 macro calls. Introduced temporary variables for clarification.
7163 Sorted if-else-if check for the type of the last form in a list by
7164 frequency. Avoided some unnecessary tail-recursion calls.
7165
7166 2002-03-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
7167
7168 * gc.c (SCM_HEAP_SEG_SIZE, CELL_UP, CELL_DN, NEXT_DATA_CELL,
7169 init_heap_seg, alloc_some_heap), gc.h (struct scm_cell, struct
7170 scm_t_cell, SCM_CELLPTR, SCM_GC_CARD_SIZE,
7171 SCM_GC_IN_CARD_HEADERP), tags.h (SCM_CELLP): Renamed the struct
7172 scm_cell and all its uses to scm_t_cell in accordance to Guile's
7173 naming scheme for types.
7174
7175 * alist.c (scm_acons), convert.i.c (CTYPES2UVECT,
7176 CTYPES2UVECT_OPTIONAL), coop-threads.c (scm_call_with_new_thread,
7177 scm_spawn_thread), debug.c (scm_make_debugobj), environments.c
7178 (scm_make_environment), eval.c (scm_closure), fports.c
7179 (scm_fdes_to_port), gc.c (scm_deprecated_newcell,
7180 scm_deprecated_newcell2), inline.h (scm_alloc_cell, scm_cell),
7181 list.c (SCM_I_CONS), numbers.c (scm_i_mkbig), pairs.c (scm_cons),
7182 ports.c (scm_void_port), procs.c (scm_c_make_subr, scm_makcclo),
7183 smob.c (scm_make_smob), smob.h (SCM_NEWSMOB), strings.c
7184 (scm_take_str, scm_allocate_string), strports.c (scm_mkstrport),
7185 unif.c (scm_make_uve), variable.c (make_variable), vectors.c
7186 (scm_c_make_vector), vports.c (scm_make_soft_port): Renamed
7187 scm_alloc_cell to scm_cell.
7188
7189 * environments.c (core_environments_observe), gc.c
7190 (scm_deprecated_newcell2), goops.c (wrap_init, scm_wrap_object),
7191 inline.h (scm_alloc_double_cell, scm_double_cell), num2float.i.c
7192 (FLOAT2NUM), numbers.c (scm_make_real), procs.c
7193 (scm_make_procedure_with_setter), smob.h (SCM_NEWSMOB2,
7194 SCM_NEWSMOB3), struct.c (scm_make_struct, scm_make_vtable_vtable),
7195 symbols.c (scm_mem2symbol, scm_mem2uninterned_symbol), weaks.c
7196 (allocate_weak_vector): Renamed scm_alloc_double_cell to
7197 scm_double_cell.
7198
7199 2002-02-27 Stefan Jahn <stefan@lkcc.org>
7200
7201 * convert.i.c, convert.c: Better range checking.
7202
7203 * inet_aton.c, fports.c: Commented the inclusion of <winsock2.h>.
7204
7205 * deprecation.c (vsnprintf): Define to `_vsnprintf' for
7206 Windows (MinGW).
7207
7208 2002-02-26 Thien-Thi Nguyen <ttn@giblet.glug.org>
7209
7210 * Makefile.am: Update path to pre-inst-guile automake frag.
7211
7212 2002-02-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
7213
7214 * gc.c (scm_gc_sweep): Make it compile even when deprecated
7215 features are excluded.
7216
7217 2002-02-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
7218
7219 * num2integral.i.c (NUM2INTEGRAL): Fixed signedness problem.
7220
7221 2002-02-25 Gary Houston <ghouston@arglist.com>
7222
7223 * convert.c: include <string.h> for convert_i.c.
7224
7225 2002-02-24 Rob Browning <rlb@defaultvalue.org>
7226
7227 * .cvsignore: add stamp-h1.
7228
7229 2002-02-21 Neil Jerram <neil@ossau.uklinux.net>
7230
7231 * unif.c (scm_array_to_list): Correct name, which had been
7232 accidentally changed to scm_t_arrayo_list!
7233
7234 2002-02-20 Mikael Djurfeldt <mdj@linnaeus>
7235
7236 * gc.c (scm_gc_sweep): Print an error message when aborting due to
7237 underflowing scm_mallocated.
7238
7239 2002-02-14 Marius Vollmer <marius.vollmer@uni-dortmund.de>
7240
7241 * gc.h, gc.c (scm_must_malloc, scm_must_realloc, scm_must_strdup,
7242 scm_must_strndup, scm_done_malloc, scm_done_free, scm_must_free):
7243 Reimplemented using the new scm_gc_malloc, etc., functions and
7244 deprecated.
7245
7246 2002-02-11 Thien-Thi Nguyen <ttn@giblet.glug.org>
7247
7248 * Makefile.am (bin_PROGRAMS): Move `guile_filter_doc_snarfage'
7249 to `noinst_PROGRAMS'.
7250 (bin_SCRIPTS): Move all values to `noinst_SCRIPTS'; delete.
7251 (noinst_PROGRAMS, noinst_SCRIPTS): New.
7252
7253 2002-02-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
7254
7255 * gc.h, gc.c (scm_gc_sweep): Issue deprecation warning when
7256 non-zero is returned from a port or smob free function.
7257 (scm_malloc, scm_realloc, scm_strndup, scm_strdup,
7258 scm_gc_register_collectable_memory,
7259 scm_gc_unregister_collectable_memory, scm_gc_malloc,
7260 scm_gc_realloc, scm_gc_free, scm_gc_strndup, scm_gc_strdup): New.
7261
7262 * backtrace.c, continuations.c, convert.i.c, coop-threads.c,
7263 debug-malloc.c, dynl.c, environments.c, environments.h,
7264 extensions.c, filesys.c, fports.c, gc.c, gc.h, gh_data.c, goops.c,
7265 guardians.c, hooks.c, init.c, keywords.c, load.c, numbers.c,
7266 ports.c, posix.c, procs.c, rdelim.c, regex-posix.c, root.c,
7267 smob.c, stime.c, strings.c, struct.c, struct.h, symbols.c, unif.c,
7268 vectors.c, weaks.c: Use scm_gc_malloc/scm_malloc and
7269 scm_gc_free/free instead of scm_must_malloc and scm_must_free, as
7270 appropriate. Return zero from smob and port free functions.
7271
7272 * debug-malloc.c (scm_malloc_reregister): Handle "old == NULL".
7273
7274 * deprecation.h, deprecation.c: Reimplemented to allow deprecation
7275 messages while the GC is running.
7276 (scm_c_issue_deprecation_warning_fmt): New.
7277
7278 * fports.c (scm_setvbuf): Reset read buffer to saved values when
7279 it is pointing to the putback buffer.
7280
7281 2002-02-08 Thien-Thi Nguyen <ttn@giblet.glug.org>
7282
7283 * gsubr.c (create_gsubr): On "too many args" error,
7284 also display arg count and name. Thanks to Bill Schottstaedt.
7285
7286 2002-02-05 Thien-Thi Nguyen <ttn@giblet.glug.org>
7287
7288 * Makefile.am: Include $(top_srcdir)/pre-inst-guile.am.
7289
7290 (bin_SCRIPTS): Remove guile-snarf-docs-texi.
7291 (alldotdocfiles, snarf2checkedtexi, dotdoc2texi): New vars.
7292 (guile.texi, guile-procedures.texi): Use $(dotdoc2texi).
7293
7294 * guile-snarf-docs-texi.in: Bye bye.
7295
7296 2002-02-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
7297
7298 * symbols.c (scm_make_symbol): Fix typo in docstring.
7299
7300 * symbols.h (scm_mem2uninterned_symbol, scm_symbol_interned_p,
7301 scm_make_symbol): New prototypes.
7302
7303 2002-02-03 Marius Vollmer <mvo@zagadka.ping.de>
7304
7305 * symbols.h (SCM_SET_SYMBOL_HASH): Removed.
7306 (SCM_SYMBOL_INTERNED_P): New.
7307 * symbols.c (scm_symbol_hash): Use scm_ulong2num instead of
7308 SCM_MAKINUM since hash values can well be bignums.
7309 (scm_mem2symbol): Only use hash values below SCM_T_BITS_MAX/2.
7310 This signals a interned symbol.
7311 (scm_mem2uninterned_symbol, scm_symbol_interned_p,
7312 scm_make_symbol): New.
7313
7314 * print.c (scm_iprin1): Print uninterned symbols unreadably.
7315
7316 2002-02-02 Thien-Thi Nguyen <ttn@giblet.glug.org>
7317
7318 * __scm.h (HAVE_UINTPTR_T): Only define if UINTPTR_T attributes
7319 are defined: UINTPTR_MAX, INTPTR_MAX, INTPTR_MIN.
7320 Thanks to Dave Love.
7321
7322 2002-01-31 Marius Vollmer <mvo@zagadka.ping.de>
7323
7324 * symbols.c (scm_gensym): Use " g" as default prefix, not "g".
7325 This might help to make unintended clashes less likely.
7326 (scm_string_to_symbol): Protect the string until the symbols is
7327 created.
7328
7329 2002-01-31 Stefan Jahn <stefan@lkcc.org>
7330
7331 * convert.c, convert.h, convert.i.c: New files containing C
7332 array to Scheme conversion helpers meant to be replacement
7333 functions for the deprecated gh interface.
7334
7335 * Makefile.am: Setup rules for new `convert.*' files.
7336
7337 2002-01-28 Stefan Jahn <stefan@lkcc.org>
7338
7339 * symbols.c (scm_c_symbol2str): New function, replacement for
7340 `gh_scm2newsymbol()'.
7341
7342 * strings.c (scm_c_substring2str): New function. Proper
7343 replacement for `gh_get_substr()'.
7344
7345 * socket.c: Include `stdint.h' if available for the `uint32_t'
7346 declaration.
7347
7348 * scmsigs.c (scm_sigaction): Initialize `chandler' (inhibits
7349 compiler warning).
7350
7351 * backtrace.c: Include `lang.h' for GUILE_DEBUG conditional.
7352
7353 2002-01-22 Neil Jerram <neil@ossau.uklinux.net>
7354
7355 Other changes unrelated to Elisp...
7356
7357 * eval.c (scm_m_if): Use s_if rather than repeating string literal
7358 "if".
7359 (comments): Fix a few typos.
7360 (scm_for_each): Add parentheses around oddly unparenthesized
7361 if/while conditions.
7362
7363 * read.c (scm_read_opts): Add full stop at end of doc for
7364 `keywords' option.
7365
7366 * script.c (scm_compile_shell_switches): Use scm_str2symbol
7367 instead of gh_symbol2scm.
7368
7369 * srcprop.h (SRCPROPBRK): Return C type rather than SCM.
7370 (SRCBRKP): Use SRCPROPBRK rather than duplicating its logic.
7371
7372 * srcprop.c (scm_srcprops_to_plist, scm_source_property): Change
7373 SRCPROPBRK (x) to SCM_BOOL (SRCPROPBRK (x)).
7374
7375 First batch of changes for Elisp support...
7376
7377 * alist.c, async.c, boolean.c, dynl.c, eval.c, filesys.c,
7378 fluids.c, list.c, load.c, options.c, posix.c, print.c, sort.c,
7379 throw.c, vectors.c, weaks.c: Add #include for lang.h.
7380
7381 * eval.c, eval.h, init.c, lang.c, lang.h: Use SCM_ENABLE_ELISP to
7382 conditionalize compilation and initialization of Elisp support
7383 function.
7384
7385 * alist.c (scm_assq, scm_assv, scm_assoc), async.c
7386 (scm_asyncs_pending, scm_run_asyncs, noop), backtrace.c
7387 (scm_set_print_params_x), dynl.c (scm_make_argv_from_stringlist),
7388 filesys.c (fill_select_type, retrieve_select_type), fluids.c
7389 (scm_swap_fluids, scm_swap_fluids_reverse), list.c (scm_null_p,
7390 scm_ilength, scm_append_x, scm_last_pair, scm_reverse,
7391 scm_reverse_x, scm_list_ref, scm_list_set_x, scm_list_cdr_set_x,
7392 scm_c_memq, scm_memv, scm_member), load.c (scm_search_path),
7393 options.c (change_option_setting, scm_options), posix.c
7394 (environ_list_to_c), print.c (scm_iprlist), throw.c
7395 (scm_exit_status), vectors.c (scm_vector), weaks.c
7396 (scm_weak_vector): Use SCM_NULL_OR_NIL_P instead of SCM_NULLP.
7397
7398 * boolean.c (scm_not): Use `SCM_FALSEP || SCM_NILP' instead of
7399 just SCM_FALSEP.
7400
7401 * boolean.c (scm_boolean_p): Use `SCM_BOOLP || SCM_NILP' instead
7402 of just SCM_BOOLP.
7403
7404 * eval.c (scm_lisp_nil, scm_lisp_t, s_nil_ify, scm_m_nil_ify,
7405 s_t_ify, scm_m_t_ify, s_0_cond, scm_m_0_cond, s_0_ify,
7406 scm_m_0_ify, s_1_ify, scm_m_1_ify): Removed.
7407 (scm_m_atfop): Support function aliasing. Support both function
7408 args, which need transformation, and macro args, which do not.
7409 Add explanatory comments.
7410 (SCM_CEVAL): In switch cases for SCM_IM_AND, SCM_IM_COND,
7411 SCM_IM_DO, SCM_IM_IF and SCM_IM_OR, add `|| SCM_NILP' to existing
7412 checks for SCM_FALSEP. In switch case for SCM_IM_NIL_COND, use
7413 SCM_NULLP || SCM_NILP instead of checks against (removed)
7414 scm_lisp_nil. Removed switch cases for SCM_IM_NIL_IFY,
7415 SCM_IM_T_IFY, SCM_IM_0_COND, SCM_IM_0_IFY, SCM_IM_1_IFY.
7416
7417 * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null,
7418 scm_m_while, scm_nil_eq): Commented out; I don't think we need
7419 these, but I don't want to remove them yet, just in case.
7420 (scm_init_lang): Define `%nil' variable on Scheme level to hold
7421 Elisp nil value.
7422
7423 * lang.h (SCM_NILP): Test against Elisp nil value instead of
7424 against (removed) scm_lisp_nil.
7425 (SCM_NILNULLP, SCM_NIL2EOL, SCM_EOL2NIL): Commented out.
7426 (SCM_NULL_OR_NIL_P): New.
7427
7428 * list.c (scm_append): Use SCM_VALIDATE_NULL_OR_NIL instead of
7429 SCM_VALIDATE_NULL.
7430
7431 * print.c (scm_isymnames): Fix comment. Remove #@nil-ify,
7432 #@t-ify, #@0-cond, #@0-ify, #@1-ify. Add #nil (for SCM_ELISP_NIL
7433 value).
7434
7435 * sort.c (scm_sorted_p, scm_merge, scm_merge_list_x, scm_merge_x,
7436 scm_sort_x, scm_sort, scm_stable_sort_x, scm_stable_sort): Use
7437 SCM_NULL_OR_NIL_P instead of SCM_NULLP. In constructions like `if
7438 (SCM_NULLP (x)) return SCM_EOL;', return x rather than SCM_EOL.
7439
7440 * tags.h (SCM_IM_NIL_IFY, SCM_IM_T_IFY, SCM_IM_0_COND,
7441 SCM_IM_0_IFY, SCM_IM_1_IFY): Removed.
7442 (SCM_IM_BIND, SCM_IM_DELAY, SCM_IM_CALL_WITH_VALUES, SCM_UNBOUND):
7443 Numbering shifted down accordingly.
7444 (SCM_ELISP_NIL): New IFLAG.
7445
7446 * validate.h (SCM_VALIDATE_NULL_OR_NIL): New.
7447
7448 2002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
7449
7450 * eval.c: Removed outdated references to "everr". Improved some
7451 comments.
7452
7453 (scm_deval_args, deval_args): Renamed scm_deval_args to
7454 deval_args, since it is not part of the interface.
7455
7456 (SCM_CEVAL): Added (maybe somewhat verbose) comment. Avoid to
7457 use references to debug.vect[0] before it exists. Add parentheses
7458 to switch statement.
7459
7460 * goops.h: Added local emacs variables.
7461
7462 2002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
7463
7464 * eval.[ch] (scm_deval_args): Made static.
7465
7466 * srcprop.c (scm_source_property): Remove redundant SCM_IMP
7467 test.
7468
7469 * strings.c (scm_c_string2str): Clarified comment. Replaced
7470 THINKME by FIXME for uniformness. Removed question about whether
7471 arguments need to be protected from garbage collection: Arguments
7472 must be protected as any other variable.
7473
7474 2002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
7475
7476 * procs.h (SCM_CLOSURE_BODY): New Macro.
7477
7478 * debug.c (scm_procedure_name, scm_procedure_source), eval.c
7479 (SCM_CEVAL, SCM_APPLY), goops.c (scm_sys_initialize_object,
7480 get_slot_value, set_slot_value), procs.c
7481 (scm_procedure_documentation), sort.c (closureless), stacks.c
7482 (get_applybody): Replace SCM_CDR (SCM_CODE (...)) by
7483 SCM_CLOSURE_BODY.
7484
7485 * sort.c (closureless): Prefer !SCM_FOOP over SCM_NFOOP.
7486
7487 2001-12-26 Marius Vollmer <mvo@zagadka.ping.de>
7488
7489 * Makefile.am (guile-procedures.txt): When we don't have makeinfo,
7490 use "cp" instead.
7491
7492 2001-12-16 Marius Vollmer <mvo@zagadka.ping.de>
7493
7494 * stacks.c, stacks.h (scm_t_stackype): Renamed to scm_stack_type
7495 everywhere.
7496
7497 * continuations.c (scm_make_continuation): Do not retain the
7498 throw_value when the continuation is invoked.
7499
7500 2001-12-08 Stefan Jahn <stefan@lkcc.org>
7501
7502 * strings.c (scm_c_string2str): New function. Converts a
7503 given Scheme string into a C string. Also put in two
7504 THINKME's regarding the malloc policy for the missing converter
7505 routines.
7506
7507 2001-12-01 Neil Jerram <neil@ossau.uklinux.net>
7508
7509 * gh_data.c (gh_module_lookup): Use scm_str2symbol rather than
7510 gh_symbol2scm.
7511
7512 2001-11-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
7513
7514 * gc.h (SCM_GC_CELL_WORD, SCM_GC_CELL_OBJECT,
7515 SCM_GC_SET_CELL_WORD, SCM_GC_SET_CELL_OBJECT): New macros.
7516
7517 (SCM_GC_CELL_TYPE, SCM_CELL_WORD, SCM_CELL_OBJECT,
7518 SCM_SET_CELL_WORD, SCM_SET_CELL_OBJECT, SCM_FREE_CELL_CDR,
7519 SCM_GC_SET_CELL_OBJECT): Express in terms of SCM_GC_CELL_*
7520 macros.
7521
7522 (SCM_FREE_CELL_P): Express in terms of SCM_GC_CELL_TYPE.
7523
7524 * inline.h (scm_alloc_cell, scm_alloc_double_cell): Use
7525 SCM_GC_CELL_* macros when accessing free cells.
7526
7527 2001-11-25 Marius Vollmer <mvo@zagadka.ping.de>
7528
7529 * vectors.h (SCM_MAKE_VECTOR_TAG): New.
7530 * unif.h (SCM_MAKE_BITVECTOR_TAG, SCM_MAKE_UVECTOR_TAG): New.
7531 * symbols.h (SCM_MAKE_SYMBOL_TAG): New.
7532 * strings.h (SCM_MAKE_STRING_TAG): New.
7533 * procs.h (SCM_MAKE_CCLO_TAG): New.
7534 * numbers.h (SCM_MAKE_BIGNUM_TAG): New.
7535
7536 * goops.h: Replaced SCM_DEBUG_DEPRECATED with
7537 !SCM_ENABLE_DEPRECATED.
7538
7539 * async.c, async.h (scm_system_async_mark_from_signal_handler):
7540 New.
7541
7542 * scmsigs.c (scm_take_signal): Removed all code that assumes that
7543 signal handlers are allowed to divert the flow of control. Call
7544 scm_system_async_mark_from_signal_handler instead of
7545 scm_system_async_mark.
7546
7547
7548 Deprecated SCM_NEWCELL and SCM_NEWCELL2. Added scm_alloc_cell and
7549 scm_alloc_double_cell in their place.
7550
7551 * gc.h (SCM_GC_SET_ALLOCATED, scm_debug_newcell,
7552 scm_debug_newcell2, scm_tc16_allocated): Removed from header.
7553 (scm_deprecated_newcell, scm_deprecated_newcell2): New.
7554 (SCM_NEWCELL, SCM_NEWCELL2): Implement in terms of
7555 scm_deprecated_newcell and scm_deprecated_newcell2.
7556
7557 gc.c (scm_tc16_allocated): Only define when including deprecated
7558 features.
7559 (scm_debug_newcell, scm_debug_newcell2): Removed.
7560 (scm_init_storage): Do not initialize scm_tc16_allocated.
7561 (scm_init_gc): Do it here.
7562 (allocated_mark): New, from old code.
7563 (scm_deprecated_newcell, scm_deprecated_newcell2): New.
7564
7565 * inline.c, inline.h: New files.
7566 * Makefile.am: Added them in all the right places.
7567
7568 * _scm.h: Include "libguile/inline.h".
7569
7570 * alist.c, coop-threads.c, debug.c, environments.c, eval.c,
7571 fports.c, gh_data.c, goops.c, guardians.c, lang.c, list.c,
7572 num2float.i.c, numbers.c, pairs.c, ports.c, print.c, procs.c,
7573 smob.c, smob.h, strings.c, strports.c, struct.c, symbols.c,
7574 unif.c, variable.c, vectors.c, vports.c, weaks.c: Replaced
7575 SCM_NEWCELL and SCM_NEWCELL2 with scm_alloc_cell and
7576 scm_alloc_double_cell, respectively.
7577
7578 2001-11-23 Marius Vollmer <mvo@zagadka.ping.de>
7579
7580 * modules.c (scm_c_use_module): Adapt to changes to
7581 `process-use-modules'.
7582
7583 2001-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
7584
7585 * numbers.c (scm_divide): Fix more division by zero errors.
7586
7587 2001-11-21 Gary Houston <ghouston@arglist.com>
7588
7589 * Makefile.am (OMIT_DEPENDENCIES): removed, since it seems to be
7590 obsolete. autogen.sh says:
7591 invalid unused variable name: `OMIT_DEPENDENCIES'
7592
7593 2001-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
7594
7595 * numbers.c (scm_divide): Fix (/ 0). Thanks to Keith Wright for
7596 reporting the bug.
7597
7598 2001-11-21 Marius Vollmer <mvo@zagadka.ping.de>
7599
7600 * Makefile.am (install-exec-hook): Prepend $(DESTDIR) to filename.
7601 Thanks to Eric Gillespie, Jr!
7602
7603 2001-11-21 Stefan Jahn <stefan@lkcc.org>
7604
7605 * win32-socket.c (getservent, setservent, endservent,
7606 getprotoent, setprotoent, endprotoent): New functions.
7607 Appropriate replacements for M$-Windows.
7608
7609 * numbers.c (SIZE_MAX, PTRDIFF_MAX, PTRDIFF_MIN): Reintroduced
7610 these definitions for GUILE_DEBUG.
7611
7612 * net_db.c: Include "win32-socket.h" if compiling with a native
7613 M$-Windows compiler. Include some pieces of code (protoent and
7614 servent interface) protected by HAVE_* macros when using a
7615 native M$-Windows compiler.
7616
7617 2001-11-20 Marius Vollmer <mvo@zagadka.ping.de>
7618
7619 * modules.c (scm_c_export): Do nothing when the first argument is
7620 already the terminating NULL. Thanks to Han-Wen Nienhuys!
7621
7622 2001-11-20 Thien-Thi Nguyen <ttn@glug.org>
7623
7624 * Makefile.am (libpath.h): In SCM_BUILD_INFO,
7625 also include `buildstamp'.
7626
7627 2001-11-18 Rob Browning <rlb@defaultvalue.org>
7628
7629 * version.c
7630 (s_scm_major_version): use SCM_MAJOR_VERSION.
7631 (s_scm_minor_version): use SCM_MINOR_VERSION.
7632 (s_scm_micro_version): use SCM_MICRO_VERSION.
7633 (s_scm_version): use SCM_MAJOR_VERSION, SCM_MINOR_VERSION, and
7634 SCM_MICRO_VERSION.
7635
7636 * version.h.in
7637 (SCM_MAJOR_VERSION): renamed from SCM_GUILE_MAJOR_VERSION.
7638 (SCM_MINOR_VERSION): renamed from SCM_GUILE_MINOR_VERSION.
7639 (SCM_MICRO_VERSION): renamed from SCM_GUILE_MICRO_VERSION.
7640
7641 2001-11-18 Neil Jerram <neil@ossau.uklinux.net>
7642
7643 * vectors.c (scm_vector_move_left_x, scm_vector_move_right_x):
7644 Rewrite docstrings without reference to substring-move-left/right,
7645 since the latter no longer exist.
7646
7647 2001-11-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
7648
7649 * eval.c: Removed bogus comment about acros.
7650
7651 (scm_unmemocar): Use !SCM_CONSP instead of SCM_IMP.
7652 Minimize scope of local variable. Eliminate dependency on
7653 macro DEBUG_EXTENSIONS.
7654
7655 (s_splicing): New error message string.
7656
7657 (scm_m_body): Issue 'bad body' message rather than 'missing
7658 expression' message.
7659
7660 (scm_m_quote): Eliminate unnecessary copying.
7661
7662 (scm_m_lambda, scm_m_letstar, scm_m_letrec, scm_m_let): Leave the
7663 checking of the body to scm_m_body.
7664
7665 (scm_m_do): Move comment to function header. Rename arg1 to
7666 binding. Made the code a bit easier to read.
7667
7668 (evalcar): Removed.
7669
7670 (iqq): Added a comment. Changed the depth parameter to
7671 unsigned. Use size_t for vector lengths. Make sure vector object
7672 is gc protected as long as its contents are read. Add some syntax
7673 checks. Get rid of unnecessary SCM_IMP test. Clean up the
7674 control structure a bit.
7675
7676 (scm_m_delay): Added comment about the implementation of
7677 scm_m_delay.
7678
7679 (scm_m_define): Add comment about guile's currying define
7680 syntax. Renamed 'proc' to 'name'. Eliminate dependency on macro
7681 DEBUG_EXTENSIONS. Simplified code a bit. Eliminate SICP code.
7682
7683 (scm_m_letrec1): Removed. Part of the functionality is taken
7684 over by the new function 'transform_bindings'.
7685
7686 (transform_bindings): New function. Takes over some of the
7687 functionality of removed function 'scm_m_letrec1', namely to split
7688 a list of bindings into a reversed list of variables and a list of
7689 initializers.
7690
7691 (scm_m_letrec): Call 'transform_bindings'.
7692
7693 (scm_m_let): Minimized scope of local variables. Renamed 'proc'
7694 to 'temp' and 'arg1' to 'binding'. Eliminated redundant SCM_NIMP
7695 test. Use 'transform_bindings'. Fixed scoping error with named
7696 let (Thanks to Aubrey Jaffer for reporting the bug and to Neil
7697 Jerram for suggesting the fix). Cleaned up the control structure
7698 a bit.
7699
7700 (scm_m_expand_body): Use 'transform_bindings'. Eliminated
7701 unnecessary consing. Eliminated unnecessary
7702 SCM_DEFER/ALLOW_INTS.
7703
7704 (SCM_CEVAL): Un-obfuscated some loops.
7705
7706 2001-11-16 Neil Jerram <neil@ossau.uklinux.net>
7707
7708 * gc.h (scm_unhash_name): Old declaration removed.
7709
7710 * eval.c (s_scm_eval): Change @var{primitive-eval} to
7711 @code{primitive-eval}.
7712
7713 * feature.c, vectors.c, net_db.c, unif.c, weaks.c, struct.c,
7714 version.c, alist.c, ports.c, ramap.c, unif.c, strings.c, list.c:
7715 Change @deffnx lines in docstrings to say {Scheme Procedure}
7716 rather than primitive or procedure.
7717
7718 * posix.c (scm_execl), filesys.c (scm_close), unif.c
7719 (scm_array_set_x, scm_array_contents, scm_uniform_array_read_x,
7720 scm_bit_set_star_x, scm_bit_invert_x), ramap.c (scm_array_fill_x,
7721 scm_array_for_each, scm_array_index_map_x), vectors.c (scm_vector,
7722 scm_make_vector, scm_vector_to_list, scm_vector_fill_x), strop.c
7723 (scm_string_split, scm_string_ci_to_symbol), strings.c
7724 (scm_string_p), sort.c (scm_merge), print.c (scm_newline),
7725 macros.c (scm_macro_type), alist.c (scm_acons, scm_assq):
7726 Docstring fixes and improvements reflecting edits that have been
7727 made in the reference manual source.
7728
7729 * objprop.c (scm_object_properties, scm_set_object_properties_x,
7730 scm_object_property, scm_set_object_property_x): Remove invalid
7731 @deffnx lines for corresponding procedure property primitives.
7732
7733 These changes add a @deffnx C function declaration and function
7734 index entries for each Guile primitive to the copy of the doc
7735 snarf output that is used for reference manual synchronization.
7736 Online help is unchanged.
7737
7738 * snarf.h (SCM_SNARF_DOCS): Output primitive's C function name.
7739 (SCM_DEFINE, SCM_DEFINE1, SCM_REGISTER_PROC): Supply to C function
7740 name to SCM_SNARF_DOCS.
7741
7742 * guile-snarf-docs-texi.in: Pass the shell script's arguments into
7743 snarf-check-and-output-texi.
7744
7745 * Makefile.am (guile-procedures.texi): New rule.
7746 (BUILT_SOURCES, guile.texi, guile-procedures.txt, CLEANFILES):
7747 Changed so that the last stage of doc snarfing is now performed
7748 twice, once to produce guile-procedures.txt for online help, and
7749 once to produce guile.texi for reference manual synchronization.
7750
7751 2001-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
7752
7753 * eval.c (RETURN): Wrap in do{}while(0) in order to make it
7754 safely usable as a single statement followed by a ';', for example
7755 in an if statement.
7756
7757 (SCM_CEVAL, SCM_APPLY): Clean up code using 'RETURN'.
7758
7759 2001-11-13 Neil Jerram <neil@ossau.uklinux.net>
7760
7761 * random.c (scm_random_solid_sphere_x,
7762 scm_random_hollow_sphere_x): Correct "shere" typos.
7763
7764 * hashtab.c (scm_hash_fold): Add missing apostrophe to docstring.
7765
7766 * version.c (scm_version): Update docstring to include
7767 `micro-version'.
7768
7769 2001-11-13 Marius Vollmer <mvo@zagadka.ping.de>
7770
7771 * modules.c (scm_c_export): Call va_end after collecting the
7772 symbols.
7773
7774 * strop.h, strop.c (scm_substring_move_left_x,
7775 scm_substring_move_right_x): Removed.
7776
7777 * __scm.h (HAVE_UINTPTR_T, HAVE_PTRDIFF_T, HAVE_LONG_LONG,
7778 HAVE_LONG_LONGS): Define to "1" when defining them, to mirror what
7779 configure does.
7780
7781 2001-11-12 Marius Vollmer <mvo@zagadka.ping.de>
7782
7783 * numbers.c: Document macros to define when including
7784 num2integral.i.c. MAX_VALUE and MIN_VALU are no longer used, we
7785 now rely on SIZEOF_ macros that have been figured out at
7786 configure time.
7787
7788 * num2integral.i.c: Adapt to new interface.
7789 (NUM2INTEGRAL): Test whether a fixnum can be represented in the
7790 target type by casting it and checking whether it is still the
7791 same. Do not try to handle bignums for integral types that are
7792 smaller than fixnums. When handling bignums, collect the
7793 magnituse first into a unsigned type, and correctly check for
7794 overflow.
7795 (INTEGRAL2BIG): Do not use MIN_VALUE explicitely by observing that
7796 only -MIN_VALUE can still be negative of all negative numbers (in
7797 twos-complement).
7798
7799 * tags.h (SIZEOF_SCM_T_BITS): Define it appropriately.
7800
7801 * __scm.h: Define HAVE_UINTPTR_T, HAVE_PTRDIFF_T and
7802 HAVE_LONG_LONG depending on whether their size is non-zero.
7803
7804 2001-11-11 Thien-Thi Nguyen <ttn@glug.org>
7805
7806 * strop.c (scm_string_null_p): Docfix; nfc.
7807 Thanks to Scott Lenser.
7808
7809 2001-11-07 Neil Jerram <neil@ossau.uklinux.net>
7810
7811 * extensions.c (scm_load_extension): Canonicalize docstring
7812 whitespace.
7813
7814 * unif.c (scm_uniform_array_write), ports.c
7815 (scm_current_output_port, scm_force_output), dynwind.c
7816 (scm_dynamic_wind), scmsigs.c (scm_setitimer, scm_getitimer),
7817 filesys.c (scm_open, scm_lstat), struct.c
7818 (scm_make_struct_layout), random.c (scm_random,
7819 scm_random_solid_sphere_x, scm_random_hollow_sphere_x, strop.c
7820 (scm_i_index): Remove superfluous whitespace from end of docstring
7821 lines.
7822
7823 * filesys.c (scm_select), guardians.c (scm_guardian_greedy_p),
7824 strings.c (scm_make_string), variable.c (scm_make_variable,
7825 scm_make_undefined_variable, scm_variable_p, scm_variable_set_x,
7826 scm_variable_bound_p), scmsigs.c (scm_setitimer, scm_getitimer),
7827 posix.c (scm_crypt), struct.c (scm_make_vtable_vtable), hashtab.c
7828 (scm_hash_fold), ports.c (scm_port_for_each): Remove superfluous
7829 newline at end of docstrings.
7830
7831 * modules.c (scm_set_current_module): Add missing newline to
7832 docstring.
7833
7834 2001-11-07 Stefan Jahn <stefan@lkcc.org>
7835
7836 * win32-socket.[ch]: New files. Defines Winsock-API error codes
7837 and makes them available through Guile. That is because the
7838 Winsock-API does not store its errors in `errno' and thus cannot
7839 return error messages via `strerror (errno)'.
7840
7841 * socket.c (scm_init_socket): Initialize `win32-socket' part
7842 here under M$-Windows.
7843
7844 * numbers.h: Added missing declaration of
7845 `scm_sys_check_number_conversions()'.
7846
7847 * error.c: Local definition of SCM_I_STRERROR and SCM_I_ERRNO
7848 and use in `(strerror)' and `(system-error)'.
7849
7850 * Makefile.am (EXTRA_libguile_la_SOURCES): Added
7851 `win32-socket.[ch]' to extra source and header files.
7852
7853 2001-11-06 Marius Vollmer <mvo@zagadka.ping.de>
7854
7855 * script.c (scm_shell_usage, scm_compile_shell_switches): Prepend
7856 a call to turn-on-debugging when --debug has been given instead of
7857 turning it on directly. Also, handle new `--no-debug' option,
7858 which might suppress the call to turn-on-debugging.
7859
7860 2001-11-05 Stefan Jahn <stefan@lkcc.org>
7861
7862 * struct.c (s_scm_struct_vtable_p): Corrected docstring.
7863
7864 2001-11-04 Stefan Jahn <stefan@lkcc.org>
7865
7866 * Makefile.am (libguile_la_LIBADD): Added $(THREAD_LIBS_LOCAL)
7867 here (was at guile_LDADD) which describes the dependency
7868 correctly and allows a clean build on Win32.
7869
7870 * __scm.h (SCM_API): Follow-up patch. Renamed __FOO__ macros
7871 into FOO.
7872
7873 * __scm.h: USE_DLL_IMPORT indicates the usage of the DLL
7874 import macros for external libraries (libcrypt, libqthreads,
7875 libreadline and libregex).
7876
7877 * coop-defs.h: Include <winsock2.h> for `struct timeval'.
7878
7879 * posix.c (flock): Added support for flock() in M$-Windows.
7880
7881 * guile.c (SCM_IMPORT): Follow-up patch. Use SCM_IMPORT instead
7882 of __SCM_IMPORT__.
7883
7884 * fports.c (getflags): Differentiate reading and writing pipes
7885 descriptors.
7886
7887 * filesys.c (S_IS*): Redefine all of the S_IS*() macros for
7888 M$-Windows.
7889
7890 * coop.c (coop_condition_variable_timed_wait_mutex): Use
7891 conditionalized error code if `ETIMEDOUT' is not available.
7892 (scm_thread_usleep): Remove bogus declaration of `struct timeval
7893 timeout'.
7894
7895 * numbers.c (PTRDIFF_MIN): Moved this definition where it actually
7896 belongs. That is because NO_PREPRO_MAGIC gets undefined after
7897 each inclusion of `num2integral.i.c'.
7898 (SIZE_MAX): Define NO_PREPRO_MAGIC if SIZE_MAX is undefined.
7899
7900 2001-11-03 Marius Vollmer <mvo@zagadka.ping.de>
7901
7902 * eval.c (scm_m_begin): Allow `(begin)`, with no subforms.
7903 (SCM_CEVAL): Evaluate an empty `begin' to SCM_UNSPECIFIED.
7904
7905 2001-11-02 Mikael Djurfeldt <mdj@linnaeus>
7906
7907 * print.c (scm_iprin1): Mark print state as revealed when
7908 dispatching to generic write or display.
7909
7910 * unif.c (scm_ra2contig): Fixed memory overwrite bug.
7911
7912 2001-11-02 Marius Vollmer <mvo@zagadka.ping.de>
7913
7914 Support for native Win32. Thanks to Stefan Jahn!
7915
7916 * Makefile.am: Add win32-uname.c, win32-uname.h, win32-dirent.c
7917 and win32-dirent.h to extra source and header files. These
7918 include the uname() and the POSIX dirent interface implementation
7919 for M$-Windows. Put `-no-undefined' into LDFLAGS to support
7920 linkers which do not allow unresolved symbols inside shared
7921 libraries. Corrected `guile_filter_doc_snarfage$(EXEEXT)'
7922 dependency.
7923
7924 * __scm.h: Defined SCM_API. This macro gets prepended to all
7925 function and data definitions which should be exported or imported
7926 in the resulting dynamic link library in the Win32 port.
7927
7928 * __scm.h, alist.h, arbiters.h, async.h, backtrace.h, boolean.h,
7929 chars.h, continuations.h, coop-defs.h, coop-threads.h,
7930 debug-malloc.h, debug.h, deprecation.h, dynl.h, dynwind.h,
7931 environments.h, eq.h, error.h, eval.h, evalext.h, extensions.h,
7932 feature.h, filesys.h, fluids.h, fports.h, gc.h, gdb_interface.h,
7933 gdbint.h, gh.h, goops.h, gsubr.h, guardians.h, hash.h, hashtab.h,
7934 hooks.h, init.h, ioext.h, iselect.h, keywords.h, lang.h, list.h,
7935 load.h, macros.h, mallocs.h, modules.h, net_db.h, numbers.h,
7936 objects.h, objprop.h, options.h, pairs.h, ports.h, posix.h, print.h,
7937 procprop.h, procs.h, properties.h, ramap.h, random.h, rdelim.h,
7938 read.h, regex-posix.h, root.h, rw.h, scmsigs.h, script.h, simpos.h,
7939 smob.h, socket.h, sort.h, srcprop.h, stackchk.h, stacks.h, stime.h,
7940 strings.h, strop.h, strorder.h, strports.h, struct.h, symbols.h,
7941 tags.h, threads.h, throw.h, unif.h, values.h, variable.h, vectors.h,
7942 vports.h, weaks.h:
7943 Prefixed each each exported symbol with SCM_API.
7944
7945 * continuations.c: Added comment about the use of the extern
7946 declarations of {get,set}context() functions used in the ia64 port.
7947
7948 * continuations.h, gc.c: `__libc_ia64_register_backing_store_base'
7949 is meant to be a `unsigned long *'.
7950
7951 * filesys.c: Include `direct.h' if possible. Use local
7952 `win32-dirent.h' for the native M$-Windows port. Define S_IS*()
7953 macros for M$-Windows. Implementation of `fstat_Win32()' which is
7954 able to differentiate between sockets and other file descriptors.
7955 Use this function as wrapper in `scm_fstat()'. Fixed typo in
7956 `scm_dirname()'.
7957
7958 * fports.c: Include `io.h' is possible. Put `*fp' into referring
7959 statement block in `scm_fport_buffer_add()'.
7960 Some corrections in `getflags()'.
7961
7962 * gdb_interface.h (GDB_INTERFACE): Also support __CYGWIN__.
7963
7964 * guile.c: Make sure to define __SCM_IMPORT__ for shared library
7965 build on Win32. Disable preloaded symbols on Win2 platforms.
7966
7967 * ioext.c, ports.c: Include `io.h' is possible.
7968
7969 * mkstemp.c: Include `process.h' is possible.
7970
7971 * net_db.c: Disable extern declaration of `h_errno' for __CYGWIN__,
7972 too.
7973 Put `scm_return_entry()' into HAVE_GETSERVENT conditional.
7974
7975 * posix.c: Remove unnecessary dirent includes and defines. Include
7976 local `win32-uname.h' for MinGW. Extern declaration of
7977 `mkstemp()' for systems where it does not exists. Make
7978 `getlogin()' available on M$-Windows.
7979
7980 * scmsigs.c: Made `usleep()' avalable on MinGW.
7981
7982 * stime.c: On M$-Windows `tzname[]' is known to be `_tzname[]'.
7983
7984 * win32-dirent.c: Include "win32-dirent.h", not "dirent.h".
7985
7986 * win32-uname.c: Include "win32-uname.h", not "uname.h".
7987
7988 2001-10-28 Mikael Djurfeldt <mdj@linnaeus>
7989
7990 * unif.c (scm_uniform_array_read_x, scm_uniform_array_write):
7991 Don't apply scm_uniform_vector_length on arrays.
7992
7993 2001-10-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
7994
7995 * eval.c (scm_lookupcar, scm_m_letstar, scm_m_do, iqq,
7996 scm_m_define, scm_m_letrec1, scm_m_let, scm_m_expand_body,
7997 scm_macroexp, unmemocopy, scm_eval_args, scm_deval_args,
7998 SCM_CEVAL, scm_map, scm_init_eval): When building lists, prefer
7999 scm_list_<n> over scm_cons[2]?.
8000
8001 (scm_unmemocar, scm_m_cond, scm_m_letstar, scm_m_letrec1,
8002 scm_m_let, scm_m_atbind, unmemocopy, SCM_CEVAL, SCM_APPLY): Use
8003 SCM_C[AD][AD]R instead of explicit form.
8004
8005 (scm_m_set_x, scm_m_cond, scm_m_letstar, scm_m_do): Reordered
8006 comparison parameters.
8007
8008 (scm_m_case, scm_m_cond, scm_m_letstar, scm_m_do, SCM_CEVAL): Use
8009 !SCM_NULLP instead of SCM_NIMP.
8010
8011 (scm_m_case): Don't copy the form. Renamed proc to clause and
8012 minimized its scope. Renamed x to clauses. Removed side
8013 effecting operation from macro call.
8014
8015 (scm_m_cond): Don't copy the form. Renamed arg1 to clause and
8016 minimized its scope. Renamed x to clauses. Minimized the scope
8017 of variable 'len'. Make sure the else clause is treated specially
8018 even in case of '=>' occurences. Don't change the else to #t in
8019 order to be able to distinguish this case in the evaluator. Leave
8020 type checking of the recipient to the evaluator.
8021
8022 (scm_c_improper_memq): Made the comment somewhat clearer.
8023
8024 (scm_m_lambda): Renamed proc to formals. Removed unnecessary
8025 test for SCM_IM_LET at the place of the formal parameters.
8026 Simplified the formal parameter checking.
8027
8028 (scm_m_letstar): Added Comment. Renamed proc to bindings.
8029 Renamed arg1 to binding and minimized its scope. Eliminated
8030 unnecessary consing.
8031
8032 (scm_m_do): Renamed proc to bindings. Minimized the scope of
8033 variable 'len'.
8034
8035 (build_binding_list): New static function.
8036
8037 (unmemocopy): Don't use SCM_TYP7 on pairs (it's unclean).
8038 Further, split up the 'letrec' unmemoizing code to the
8039 corresponding parts for 'do', 'let' and 'letrec', adding comments
8040 to each form. Cleanup the handling of the do form (This removes
8041 some *real* code :-).
8042
8043 (SCM_CEVAL): Removed side effecting operation from macro call.
8044 Handle the 'else clause of the 'cond form specially - the symbol
8045 'else is not replaced with #t any more.
8046
8047 2001-10-14 Gary Houston <ghouston@arglist.com>
8048
8049 * version.c (scm_version): use sprintf instead of snprintf,
8050 for portability. thanks to Bill Schottstaedt.
8051
8052 2001-10-14 Mikael Djurfeldt <mdj@linnaeus>
8053
8054 * read.c (scm_lreadr): When user-defined hash procedure returns
8055 SCM_UNSPECIFIED: Fall back to standard handling instead of raising
8056 an exception. (This prevents parsing of uniform vectors from
8057 interfering with parsing of numbers.)
8058
8059 2001-10-13 Marius Vollmer <mvo@zagadka.ping.de>
8060
8061 * numbers.c: Set NO_PREPRO_MAGIC when defining our version of
8062 PTRDIFF_MIN. Thanks to Ken Raeburn.
8063
8064 2001-10-07 Marius Vollmer <mvo@zagadka.ping.de>
8065
8066 * Makefile.am (EXTRA_libguile_la_SOURCES): Added "mkstemp.c".
8067
8068 * eval.c (scm_m_atbind): First try to find the variable without
8069 defining it locally; when it has not been found, define it
8070 locally.
8071
8072 * modules.c (module_variable): Pass over variables that exist but
8073 are unbound.
8074
8075 2001-10-06 Marius Vollmer <mvo@zagadka.ping.de>
8076
8077 * backtrace.c (display_backtrace_file_and_line): Only use
8078 scm_basename when POSIX support is compiled in. Thanks to Chris
8079 Cramer.
8080
8081 2001-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
8082
8083 * numbers.c (mem2uinteger): Return number read so far when coming
8084 across a hexdigit after having read a # or if not reading a hex
8085 value. This will enable the calling code to correctly handle
8086 forms like 1e2. (The background is, that the exponent markers d,
8087 e and f are also hexdigits.) Thanks to Mikael Djurfeldt for
8088 providing this patch.
8089
8090 (mem2complex): Fix erroneous double-negation. Now, numbers like
8091 1-i will be read correctly.
8092
8093 2001-10-12 Mikael Djurfeldt <mdj@linnaeus>
8094
8095 * debug.c (scm_mem_to_proc): Fixed typo in previous change.
8096
8097 * validate.h (SCM_VALIDATE_DOUBLE_DEF_COPY): New macro.
8098
8099 2001-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
8100
8101 * print.c (scm_print_state_vtable, print_state_pool):
8102 Initialize. These variables are now registered as gc roots.
8103
8104 (scm_current_pstate): Update documentation.
8105
8106 (scm_current_pstate, scm_make_print_state, scm_free_print_state,
8107 scm_prin1, scm_init_print): print_state_pool is registered as a
8108 gc root and thus does not need to be protected by a surrounding
8109 pair any more.
8110
8111 (make_print_state): The car of print_state_pool no longer holds
8112 the scm_print_state_vtable.
8113
8114 (scm_current_pstate, scm_make_print_state, print_circref,
8115 scm_iprin1, scm_prin1, scm_iprlist): Prefer !SCM_<foo> over
8116 SCM_N<foo>.
8117
8118 (scm_prin1): When building lists, prefer scm_list_<n> over
8119 scm_cons[2]?.
8120
8121 (scm_iprlist): Removed a redundant SCM_IMP test.
8122
8123 (scm_simple_format): Use SCM_EQ_P to compare SCM values.
8124
8125 2001-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
8126
8127 * debug.c (scm_make_iloc): Prefer !SCM_<foo> over SCM_N<foo>.
8128
8129 (scm_memcons, scm_mem_to_proc): When building lists, prefer
8130 scm_list_<n> over scm_cons[2]?.
8131
8132 (scm_mem_to_proc): Prefer SCM_CONSP over SCM_NIMP.
8133
8134 (scm_procedure_name): Use SCM_CADR instead of explicit form.
8135
8136 (debugobj_print): Coerce scm_intprint arg 1 to long, not int.
8137 Thanks to Rob Browning for the patch (see log entry 2001-09-21) -
8138 for some reason his patch didn't make it into the cvs.
8139
8140 2001-10-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
8141
8142 * numbers.c (mem2decimal_from_point): Cleaned up the parsing a
8143 little bit - should even be somewhat more accurate now.
8144
8145 2001-10-08 Rob Browning <rlb@defaultvalue.org>
8146
8147 * gc.c: support ia64 register backing store.
8148 (SCM_MARK_BACKING_STORE): new macro.
8149
8150 * continuations.h: support ia64 register backing store.
8151 (struct scm_t_contregs): add ia64 register backing store.
8152
8153 * continuations.c: support ia64 register backing store.
8154 (continuation_mark): mark ia64 register backing store.
8155 (continuation_free): free ia64 register backing store.
8156 (scm_make_continuation): capture ia64 register backing store.
8157 (copy_stack_and_call): copy ia64 register backing store.
8158
8159 2001-10-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
8160
8161 * hashtab.c (scm_hash_fn_create_handle_x): The result of assoc_fn
8162 is known to be #f if no entry is found. Thus, use !SCM_FALSEP
8163 instead of SCM_NIMP to test for that case.
8164
8165 * strings.h (SCM_SET_STRING_LENGTH): Cast the length to
8166 scm_t_bits instead of long.
8167
8168 2001-10-06 Marius Vollmer <mvo@zagadka.ping.de>
8169
8170 * tags.h (SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
8171 SCM_T_SIGNED_BITS_MIN): New.
8172 * numbers.h (SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM):
8173 Use them to make these macros computable by the preprocessor.
8174
8175 * num2integral.i.c (INTEGRAL2NUM): Let the preprocessor test
8176 whether the integral type fits in a fixnum, not the compiler.
8177 This removes a spurious compiler warning. Also, honor the
8178 NO_PREPRO_MAGIC flag to suppress any preprocessor tests. This is
8179 needed for `long long's.
8180
8181 * numbers.c: Define NO_PREPRO_MAGOC when including
8182 num2integral.c.i for `long long' and `signed long long'.
8183
8184 2001-10-06 Mikael Djurfeldt <mdj@linnaeus>
8185
8186 These changes fixes a race condition in the Guile coop - pthread
8187 compatibility code.
8188
8189 * coop.c (mother_awake_p): New variable.
8190 (coop_create): Set mother_awake_p before creating or signalling
8191 mother; wait until mother is going to sleep before returning.
8192 (mother): Reset mother_awake_p before going to sleep.
8193
8194 2001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
8195
8196 * options.c (protected_objects, scm_init_options): The content of
8197 protected_objects is now protected from garbage collection using
8198 scm_gc_register_root instead of scm_permanent_object.
8199
8200 (get_option_setting): New static function that computes an option
8201 setting as it was formerly done in the function scm_options.
8202
8203 (get_documented_option_setting): New static function that
8204 returns option documentation as it was formerly done in the
8205 function scm_options. Note that documentation C strings are no
8206 longer precomputed into SCM objects. Instead, they are converted
8207 into SCM strings every time get_documented_option_setting is
8208 called.
8209
8210 (change_option_setting): New static functions that modifies the
8211 option setting as it was formerly done in the function
8212 scm_options. The function is now exception safe, i. e. won't
8213 cause a memory leak when interrupted. Further, only non-immediate
8214 option values are added to the protection list.
8215
8216 (scm_options): This function now has only the purpose to dispatch
8217 to to get_option_setting, get_documented_option_setting or
8218 change_option_setting, depending on the arguments given to
8219 scm_options.
8220
8221 (scm_init_opts): Don't convert documentation C strings into SCM
8222 strings. Further, don't protect any object values: They _must_
8223 be immediate values, otherwise there is no guarantee that they
8224 have not been collected before anyway.
8225
8226 * options.[ch] (scm_t_option): Made type unsigned, name into a
8227 constant char* and val into a scm_t_bits type.
8228
8229 (scm_options, scm_init_opts): The number of options is guaranteed
8230 to be larger or equal to zero. Thus, the type is changed to
8231 unsigned.
8232
8233 2001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
8234
8235 * num2integral.i.c (NUM2INTEGRAL): Eliminated some warnings about
8236 testing an unsigned value for being >= 0.
8237
8238 2001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
8239
8240 * numbers.h: Removed old comment about using SCM_CAR to access
8241 non-pair cells.
8242
8243 (SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM): Make sure
8244 the return value is signed. Thanks to Brian Crowder for the bug
8245 report.
8246
8247 (SCM_SRS): Avoid unnecessary casting and don't unpack input
8248 values. With this patch, SCM_SRS can be safely used for other
8249 types than scm_t_signed_bits. However, it should still better be
8250 an internal macro and thus be renamed to SCM_I_SRS.
8251
8252 (SCM_MAKINUM, SCM_INUM): Use proper casting.
8253
8254 2001-10-03 Gary Houston <ghouston@arglist.com>
8255
8256 * continuations.h, unif.h: in the descriptions of the bit patterns
8257 of the heap cells, make bit 0 the least significant.
8258
8259 2001-09-25 Thien-Thi Nguyen <ttn@glug.org>
8260
8261 * chars.h (SCM_MAKE_CHAR): Use `scm_t_bits' instead of `intptr_t'.
8262 Thanks to Golubev I. N.
8263
8264 2001-09-25 Gary Houston <ghouston@arglist.com>
8265
8266 * ports.c (scm_drain_input): extended the docstring. thanks to
8267 Alex Schroeder and Thien-Thi Nguyen.
8268
8269 2001-09-23 Mikael Djurfeldt <mdj@linnaeus>
8270
8271 * validate.h (SCM_NUM2FLOAT, SCM_NUM2DOUBLE,
8272 SCM_VALIDATE_FLOAT_COPY, SCM_VALIDATE_DOUBLE_COPY): New
8273 macros. (The NUM names might soon change.)
8274
8275 * numbers.h: Added missing declarations.
8276
8277 2001-09-22 Mikael Djurfeldt <mdj@linnaeus>
8278
8279 * Makefile.am: Distribute num2float.i.c.
8280
8281 * num2float.i.c: New file, multiply included by numbers.c, used
8282 to "templatize" the float <-> num conversion routines.
8283
8284 * numbers.c: New functions: scm_num2float, scm_float2num,
8285 scm_num2double, scm_double2num.
8286
8287 2001-09-21 Rob Browning <rlb@defaultvalue.org>
8288
8289 * .cvsignore: really add version.h
8290
8291 * strings.h (SCM_SET_STRING_LENGTH): coerce "l" to a long.
8292 Otherwise it fails on the alpha. However, we might rather choose
8293 this size conditionally.
8294
8295 * numbers.c (scm_gcd): change "k" to a long from an int.
8296 Otherwise it fails on the alpha. However, we might rather choose
8297 this size conditionally.
8298
8299 * error.c (scm_wta): coerce char* to intptr_t before int
8300 assignment.
8301
8302 * debug.c (debugobj_print): coerce scm_intprint arg 1 to long, not
8303 int.
8304
8305 * chars.h (SCM_MAKE_CHAR): coerce value to intptr_t.
8306
8307 2001-09-20 Mikael Djurfeldt <mdj@linnaeus>
8308
8309 * numbers.c (scm_integer_expt): Accept inexact integer in second
8310 argument. (Thanks to Bill Schottstaedt.)
8311
8312 2001-09-20 Rob Browning <rlb@defaultvalue.org>
8313
8314 * .cvsignore: add version.h
8315
8316 * versiondat.h.in: removed (obsolete).
8317
8318 * version.h.in: renamed from version.h.
8319 (SCM_GUILE_MAJOR_VERSION): new public macro.
8320 (SCM_GUILE_MINOR_VERSION): new public macro.
8321 (SCM_GUILE_MICRO_VERSION): new public macro.
8322
8323 * version.h: renamed to version.h.in.
8324
8325 * version.c
8326 (scm_major_version): support integer *_VERSION macros.
8327 (scm_minor_version): support integer *_VERSION macros.
8328 (scm_micro_version): support integer *_VERSION macros.
8329 (scm_version): support integer *_VERSION macros.
8330
8331 2001-09-20 Mikael Djurfeldt <mdj@linnaeus>
8332
8333 * error.c, error.h: Made error keys globally accessible.
8334 Applications might want to test for these or use them in a direct
8335 call to scm_error.
8336
8337 * num2integral.i.c (NUM2INTEGRAL): Report an error when these
8338 routines are passed an inexact. This change in behavior is
8339 motivated by concordance with R5RS: It is more common that a
8340 primitive doesn't want to accept an inexact for an exact.
8341
8342 2001-09-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
8343
8344 The following patch partially undoes my patch from 2001-06-30,
8345 where I added the function scm_gc_mark_cell_conservatively. The
8346 function is buggy, since it breaks guile during conservative
8347 marking if a pointer on the stack points directly into the list of
8348 free cells on the heap: With conservative cell marking this will
8349 cause the whole free list to be scanned and marked - boom!
8350
8351 * gc.c (allocated_mark, MARK, heap_segment,
8352 scm_gc_mark_cell_conservatively, scm_init_storage), gc.h
8353 (scm_gc_mark_cell_conservatively): Remove function
8354 scm_gc_mark_cell_conservatively and update the corresponding
8355 comments and uses accordingly. Thanks to Christopher Cramer for
8356 the patch. (Minor corrections by me.)
8357
8358 2001-09-15 Gary Houston <ghouston@arglist.com>
8359
8360 * root.h (scm_root_state): removed the continuation_stack and
8361 continuation_stack_ptr members, which have no apparent purpose.
8362 (scm_continuation_stack, scm_continuation_stack_ptr): #defines
8363 removed.
8364
8365 * root.c (root_mark), init.c (restart_stack, start_stack), gc
8366 (scm_igc): remove all references to contination_stack and
8367 continuation_stack_ptr, avoiding allocation of a vector and
8368 useless processing during gc.
8369
8370 2001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
8371
8372 * guardians.c (tconc_t, t_tconc): Renamed tconc_t to t_tconc.
8373
8374 (TCONC_IN): Make sure that the cell word 0 is initialized last.
8375
8376 (guardians_t, t_guardians): Renamed guardians_t to t_guardians.
8377
8378 (GUARDIAN, GUARDIAN_DATA): Renamed GUARDIAN to GUARDIAN_DATA.
8379
8380 (guardian_apply, scm_get_one_zombie, scm_make_guardian,
8381 mark_and_zombify): Prefer !SCM_<foo> over SCM_N<foo>.
8382
8383 2001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
8384
8385 * guardians.c (mark_dependencies_in_tconc,
8386 whine_about_self_centered_zombies, scm_init_guardians): Register
8387 the static global variable `self_centered_zombies' via
8388 scm_gc_register_root, to make some cdr-ing unnecessary.
8389
8390 2001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
8391
8392 * backtrace.c (display_backtrace_file,
8393 display_backtrace_file_and_line): Use SCM_EQ_P when comparing SCM
8394 values, use SCM_FALSEP when comparing SCM values against #f.
8395 Thanks to Rob Browning for the bug report.
8396
8397 2001-09-12 Martin Baulig <martin@home-of-linux.org>
8398
8399 * strings.[ch] (scm_str2string): New function.
8400
8401 2001-09-06 Marius Vollmer <mvo@zagadka.ping.de>
8402
8403 * gc.c (scm_done_free): Always subtract size from scm_mallocated
8404 when computing nm, even if it's negative.
8405 (scm_must_malloc): Abort on overflow of scm_mtrigger.
8406 (scm_must_realloc): Likewise.
8407
8408 2001-09-01 Michael Livshin <mlivshin@bigfoot.com>
8409
8410 * numbers.c (scm_sys_check_number_conversions): new function,
8411 defined if Guile is compiled in debugging mode. currently checks
8412 `scm_num2ulong', should check much much more.
8413
8414 * num2integral.i.c (NUM2INTEGRAL): when converting a bignum to
8415 unsigned, ensure that it's positive. thanks to Martin Baulig!
8416
8417 2001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
8418
8419 * __scm.h: Added new section about compile time selectable
8420 features.
8421
8422 (long_long, ulong_long, scm_sizet, SCM_WNA, SCM_OUTOFRANGE,
8423 SCM_NALLOC, SCM_HUP_SIGNAL, SCM_INT_SIGNAL, SCM_FPE_SIGNAL,
8424 SCM_BUS_SIGNAL, SCM_SEGV_SIGNAL, SCM_ALRM_SIGNAL, SCM_GC_SIGNAL,
8425 SCM_TICK_SIGNAL, SCM_SIG_ORD, SCM_ORD_SIG, SCM_NUM_SIGS):
8426 Removed.
8427
8428 * deprecation.c (scm_include_deprecated_features): Simplified.
8429
8430 * eval.c (EVALCAR, unmemocopy), eval.h (SCM_XEVALCAR): Use
8431 `SCM_IMP´ instead of `!SCM_CELLP´.
8432
8433 * eval.c (unmemocopy): Eliminate redundant SCM_CELLP tests.
8434 Extract side-effecting operations from macros.
8435
8436 (scm_init_eval): Don't initialize *top-level-lookup-closure*,
8437 scm_top_level_lookup_closure_var and scm_system_transformer.
8438
8439 * gc.c (CELL_P): New local definition to replace SCM_CELLP.
8440
8441 (heap_segment): Use CELL_P instead of SCM_CELLP.
8442
8443 * init.c (start_stack): Don't initialize
8444 scm_top_level_lookup_closure_var and scm_system_transformer.
8445
8446 * modules.c (scm_set_current_module): Don't access
8447 scm_top_level_lookup_closure_var and scm_system_transformer.
8448
8449 (scm_sym2var): Don't call scm_variable_set_name_hint.
8450
8451 (scm_post_boot_init_modules): Removed deprecated initializations.
8452
8453 * print.c (scm_ipruk): Don't access cell contents of non cells.
8454
8455 * strings.c (scm_string_set_x): All strings are writable.
8456
8457 * strings.h (SCM_STRINGP): Use SCM_TYP7 to determine the string
8458 type. There is only one string type now.
8459
8460 (SCM_STRING_COERCE_0TERMINATION_X): Deprecated.
8461
8462 * tags.h: Remove comments about two different string types.
8463
8464 (SCM_CELLP, SCM_NCELLP): Deprecated.
8465
8466 * variable.c (make_variable): Remove code variant for vcells.
8467
8468 * variable.h (SCM_VARIABLE_REF, SCM_VARIABLE_SET,
8469 SCM_VARIABLE_LOC): Remove code variant for vcells.
8470
8471 * __scm.h, deprecation.[ch]: Renamed SCM_DEBUG_DEPRECATED to
8472 SCM_ENABLE_DEPRECATED with the logic reversed.
8473
8474 * dynl.c (moddata, registered_mods), dynl.[ch]
8475 (scm_register_module_xxx, scm_registered_modules,
8476 scm_clear_registered_modules), error.[ch] (scm_wta), eval.c
8477 (*top-level-lookup-closure*), eval.[ch]
8478 (scm_top_level_lookup_closure_var, scm_system_transformer,
8479 scm_eval_3, scm_eval2), gc.h (SCM_SETAND_CAR, SCM_SETOR_CAR,
8480 SCM_SETAND_CDR, SCM_SETOR_CDR, SCM_FREEP, SCM_NFREEP,
8481 SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16,
8482 SCM_GCCDR), gc.[ch] (scm_remember, scm_protect_object,
8483 scm_unprotect_object), modules.c (root_module_lookup_closure,
8484 scm_sym_app, scm_sym_modules, module_prefix, make_modules_in_var,
8485 beautify_user_module_x_var, try_module_autoload_var,
8486 scm_module_full_name), modules.[ch] (scm_the_root_module,
8487 scm_make_module, scm_ensure_user_module, scm_load_scheme_module),
8488 ports.h (scm_port, scm_ptob_descriptor, scm_port_rw_active),
8489 ports.[ch] (scm_close_all_ports_except), random.h (scm_rstate,
8490 scm_rng, scm_i_rstate), strings.h (SCM_SLOPPY_STRINGP,
8491 SCM_RWSTRINGP, SCM_STRING_UCHARS, SCM_STRING_CHARS), strings.[ch]
8492 (scm_read_only_string_p, scm_makstr, scm_makfromstr,
8493 scm_make_shared_substring), tags.h (scm_tc7_substring,
8494 SCM_SLOPPY_CONSP, SCM_SLOPPY_NCONSP, scm_tc7_ssymbol,
8495 scm_tc7_msymbol, scm_tcs_symbols), variable.c (sym_huh),
8496 variable.[ch] (scm_variable_set_name_hint, scm_builtin_variable),
8497 variable.h (SCM_VARVCELL, SCM_UDVARIABLEP, SCM_DEFVARIABLEP):
8498 Removed.
8499
8500 * dynl.c (scm_dynamic_link, scm_dynamic_func), error.c
8501 (scm_error_scm), filesys.c (scm_chown, scm_chmod, scm_open_fdes,
8502 scm_stat, scm_link, scm_rename, scm_delete_file, scm_mkdir,
8503 scm_rmdir, scm_opendir, scm_chdir, scm_symlink, scm_readlink,
8504 scm_lstat, scm_copy_file), fports.c (scm_open_file), ioext.c
8505 (scm_fdopen), net_db.c (scm_gethost, scm_getnet, scm_getproto,
8506 scm_getserv), ports.c (scm_truncate_file, scm_sys_make_void_port),
8507 posix.c (scm_getpwuid, scm_getgrgid, scm_execl, scm_execlp,
8508 scm_execle, scm_mkstemp, scm_utime, scm_access, scm_setlocale,
8509 scm_mknod, scm_crypt, scm_chroot, scm_getpass, scm_sethostname),
8510 regex-posix.c (scm_make_regexp, scm_regexp_exec), simpos.c
8511 (scm_system, scm_getenv), socket.c (scm_inet_aton), stime.c
8512 (setzone, scm_strftime, scm_strptime), vports.c
8513 (scm_make_soft_port): Remove calls to
8514 SCM_STRING_COERCE_0TERMINATION_X. Since the substring type is
8515 gone, all strings are 0-terminated anyway.
8516
8517 * dynl.h (LIBGUILE_DYNL_H, SCM_DYNL_H), random.h (RANDOMH,
8518 SCM_RANDOM_H): Renamed the macros that are defined to inhibit
8519 double inclusion of the same headers to the SCM_<filename>_H
8520 format.
8521
8522 * eval.c (SCM_CEVAL), gc.c (MARK, scm_gc_sweep), gh_data.c
8523 (gh_scm2chars), hash.c (scm_hasher), objects.c (scm_class_of),
8524 print.c (scm_iprin1): The type scm_tc7_substring does not exist
8525 any more.
8526
8527 * ports.h (SCM_PORTP, SCM_OPPORTP, SCM_OPINPORTP, SCM_OPOUTPORTP,
8528 SCM_INPUT_PORT_P, SCM_OUTPUT_PORT_P, SCM_OPENP), tags.h
8529 (SCM_TYP16_PREDICATE), variable.h (SCM_VARIABLEP): Prefer
8530 !SCM_<foo> over SCM_N<foo>.
8531
8532 2001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
8533
8534 * Makefile.am: Remove references to symbols-deprecated.c.
8535
8536 * symbols.c (scm_init_symbols): Don't initialize deprecated
8537 symbol functions.
8538
8539 * symbols-deprecated.c: Removed.
8540
8541 * fluids.[ch] (scm_internal_with_fluids), gsubr.[ch]
8542 (scm_make_gsubr, scm_make_gsubr_with_generic), hooks.[ch]
8543 (scm_create_hook), list.c (list*), list.h (SCM_LIST[0-9],
8544 scm_listify), list.[ch] (scm_sloppy_memq, scm_sloppy_memv,
8545 scm_sloppy_member), load.c (scm_end_of_file_key), load.[ch]
8546 (scm_read_and_eval_x), numbers.[ch] (scm_mkbig, scm_big2inum,
8547 scm_adjbig, scm_normbig, scm_copybig, scm_2ulong2big, scm_dbl2big,
8548 scm_big2dbl), numbers.h (SCM_FIXNUM_BIT), procs.h
8549 (scm_subr_entry, SCM_SUBR_DOC), procs.[ch] (scm_make_subr_opt,
8550 scm_make_subr, scm_make_subr_with_generic), root.c (setjmp_type,
8551 setjmp_type), root.[ch] (scm_call_catching_errors), smob.[ch]
8552 (scm_make_smob_type_mfpe, scm_set_smob_mfpe), strports.[ch]
8553 (scm_strprint_obj, scm_read_0str, scm_eval_0str), symbols.h
8554 (SCM_CHARS, SCM_UCHARS, SCM_SETCHARS, SCM_SLOPPY_SUBSTRP,
8555 SCM_SUBSTR_STR, SCM_SUBSTR_OFFSET, SCM_LENGTH_MAX, SCM_LENGTH,
8556 SCM_SETLENGTH, SCM_ROSTRINGP, SCM_ROLENGTH, SCM_ROCHARS,
8557 SCM_ROUCHARS, SCM_SUBSTRP, SCM_COERCE_SUBSTR, scm_strhash,
8558 scm_sym2vcell, scm_sym2ovcell_soft, scm_sym2ovcell,
8559 scm_intern_obarray_soft, scm_intern_obarray, scm_intern,
8560 scm_intern0, scm_sysintern, scm_sysintern0,
8561 scm_sysintern0_no_module_lookup, scm_symbol_value0,
8562 scm_string_to_obarray_symbol, scm_intern_symbol,
8563 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned_p,
8564 scm_symbol_bound_p, scm_symbol_set_x, scm_gentemp,
8565 scm_init_symbols_deprecated), vectors.c (s_vector_set_length_x),
8566 vectors.[ch] (scm_vector_set_length_x): Removed.
8567
8568 * fluids.h (FLUIDSH, SCM_FLUIDS_H), gsubr.c (GSUBRH, SCM_GSUBR_H),
8569 list.h (LISTH, SCM_LIST_H), load.h (LOADH, SCM_LOAD_H), root.h
8570 (ROOTH, SCM_ROOT_H), strports.h (STRPORTSH, SCM_STRPORTS_H):
8571 Renamed the macros that are defined to inhibit double inclusion of
8572 the same headers to the SCM_<filename>_H format.
8573
8574 * procs.h (SCM_CLOSUREP, SCM_PROCEDURE_WITH_SETTER_P), symbols.h
8575 (SCM_SYMBOLP), vectors.h (SCM_VECTORP): Prefer !SCM_<foo> over
8576 SCM_N<foo>.
8577
8578 2001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
8579
8580 * continuations.h (scm_contregs), debug.h (scm_debug_info,
8581 scm_debug_frame, SCM_DSIDEVAL), filesys.h (SCM_OPDIRP), fports.h
8582 (scm_fport), options.h (scm_option), snarf.h (SCM_CONST_LONG,
8583 SCM_VCELL, SCM_GLOBAL_VCELL, SCM_VCELL_INIT,
8584 SCM_GLOBAL_VCELL_INIT), srcprop.h (scm_srcprops,
8585 scm_srcprops_chunk), stacks.h (scm_info_frame, scm_stack), unif.h
8586 (scm_array, scm_array_dim, SCM_ARRAY_CONTIGUOUS, SCM_HUGE_LENGTH),
8587 validate.h (SCM_FUNC_NAME, SCM_WTA, RETURN_SCM_WTA,
8588 SCM_VALIDATE_NUMBER_COPY, SCM_VALIDATE_NUMBER_DEF_COPY,
8589 SCM_VALIDATE_STRINGORSUBSTR, SCM_VALIDATE_ROSTRING,
8590 SCM_VALIDATE_ROSTRING_COPY, SCM_VALIDATE_NULLORROSTRING_COPY,
8591 SCM_VALIDATE_RWSTRING, SCM_VALIDATE_OPDIR): Removed.
8592
8593 * continuations.h (CONTINUATIONSH, SCM_CONTINUATIONS_H), filesys.h
8594 (FILESYSH, SCM_FILESYS_H), fports.h (FPORTSH, SCM_FPORTS_H),
8595 options.h (OPTIONSH, SCM_OPTIONS_H), regex-posix.h (REGEXPOSIXH,
8596 SCM_REGEX_POSIX_H), snarf.h (LIBGUILE_SNARF_H, SCM_SNARF_H),
8597 srcprop.h (SCM_SOURCE_PROPERTIES_H, SCM_SRCPROP_H), unif.h
8598 (SCM_UNIFORM_VECTORS_H, SCM_UNIF_H), validate.h (SCM_VALIDATE_H__,
8599 SCM_VALIDATE_H): Renamed the macros that are defined to inhibit
8600 double inclusion of the same headers to the SCM_<filename>_H
8601 format.
8602
8603 * debug.h (SCM_RESET_DEBUG_MODE), regex-posix.h (SCM_RGXP),
8604 srcprop.h (SRCBRKP, PROCTRACEP), struct.h (SCM_STRUCTP),
8605 validate.h (SCM_VALIDATE_THUNK, SCM_VALIDATE_ARRAY,
8606 SCM_VALIDATE_VECTOR_OR_DVECTOR, SCM_VALIDATE_VTABLE): Prefer
8607 !SCM_<foo> over SCM_N<foo>.
8608
8609 2001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
8610
8611 * _scm.h (_SCMH, SCM__SCM_H), alist.h (ALISTH, SCM_ALIST_H),
8612 arbiters.h (ARBITERSH, SCM_ARBITERS_H), backtrace.h (BACKTRACEH,
8613 SCM_BACKTRACE_H), boolean.h (BOOLEANH, SCM_BOOLEAN_H), chars.h
8614 (SCM_CHARSH, SCM_CHARS_H), coop-defs.h (COOP_DEFSH,
8615 SCM_COOP_DEFS_H), coop-threads.h (COOP_THREADSH,
8616 SCM_COOP_THREADS_H), debug-malloc.h (DEBUGMALLOCH,
8617 SCM_DEBUG_MALLOC_H), dynwind.h (DYNWINDH, SCM_DYNWIND_H),
8618 environments.h (ENVIRONMENTS_H, SCM_ENVIRONMENTS_H), eq.h (EQH,
8619 SCM_EQ_H), evalext.h (EVALEXTH, SCM_EVALEXT_H), extensions.h
8620 (LIBGUILE_EXTENSIONS_H, SCM_EXTENSIONS_H), feature.h (FEATUREH,
8621 SCM_FEATURE_H), gdbint.h (GDBINTH, SCM_GDBINT_H), guardians.h
8622 (SCM_GUARDIANH, SCM_GUARDIANS_H), hash.h (HASHH, SCM_HASH_H),
8623 hashtab.h (HASHTABH, SCM_HASHTAB_H), init.h (INITH, SCM_INIT_H),
8624 ioext.h (IOEXTH, SCM_IOEXT_H), iselect.h (ISELECTH,
8625 SCM_ISELECT_H), keywords.h (KEYWORDSH, SCM_KEYWORDS_H), lang.h
8626 (LANGH, SCM_LANG_H), mallocs.h (MALLOCSH, SCM_MALLOCS_H), net_db.h
8627 (SCM_NETDBH, SCM_NET_DB_H), objprop.h (OBJPROPH, SCM_OBJPROP_H),
8628 posix.h (POSIXH, SCM_POSIX_H), procprop.h (PROCPROPH,
8629 SCM_PROCPROP_H), properties.h (PROPERTIES_H, SCM_PROPERTIES_H),
8630 ramap.h (RAMAPH, SCM_RAMAP_H), rdelim.h (SCM_RDELIM,
8631 SCM_RDELIM_H), read.h (READH, SCM_READ_H), rw.h (SCM_RW,
8632 SCM_RW_H), scmsigs.h (SCMSIGSH, SCM_SCMSIGS_H), script.h (SCRIPTH,
8633 SCM_SCRIPT_H), simpos.h (SIMPOSH, SCM_SIMPOS_H), socket.h
8634 (SCM_SOCKETH, SCM_SOCKET_H), sort.h (SORTH, SCM_SORT_H),
8635 stackchk.h (STACKCHKH, SCM_STACKCHK_H), stime.h (STIMEH,
8636 SCM_STIME_H), strop.h (STROPH, SCM_STROP_H), strorder.h
8637 (STRORDERH, SCM_STRORDER_H), threads.h (THREADSH, SCM_THREADS_H),
8638 throw.h (THROWH, SCM_THROW_H), version.h (VERSIONH,
8639 SCM_VERSION_H), vports.h (VPORTSH, SCM_VPORTS_H): Renamed
8640 the macros that are defined to inhibit double inclusion of the
8641 same headers to the SCM_<filename>_H format.
8642
8643 2001-08-27 Marius Vollmer <mvo@zagadka.ping.de>
8644
8645 * ports.c, ports.h, fprots.c, gc.c, ioext.c: Replaced
8646 "scm_t_portable" with "scm_port_table" which was an artifact from
8647 the great "scm_*_t -> scm_t_" renaming.
8648
8649 2001-08-25 Thien-Thi Nguyen <ttn@revel.glug.org>
8650
8651 * gc_os_dep.c (GC_noop1): Move before `GC_find_limit' where it is
8652 used; nfc. Thanks to Bill Schottstaedt.
8653
8654 * validate.h (SCM_VALIDATE_USHORT_COPY, SCM_VALIDATE_SHORT_COPY,
8655 SCM_VALIDATE_UINT_COPY, SCM_VALIDATE_INT_COPY): New macros.
8656 Thanks to Chris Cramer.
8657
8658 2001-08-25 Marius Vollmer <mvo@zagadka.ping.de>
8659
8660 * Makefile.am (AUTOMAKE_OPTIONS): Change "foreign" to "gnu".
8661
8662 * eval.c (scm_m_atbind): Redesigned to behvae like `let', but with
8663 dynamic scope.
8664 * dynwind.h (scm_swap_bindings): Declare.
8665 * dynwind.c (scm_swap_bindings): Make non-static.
8666
8667 2001-08-25 Michael Livshin <mlivshin@bigfoot.com>
8668
8669 * gc.c (scm_gc_sweep): now can sweep unreachable variables (by
8670 doing exactly nothing about them). thanks Neil!
8671
8672 2001-08-18 Neil Jerram <neil@ossau.uklinux.net>
8673
8674 * __scm.h (SCM_ENABLE_VCELLS): Fix spelling mistake in comment.
8675
8676 2001-08-17 Thien-Thi Nguyen <ttn@revel.glug.org>
8677
8678 * gc.c: Fix omission bug: Add `heap_segment' forward decl
8679 (proto) in the case when either `GUILE_DEBUG' or
8680 `GUILE_DEBUG_FREELIST' preprocessor symbols are defined.
8681
8682 (map_free_list): Fix typo: Ref `f' correctly.
8683
8684 Thanks to Chris Cramer.
8685
8686 2001-08-15 Rob Browning <rlb@defaultvalue.org>
8687
8688 * Makefile.am (libguile_la_LDFLAGS): use libtool interface version
8689 variables.
8690 (libpath.h): change libguileversion to libguileinterface.
8691
8692 2001-08-07 Marius Vollmer <mvo@zagadka.ping.de>
8693
8694 * Makefile.am (EXTRA_DIST): Distribute ChangeLog-1996-1999 and
8695 ChangeLog-2000. Thanks to Daniel Skarda!
8696
8697 2001-08-07 Michael Livshin <mlivshin@bigfoot.com>
8698
8699 * guile-snarf-docs-texi.in: don't call the tokenizer here, we now
8700 do it from the Makefile.
8701
8702 * Makefile.am: rearrange the snarfing slightly, so that .doc files
8703 are of a reasonable size.
8704
8705 2001-08-02 Neil Jerram <neil@ossau.uklinux.net>
8706
8707 * stacks.c (scm_make_stack): Improve docstring by explaining use
8708 of cutting args.
8709
8710 2001-08-01 Marius Vollmer <mvo@zagadka.ping.de>
8711
8712 * chars.c (scm_char_alphabetic_p, scm_char_numeric_p,
8713 scm_char_whitespace_p, scm_char_upper_case_p,
8714 scm_char_lower_case_p, scm_char_is_both_p): Do not require
8715 characters to fulfill isascii in addition to the primary
8716 predicate.
8717
8718 2001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
8719
8720 * numbers.c (DIGITS, scm_small_istr2int, scm_istr2int,
8721 scm_istr2flo, scm_istring2number): Removed.
8722
8723 (iflo2str, scm_real_p, scm_integer_p): Use SCM_<foo> instead of
8724 SCM_SLOPPY_<foo>.
8725
8726 (t_exactness, t_radix, DIGIT2UINT, XDIGIT2UINT, mem2uinteger,
8727 mem2decimal_from_point, mem2ureal, mem2complex, scm_i_mem2number):
8728 Added.
8729
8730 (scm_string_to_number): Use new number parser.
8731
8732 (scm_exact_to_inexact): Replace dummy by a GPROC, which also
8733 handles complex numbers.
8734
8735 * numbers.h (NUMBERSH, SCM_NUMBERS_H): Rename <foo>H to
8736 SCM_<foo>_H.
8737
8738 (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Prefer !SCM_<pred> over
8739 SCM_N<pred>.
8740
8741 (scm_istr2int, scm_istr2flo, scm_istring2number): Removed.
8742
8743 (scm_i_mem2number): Added.
8744
8745 (scm_exact_to_inexact): Changed signature.
8746
8747 * read.c (scm_lreadr): Perform the shortcut test for '+ and '-
8748 here instead of within scm_i_mem2number. Call scm_i_mem2number
8749 instead of scm_istr2int and scm_istring2number.
8750
8751 2001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
8752
8753 * eval.c (scm_lookupcar, scm_m_body, scm_m_lambda, unmemocopy,
8754 scm_unmemocopy, scm_badargsp, scm_eval_body, CHECK_EQVISH,
8755 SCM_CEVAL, scm_nconc2last, SCM_APPLY, scm_copy_tree): Prefer
8756 !SCM_<pred> over SCM_N<pred>.
8757
8758 (scm_eval_body): Remove side effecting code from macro call.
8759
8760 (SCM_CEVAL, SCM_APPLY): Remove goto statement and redundant
8761 SCM_NIMP test.
8762
8763 2001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
8764
8765 * pairs.h (SCM_VALIDATE_PAIR): Use SCM_CONSP, not SCM_ECONSP.
8766
8767 2001-07-29 Marius Vollmer <mvo@zagadka.ping.de>
8768
8769 Removed vcell slot from structs.
8770
8771 * struct.h (scm_vtable_index_vcell): Removed. Renumbered
8772 subsequent indices.
8773
8774 * struct.c (scm_struct_vtable_p): Do not check vcell slot for
8775 zero. Use scm_vtable_index_layout instead of "0" when accessing
8776 said slot.
8777 (scm_init_struct): Remove vcell slot layout code from
8778 required_vtable_fields.
8779
8780 * objects.h (scm_si_redefined, scm_si_hashsets): Renumbered.
8781
8782 * goops.c (build_class_class_slots): Removed vcell slot
8783 definition.
8784
8785 * goops.h: Renumbered slot indices. (SCM_CLASS_CLASS_LAYOUT):
8786 Removed vcell slot layout code.
8787 (scm_si_vcell): Removed.
8788
8789 2001-07-26 Marius Vollmer <mvo@zagadka.ping.de>
8790
8791 "Glocs" have been removed.
8792
8793 * tags.h: Update tag system docs.
8794 (scm_tc3_cons_gloc): Renamed to scm_tc3_struct. Changed all uses.
8795 (scm_tcs_cons_gloc): Renamed to scm_tcs_struct. Changed all uses.
8796 (SCM_ECONSP, SCM_NECONSP): Removed. Changed all uses to SCM_CONSP
8797 or SCM_NCONSP, respectively.
8798
8799 * struct.c, struct.h, srcprop.c, procs.c, procprop.c, print.c,
8800 objects.c. modules.c, goops.c, eval.c, debug.c: Changed all uses
8801 of scm_tc3_cond_gloc and scm_tcs_cons_gloc. See above.
8802
8803 * print.c (scm_iprin1): Remove printing of glocs. Do not try to
8804 tell glocs from structs.
8805
8806 * gc.c (scm_gc_mark, scm_gc_sweep): Remove handling of glocs.
8807
8808 * eval.c (scm_m_atbind): Make a list of variables, not glocs.
8809 (scm_ceval, scm_deval): For SCM_IM_BIND, fiddle with variables
8810 instead of with glocs.
8811 (EVALCAR): Do not test for glocs.
8812 (scm_lookupcar, scm_lookupcar1): Do not handle glocs in race
8813 condition.
8814 (scm_unmemocar): Do not handle glocs.
8815 (scm_m_atfop): Memoize as a variable, not as a gloc.
8816 (scm_eval_args, scm_deval_args): Do not handle glocs.
8817 (scm_ceval, scm_deval): Likewise.
8818
8819 * eval.h (SCM_XEVALCAR): Do not test for glocs.
8820 (SCM_GLOC_VAR, SCM_GLOC_VAL, SCM_GLOC_SET_VAL, SCM_GLOC_VAL_LOC):
8821 Removed.
8822
8823 * debug.h, debug.c (scm_make_gloc, scm_gloc_p): Removed.
8824
8825 * dynwind.c (scm_swap_bindings): Likewise.
8826 (scm_dowinds): Updated to recognize lists of variables instead of
8827 lists of glocs.
8828
8829 * __scm.h (SCM_CAUTIOS, SCM_RECKLESS): Update comments.
8830
8831
8832 * gc_os_dep.c (GC_noop1): Moved into the same #if/#endif context
8833 where it is needed.
8834
8835 2001-07-25 Gary Houston <ghouston@arglist.com>
8836
8837 * numbers.c (scm_logand, scm_logior, scm_logxor): adjusted the
8838 docstrings to reflect the n-ary implementation.
8839
8840 2001-07-26 Marius Vollmer <mvo@zagadka.ping.de>
8841
8842 * eval.c (scm_ceval, scm_deval): Use "RETURN" macro when returning
8843 value of a variable, not the plain "return" statement.
8844
8845 2001-07-25 Marius Vollmer <mvo@zagadka.ping.de>
8846
8847 * eval.c: Allow variables in memoized code (in addition to glocs).
8848 (scm_lookupcar): Handle variables in lost races. Replace symbol
8849 with variable directly, do not make a gloc.
8850 (scm_unmemocar): Rewrite variables using a reverse lookup, just
8851 like glocs.
8852 (scm_ceval, scm_deval): Deal with variables in SCM_IM_SET and in
8853 the main switch.
8854
8855 2001-07-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
8856
8857 * variable.c (scm_i_variable_print): Use "value" instead of
8858 "binding" since a binding is the mapping between symbols and
8859 variables, not between variables and their values.
8860
8861 * tags.h (scm_tc7_variable): New.
8862 * gc.c (scm_gc_mark): Handle scm_tc7_variable objects.
8863 * print.c (scm_iprin1): Likewise.
8864
8865 * variable.h (scm_tc16_variable): Removed.
8866 (SCM_VARIABLEP): Test for new tc7 code.
8867 (scm_i_variable_print): New.
8868 * variable.c (scm_tc16_variable): Removed.
8869 (variable_print): Renamed to scm_i_variable_print and made
8870 non-static.
8871 (variable_equal_p): Removed.
8872 (make_variable): Construct a tc7 object instead of a smob.
8873 (scm_init_variable): Do not register smob.
8874
8875 2001-07-22 Marius Vollmer <mvo@zagadka.ping.de>
8876
8877 * tags.h: Include inttypes.h when we have it.
8878
8879 2001-07-13 Marius Vollmer <mvo@zagadka.ping.de>
8880
8881 * tags.h (SCM_UNBOUND): Make it the 34th isym/iflag, the 33th slot
8882 is taken by the new SCM_IM_CALL_WITH_VALUES.
8883 * print.c (scm_isymnames): Update table accordingly.
8884
8885 2001-07-22 Gary Houston <ghouston@arglist.com>
8886
8887 * regex-posix.c (s_scm_regexp_exec): use scm_long2num not
8888 SCM_MAKINUM to convert regoff_t value to SCM.
8889
8890 2001-07-21 Gary Houston <ghouston@arglist.com>
8891
8892 * scmsigs.c: include sys/time.h for itimer stuff.
8893
8894 2001-07-19 Rob Browning <rlb@defaultvalue.org>
8895
8896 * gc_os_dep.c (GC_noop1): ifdef out (unused) to quiet warning.
8897
8898 * c-tokenize.lex: add option %nounput to quiet warning.
8899 Add prototype for yylex to quiet warning.
8900
8901 * scmconfig.h.in: add flags for setitimer and getitimer.
8902
8903 * scmsigs.h (scm_init_scmsigs): new prototype.
8904 (scm_init_scmsigs): new prototype.
8905
8906 * scmsigs.c (s_scm_setitimer): new function.
8907 (s_scm_setitimer): new function.
8908
8909 2001-07-18 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
8910
8911 * alist.c, arbiters.c, async.h, backtrace.h, boolean.c, chars.c,
8912 chars.h, continuations.h, debug-malloc.h, dynl.c, feature.c,
8913 feature.h, filesys.h, fluids.h, fports.h, gc_os_dep.c,
8914 gdb_interface.h, gh_eval.c, gh_funcs.c, gh_io.c, gh_list.c,
8915 gh_predicates.c, gsubr.c, gsubr.h, guardians.h,
8916 guile-func-name-check.in, guile-snarf-docs-texi.in,
8917 guile-snarf-docs.in, guile-snarf.awk.in, guile-snarf.in,
8918 hashtab.h, iselect.h, keywords.h, lang.c, list.h, load.h,
8919 objprop.c, objprop.h, options.c, options.h, random.h,
8920 regex-posix.h, root.c, root.h, script.c, snarf.h, stackchk.c,
8921 strerror.c, strop.h, strports.h, threads.h, values.c, values.h,
8922 version.c, version.h: Updated copyright notice.
8923
8924 2001-07-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
8925
8926 * goops.c (sym_layout, sym_vcell, sym_vtable, sym_print,
8927 sym_procedure, sym_setter, sym_redefined, sym_h0, sym_h1, sym_h2,
8928 sym_h3, sym_h4, sym_h5, sym_h6, sym_h7, sym_name,
8929 sym_direct_supers, sym_direct_slots, sym_direct_subclasses,
8930 sym_direct_methods, sym_cpl, sym_default_slot_definition_class,
8931 sym_slots, sym_getters_n_setters, sym_keyword_access, sym_nfields,
8932 sym_environment, scm_sym_change_class): New static variables to
8933 hold predefined symbols.
8934
8935 (build_class_class_slots): Build the list using scm_list_n
8936 instead of cons. Also, slots are already created as lists, thus
8937 making a call to maplist unnecessary.
8938
8939 (scm_class_name, scm_class_direct_supers, scm_class_direct_slots,
8940 scm_class_direct_subclasses, scm_class_direct_methods,
8941 scm_class_precedence_list, scm_class_slots, scm_class_environment,
8942 scm_method_procedure, create_standard_classes, purgatory): Use
8943 predefined symbols.
8944
8945 (build_slots_list, compute_getters_n_setters,
8946 scm_sys_initialize_object, scm_sys_inherit_magic_x,
8947 get_slot_value_using_name, set_slot_value_using_name,
8948 scm_sys_invalidate_method_cache_x, scm_generic_capability_p,
8949 scm_compute_applicable_methods, scm_sys_method_more_specific_p,
8950 make_struct_class): Prefer !SCM_<pred> over SCM_N<pred>.
8951
8952 (scm_sys_prep_layout_x): Minimize variable scopes.
8953
8954 (scm_sys_prep_layout_x, scm_sys_fast_slot_ref,
8955 scm_sys_fast_slot_set_x): Fix signedness.
8956
8957 (go_to_hell, go_to_heaven, purgatory, scm_change_object_class,
8958 lock_cache_mutex, unlock_cache_mutex, call_memoize_method,
8959 scm_memoize_method, scm_wrap_object): Use packing and unpacking
8960 when converting to and from SCM values.
8961
8962 (scm_enable_primitive_generic_x): Add rest argument checking.
8963
8964 (map, filter_cpl, maplist, scm_sys_initialize_object,
8965 scm_sys_prep_layout_x, slot_definition_using_name,
8966 scm_enable_primitive_generic_x, scm_compute_applicable_methods,
8967 call_memoize_method, scm_make, scm_make_class): Prefer explicit
8968 predicates over SCM_N?IMP tests.
8969
8970 (scm_sys_prep_layout_x): Fix typo in error message. Fix type
8971 checking.
8972
8973 (burnin, go_to_hell): Use SCM_STRUCT_DATA instead of the SCM_INST
8974 alias.
8975
8976 2001-07-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
8977
8978 * fports.c (fport_print): Don't use SCM_C[AD]R for non pairs.
8979
8980 * num2integral.i.c (INTEGRAL2NUM, INTEGRAL2BIG): Fix signedness.
8981
8982 * symbols-deprecated.c (scm_gentemp): Simplify vector test.
8983
8984 * vectors.c (scm_vector_p): Eliminate redundant IMP test.
8985
8986 2001-07-12 Michael Livshin <mlivshin@bigfoot.com>
8987
8988 * strings.c (s_scm_string): fix arg position in assert.
8989
8990 2001-07-11 Gary Houston <ghouston@arglist.com>
8991
8992 * strports.c (st_write): use memcpy, not strncpy. thanks to
8993 Dale P. Smith.
8994
8995 2001-07-09 Thien-Thi Nguyen <ttn@revel.glug.org>
8996
8997 * alist.c, alloca.c, arbiters.c, async.c, async.h, backtrace.c,
8998 boolean.c, chars.c, continuations.c, coop-defs.h, coop-threads.c,
8999 debug-malloc.h, debug.c, debug.h, dynl.c, dynwind.c, eq.c,
9000 error.c, eval.c, evalext.c, feature.c, feature.h, filesys.c,
9001 filesys.h, fluids.c, fluids.h, fports.c, fports.h, gc.c, gc.h,
9002 gdbint.c, gsubr.c, guardians.c, hash.c, hashtab.c, hooks.c,
9003 hooks.h, inet_aton.c, init.c, ioext.c, keywords.c, keywords.h,
9004 lang.c, list.c, load.c, macros.c, mallocs.c, memmove.c, modules.c,
9005 net_db.c, numbers.c, numbers.h, objects.c, objprop.c, options.c,
9006 pairs.c, pairs.h, ports.c, ports.h, posix.c, print.c, print.h,
9007 procprop.c, procs.c, procs.h, properties.c, putenv.c, ramap.c,
9008 random.c, random.h, read.c, regex-posix.c, regex-posix.h, root.c,
9009 root.h, scmsigs.c, script.c, simpos.c, smob.c, snarf.h, socket.c,
9010 sort.c, srcprop.c, srcprop.h, stackchk.c, stacks.c, stacks.h,
9011 stime.c, strerror.c, strings.c, strings.h, strop.c, strorder.c,
9012 strports.c, struct.c, struct.h, symbols-deprecated.c, symbols.c,
9013 symbols.h, tags.h, threads.c, threads.h, throw.c, unif.c, unif.h,
9014 variable.c, variable.h, vectors.c, vectors.h, version.c, vports.c,
9015 weaks.c, weaks.h: Remove "face-lift" comment.
9016
9017 2001-07-08 Rob Browning <rlb@defaultvalue.org>
9018
9019 * .cvsignore: add stamp-h.in.
9020
9021 2001-07-04 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9022
9023 * hooks.c (scm_make_hook, scm_add_hook_x),
9024 (scm_remove_hook_x, scm_reset_hook_x, scm_run_hook): Added return
9025 value info to the docstrings.
9026
9027 2001-07-03 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9028
9029 Some more compatibility patches for Windows.
9030
9031 * posix.c (getlogin): getlogin() implementation for Windows.
9032
9033 * backtrace.c, ioext.c: Include <stdio.h>.
9034
9035 * unif.c, script.c, rw.c, error.c: Include <io.h>, if it does
9036 exist.
9037
9038 * cpp_sig_symbols.in: Added SIGBREAK.
9039
9040 2001-07-01 Marius Vollmer <mvo@zagadka.ping.de>
9041
9042 * strports.c (scm_read_0str, scm_eval_0str): Call
9043 scm_c_read_string and scm_c_eval_string respectively, not
9044 themselves. Thanks to Dale P. Smith!
9045
9046 2001-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
9047
9048 * unif.c (scm_array_set_x): The variable args does not
9049 necessarily have to be a list. Further, got rid of a redundant
9050 SCM_NIMP test.
9051
9052 2001-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
9053
9054 * list.c (SCM_I_CONS): Make sure the cell type is initialized
9055 last.
9056
9057 * gc.c (s_scm_map_free_list, scm_igc, scm_gc_sweep,
9058 init_heap_seg): Fixed signedness.
9059
9060 (init_heap_seg): Replaced strange for-loop with a while loop.
9061
9062 * weaks.h (WEAKSH, SCM_WEAKS_H): Rename <foo>H to SCM_<foo>_H.
9063
9064 (SCM_WVECTP): Prefer !SCM_<pred> over SCM_N<pred>.
9065
9066 The following patch adds conservative marking for the elements of
9067 free or allocated cells.
9068
9069 * gc.c (allocated_mark, heap_segment): New static functions.
9070
9071 (which_seg): Deleted, since the functionality is now provided by
9072 function heap_segment.
9073
9074 (map_free_list): Use heap_segment instead of which_seg.
9075
9076 (MARK): If cell debugging is disabled, mark free cells
9077 conservatively.
9078
9079 (scm_mark_locations, scm_cellp): Extracted the search for the
9080 heap segment of a SCM value into function heap_segment.
9081
9082 (scm_init_storage): Allocated cells must be marked
9083 conservatively.
9084
9085 * gc.[ch] (scm_gc_mark_cell_conservatively): New function.
9086
9087 The following patch changes the representation of weak vectors to
9088 double cells instead of using an extension of the vector's
9089 allocated memory.
9090
9091 * gc.c (MARK): Use SCM_SET_WVECT_GC_CHAIN instead of assigning to
9092 the result of SCM_WVECT_GC_CHAIN.
9093
9094 (scm_gc_sweep): Weak vectors don't have extra fields any more.
9095
9096 * weaks.c (allocate_weak_vector): New static function. It does
9097 not patch any previously created vector object during the
9098 construction of a weak vector, and thus doesn't need to switch
9099 off interrupts during vector creation.
9100
9101 (scm_make_weak_vector, scm_make_weak_key_hash_table,
9102 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
9103 Use allocate_weak_vector to provide the new weak vector object.
9104
9105 * weaks.h (SCM_WVECT_TYPE, SCM_SET_WVECT_TYPE,
9106 SCM_SET_WVECT_GC_CHAIN): New macros. The weak vector subtype is
9107 now stored in the double cell.
9108
9109 (SCM_IS_WHVEC, SCM_IS_WHVEC_V, SCM_IS_WHVEC_B, SCM_IS_WHVEC_ANY):
9110 Use SCM_WVECT_TYPE.
9111
9112 (SCM_WVECT_GC_CHAIN): The weak objects are now chained together
9113 using an entry of the double cell.
9114
9115 2001-06-30 Thien-Thi Nguyen <ttn@revel.glug.org>
9116
9117 * stamp-h.in: bye bye
9118
9119 2001-06-30 Marius Vollmer <mvo@zagadka.ping.de>
9120
9121 * gh_eval.c (gh_eval_str): Use scm_c_eval_string instead of
9122 scm_eval_0str.
9123
9124 * load.c, load.h (scm_c_primitive_load,
9125 scm_c_primitive_load_path): New.
9126
9127 * strports.c, strports.h (scm_c_read_string): Renamed from
9128 scm_read_0str. Also, added "const" qualifier to argument.
9129 (scm_c_eval_string): Renamed from scm_eval_0str.
9130 (scm_read_0str, scm_eval_0str): Deprecated.
9131
9132 2001-06-28 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9133
9134 * fluids.c (scm_c_with_fluid): Use scm_list_1() instead of
9135 SCM_LIST1.
9136
9137 2001-06-28 Keisuke Nishida <kxn30@po.cwru.edu>
9138
9139 * list.h (scm_list_1, scm_list_2, scm_list_3, scm_list_4, scm_list_5,
9140 scm_list_n): New functions.
9141 (SCM_LIST0, SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5,
9142 SCM_LIST6, SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify): Deprecated.
9143 (lots of files): Use the new functions.
9144
9145 * goops.c (CALL_GF1, CALL_GF2, CALL_GF3, CALL_GF4): Use scm_call_N.
9146
9147 * strings.c: #include "libguile/deprecation.h".
9148
9149 2001-06-27 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9150
9151 * read.c (scm_lreadr): When reading a hash token, check for a
9152 user-defined hash procedure first, so that overriding the builtin
9153 hash characters is possible (this was needed for implementing
9154 SRFI-4's read synax `f32(...)').
9155
9156 * num2integral.i.c: Use scm_t_signed_bits instead of scm_t_bits,
9157 because the latter is unsigned now and breaks comparisons like
9158 (n < (scm_t_signed_bits)MIN_VALUE).
9159
9160 2001-06-26 Neil Jerram <neil@ossau.uklinux.net>
9161
9162 * eval.h, eval.c (scm_call_4): New function.
9163
9164 * eval.c (SCM_APPLY, SCM_CEVAL, ENTER_APPLY): Call trap handlers
9165 directly rather than dispatching to them via scm_ithrow and a lazy
9166 catch.
9167
9168 * eval.c (scm_evaluator_trap_table), eval.h (SCM_ENTER_FRAME_HDLR,
9169 SCM_APPLY_FRAME_HDLR, SCM_EXIT_FRAME_HDLR): Add three new options
9170 for trap handler procedures.
9171
9172 * debug.h (SCM_RESET_DEBUG_MODE): Add checks for trap handler
9173 procedures not being #f.
9174
9175 2001-06-27 Michael Livshin <mlivshin@bigfoot.com>
9176
9177 * Makefile.am (c-tokenize.c): add rule to generate it.
9178 (EXTRA_DIST): add c-tokenize.lex, so it gets distributed.
9179
9180 filter-doc-snarfage.c: remove.
9181
9182 2001-06-26 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9183
9184 * ports.c (scm_output_port_p): Use result of SCM_COERCE_OUTPORT.
9185
9186 The following set of changes makes compiling Guile under various
9187 Windows compilers easier. Compilation under GNU systems should
9188 not be affected at all.
9189
9190 Thanks to Stefan Jahn for all necessary information, patches and
9191 testing.
9192
9193 * posix.c: Conditialize getpwent, getgrent, kill, getppid, getuid,
9194 getpgrp, ttyname, primitive-fork and some header inclusion for
9195 Windows.
9196
9197 * random.c: Define M_PI, if not predefined and use __int64 for
9198 LONG64 under Windows.
9199
9200 * scmsigs.c: Emulate some functions (alarm, sleep, kill) under
9201 Windows and conditionalize some signal names.
9202
9203 * socket.c (scm_getsockopt): Added missing comma.
9204 Include socket library header under Windows.
9205
9206 * stime.c (CLKTCK): Add cast to int, to make it compile under
9207 Windows.
9208
9209 * ports.c (truncate): New function, compiled only under Windows.
9210
9211 * net_db.c: Do not declare errno under Windows.
9212
9213 * iselect.h, inet_aton.c: Include socket library headers under
9214 Windows.
9215
9216 * guile.c (inner_main): Under Windows, initialize socket library
9217 and initialize gdb_interface data structures.
9218
9219 * gdb_interface.h: Under Windows, gdb_interface cannot be
9220 initialized statically. Initialize at runtime instead.
9221
9222 * fports.c (write_all): ssize_t -> size_t.
9223 (fport_print): Conditionalize call to ttyname().
9224 (getflags): New function, compiled only under Windows.
9225
9226 * filesys.c: Conditionalize inclusion of <pwd.h>. Conditionalize
9227 primitives chown, link, fcntl.
9228 (scm_basename, scm_dirname): Under Windows, handle \ as well as /
9229 as path seperator.
9230
9231 * backtrace.c: Include <io.h> under Windows.
9232
9233 * async.h (ASYNCH, SCM_ASYNC_H): Rename <foo>H to SCM_<foo>_H.
9234
9235 * _scm.h: Added preprocessor conditional for __MINGW32__ for errno
9236 declaration.
9237
9238 2001-06-27 Keisuke Nishida <kxn30@po.cwru.edu>
9239
9240 * eval.c (scm_call_0, scm_call_1, scm_call_2, scm_call_3,
9241 scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3): New functions.
9242 * eval.h (scm_call_0, scm_call_1, scm_call_2, scm_call_3,
9243 scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3): Declared.
9244 * async.c (scm_run_asyncs), coop-threads.c (scheme_body_bootstrip,
9245 scheme_handler_bootstrip), debug.c (with_traps_inner), dynwind.c
9246 (scm_dynamic_wind, scm_dowinds), environments.c
9247 (import_environment_conflict), eval.c (scm_macroexp, scm_force,
9248 scm_primitive_eval_x, scm_primitive_eval), fluids.c (apply_thunk),
9249 goops.c (GETVAR, purgatory, make_class_from_template,
9250 scm_ensure_accessor), hashtab.c (scm_ihashx, scm_sloppy_assx,
9251 scm_delx_x, fold_proc), hooks.c (scm_c_run_hook), load.c
9252 (scm_primitive_load), modules.c (scm_resolve_module,
9253 scm_c_define_module, scm_c_use_module, scm_c_export,
9254 module_variable, scm_eval_closure_lookup, scm_sym2var,
9255 scm_make_module, scm_ensure_user_module, scm_load_scheme_module),
9256 ports.c (scm_port_for_each), print.c (scm_printer_apply),
9257 properties.c (scm_primitive_property_ref), ramap.c (ramap,
9258 ramap_cxr, rafe, scm_array_index_map_x, read.c (scm_lreadr),
9259 scmsigs.c (sys_deliver_signals), sort.c (applyless), strports.c
9260 (scm_object_to_string, scm_call_with_output_string,
9261 scm_call_with_input_string), throw.c (scm_body_thunk,
9262 scm_handle_by_proc, hbpca_body), unif.c (scm_make_shared_array,
9263 scm_make_shared_array), vports.c (sf_flush, sf_write,
9264 sf_fill_input, sf_close): Use one of the above functions.
9265 * goops.c, hashtab.c, scmsigs.c, sort.c: #include "libguile/root.h".
9266
9267 2001-06-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
9268
9269 * filesys.c (scm_close), ports.c (scm_close_port,
9270 scm_port_closed_p), strop.c (scm_string_null_p): Use SCM_BOOL
9271 instead of SCM_NEGATE_BOOL.
9272
9273 * filesys.c (scm_stat): Clean up type dispatch.
9274
9275 * filesys.c (scm_stat), ports.c (scm_input_port_p,
9276 scm_output_port_p): Get rid of redundant IM type check.
9277
9278 * filesys.c (scm_readdir, scm_getcwd, scm_readlink), gh_data.c
9279 (gh_str2scm), load.c (scm_primitive_load, scm_internal_parse_path,
9280 scm_search_path), net_db.c (scm_gethost, scm_getnet, scm_getproto,
9281 scm_return_entry), numbers.c (scm_number_to_string), objects.c
9282 (scm_make_subclass_object), ports.c (scm_port_mode), read.c
9283 (scm_lreadr), simpos.c (scm_getenv), socket.c (scm_inet_ntoa,
9284 scm_addr_vector), stime.c (scm_strftime), strings.c
9285 (scm_makfromstrs, scm_makfrom0str, scm_substring), strings.h
9286 (SCM_STRING_COERCE_0TERMINATION_X), strop.c (string_copy,
9287 scm_string_split), strports.c (scm_strport_to_string), symbols.c
9288 (scm_symbol_to_string), vports.c (sf_write): Use scm_mem2string
9289 instead of scm_makfromstr.
9290
9291 * net_db.c (scm_sethost, scm_setnet, scm_setproto, scm_setserv),
9292 ports.c (scm_close_all_ports_except), read.c (scm_lreadr,
9293 scm_read_hash_extend), stime.c (scm_strftime), strings.c
9294 (scm_string_append, scm_string), strings.h (SCM_STRINGP,
9295 SCM_STRING_COERCE_0TERMINATION_X, SCM_RWSTRINGP), strop.c
9296 (string_capitalize_x): Prefer explicit type check over SCM_N?IMP,
9297 !SCM_<pred> over SCM_N<pred>.
9298
9299 * strings.[ch] (scm_makfromstr): Deprecated.
9300
9301 (scm_mem2string): New function, replaces scm_makfromstr.
9302
9303 * strings.c (scm_substring), strop.c (string_copy,
9304 scm_string_split), strports.c (scm_strport_to_string), symbols.c
9305 (scm_symbol_to_string): Fix gc problem.
9306
9307 * strings.h (STRINGSH, SCM_STRINGS_H): Rename <foo>H to
9308 SCM_<foo>_H.
9309
9310 * validate.h (SCM_VALIDATE_SUBSTRING_SPEC_COPY): Eliminate
9311 warning about comparing signed and unsigned values. This fix is
9312 not optimal, since it won't work reliably if sizeof (c_start) >
9313 sizeof (size_t) or sizeof (c_end) > sizeof (size_t). A better
9314 solution is to define this macro as an inline function, thus
9315 allowing to specifiy the types of c_start and c_end.
9316
9317 2001-06-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
9318
9319 * debug.h (SCM_DEBUGOBJ_FRAME): Deliver result as a
9320 scm_t_debug_frame*.
9321
9322 * debug.h (DEBUGH, SCM_DEBUG_H), stacks.h (STACKSH, SCM_STACKSH):
9323 Rename <foo>H to SCM_<foo>_H.
9324
9325 * stacks.c (NEXT_FRAME, narrow_stack): Prefer explicit type check
9326 over SCM_N?IMP, !SCM_<pred> over SCM_N<pred>.
9327
9328 (narrow_stack): Make i unsigned. Don't use side-effecting
9329 operations in conditions.
9330
9331 (narrow_stack, scm_make_stack, scm_stack_id,
9332 scm_last_stack_frame): Get rid of redundant SCM_N?IMP checks.
9333
9334 (scm_make_stack, scm_stack_id, scm_last_stack_frame): Clean up
9335 type dispatch. No need to cast result of SCM_DEBUGOBJ_FRAME any
9336 more.
9337
9338 (scm_stack_ref, scm_frame_previous, scm_frame_next): Fix
9339 signedness.
9340
9341 (scm_last_stack_frame): Remove bogus `;´.
9342
9343 * stacks.h (SCM_FRAMEP): Fix type check.
9344
9345 2001-06-25 Michael Livshin <mlivshin@bigfoot.com>
9346
9347 * Makefile.am (MAINTAINERCLEANFILES): be sure to remove
9348 c-tokenize.c when doing maintainer-clean.
9349
9350 * snarf.h (SCM_SNARF_DOCS): change the "grammar" slightly.
9351
9352 * guile-snarf-docs.in, guile-snarf-docs-texi.in: rewrite &
9353 simplify.
9354
9355 * eval.c: all hash signs are in column 0.
9356
9357 * Makefile.am (guile_filter_doc_snarfage): build using
9358 c-tokenize.c, not filter-doc-snarfage.c.
9359 rearrange snarfing dependencies a bit.
9360
9361 * c-tokenize.lex: new file.
9362
9363 2001-06-25 Marius Vollmer <mvo@zagadka.ping.de>
9364
9365 * srcprop.h, srcprop.c (scm_srcprops_to_plist): Renamed from
9366 scm_t_srcpropso_plist. See the big type renaming.
9367 * coop-defs.h (scm_mutex_trylock, scm_cond_timedwait): Likewise.
9368 Thanks to Seth Alves!
9369
9370 * numbers.c (SIZE_MAX, PTRDIFF_MIN, PTRDIFF_MAX): Only define when
9371 they aren't defined already.
9372
9373 2001-06-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
9374
9375 * backtrace.c (display_backtrace_body): Use SCM_VALIDATE_STACK
9376 and SCM_VALIDATE_OPOUTPORT instead of SCM_ASSERT. Fix signedness
9377 problem.
9378
9379 * backtrace.c (display_expression, scm_set_print_params_x,
9380 display_application, display_frame, scm_backtrace), numbers.c
9381 (scm_istring2number), objects.c (scm_class_of,
9382 scm_mcache_lookup_cmethod, scm_mcache_compute_cmethod): Prefer
9383 explicit type check over SCM_N?IMP, !SCM_<pred> over SCM_N<pred>.
9384
9385 * fluids.c (scm_fluid_ref, scm_fluid_set_x): Fluid numbers are
9386 always positive.
9387
9388 * numbers.c (scm_i_mkbig): Remove unnecessary casts, remove
9389 unnecessary SCM_DEFER_INTS, SCM_ALLOW_INTS.
9390
9391 * objects.c (scm_class_of): Type fix.
9392
9393 (scm_mcache_lookup_cmethod): Improved comment, simplified,
9394 eliminated goto.
9395
9396 * pairs.h (scm_error_pair_access): The function can return if
9397 called recursively.
9398
9399 2001-06-20 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9400
9401 * init.c (scm_init_guile_1): Removed initialization of tag.c.
9402
9403 * gdbint.c, init.c: Removed inclusion of tag.h.
9404
9405 * tag.h, tag.c: Removed files.
9406
9407 * Makefile.am: Removed tag.{h,c,doc,x} in various places.
9408
9409 2001-06-20 Gary Houston <ghouston@arglist.com>
9410
9411 * deprecation.c, extensions.c, rw.c: include string.h.
9412
9413 2001-06-19 Gary Houston <ghouston@arglist.com>
9414
9415 * filter-doc-snarfage.c (process): added ungetc in
9416 MULTILINE_COOKIE case since otherwise it fails when there's no
9417 space between the '(' and the quote of the following string
9418 (gcc 3.0).
9419
9420 2001-06-14 Marius Vollmer <mvo@zagadka.ping.de>
9421
9422 Throughout: replace "scm_*_t" with "scm_t_*", except "scm_lisp_t".
9423
9424 2001-06-14 Marius Vollmer <mvo@zagadka.ping.de>
9425
9426 * unif.h (SCM_ARRAY_NDIM): Shift then cast so that no sign
9427 extension takes place.
9428 * strings.h (SCM_STRING_LENGTH): Likewise.
9429 (SCM_STRING_MAX_LENGTH): Use unsigned numbers.
9430
9431 * __scm.h (ptrdiff_t): Typedef to long when configure didn't find
9432 it.
9433
9434 * tags.h: Include <stdint.h> when we have it.
9435 (scm_bits_t): Changed to be a unsigned type. Use uintptr_t when
9436 available. Else use "unsigned long".
9437 (scm_signed_bits_t): New.
9438
9439 * numbers.h (SCM_SRS): Cast shiftee to scm_signed_bits_t.
9440 (SCM_INUM): Cast result to scm_signed_bits_t.
9441
9442 2001-06-13 Thien-Thi Nguyen <ttn@revel.glug.org>
9443
9444 * mkstemp.c: Update path to #include file scmconfig.h.
9445 Thanks to Golubev I. N.
9446
9447 2001-06-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
9448
9449 * struct.h (SCM_STRUCT_VTABLE_FLAGS): New macro.
9450
9451 * goops.h (SCM_NUMBER_OF_SLOTS): Removed bogus `\´ at the end of
9452 the macro definition.
9453
9454 (SCM_CLASSP, SCM_INSTANCEP, SCM_PUREGENERICP, SCM_ACCESSORP,
9455 SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Use SCM_STRUCT_VTABLE_FLAGS
9456 instead of SCM_INST_TYPE.
9457
9458 (SCM_ACCESSORP, SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Make sure
9459 the object is a struct before accessing its struct flags.
9460
9461 (SCM_INST_TYPE, SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Deprecated.
9462
9463 2001-06-10 Gary Houston <ghouston@arglist.com>
9464
9465 * rdelim.c (scm_init_rdelim_builtins): don't try to activate the
9466 (ice-9 rdelim) module in (guile) and (guile-user). it didn't
9467 work reliably anymore. try it from boot-9.scm instead.
9468
9469 2001-06-09 Marius Vollmer <mvo@zagadka.ping.de>
9470
9471 * ports.c (scm_lfwrite): Maintain columnd and row count in port.
9472 Thanks to Matthias Köppe!
9473
9474 2001-06-08 Michael Livshin <mlivshin@bigfoot.com>
9475
9476 * snarf.h, filter-doc-snarfage.c: more changes to cope with
9477 space-happy C preprocessors.
9478
9479 * filter-doc-snarfage.c, guile-snarf.in: try to cope with spaces
9480 inside cookies. thanks to Matthias Köppe!
9481
9482 2001-06-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
9483
9484 * keywords.c (keyword_print): Don't use SCM_C[AD]R to access
9485 keywords. Fix gc protection.
9486
9487 * objects.c (scm_mcache_lookup_cmethod): Don't use side effecting
9488 operations in macro calls.
9489
9490 * pairs.c (scm_error_pair_access): Avoid recursion.
9491
9492 Thanks to Matthias Koeppe for reporting the bugs that correspond
9493 to the following set of patches.
9494
9495 * unif.c (scm_bit_set_star_x, scm_bit_invert_x), vectors.h
9496 (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR): Obtain the
9497 bitvector base address using SCM_BITVECTOR_BASE.
9498
9499 * unif.h (SCM_BITVECTOR_BASE): Return the base address as an
9500 unsigned long*.
9501
9502 2001-06-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
9503
9504 * goops.c (SCM_CLASS_REDEF): Removed.
9505
9506 * vectors.h (VECTORSH, SCM_VECTORS_H): Renamed <foo>H to
9507 SCM_<foo>_H.
9508
9509 Thanks to Matthias Koeppe for reporting the bugs that correspond
9510 to the following set of patches.
9511
9512 * goops.c (scm_sys_prep_layout_x, scm_basic_basic_make_class,
9513 create_basic_classes, scm_sys_fast_slot_set_x, set_slot_value,
9514 scm_sys_allocate_instance, clear_method_cache,
9515 scm_sys_invalidate_method_cache_x, scm_make,
9516 create_standard_classes, scm_make_port_classes, scm_make_class,
9517 scm_add_slot): Use SCM_SET_SLOT to set slot values.
9518
9519 (prep_hashsets): Use SCM_SET_HASHSET to set class hash values.
9520
9521 * goops.h (SCM_SET_SLOT, SCM_SET_HASHSET): New macros.
9522
9523 * ramap.c (BINARY_ELTS_CODE, BINARY_PAIR_ELTS_CODE,
9524 UNARY_ELTS_CODE): Remove bogus break statement.
9525
9526 * vectors.h (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR):
9527 Don't access bit vectors elements as SCM objects.
9528
9529 * weaks.c (scm_make_weak_vector, scm_make_weak_key_hash_table,
9530 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
9531 Don't assign to an unpacked value.
9532
9533 2001-06-07 Dirk Herrmann <D.Herrmann@tu-bs.de>
9534
9535 * __scm.h (SCM_NORETURN): Moved here from error.h.
9536
9537 (SCM_UNUSED): New macro.
9538
9539 (SCM_DEBUG_PAIR_ACCESSES): New macro.
9540
9541 * backtrace.c (display_error_handler), continuations.c
9542 (continuation_print), debug.c (debugobj_print), dynwind.c
9543 (guards_print), environments.c (observer_print,
9544 core_environments_finalize, leaf_environment_cell,
9545 leaf_environment_print, eval_environment_print,
9546 eval_environment_observer, import_environment_define,
9547 import_environment_undefine, import_environment_print,
9548 import_environment_observer, export_environment_define,
9549 export_environment_undefine, export_environment_print,
9550 export_environment_observer), eval.c (scm_m_quote, scm_m_begin,
9551 scm_m_if, scm_m_set_x, scm_m_and, scm_m_or, scm_m_case,
9552 scm_m_cond, scm_m_lambda, scm_m_letstar, scm_m_do, scm_m_delay,
9553 scm_m_letrec1, scm_m_apply, scm_m_cont, scm_m_nil_cond,
9554 scm_m_nil_ify, scm_m_t_ify, scm_m_0_cond, scm_m_0_ify,
9555 scm_m_1_ify, scm_m_atfop, scm_m_at_call_with_values), evalext.c
9556 (scm_m_generalized_set_x), fluids.c (fluid_print), fports.c
9557 (fport_print), gc.c (gc_start_stats, scm_remember_upto_here_1,
9558 scm_remember_upto_here_2, scm_remember_upto_here, mark_gc_async),
9559 gh_init.c (gh_standard_handler), goops.c (get_slot_value,
9560 set_slot_value, test_slot_existence, scm_change_object_class,
9561 scm_m_atslot_ref, scm_m_atslot_set_x, make_struct_class,
9562 default_setter), guardians.c (guardian_print, guardian_gc_init,
9563 guardian_zombify, whine_about_self_centered_zombies), guile.c
9564 (inner_main), init.c (stream_handler), keywords.c (keyword_print),
9565 mallocs.c (malloc_print), numbers.c (scm_print_real,
9566 scm_print_complex, scm_bigprint), ports.c (flush_port_default,
9567 end_input_default, scm_port_print, fill_input_void_port,
9568 write_void_port), root.c (root_print), smob.c (scm_mark0,
9569 scm_free0, scm_smob_print, scm_smob_apply_1_error,
9570 scm_smob_apply_2_error, scm_smob_apply_3_error, free_print),
9571 stime.c (restorezone), strings.c (scm_makfromstr), struct.c
9572 (scm_struct_free_0, scm_struct_free_standard,
9573 scm_struct_free_entity, scm_struct_gc_init, scm_free_structs),
9574 throw.c (jmpbuffer_print, lazy_catch_print, ss_handler,
9575 scm_handle_by_throw, scm_ithrow), weaks.c
9576 (scm_weak_vector_gc_init, scm_mark_weak_vector_spines,
9577 scm_scan_weak_vectors), ramap.c (scm_array_fill_int), filesys.c
9578 (scm_dir_print): Mark unused parameters with SCM_UNUSED.
9579
9580 * error.h (SCM_NORETURN): Moved to __scm.h.
9581
9582 * error.h (ERRORH, SCM_ERROR_H), pairs.h (PAIRSH, SCM_PAIRS_H):
9583 Renamed <foo>H to SCM_<foo>_H.
9584
9585 * gc.c (debug_cells_gc_interval): New static variable.
9586
9587 (scm_assert_cell_valid): If selected by the user, perform
9588 additional garbage collections.
9589
9590 (scm_set_debug_cell_accesses_x): Extended to let the user specify
9591 if additional garbage collections are desired.
9592
9593 (mark_gc_async): If additional garbage collections are selected
9594 by the user, don't call the after-gc-hook. Instead require the
9595 user to run the hook manually.
9596
9597 * pairs.c (scm_error_pair_access): New function. Only compiled
9598 if SCM_DEBUG_PAIR_ACCESSES is set to 1.
9599
9600 * pairs.h (SCM_VALIDATE_PAIR): New macro.
9601
9602 (SCM_CAR, SCM_CDR, SCM_SETCAR, SCM_SETCDR): If
9603 SCM_DEBUG_PAIR_ACCESSES is set to 1, make sure that the argument
9604 is a real pair object. (Glocs are also accepted, but that may
9605 change.) If not, abort with an error message.
9606
9607 2001-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
9608
9609 * eval.c (SCM_VALIDATE_NON_EMPTY_COMBINATION): New macro.
9610
9611 (SCM_CEVAL, SCM_APPLY): Replace calls to SCM_EVALIM2 with calls
9612 to SCM_VALIDATE_NON_EMPTY_COMBINATION.
9613
9614 2001-06-05 Marius Vollmer <mvo@zagadka.ping.de>
9615
9616 * extensions.c (scm_c_register_extension): Allow NULL as library
9617 name.
9618 (load_extension): Ignore NULL library names when comparing.
9619
9620 * hash.c (scm_hasher): Use SCM_UNPACK in the case labels so that
9621 non-pointers are being compared. Thanks to Alexander Klimov!
9622
9623 2001-06-04 Gary Houston <ghouston@arglist.com>
9624
9625 * rw.c (scm_write_string_partial): new procedure implementing
9626 write-string/partial in (ice-9 rw).
9627 * rw.h: declare scm_write_string_partial.
9628
9629 2001-06-04 Marius Vollmer <mvo@zagadka.ping.de>
9630
9631 * keywords.c (keyword_print): Substract 1 from length of symbol
9632 name, accounting for the silly dash.
9633
9634 * dynl.c (scm_registered_modules, scm_clear_registered_modules):
9635 Do not emit deprecation warning.
9636
9637 Added exception notice to all files.
9638
9639 * dynl.c: Include "deprecation.h".
9640
9641 2001-06-03 Marius Vollmer <mvo@zagadka.ping.de>
9642
9643 * dynl.c (scm_register_module_xxx, scm_registered_modules,
9644 scm_clear_registered_modules): Deprecated.
9645
9646 2001-06-02 Rob Browning <rlb@cs.utexas.edu>
9647
9648 * .cvsignore: add guile_filter_doc_snarfage guile-snarf-docs
9649 guile-snarf-docs-texi.
9650
9651 * fports.c: HAVE_ST_BLKSIZE changed to
9652 HAVE_STRUCT_STAT_ST_BLKSIZE.
9653 (scm_fport_buffer_add): HAVE_ST_BLKSIZE changed to
9654 HAVE_STRUCT_STAT_ST_BLKSIZE.
9655
9656 * filesys.c (scm_stat2scm): HAVE_ST_RDEV changed to
9657 HAVE_STRUCT_STAT_ST_RDEV.
9658 (scm_stat2scm): HAVE_ST_BLKSIZE changed to
9659 HAVE_STRUCT_STAT_ST_BLKSIZE.
9660 (scm_stat2scm): HAVE_ST_BLOCKS changed to
9661 HAVE_STRUCT_STAT_ST_BLOCKS.
9662
9663 2001-06-02 Marius Vollmer <mvo@zagadka.ping.de>
9664
9665 * strports.c (scm_eval_string): Use scm_primitive_eval_x instead
9666 of scm_eval_x to allow module changes between the forms in the
9667 string. Set/restore module using scm_c_call_with_current_module.
9668
9669 * mkstemp.c: New file, slightly modified from libiberties
9670 mkstemps.c.
9671
9672 2001-05-31 Michael Livshin <mlivshin@bigfoot.com>
9673
9674 * guile-snarf-docs.in, guile-snarf-docs-texi.in,
9675 filter-doc-snarfage.c: new files.
9676
9677 * Makefile.am: add stuff to [build,] use and distribute
9678 guile-snarf-docs, guile-snarf-docs-texi, guile_filter_doc_snarfage.
9679
9680 * guile-snarf.in: grok the new snarf output.
9681
9682 * snarf.h: make the output both texttools- and `read'-friendly.
9683
9684 * guile-doc-snarf.in: reimplement in terms of guile-snarf and
9685 guile-snarf-docs. (should also deprecate, I guess. maybe not).
9686
9687 2001-05-31 Marius Vollmer <mvo@zagadka.ping.de>
9688
9689 * print.c (scm_simple_format): Support "~~" and "~%". Signal
9690 error for unsupported format controls and for superflous
9691 arguments. Thanks to Daniel Skarda!
9692
9693 * print.h, print.c (scm_print_symbol_name): Factored out of
9694 scm_iprin1.
9695 (scm_iprin1): Call it.
9696
9697 * keywords.c (keyword_print): Use scm_print_symbol_name so that
9698 weird names are printed correctly.
9699
9700 * print.c (scm_print_symbol_name): Symbols whose name starts with
9701 `#' or `:' or ends with `:' are considered weird.
9702
9703 2001-05-30 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9704
9705 * numbers.c (scm_difference, scm_divide): Clarified comments for -
9706 and /.
9707
9708 2001-05-29 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9709
9710 * debug.h: Removed prototype for scm_eval_string.
9711
9712 2001-05-28 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9713
9714 * symbols.c (scm_gensym): Fix buffer overrun (try `(gensym
9715 (make-string 2000 #\!))' in an older version).
9716
9717 Change strncpy to memcpy to allow embedded NUL characters in
9718 symbol prefix.
9719
9720 2001-05-28 Michael Livshin <mlivshin@bigfoot.com>
9721
9722 * hooks.c (scm_create_hook): deprecated.
9723 (make_hook): deleted.
9724 (scm_make_hook): all the hook creation code is now here.
9725
9726 * gc.c (scm_init_gc): don't call `scm_create_hook'. instead make
9727 a hook, make it permanent, and do a `scm_c_define' on it.
9728
9729 * strop.c (s_scm_string_capitalize_x): fix docstring quoting.
9730
9731 * socket.c (s_scm_inet_pton): fix docstring quoting.
9732 (s_scm_inet_ntop): ditto.
9733
9734 * num2integral.i.c (INTEGRAL2NUM): cast to fix a warning.
9735
9736 * hashtab.c (scm_internal_hash_fold): fix argument position in
9737 SCM_ASSERT.
9738
9739 * environments.c (s_scm_import_environment_set_imports_x): fix
9740 argument position in SCM_ASSERT.
9741
9742 * debug.c (s_scm_make_gloc): fix SCM packing/unpacking.
9743 (s_scm_make_iloc): ditto.
9744
9745 2001-05-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
9746
9747 * __scm.h (SCM_DEBUG_TYPING_STRICTNESS): Make 1 the default.
9748
9749 * eval.c (promise_print): Read the promise's value as an object.
9750
9751 (SCM_CEVAL): Don't perform side-effecting operations in macro
9752 parameters.
9753
9754 * eval.h (SCM_EVALIM2): Fix the typing strictness of the
9755 conditional expression.
9756
9757 * gc.c (scm_master_freelist, scm_master_freelist2): Added missing
9758 initializer.
9759
9760 * gh_data.c (gh_set_substr): Removed redundant unsigned >= 0
9761 text, removed redundant computation of effective_length and fixed
9762 the overflow check.
9763
9764 * goops.c (test_slot_existence): Use SCM_EQ_P to compare SCM
9765 values.
9766
9767 (wrap_init): Don't use SCM_C[AD]R for non pairs.
9768
9769 (hell): Make it a scm_bits_t pointer rather than a SCM pointer.
9770
9771 * goops.c (scm_sys_modify_class), strports.c (st_resize_port),
9772 struct.h (SCM_SET_STRUCT_PRINTER): Store unpacked values.
9773
9774 * goops.h (SCM_ACCESSORS_OF, SCM_SLOT): Return a SCM value.
9775
9776 * goops.h (GOOPSH, SCM_GOOPS_H), modules.h (MODULESH,
9777 SCM_MODULES_H), objects.h (OBJECTSH, SCM_OBJECTS_H), struct.h
9778 (STRUCTH, SCM_STRUCT_H), symbols.h (SYMBOLSH, SCM_SYMBOLS_H),
9779 __scm.h (__SCMH, SCM___SCM_H): Change <foo>H to SCM_<foo>_H.
9780
9781 * modules.[ch] (scm_module_tag): Make it a scm_bits_t value.
9782
9783 * objects.h (SCM_SET_CLASS_INSTANCE_SIZE): Fixed typing.
9784
9785 * ramap.c (ramap_rp): Removed bogus `;´.
9786
9787 * sort.c (scm_restricted_vector_sort_x): Fixed signedness
9788 problem.
9789
9790 * symbols.h (SCM_PROP_SLOTS, SCM_SET_PROP_SLOTS, SCM_SYMBOL_FUNC,
9791 SCM_SET_SYMBOL_FUNC, SCM_SYMBOL_PROPS, SCM_SET_SYMBOL_PROPS):
9792 Read SCM objects rather than scm_bits_t values.
9793
9794 * tags.h (SCM_VOIDP_TEST): Removed.
9795
9796 (SCM_DEBUG_TYPING_STRICTNESS): Now takes values 0, 1, 2. The
9797 value of 2 now corresponds to the former 1, the current 1
9798 corresponds to the former situation that SCM_VOIDP_TEST was
9799 defined.
9800
9801 (SCM): Now defined as typedef struct scm_unused_struct * SCM;
9802 If this appears to be not ANSI compliant, we will change it to
9803 typedef struct scm_unused_struct { } * SCM;
9804 Thanks to Han-Wen Nienhuys for the suggestion.
9805
9806 * unif.c (scm_array_set_x): Fix typing problem, and use
9807 SCM_UVECTOR_BASE instead of SCM_VELTS or SCM_CELL_WORD_1 when
9808 dealing with uniform vectors.
9809
9810 2001-05-27 Michael Livshin <mlivshin@bigfoot.com>
9811
9812 * gc.c (scm_init_storage): init `scm_gc_registered_roots'.
9813 (scm_igc): mark from them, too (precisely, not conservatively!).
9814
9815 * root.h (scm_gc_registered_roots): new object in
9816 scm_sys_protects.
9817
9818 * hooks.c (scm_create_hook): call `scm_gc_protect_object' instead
9819 `scm_protect_object'. shouldn't call it at all, though, it seems.
9820
9821 * gc.c (scm_[un]protect_object): deprecated.
9822 (scm_gc_[un]protect_object): new names for scm_[un]protect_object.
9823 (scm_gc_[un]register_root[s]): new.
9824
9825 * gc.h: add prototypes for scm_gc_[un]protect_object,
9826 scm_gc_[un]register_root[s].
9827
9828 2001-05-26 Michael Livshin <mlivshin@bigfoot.com>
9829
9830 revert the controversial part of the 2001-05-24 changes.
9831
9832 2001-05-25 Marius Vollmer <mvo@zagadka.ping.de>
9833
9834 * modules.c (scm_env_module): Exported to Scheme.
9835
9836 * eval.c (scm_debug_opts): New option `show-file-name'.
9837
9838 * debug.h (SCM_SHOW_FILE_NAME): New.
9839
9840 * backtrace.c: Include "libguile/filesys.h".
9841 (sym_base, display_backtrace_get_file_line,
9842 display_backtrace_file, display_backtrace_file_and_line): New.
9843 (display_frame): Call display_backtrace_file_and_line if that is
9844 requested.
9845 (display_backtrace_body): Call scm_display_backtrace_file if
9846 requested.
9847
9848 * debug.h (scm_lookup_cstr, scm_lookup_soft, scm_evstr):
9849 Prototypes removed since there's no definition for these
9850 functions.
9851
9852 2001-05-24 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9853
9854 * unif.c (scm_make_ra, array_free), unif.h (SCM_ARRAY_DIMS):
9855 Changed use of scm_array->scm_array_t and
9856 scm_array_dim->scm_array_dim_t to enable build with
9857 --disable-deprecated.
9858
9859 2001-05-24 Michael Livshin <mlivshin@bigfoot.com>
9860
9861 The purpose of this set of changes is to regularize Guile's usage
9862 of ANSI C integral types, with the following ideas in mind:
9863
9864 - SCM does not nesessarily have to be long.
9865 - long is not nesessarily enough to store pointers.
9866 - long is not nesessarily the same size as int.
9867
9868 The changes are incomplete and possibly buggy. Please test on
9869 something exotic.
9870
9871 * validate.h
9872 (SCM_NUM2{SIZE,PTRDIFF,SHORT,USHORT,BITS,UBITS,INT,UINT}[_DEF]):
9873 new macros.
9874
9875 * unif.h: type renaming:
9876 scm_array -> scm_array_t
9877 scm_array_dim -> scm_array_dim_t
9878 the old names are deprecated, all in-Guile uses changed.
9879
9880 * tags.h (scm_ubits_t): new typedef, representing unsigned
9881 scm_bits_t.
9882
9883 * stacks.h: type renaming:
9884 scm_info_frame -> scm_info_frame_t
9885 scm_stack -> scm_stack_t
9886 the old names are deprecated, all in-Guile uses changed.
9887
9888 * srcprop.h: type renaming:
9889 scm_srcprops -> scm_srcprops_t
9890 scm_srcprops_chunk -> scm_srcprops_chunk_t
9891 the old names are deprecated, all in-Guile uses changed.
9892
9893 * gsubr.c, procs.c, print.c, ports.c, read.c, rdelim.c, ramap.c,
9894 rw.c, smob.c, sort.c, srcprop.c, stacks.c, strings.c, strop.c,
9895 strorder.c, strports.c, struct.c, symbols.c, unif.c, values.c,
9896 vectors.c, vports.c, weaks.c:
9897 various int/size_t -> size_t/scm_bits_t changes.
9898
9899 * random.h: type renaming:
9900 scm_rstate -> scm_rstate_t
9901 scm_rng -> scm_rng_t
9902 scm_i_rstate -> scm_i_rstate_t
9903 the old names are deprecated, all in-Guile uses changed.
9904
9905 * procs.h: type renaming:
9906 scm_subr_entry -> scm_subr_entry_t
9907 the old name is deprecated, all in-Guile uses changed.
9908
9909 * options.h (scm_option_t.val): unsigned long -> scm_bits_t.
9910 type renaming:
9911 scm_option -> scm_option_t
9912 the old name is deprecated, all in-Guile uses changed.
9913
9914 * objects.c: various long -> scm_bits_t changes.
9915 (scm_i_make_class_object): flags: unsigned long -> scm_ubits_t
9916
9917 * numbers.h (SCM_FIXNUM_BIT): deprecated, renamed to
9918 SCM_I_FIXNUM_BIT.
9919
9920 * num2integral.i.c: new file, multiply included by numbers.c, used
9921 to "templatize" the various integral <-> num conversion routines.
9922
9923 * numbers.c (scm_mkbig, scm_big2num, scm_adjbig, scm_normbig,
9924 scm_copybig, scm_2ulong2big, scm_dbl2big, scm_big2dbl):
9925 deprecated.
9926 (scm_i_mkbig, scm_i_big2inum, scm_i_adjbig, scm_i_normbig,
9927 scm_i_copybig, scm_i_short2big, scm_i_ushort2big, scm_i_int2big,
9928 scm_i_uint2big, scm_i_long2big, scm_i_ulong2big, scm_i_bits2big,
9929 scm_i_ubits2big, scm_i_size2big, scm_i_ptrdiff2big,
9930 scm_i_long_long2big, scm_i_ulong_long2big, scm_i_dbl2big,
9931 scm_i_big2dbl, scm_short2num, scm_ushort2num, scm_int2num,
9932 scm_uint2num, scm_bits2num, scm_ubits2num, scm_size2num,
9933 scm_ptrdiff2num, scm_num2short, scm_num2ushort, scm_num2int,
9934 scm_num2uint, scm_num2bits, scm_num2ubits, scm_num2ptrdiff,
9935 scm_num2size): new functions.
9936
9937 * modules.c (scm_module_reverse_lookup): i, n: int -> scm_bits_t.
9938
9939 * load.c: change int -> size_t in various places (where the
9940 variable is used to store a string length).
9941 (search-path): call scm_done_free, not scm_done_malloc.
9942
9943 * list.c (scm_ilength): return a scm_bits_t, not long.
9944 some other {int,long} -> scm_bits_t changes.
9945
9946 * hashtab.c: various [u]int -> scm_bits_t changes.
9947 scm_ihashx_closure -> scm_ihashx_closure_t (and made a typedef).
9948 (scm_ihashx): n: uint -> scm_bits_t
9949 use scm_bits2num instead of scm_ulong2num.
9950
9951 * gsubr.c: various int -> scm_bits_t changes.
9952
9953 * goops.[hc]: various {int,long} -> scm_bits_t changes.
9954
9955 * gh_data.c (gh_num2int): no loss of precision any more.
9956
9957 * gh.h (gh_str2scm): len: int -> size_t
9958 (gh_{get,set}_substr): start: int -> scm_bits_t,
9959 len: int -> size_t
9960 (gh_<num>2scm): n: int -> scm_bits_t
9961 (gh_*vector_length): return scm_[u]size_t, not unsigned long.
9962 (gh_length): return scm_bits_t, not unsigned long.
9963
9964 * gc.[hc]: various small changes relating to many things stopping
9965 being long and starting being scm_[u]bits_t instead.
9966 scm_mallocated should no longer wrap around.
9967
9968 * fports.h: type renaming:
9969 scm_fport -> scm_fport_t
9970 the old name is deprecated, all in-Guile uses changed.
9971
9972 * fports.c (fport_fill_input): count: int -> scm_bits_t
9973 (fport_flush): init_size, remaining, count: int -> scm_bits_t
9974
9975 * debug.h (scm_lookup_cstr, scm_lookup_soft, scm_evstr): removed
9976 those prototypes, as the functions they prototype don't exist.
9977
9978 * fports.c (default_buffer_size): int -> size_t
9979 (scm_fport_buffer_add): read_size, write_size: int -> scm_bits_t
9980 default_size: int -> size_t
9981 (scm_setvbuf): csize: int -> scm_bits_t
9982
9983 * fluids.c (n_fluids): int -> scm_bits_t
9984 (grow_fluids): old_length, i: int -> scm_bits_t
9985 (next_fluid_num, scm_fluid_ref, scm_fluid_set_x): n: int ->
9986 scm_bits_t
9987 (scm_c_with_fluids): flen, vlen: int -> scm_bits_t
9988
9989 * filesys.c (s_scm_open_fdes): changed calls to SCM_NUM2LONG to
9990 the new and shiny SCM_NUM2INT.
9991
9992 * extensions.c: extension -> extension_t (and made a typedef).
9993
9994 * eval.h (SCM_IFRAME): cast to scm_bits_t, not int. just so
9995 there are no nasty surprises if/when the various deeply magic tag
9996 bits move somewhere else.
9997
9998 * eval.c: changed the locals used to store results of SCM_IFRAME,
9999 scm_ilength and such to be of type scm_bits_t (and not int/long).
10000 (iqq): depth, edepth: int -> scm_bits_t
10001 (scm_eval_stack): int -> scm_bits_t
10002 (SCM_CEVAL): various vars are not scm_bits_t instead of int.
10003 (check_map_args, scm_map, scm_for_each): len: long -> scm_bits_t
10004 i: int -> scm_bits_t
10005
10006 * environments.c: changed the many calls to scm_ulong2num to
10007 scm_ubits2num.
10008 (import_environment_fold): proc_as_ul: ulong -> scm_ubits_t
10009
10010 * dynwind.c (scm_dowinds): delta: long -> scm_bits_t
10011
10012 * debug.h: type renaming:
10013 scm_debug_info -> scm_debug_info_t
10014 scm_debug_frame -> scm_debug_frame_t
10015 the old names are deprecated, all in-Guile uses changed.
10016 (scm_debug_eframe_size): int -> scm_bits_t
10017
10018 * debug.c (scm_init_debug): use scm_c_define instead of the
10019 deprecated scm_define.
10020
10021 * continuations.h: type renaming:
10022 scm_contregs -> scm_contregs_t
10023 the old name is deprecated, all in-Guile uses changed.
10024 (scm_contregs_t.num_stack_items): size_t -> scm_bits_t
10025 (scm_contregs_t.num_stack_items): ulong -> scm_ubits_t
10026
10027 * continuations.c (scm_make_continuation): change the type of
10028 stack_size from long to scm_bits_t.
10029
10030 * ports.h: type renaming:
10031 scm_port_rw_active -> scm_port_rw_active_t (and made a typedef)
10032 scm_port -> scm_port_t
10033 scm_ptob_descriptor -> scm_ptob_descriptor_t
10034 the old names are deprecated, all in-Guile uses changed.
10035 (scm_port_t.entry): int -> scm_bits_t.
10036 (scm_port_t.line_number): int -> long.
10037 (scm_port_t.putback_buf_size): int -> size_t.
10038
10039 * __scm.h (long_long, ulong_long): deprecated (they pollute the
10040 global namespace and have little value beside that).
10041 (SCM_BITS_LENGTH): new, is the bit size of scm_bits_t (i.e. of an
10042 SCM handle).
10043 (ifdef spaghetti): include sys/types.h and sys/stdtypes.h, if they
10044 exist (for size_t & ptrdiff_t).
10045 (scm_sizet): deprecated.
10046
10047 * Makefile.am (noinst_HEADERS): add num2integral.i.c
10048
10049 2001-05-23 Marius Vollmer <mvo@zagadka.ping.de>
10050
10051 * snarf.h (SCM_CONST_LONG): Use SCM_VCELL_INIT instead of
10052 SCM_VARIABLE_INIT since that it what it used to be.
10053
10054 * deprecation.c (scm_include_deprecated_features): Make docstring
10055 ANSIsh. Thanks to Matthias Köppe!
10056
10057 2001-05-21 Marius Vollmer <mvo@zagadka.ping.de>
10058
10059 * symbols.c (scm_mem2symbol): Re-introduce indirect cell. It is
10060 needed for weak-key hashtables.
10061
10062 * procs.c (scm_make_subr_with_generic): Add missing last argument
10063 in call to scm_c_define_gsubr_with_generic. Thanks to Ariel Rios.
10064
10065 * eval.c: Use SCM_EQ_P instead of `==' or `!=' in certain
10066 places. (scm_c_improper_memq): Return 1 instead of SCM_BOOL_T.
10067
10068 * eval.h (SCM_EVALIM2): Use SCM_EQ_P instead of `=='.
10069
10070 2001-05-20 Marius Vollmer <mvo@zagadka.ping.de>
10071
10072 * symbols.c (scm_mem2symbol): Call `scm_must_strndup' instead of
10073 `duplicate_string'. Do not use an indirect cell, store symbol
10074 directly in collision list of hash table.
10075 (duplicate_string): Removed.
10076
10077 * init.c (scm_init_guile_1): Call scm_init_extensions.
10078
10079 * Makefile.am: Add "extensions.c" and related files in all the
10080 right places.
10081
10082 * extensions.h, extension.c: New files.
10083
10084 * gc.h, gc.c (scm_must_strdup, scm_must_strndup): New.
10085
10086 * modules.h (scm_system_module_env_p): Move out of deprecated
10087 section.
10088
10089 * rw.h (scm_init_rw): Added prototype.
10090
10091 * gsubr.h, gsubr.c (scm_c_make_gsubr, scm_c_define_gsubr,
10092 scm_c_make_gsubr_with_generic, scm_c_define_gsubr_with_generic):
10093 New functions. They replace scm_make_gsubr and
10094 scm_make_gsubr_with_generic. The `make' variants only create the
10095 gsubr object, while the `define' variants also put it into the
10096 current module. Changed all callers.
10097 (scm_make_gsubr, scm_make_gsubr_with_generic): Deprecated.
10098
10099 * procs.h, procs.c (scm_c_make_subr, scm_c_define_subr,
10100 scm_c_make_subr_with_generic, scm_c_define_subr_with_generic): New
10101 functions. They replace scm_make_subr, scm_make_subr_opt and
10102 scm_make_subr_with_generic. The `make' variants only create the
10103 subr object, while the `define' variants also put it into the
10104 current module. Changed all callers.
10105 (scm_make_subr, scm_make_subr_opt, scm_make_subr_with_generic):
10106 Deprecated.
10107
10108 * eval.c, gc.c, gh_funcs.c, goops.c, macros.c, pairs.c, ramap.c,
10109 rdelim.c, rw.c, scmsigs.c, snarf.h, values.c: Changed according to
10110 the comments above.
10111
10112 2001-05-19 Neil Jerram <neil@ossau.uklinux.net>
10113
10114 * throw.c (scm_lazy_catch): Slight docstring clarification.
10115
10116 2001-05-19 Marius Vollmer <mvo@zagadka.ping.de>
10117
10118 * throw.c: Lazy-catch handlers are no longer allowed to return.
10119 Fixed comments throughout.
10120 (scm_ithrow): Signal an error when a lazy-catch handler returns.
10121 Moved actual jump to jmpbuf into if-branch where the jmpbuf is
10122 recognized as such.
10123
10124 * version.c (s_scm_micro_version): Fix typo in FUNC_NAME, it
10125 refered to s_scm_minor_version previously.
10126
10127 * modules.h, modules.c: Moved around a lot of code so that
10128 deprecated features appear at the bottom.
10129 (root_module_lookup_closure, scm_sym_app, scm_sym_modules,
10130 module_prefix, make_modules_in_var, beautify_user_module_x_var,
10131 scm_the_root_module, scm_make_module, scm_ensure_user_module,
10132 scm_load_scheme_module): Deprecated.
10133 (scm_system_module_env_p): Return SCM_BOOL_T directly for
10134 environments corresponding to the root module.
10135 (convert_module_name, scm_c_resolve_module,
10136 scm_c_call_with_current_module, scm_c_define_module,
10137 scm_c_use_module, scm_c_export): New.
10138 (the_root_module): New static variant of scm_the_root_module. Use
10139 it everywhere instead of scm_the_root_module.
10140
10141 * fluids.h, fluids.c (scm_internal_with_fluids): Deprecated.
10142 (scm_c_with_fluids): Renamed from scm_internal_with_fluids.
10143 (scm_c_with_fluid): New.
10144 (scm_with_fluids): Use scm_c_with_fluids instead of
10145 scm_internal_with_fluids.
10146
10147 * goops.h, goops.c (scm_init_goops_builtins): Renamed from
10148 `scm_init_goops'. Do not explicitly create/switch modules.
10149 Return SCM_UNSPECIFIED.
10150 (scm_init_goops): Only register `%init-goops-builtins' procedure.
10151 (scm_load_goops): Use scm_c_resolve_module instead of
10152 scm_resolve_module.
10153
10154 * init.c (scm_init_guile_1): Call `scm_init_goops' instead of
10155 `scm_init_oop_goops_goopscore_module'. Call `scm_init_rdelim' and
10156 `scm_init_rw' prior to loading the startup files.
10157
10158 * rdelim.h, rdelim.c: (scm_init_rdelim_builtins): Renamed from
10159 scm_init_rdelim. Do not explicitly create/switch modules.
10160 Return SCM_UNSPECIFIED.
10161 (scm_init_rdelim): Only register `%init-rdelim-builtins'
10162 procedure.
10163
10164 * rw.c (scm_init_rw_builtins): Renamed from scm_init_rw. Do not
10165 explicitly create/switch modules. Return SCM_UNSPECIFIED.
10166 (scm_init_rw): Only register `%init-rw-builtins' procedure.
10167
10168 * script.c (scm_shell): Evaluate the compiled switches in the
10169 current module, not in the root module.
10170
10171 2001-05-18 Marius Vollmer <mvo@zagadka.ping.de>
10172
10173 * fluids.c (scm_c_with_fluids): Rename from
10174 scm_internal_with_fluids.
10175 (scm_internal_with_fluids): Deprecated.
10176 (scm_c_with_fluid): New.
10177
10178 2001-05-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
10179
10180 * print.h (PRINTH, SCM_PRINT_H): Renamed PRINTH to SCM_PRINT_H.
10181
10182 (SCM_PORT_WITH_PS_PORT, SCM_PORT_WITH_PS_PS): Only pairs may be
10183 accessed with SCM_C[AD]R.
10184
10185 (SCM_COERCE_OUTPORT): Removed redundant SCM_NIMP test.
10186
10187 2001-05-16 Rob Browning <rlb@cs.utexas.edu>
10188
10189 * version.c (s_scm_major_version): doc fixes.
10190 (s_scm_minor_version): doc fixes.
10191 (s_scm_minor_version): new function.
10192
10193 * version.h (scm_init_version): new function.
10194
10195 * versiondat.h.in: add GUILE_MICRO_VERSION.
10196
10197 2001-05-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
10198
10199 * deprecation.c (scm_init_deprecation): Renamed
10200 GUILE_WARN_DEPRECATED_DEFAULT to SCM_WARN_DEPRECATED_DEFAULT.
10201
10202 2001-05-16 Marius Vollmer <mvo@zagadka.ping.de>
10203
10204 * Makefile.am (cpp_sig_symbols.c, cpp_err_symbols.c): Make
10205 dependent on cpp_cnvt.awk
10206
10207 2001-05-15 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10208
10209 * script.c (scm_compile_shell_switches): New command line option
10210 `--use-srfi' for loading a list of SRFIs on startup.
10211 (scm_shell_usage): Added `--use-srfi' to help message.
10212
10213 2001-05-10 Marius Vollmer <mvo@zagadka.ping.de>
10214
10215 Merged from mvo-vcell-cleanup-1-branch.
10216
10217 The concept of vcells has been removed from Guile. With it,
10218 explicit obarrays and associated operations are gone. Use
10219 hashtables instead of obarrays.
10220
10221 Throughout: use scm_sym2var instead of scm_sym2vcell and treat
10222 result as variable instead of vcell. Glocs no longer point to a
10223 vcell but to a variable. Use scm_c_define instead of
10224 scm_sysintern and treat the result as a variable (which it is),
10225 not a vcell.
10226
10227 * variable.c, variable.h (SCM_VARVCELL, SCM_UDVARIABLEP,
10228 SCM_DEFVARIABLEP): Deprecated.
10229 (SCM_VARIABLE_REF, SCM_VARIABLE_SET, SCM_VARIABLE_LOC): New.
10230 (variable_print): Do not print name of variable.
10231 (variable_equalp): Compare values, not vcells.
10232 (anonymous_variable_sym): Removed.
10233 (make_vcell_variable): Removed.
10234 (make_variable): New, as replacement.
10235 (scm_make_variable, scm_make_undefined_variable): Do not take name
10236 hint parameter.
10237 (scm_variable_ref): Check for SCM_UNDEFINED and throw "unbound"
10238 error in that case.
10239 (scm_builtin_variable): Deprecated.
10240
10241 * symbols.c, symbols.h (scm_sym2vcell, scm_sym2ovcell_soft,
10242 scm_sym2ovcell, scm_intern_obarray_soft, scm_intern_obarray,
10243 scm_intern, scm_intern0, scm_sysintern0_no_module_lookup,
10244 scm_sysintern, scm_sysintern0, scm_symbol_value0,
10245 scm_string_to_obarray_symbol, scm_intern_symbol,
10246 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned,
10247 scm_symbol_bound_p, scm_symbol_set_x, scm_gentmp, gentmp_counter):
10248 Deprecated and moved to "symbols-deprecated.c".
10249 (copy_and_prune_obarray, scm_builtin_bindings): Removed.
10250 (scm_init_symbols): Call scm_init_symbols_deprecated.
10251 * symbols-deprecated.c: New file.
10252 * Makefile.am: Added symbols-deprecated.c and related files in all
10253 the right places.
10254
10255 * snarf.h (SCM_VCELL, SCM_GLOBAL_VCELL, SCM_VCELL_INIT,
10256 SCM_GLOBAL_VCELL_INIT): Deprecated.
10257 (SCM_VARIABLE, SCM_GLOBAL_VARIABLE, SCM_VARIABLE_INIT,
10258 SCM_GLOBAL_VARIABLE_INIT): New, as replacement. Changed all uses.
10259
10260 * print.c (scm_iprin1): Use scm_module_reverse_lookup instead of
10261 SCM_GLOC_SYM.
10262
10263 * evalext.c, filesys.c, fports.c, gdbint.c, gh_data.c, gsubr.c,
10264 hooks.c, load.c, numbers.c, objects.c, ports.c, posix.c, procs.c,
10265 ramap.c, random.c, read.c, regex-posix.c, scmsigs.c, script.c,
10266 socket.c, srcprop.c, stacks.c, stime.c, struct.c, tag.c, throw.c:
10267 Changed according to the `throughout' comments.
10268
10269 * modules.h, modules.c (scm_module_system_booted_p): Changed type
10270 to `int'.
10271 (scm_module_type): Removed.
10272 (the_root_module): Renamed to the_root_module_var. Now points to
10273 a variable instead of a vcell. Updated all uses.
10274 (scm_the_root_module): Return SCM_BOOL_F when module systems
10275 hasn't been booted yet.
10276 (SCM_VALIDATE_STRUCT_TYPE): Removed.
10277 (scm_post_boot_init_modules): Made static.
10278 (scm_set_current_module): Call scm_post_boot_init_modules on first
10279 call.
10280 (make_modules_in, beautify_user_module_x, resolve_module,
10281 try_module_autoload, module_make_local_var_x): Tacked on "_var"
10282 suffix. Now point to variables instead of vcells. Updated all
10283 uses.
10284 (scm_module_lookup_closure): Deal with the module being SCM_BOOL_F
10285 and return SCM_BOOL_F in that case.
10286 (scm_module_transformer): Likewise.
10287 (sym_module, scm_lookup_closure_module, scm_env_module): New.
10288 (SCM_F_EVAL_CLOSURE_INTERFACE, SCM_EVAL_CLOSURE_INTERFACE_P): New.
10289 (scm_eval_closure_lookup): Do not allow new definitions when
10290 `interface' flag is set.
10291 (scm_standard_interface_eval_closure): New.
10292 (scm_pre_modules_obarray, scm_sym2var, scm_module_lookup,
10293 scm_lookup, scm_module_define, scm_define, scm_c_module_lookup,
10294 scm_c_lookup, scm_c_module_define, scm_c_define,
10295 scm_module_reverse_lookup, scm_get_pre_modules_obarray,
10296 scm_modules_prehistory): New.
10297 (scm_post_boot_init_modules): Use scm_c_define and scm_c_lookup
10298 instead of scm_intern0.
10299
10300 * macros.c (scm_make_synt): Return SCM_UNSPECIFIED instead of the
10301 symbol.
10302
10303 * keywords.c (s_scm_make_keyword_from_dash_symbol): Use a regular
10304 hashtable operations to maintain the keywords, not obarray ones.
10305
10306 * init.c (scm_load_startup_files): Do not call
10307 scm_post_boot_init_modules. This is done by
10308 scm_set_current_module now.
10309 (scm_init_guile_1): Call scm_modules_prehistory. Call
10310 scm_init_variable early on.
10311
10312 * goops.c (s_scm_sys_goops_loaded): Get
10313 var_compute_applicable_methods from scm_sym2var, not from a direct
10314 invocation of scm_goops_lookup_closure.
10315
10316 * gh_funcs.c (gh_define): Return SCM_UNSPECIFIED instead of vcell.
10317
10318 * gc.c: Added simple debugging hack to mark phase of GC: When
10319 activated, do not tail-call scm_gc_mark. This gives nice
10320 backtraces.
10321 (scm_unhash_name): Removed.
10322
10323 * feature.c (features): Renamed to features_var. Now points to a
10324 variable instead of a vcell. Updated all uses.
10325
10326 * eval.h (SCM_TOP_LEVEL_LOOKUP_CLOSURE): Use
10327 `scm_current_module_lookup_closure' which will do the right thing
10328 when the module system hasn't been booted yet.
10329 (SCM_GLOC_SYM): Removed.
10330 (SCM_GLOC_VAR, SCM_GLOC_SET_VAL): New.
10331 (SCM_GLOC_VAL, SCM_GLOC_LOC): Reimplemented in terms of variables.
10332
10333 * eval.c (scm_lookupcar, scm_lookupcar1): Deal with variables
10334 instead of with vcells. Do not overwrite `var' with the result of
10335 the lookup, use the new `real_var' instead. Remove `var2' in
10336 exchange (which was only used with threads).
10337 (sym_three_question_marks): New.
10338 (scm_unmemocar): Use `scm_module_reverse_lookup' instead of
10339 `SCM_GLOC_SYM'.
10340 (scm_lisp_nil, scm_lisp_t): Directly define as symbols.
10341 (scm_m_atfop): Expect the function definition to be a variable
10342 instead of a vcell.
10343 (scm_macroexp): Do not use `unmemocar', explicitely remember the
10344 symbol instead.
10345 (scm_unmemocopy): Removed thoughts about anti-macro interface.
10346 (scm_eval_args): Use more explicit code in the gloc branch of the
10347 atrocious struct ambiguity test. The optimizer will sort this
10348 out.
10349 (scm_deval_args): Likewise.
10350 (SCM_CEVAL): Likewise. Also, do not use unmemocar, explicitely
10351 remember the symbol instead. Added some comments where
10352 scm_tc3_cons_gloc really exclusively refers to structs.
10353 (scm_init_eval): Use scm_define to initialize "nil" and "t" to
10354 scm_lisp_nil and scm_lisp_t, respectively. Use scm_define instead
10355 of scm_sysintern in general.
10356
10357 * dynwind.c (scm_swap_bindings): Use SCM_GLOC_SET_VAL instead of
10358 explicit magic.
10359
10360 * debug.c (s_scm_make_gloc): Only allow proper variables, no
10361 pairs. Put the variable directly in the gloc.
10362 (s_scm_gloc_p): Use `scm_tc3_cons_gloc' instead of the magic `1'.
10363 (scm_init_debug): Use scm_c_define instead scm_sysintern.
10364
10365 * cpp_cnvt.awk: Emit "scm_c_define" instead of "scm_sysintern".
10366
10367 * backtrace.h, backtrace.c (scm_the_last_stack_fluid): Renamed to
10368 scm_the_last_stack_fluid_var. It now points to a variable instead
10369 of a vcell. Updated all uses.
10370 (scm_has_shown_backtrace_hint_p_var): Now points to a variable
10371 instead of a vcell. Updated all uses.
10372
10373 * _scm.h: Include "variables.h" and "modules.h" since almost
10374 everybody needs them now.
10375
10376 * root.h (scm_symhash, scm_symhash_vars): Removed.
10377 * gc.c (scm_init_storage): Do not initialize them.
10378
10379 2001-05-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
10380
10381 * eval.c (scm_init_eval): Initialize scm_undefineds and
10382 scm_listofnull.
10383
10384 * gc.c (scm_debug_newcell, scm_debug_newcell2): Fixed to behave
10385 like the SCM_NEWCELL macro counterparts.
10386
10387 (scm_init_storage, scm_init_gc): Moved initialization of
10388 scm_tc16_allocated from scm_init_gc to scm_init_storage.
10389
10390 (scm_init_storage): Moved initialization of scm_undefineds and
10391 scm_listofnull to eval.c, initializion of scm_nullstr to
10392 strings.c, initializion of scm_nullvect to vectors.c.
10393
10394 * gc.h (SCM_NEWCELL, SCM_NEWCELL2): Prefer SCM_NULLP over
10395 SCM_IMP, as in scm_debug_newcell and scm_debug_newcell2.
10396
10397 * init.c (scm_init_guile_1): Reordered some initializations and
10398 added dependcy information comments.
10399
10400 * load.c (scm_init_load): Use scm_nullstr.
10401
10402 * strings.c (scm_init_strings): Initialize scm_nullstr.
10403
10404 * vectors.c (scm_init_vectors): Initialize scm_nullvect.
10405
10406 2001-05-15 Marius Vollmer <mvo@zagadka.ping.de>
10407
10408 * values.c (print_values): Print as a unreadable object, not as
10409 multiple lines. Thanks to Matthias Köppe!
10410
10411 2001-05-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
10412
10413 * deprecation.c: Fixed copyright date.
10414
10415 * deprecation.h (DEPRECATION_H, SCM_DEPRECATION_H): Renamed
10416 DEPRECATION_H to SCM_DEPRECATION_H.
10417
10418 2001-05-10 Thien-Thi Nguyen <ttn@revel.glug.org>
10419
10420 * guile-doc-snarf.in: Update copyright.
10421 Fix relative path bug. Thanks to Sergey Poznyakoff.
10422
10423 2001-05-10 Marius Vollmer <mvo@zagadka.ping.de>
10424
10425 * ports.c (scm_port_revealed, scm_set_port_revealed_x): Only
10426 accept open ports. Thanks to Quetzalcoatl Bradley!
10427
10428 2001-05-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10429
10430 * procs.c: Increased `scm_subr_table_room' to 800 because Guile now
10431 has 779 primitives on startup.
10432
10433 2001-05-09 Marius Vollmer <mvo@zagadka.ping.de>
10434
10435 * eval.c (scm_i_eval): Copy expression before passing it to
10436 SCM_XEVAL. The copy operation was removed unintendedly during my
10437 change on 2001-03-25.
10438
10439 2001-05-09 Michael Livshin <mlivshin@bigfoot.com>
10440
10441 from Matthias Köppe (thanks!):
10442
10443 * ports.c (scm_c_read): pointer arithmetic on void pointers isn't
10444 portable.
10445
10446 * deprecation.c (s_scm_include_deprecated_features): ANSI'fied the
10447 docstring.
10448
10449 2001-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
10450
10451 * gc.c (scm_init_gc): Added FIXME comment.
10452
10453 * hooks.c: Since hooks don't have a name any more, it is not
10454 necessary to include objprop.h.
10455
10456 (hook_print, scm_add_hook_x): Replace SCM_NFALSEP by !SCM_FALSEP.
10457
10458 (symbol_name, scm_make_hook_with_name): Removed.
10459
10460 (scm_create_hook): Don't set the hook's name property.
10461
10462 * hooks.h (HOOKSH, SCM_HOOKS_H): Renamed HOOKSH to SCM_HOOKS_H.
10463
10464 (SCM_HOOK_NAME, scm_make_hook_with_name): Removed.
10465
10466 * init.c (scm_init_guile_1): Hooks don't use objprops any more.
10467
10468 * numbers.c (SCM_FLOBUFLEN, FLOBUFLEN, scm_number_to_string,
10469 scm_print_real, scm_print_complex): Renamed SCM_FLOBUFLEN to
10470 FLOBUFLEN and define it unconditionally.
10471
10472 2001-05-07 Marius Vollmer <mvo@zagadka.ping.de>
10473
10474 * gh_data.c (gh_lookup): Call gh_module_lookup with
10475 `scm_current_module ()', not `#f'.
10476 (gh_module_lookup): Expect a module instead of an obarray as first
10477 argument and do lookup in that module.
10478
10479 * ramap.c (raeql_1): Do not call scm_uniform_vector_length on
10480 arrays. The length of array is already determined differently and
10481 scm_uniform_vector_length does not work on arrays.
10482
10483 2001-05-06 Marius Vollmer <mvo@zagadka.ping.de>
10484
10485 * snarf.h (SCM_FUNC_CAST_ARBITRARY_ARGS): Use "SCM (*)()" for C++
10486 as well. "SCM (*)(...)" does not work on RedHat 7.1.
10487
10488 * __scm.h (SCM_WTA_DISPATCH_0): Removed ARG and POS parameters,
10489 they are not used. Changed `wrong type' error into `wrong num
10490 args' error. Changed all callers.
10491
10492 * numbers.c (scm_difference): Call SCM_WTA_DISPATCH_0 when zero
10493 arguments are supplied.
10494
10495 2001-05-05 Thien-Thi Nguyen <ttn@revel.glug.org>
10496
10497 * regex-posix.c (scm_regexp_exec): Expand docstring to briefly
10498 describe `regexp/notbol' and `regexp/noteol' execution flags.
10499
10500 * strop.c (scm_substring_move_x): Doc fix; nfc.
10501
10502 2001-05-05 Marius Vollmer <mvo@zagadka.ping.de>
10503
10504 * objects.c, objects.h (scm_valid_object_procedure_p): New.
10505 (scm_set_object_procedure_x): Use it to check argument. Fix
10506 docstring.
10507
10508 * evalext.c (scm_definedp): Fix docstring.
10509
10510 2001-05-05 Gary Houston <ghouston@arglist.com>
10511
10512 * socket.c: use HAVE_IPV6 instead of AF_INET6 to enable IPv6
10513 support.
10514
10515 2001-05-04 Neil Jerram <neil@ossau.uklinux.net>
10516
10517 * eval.c (scm_promise_p), list.c (scm_append_x, scm_reverse_x),
10518 symbols.c (scm_symbol_to_string), vports.c (scm_make_soft_port):
10519 Change R4RS references to R5RS.
10520
10521 * guile-snarf.awk.in: Fixes so that (i) blank lines in the
10522 docstring source are correctly reproduced in the output (ii)
10523 we don't anymore get occasional trailing quotes. Also reorganized
10524 and commented the code a little.
10525
10526 * scmsigs.c (scm_raise), throw.c (scm_throw): Docstring format
10527 fixes.
10528
10529 2001-05-04 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10530
10531 * strop.c (scm_string_split): New procedure.
10532
10533 * strop.h (scm_string_split): Added prototype.
10534
10535 2001-05-04 Gary Houston <ghouston@arglist.com>
10536
10537 * socket.c: define uint32_t if netdb.h doesn't. thanks to
10538 Dale P. Smith.
10539
10540 2001-05-02 Marius Vollmer <mvo@zagadka.ping.de>
10541
10542 * rw.c: Include "modules.h" and "strports.h".
10543
10544 * net_db.h (scm_gethost): Added prototype.
10545
10546 * deprecation.h, deprecation.c: New.
10547 * Makefile.am (libguile_la_SOURCES): Added "deprecation.c".
10548 (DOT_X_FILES): Added "deprecation.x".
10549 (modinclude_HEADERS): Added "deprecation.h".
10550
10551 * init.c: Include "deprecation.h".
10552 (scm_init_guile_1): Call scm_init_deprecation.
10553
10554 2001-05-01 Marius Vollmer <mvo@zagadka.ping.de>
10555
10556 * gh.h (gh_init_guile, gh_make_string, gh_string_length,
10557 gh_string_ref, gh_string_set_x, gh_substring, gh_string_append):
10558 New.
10559
10560 2001-04-29 Gary Houston <ghouston@arglist.com>
10561
10562 * rw.c: new file, implementing C part of module (ice-9 rw).
10563 (scm_read_string_x_partial): moved from ioext.c
10564 (scm_init_rw): new proc.
10565 * rw.h: new file.
10566 init.c: include rw.h and call scm_init_rw.
10567 Makefile.am: include rw.c and rw.h.
10568
10569 2001-04-28 Rob Browning <rlb@cs.utexas.edu>
10570
10571 * numbers.c: enabled local definition of SCM_FLOBUFLEN until we
10572 know what's supposed to happen to it.
10573
10574 * list.h (scm_list_star): deprecation expired - removed.
10575
10576 * numbers.h (scm_dblproc): deprecation expired - removed.
10577 (SCM_UNEGFIXABLE): deprecation expired - removed.
10578 (SCM_FLOBUFLEN): deprecation expired - removed.
10579 (SCM_INEXP): deprecation expired - removed.
10580 (SCM_CPLXP): deprecation expired - removed.
10581 (SCM_REAL): deprecation expired - removed.
10582 (SCM_IMAG): deprecation expired - removed.
10583 (SCM_REALPART): deprecation expired - removed.
10584 (scm_makdbl): deprecation expired - removed.
10585 (SCM_SINGP): deprecation expired - removed.
10586 (SCM_NUM2DBL): deprecation expired - removed.
10587 (SCM_NO_BIGDIG): deprecation expired - removed.
10588
10589 * tags.h (SCM_DOUBLE_CELLP): deprecation expired - removed.
10590 (scm_tc_dblr): deprecation expired - removed.
10591 (scm_tc_dblc): deprecation expired - removed.
10592 (scm_tc16_flo): deprecation expired - removed.
10593 (scm_tc_flo): deprecation expired - removed.
10594
10595 * tag.h (scm_tag): deprecation expired - removed.
10596
10597 * tag.c: (scm_tag): deprecation expired - removed.
10598
10599 * ioext.c: (scm_fseek): deprecation expired - removed.
10600
10601 * ioext.h (scm_fseek): deprecation expired - removed.
10602
10603 * gh_data.c (gh_int2scmb): deprecation expired - removed.
10604
10605 * gh.h (gh_int2scmb): deprecation expired - removed.
10606
10607 2001-04-28 Neil Jerram <neil@ossau.uklinux.net>
10608
10609 * stacks.c (scm_make_stack): Fix typo in docstring.
10610
10611 2001-04-27 Rob Browning <rlb@cs.utexas.edu>
10612
10613 * error.c (scm_sysmissing): deprecation expired - removed.
10614
10615 * error.h (scm_sysmissing): deprecation expired - removed.
10616
10617 * gc.c
10618 (scm_init_gc): gc-thunk deprecation expired - removed.
10619 (scm_gc_vcell): deprecation expired - removed.
10620 (gc_async_thunk): scm_gc_vcell related code removed.
10621
10622 * vectors.h (SCM_NVECTORP): deprecation expired - removed.
10623
10624 * strings.h
10625 (SCM_NSTRINGP): deprecation expired - removed.
10626 (SCM_NRWSTRINGP): deprecation expired - removed.
10627
10628 * continuations.h (SCM_SETJMPBUF): deprecation expired - removed.
10629
10630 * chars.h
10631 (SCM_ICHRP): deprecation expired - removed.
10632 (SCM_ICHR): deprecation expired - removed.
10633 (SCM_MAKICHR): deprecation expired - removed.
10634
10635 * ports.h
10636 (SCM_INPORTP): deprecation expired - removed.
10637 (SCM_OUTPORTP): deprecation expired - removed.
10638
10639 2001-04-25 Marius Vollmer <mvo@zagadka.ping.de>
10640
10641 * modules.c (scm_module_type): New.
10642 (scm_post_boot_init_modules): Initialize from Scheme value.
10643 (the_module, scm_current_module, scm_init_modules): the_module is
10644 now a C only fluid.
10645 (scm_current_module): Export to Scheme.
10646 (scm_set_current_module): Do not call out to Scheme, do all the
10647 work in C. Export procedure to Scheme. Only accept modules, `#f'
10648 is no longer valid as the current module. Only set
10649 scm_top_level_lookup_closure_var and scm_system_transformer when
10650 they are not deprecated.
10651 (scm_module_transformer, scm_current_module_transformer): New.
10652
10653 * modules.h (scm_module_index_transformer, SCM_MODULE_TRANSFORMER,
10654 scm_current_module_transformer, scm_module_transformer): New.
10655
10656 * gh_data.c: Removed FIXME comment about gh_lookup returning
10657 SCM_UNDEFINED. That's the right thing to do.
10658
10659 * eval.h, eval.c (scm_system_transformer): Deprecated by moving it
10660 into the conditionally compiled sections.
10661 * eval.c (scm_primitive_eval_x, scm_primitive_eval): Use
10662 scm_current_module_transformer instead of scm_system_transformer.
10663 * init.c (start_stack): Move initialization of
10664 scm_system_transformer to the deprecated section.
10665
10666 2001-04-22 Neil Jerram <neil@ossau.uklinux.net>
10667
10668 * throw.c (scm_throw): Correct docstring.
10669
10670 2001-04-22 Gary Houston <ghouston@arglist.com>
10671
10672 * socket.c: attempted to improve the docstrings slightly.
10673
10674 * net_db.c: remove bogus "close" declaration.
10675 (inet_aton declaration, scm_inet_aton, scm_inet_ntoa,
10676 scm_inet_netof, scm_lnaof, scm_inet_makeaddr, INADDR_ANY etc.):
10677 moved to socket.c.
10678 * net_db.h: declarations moved too.
10679
10680 * socket.c (scm_htonl, scm_ntohl): use uint32_t instead of unsigned
10681 long.
10682 (ipv6_net_to_num, ipv6_num_to_net): new static procedures.
10683 (VALIDATE_INET6): new macro.
10684 (scm_inet_pton, scm_inet_ntop): new procedures, implementing
10685 inet-pton and inet-ntop.
10686 (scm_fill_sockaddr): use VALIDATE_INET6 and ipv6_num_to_net.
10687 (scm_addr_vector): use ipv6_net_to_num.
10688
10689 2001-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
10690
10691 * eq.c (scm_equal_p), ramap.c (scm_init_ramap): Don't compute the
10692 smob number explicitly. Use SCM_TC2SMOBNUM instead.
10693
10694 * gc.c (MARK, scm_gc_sweep): Only check for illegal heap objects
10695 when compiled in debug mode.
10696
10697 (scm_gc_sweep): Only call smob's free function if it is defined.
10698
10699 * print.c (scm_iprin1): No need to check for validity of smob
10700 type or existence of print function.
10701
10702 * smob.[ch] (scm_smobs): Made into a fixed size global array.
10703 Resizing will not work well with preemptive threading.
10704
10705 * smob.c (scm_smob_print): Don't use SCM_CDR to access smob data.
10706
10707 (scm_make_smob_type): Extracted initialization of smob
10708 descriptors to scm_smob_prehistory. Don't use scm_numsmob outside
10709 of the critical section.
10710
10711 (scm_smob_prehistory): Initialize all smob descriptors. By
10712 default, don't assign a smob free function: Most smob types don't
10713 need one.
10714
10715 * smob.h (SMOBH, SCM_SMOB_H): Renamed SMOBH to SCM_SMOB_H.
10716
10717 2001-04-21 Gary Houston <ghouston@arglist.com>
10718
10719 * socket.c (FLIP_NET_HOST_128): new macro.
10720 (scm_fill_sockaddr): use new macro.
10721 (scm_addr_vector): completed IPv6 address support. added const
10722 to the address parameter.
10723
10724 2001-04-20 Gary Houston <ghouston@arglist.com>
10725
10726 * socket.c (scm_fill_sockaddr): call htons for sin6_port.
10727 Don't assign sin6_scope_id in structure unless HAVE_SIN6_SCOPE_ID
10728 is defined.
10729 (scm_addr_vector): use a switch instead of multiple if statements.
10730 Add support for IPv6 (incomplete) .
10731 MAX_ADDR_SIZE: increase to size of struct sockaddr_in6 if needed.
10732
10733 2001-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
10734
10735 * struct.c (scm_free_structs): Only pairs may be accessed with
10736 SCM_C[AD]R.
10737
10738 2001-04-19 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
10739
10740 * unif.h (SCM_ARRAY_CONTIGUOUS): Reintroduced as deprecated.
10741
10742 * __scm.h (SCM_WTA_DISPATCH_0, SCM_WTA_DISPATCH_1,
10743 SCM_WTA_DISPATCH_2, SCM_WTA_DISPATCH_n): Inserted required
10744 parentheses in order to get the correct associativity.
10745
10746 2001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
10747
10748 * unif.c (scm_array_to_list): Added missing handling of arrays of
10749 bytes. Thanks to Masao Uebayashi for the bug report.
10750
10751 2001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
10752
10753 * debug.c (scm_procedure_source): Use SCM_CLOSURE_FORMALS more
10754 consistently.
10755
10756 2001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
10757
10758 * procs.h (SCM_CLOSURE_FORMALS): New macro.
10759
10760 * debug.c (scm_procedure_source), eval.c (scm_badformalsp,
10761 SCM_CEVAL, SCM_APPLY), goops.c (get_slot_value, set_slot_value),
10762 procprop.c (scm_i_procedure_arity), sort.c (closureless): Use
10763 SCM_CLOSURE_FORMALS.
10764
10765 * eval.c (scm_badformalsp, SCM_CEVAL), procprop.c
10766 (scm_i_procedure_arity): Prefer stronger predicates like
10767 SCM_NULLP or SCM_FALSEP over SCM_IMP.
10768
10769 * macros.c (macro_print): Extracted macro printing code from
10770 print.c and simplified it.
10771
10772 (scm_macro_type): Use SCM_MACRO_TYPE;
10773
10774 (scm_init_macros): Use macro_print for printing macros.
10775
10776 * print.c (scm_print_opts): Improved option documentation.
10777
10778 (scm_iprin1): Extracted printing of macros to macros.c.
10779 Simplified printing of ordinary closures.
10780
10781 * procs.c (scm_thunk_p): Fixed handling of closures. Thanks to
10782 Martin Grabmueller for the bug report.
10783
10784 2001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
10785
10786 This patch eliminates some further applications of SCM_C[AD]R to
10787 non pair cells.
10788
10789 * gc.h (SCM_SETAND_CAR, SCM_SETOR_CAR): Deprecated. These have
10790 never been applied to real pairs.
10791
10792 * srcprop.h (SCM_SOURCE_PROPERTY_FLAG_BREAK): Added.
10793
10794 (SRCPROPBRK): Use SCM_SOURCE_PROPERTY_FLAG_BREAK.
10795
10796 * unif.h (SCM_ARRAY_CONTIGUOUS, SCM_ARRAY_FLAG_CONTIGUOUS,
10797 SCM_ARRAY_CONTP): Renamed SCM_ARRAY_CONTIGUOUS to
10798 SCM_ARRAY_FLAG_CONTIGUOUS and use it.
10799
10800 (SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG):
10801 Added.
10802
10803 * srcprop.h (SRCPROPH), unif.h (UNIFH): Renamed to
10804 SCM_SOURCE_PROPERTIES_H and SCM_UNIFORM_VECTORS_H, respectively.
10805
10806 * srcprop.h (SETSRCPROPBRK, CLEARSRCPROPBRK), unif.c
10807 (scm_dimensions_to_uniform_array, scm_ra_set_contp): Don't use
10808 SCM_SET{AND,OR}_CAR.
10809
10810 2001-04-17 Gary Houston <ghouston@arglist.com>
10811
10812 * some initial support for IPv6:
10813
10814 * socket.c (scm_fill_sockaddr): improve the argument validation.
10815 don't allocate memory until all args are checked. instead of
10816 unconditional memset of soka, try setting sin_len to 0 if
10817 SIN_LEN is defined. add support for AF_INET6. define FUNC_NAME.
10818 (scm_socket, scm_connect): extend docstrings for IPv6.
10819 (scm_init_socket): intern AF_INET6 and PF_INET6.
10820
10821 2001-04-17 Niibe Yutaka <gniibe@m17n.org>
10822
10823 * srcprop.c (scm_make_srcprops): Added SCM_ALLOW_INTS which
10824 matches SCM_DEFER_INTS at the beginning of the function.
10825
10826 * mallocs.c (scm_malloc_obj): Remove un-matched SCM_ALLOW_INTS.
10827
10828 * gc.c (scm_igc): Unconditionally call
10829 SCM_CRITICAL_SECTION_START/END.
10830
10831 * fluids.c (next_fluid_num): Unconditionally call
10832 SCM_CRITICAL_SECTION_START/END.
10833 (s_scm_make_fluid): Remove un-matched SCM_DEFER_INTS.
10834
10835 * coop-defs.h (SCM_THREAD_DEFER, SCM_THREAD_ALLOW,
10836 SCM_THREAD_REDEFER, SCM_THREAD_REALLOW_1, SCM_THREAD_REALLOW_2):
10837 Removed.
10838
10839 * __scm.h (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END):
10840 Defined as nothing for the case of !defined(USE_THREADS).
10841 (SCM_THREAD_DEFER, SCM_THREAD_ALLOW, SCM_THREAD_REDEFER):
10842 Removed.
10843 (<stdio.h>): Include when (SCM_DEBUG_INTERRUPTS == 1).
10844 (SCM_CHECK_NOT_DISABLED, SCM_CHECK_NOT_ENABLED): Print FILE and
10845 LINE.
10846 (SCM_DEFER_INTS, SCM_ALLOW_INTS_ONLY, SCM_ALLOW_INTS,
10847 SCM_REDEFER_INTS, SCM_REALLOW_INTS): Don't use
10848 SCM_THREAD_DEFER/SCM_THREAD_ALLOW. Instead, use
10849 SCM_CRITICAL_SECTION_START/END.
10850 (SCM_REALLOW_INTS: Bug fix. Don't call
10851 SCM_THREAD_SWITCHING_CODE.
10852 (SCM_TICK): Don't use SCM_DEFER_INTS/SCM_ALLOW_INTS. Instead, use
10853 SCM_THREAD_SWITCHING_CODE directly.
10854 (SCM_ENTER_A_SECTION): Unconditionally use
10855 SCM_CRITICAL_SECTION_START/END. (was:
10856 SCM_DEFER_INTS/SCM_ALLOW_INTS when SCM_POSIX_THREADS defined).
10857
10858 2001-04-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
10859
10860 * __scm.h (SCM_CAREFUL_INTS, SCM_DEBUG_INTERRUPTS): Replaced the
10861 macro SCM_CAREFUL_INTS by the macro SCM_DEBUG_INTERRUPTS and
10862 allowed to explicitly set this macro via the CFLAGS variable
10863 during make.
10864
10865 * fluids.c (next_fluid_num), gc.c (scm_igc), coop-defs.h
10866 (SCM_THREAD_CRITICAL_SECTION_START,
10867 SCM_THREAD_CRITICAL_SECTION_END): Renamed
10868 SCM_THREAD_CRITICAL_SECTION_START/END to
10869 SCM_CRITICAL_SECTION_START/END.
10870
10871 2001-04-11 Keisuke Nishida <kxn30@po.cwru.edu>
10872
10873 * debug-malloc.c (grow, scm_debug_malloc_prehistory): Use memset
10874 instead of bzero.
10875
10876 * coop.c, iselect.c (FD_ZERO_N): Unconditionally use memset.
10877 (MISSING_BZERO_DECL): Remove the declaration.
10878
10879 Thanks to NIIBE Yutaka.
10880
10881 2001-04-10 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
10882
10883 * init.c, goops.c, goops.h: Reverted change of 2001-03-29. (The
10884 goops module should be registered in order to work for an
10885 application which uses libguile statically linked.)
10886
10887 2001-04-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
10888
10889 * numbers.[ch] (scm_num2long, scm_num2long_long,
10890 scm_num2ulong_long, scm_num2ulong): Argument position is an
10891 unsigned integer.
10892
10893 * environments.c (eval_environment_folder,
10894 import_environment_folder), gh_data.c (gh_scm2longs,
10895 gh_scm2floats, gh_scm2doubles): Distinguish between 0 and NULL
10896 for integers and pointers, respectively.
10897
10898 * gh_data.c (gh_scm2ulong, gh_scm2long, gh_scm2int), socket.c
10899 (scm_fill_sockaddr), unif.c (scm_array_set_x), validate.h
10900 (SCM_NUM2ULONG, SCM_NUM2LONG, SCM_NUM2LONG_DEF,
10901 SCM_NUM2LONG_LONG): Don't pass argument positions as pointers.
10902
10903 * filesys.c (scm_open_fdes, scm_open), net_db (scm_inet_ntoa,
10904 scm_inet_netof, scm_lnaof, scm_gethost, scm_getproto), posix.c
10905 (scm_utime), ramap.c (scm_array_fill_int), scmsigs.c
10906 (scm_sigaction), socket.c (scm_htonl, scm_ntohl, scm_sendto),
10907 stime.c (scm_localtime, scm_gmtime), struct.c (scm_struct_set_x),
10908 validate.h (SCM_VALIDATE_LONG_COPY): Whitespace fixes.
10909
10910 2001-04-09 Neil Jerram <neil@ossau.uklinux.net>
10911
10912 * strings.c (scm_read_only_string_p): Update docstring to reflect
10913 current (non-)usage of "read only" strings.
10914 (scm_make_shared_substring): Clarify docstring by changing
10915 "semantics" to "arguments".
10916
10917 2001-04-06 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10918
10919 * hooks.c (scm_make_hook, scm_make_hook_with_name),
10920 (scm_hook_p, scm_hook_empty_p, scm_run_hook): Docstring
10921 improvements.
10922
10923 2001-04-03 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10924
10925 The following changes make the documentation more consistent.
10926
10927 * rdelim.c (scm_write_line), posix.c (scm_utime), ports.c
10928 (scm_seek), net_db.c (scm_inet_aton, scm_inet_ntoa),
10929 (scm_inet_netof, scm_lnaof, scm_inet_makeaddr), ioext.c
10930 (scm_ftell): Changed @smalllisp ... @end smalllisp to @lisp
10931 ... @end lisp.
10932
10933 * vports.c (scm_make_soft_port), version.c (scm_version), unif.c
10934 (scm_array_dimensions, scm_make_shared_array),
10935 (scm_transpose_array, scm_enclose_array, scm_bit_count_star),
10936 throw.c (scm_catch), struct.c (scm_make_vtable_vtable), strop.c
10937 (scm_string_rindex, scm_string_index, scm_substring_fill_x),
10938 (scm_string_null_p), strings.c (scm_read_only_string_p), root.c
10939 (scm_call_with_dynamic_root), ramap.c (scm_array_index_map_x),
10940 posix.c (scm_mknod), numbers.c (scm_logtest, scm_logbit_p),
10941 macros.c (scm_makmmacro), list.c (scm_append), environments.c
10942 (scm_environment_fold), dynwind.c (s_scm_dynamic_wind): Changed
10943 @example ... @end example to @lisp ... @end lisp.
10944
10945 * weaks.c (scm_weak_vector): Corrected docstring.
10946
10947 * hashtab.c (scm_hashq_ref, scm_hashq_set_x, scm_hashq_remove_x),
10948 (scm_hashv_ref, scm_hashv_set_x, scm_hashv_remove_x),
10949 (scm_hash_ref, scm_hash_set_x, scm_hash_remove_x, scm_hashx_ref),
10950 (scm_hashx_set_x, scm_hashx_get_handle),
10951 (scm_hashx_create_handle_x), regex-posix.c (scm_make_regexp),
10952 (scm_regexp_exec, scm_regexp_p), numbers.c (scm_logtest),
10953 vectors.c (scm_vector_fill_x), strings.c
10954 (scm_make_shared_substring), symbols.c (scm_string_to_symbol),
10955 objprop.c (scm_set_object_properties_x):
10956 (scm_set_object_property_x), throw.c (scm_catch, scm_lazy_catch),
10957 strports.c (scm_call_with_input_string), ports.c
10958 (scm_truncate_file), ioext.c (scm_ftell), ports.c (scm_seek),
10959 list.c (scm_append_x), dynwind.c (scm_dynamic_wind), error.c
10960 (scm_error_scm), vports.c (scm_make_soft_port), weaks.c
10961 (scm_make_weak_vector,scm_weak_vector_p),
10962 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table),
10963 (scm_make_doubly_weak_hash_table, scm_weak_key_hash_table_p),
10964 (scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
10965 macros.c (scm_macro_type), dynl.c (scm_dynamic_link),
10966 (scm_dynamic_unlink, scm_dynamic_call, scm_dynamic_args_call):
10967 Made parameter names match documentation by renaming parameters
10968 and/or fixing docstrings.
10969
10970 * numbers.c (scm_ash): Corrected Texinfo markup.
10971
10972 * strop.c (scm_string_index, scm_string_rindex),
10973 (scm_substring_fill_x, scm_string_null_p): Removed `qdocs'.
10974
10975 * vports.c (scm_make_soft_port), unif.c
10976 (scm_uniform_vector_length, scm_array_p, scm_array_rank),
10977 (scm_dimensions_to_uniform_array, scm_transpose_array),
10978 (scm_array_in_bounds_p, scm_uniform_vector_ref),
10979 (scm_bit_count, scm_bit_position, scm_bit_count_star),
10980 (scm_array_to_list, scm_list_to_uniform_array),
10981 (scm_array_prototype, symbols.c (scm_string_to_symbol), strports.c
10982 (scm_open_input_string, scm_open_output_string),
10983 (scm_get_output_string), strop.c (scm_string_copy),
10984 (scm_string_fill_x), strings.c (scm_string_p, scm_string), stime.c
10985 (scm_get_internal_real_time, scm_times),
10986 (scm_get_internal_run_time, scm_current_time, scm_gettimeofday),
10987 (scm_localtime, scm_gmtime), socket.c (scm_htons, scm_ntohs),
10988 (scm_htonl, scm_ntohl, scm_socket, scm_socketpair),
10989 (scm_getsockopt, scm_getsockname, scm_getpeername, scm_recvfrom),
10990 simpos.c (scm_system), random.c (scm_random_uniform),
10991 (scm_random_normal, scm_random_exp), ramap.c
10992 (scm_array_equal_p), posix.c (scm_pipe, scm_getgroups),
10993 (scm_status_exit_val, scm_status_term_sig, scm_status_stop_sig),
10994 (scm_getppid, scm_getuid, scm_getgid, scm_geteuid, scm_getegid),
10995 (scm_getpgrp, scm_ttyname, scm_ctermid, scm_tcgetpgrp, scm_uname),
10996 (scm_environ, scm_tmpnam, scm_mkstemp, scm_access, scm_getpid),
10997 (scm_setlocale), ports.c (scm_char_ready_p, scm_drain_input),
10998 (scm_pt_size, scm_pt_member, scm_port_revealed, scm_port_mode),
10999 (scm_close_port, scm_input_port_p, scm_output_port_p, scm_port_p),
11000 (scm_port_closed_p, scm_eof_object_p, scm_read_char),
11001 (scm_peek_char), pairs.c (scm_pair_p, scm_cons), numbers.c
11002 (scm_logand, scm_logior, scm_logxor, scm_lognot),
11003 (scm_integer_expt, scm_bit_extract, scm_logcount),
11004 (scm_integer_length, scm_string_to_number, scm_inexact_to_exact),
11005 net_db.c (scm_inet_netof, scm_lnaof), modules.c
11006 (scm_interaction_environment), macros.c (scm_makacro),
11007 (scm_makmacro, scm_makmmacro), keywords.c (scm_keyword_p), ioext.c
11008 (scm_ftell, scm_dup_to_fdes, scm_fileno, scm_isatty_p),
11009 (scm_fdopen, scm_fdes_to_ports), gc.c (scm_gc_stats), fluids.c
11010 (scm_fluid_ref), filesys.c (scm_open_fdes),
11011 (scm_stat, scm_directory_stream_p, scm_getcwd, scm_readlink):
11012 Docstring correction: `Returns' -> `Return'
11013
11014 * gc.c (scm_set_debug_cell_accesses_x):
11015 (s_scm_gc_set_debug_check_freelist_x):
11016 * fluids.c (scm_fluid_p): Added texinfo markup.
11017
11018 * error.c (scm_strerror): Made docstring more precise.
11019
11020 * vectors.c (scm_vector_p, scm_vector, scm_make_vector),
11021 (scm_vector_to_list, _scm_vector_fill_x), symbols.c
11022 (scm_symbol_p, scm_symbol_to_string), strorder.c
11023 (scm_string_equal_p, scm_string_ci_equal_p, scm_string_less_p),
11024 (scm_string_leq_p, scm_string_gr_p, scm_string_geq_p),
11025 (scm_string_ci_less_p, scm_string_ci_leq_p, scm_string_ci_gr_p):
11026 (scm_string_ci_geq_p), strop.c (scm_string_copy),
11027 (scm_string_fill_x): Removed `(r5rs)' from docstrings.
11028
11029 2001-04-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
11030
11031 * gc.c (MARK): Re-introduce a cheap sanity test for non debug
11032 mode, as suggested by Michael Livshin.
11033
11034 2001-03-31 Michael Livshin <mlivshin@bigfoot.com>
11035
11036 * backtrace.c (display_backtrace_body): since the `print_state'
11037 variable is not used (instead its data field is used directly as
11038 `pstate'), protect it from the hungry compiler optimizations.
11039 thanks to Bill Schottstaedt for the report.
11040
11041 2001-03-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
11042
11043 * gc.[ch] (scm_tc16_allocated): New type tag for allocated cells.
11044 It is only defined and used if guile is compiled with
11045 SCM_DEBUG_CELL_ACCESSES set to true. It's purpose is, to never
11046 let cells with a free_cell type tag be visible outside of the
11047 garbage collector when in debug mode.
11048
11049 * gc.c (scm_debug_cell_accesses_p): Set to true as default.
11050
11051 (scm_assert_cell_valid): Use a local static variable to avoid
11052 recursion.
11053
11054 (MARK): Only check for rogue cell pointers in debug mode. Use
11055 scm_cellp for this purpose and place all checks for rogue pointers
11056 into that function. Further, since due to conservative scanning
11057 we may encounter free cells during marking, don't use the standard
11058 cell type accessor macro to determine the cell type.
11059
11060 (scm_cellp): Check if the cell pointer actually points into a
11061 card header.
11062
11063 (scm_init_gc): Initalize scm_tc16_allocated.
11064
11065 * gc.h (GCH): Renamed to SCM_GC_H.
11066
11067 (SCM_VALIDATE_CELL): Enclose the expression in brackets. This
11068 might be unnecessary, but I feel better this way :-)
11069
11070 (SCM_GC_CELL_TYPE): New macro.
11071
11072 (SCM_SETAND_CDR, SCM_SETOR_CDR): Deprecated. These are not used
11073 in guile, and it is unlikely that they will be applied to real
11074 pairs anyway.
11075
11076 (SCM_SET_FREE_CELL_TYPE): Removed. It was not used.
11077
11078 (SCM_GC_SET_ALLOCATED): New macro. Only non-empty if guile is
11079 compiled with SCM_DEBUG_CELL_ACCESSES set to true.
11080
11081 (SCM_NEWCELL, SCM_NEWCELL2): Use of SCM_GC_SET_ALLOCATED will
11082 make sure that in debug mode no free cell will ever be visible
11083 outside of the garbage collector.
11084
11085 2001-03-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
11086
11087 * async.c (scm_asyncs_pending): Don't use != to compare SCM
11088 values.
11089
11090 * async.c (scm_system_async), variable.c (scm_make_variable,
11091 scm_make_undefined_variable): Use scm_cons to create a pair.
11092
11093 * debug.c (scm_reverse_lookup): Perform proper type checking.
11094 Remove suspicious use of SCM_SLOPPY_CONSP.
11095
11096 * eq.c (scm_equal_p), tags.h (SCM_ECONSP): Use SCM_CONSP instead
11097 of SCM_SLOPPY_CONSP. A sane compiler should be able to perform
11098 the corresponding optimization.
11099
11100 * eval.c (iqq): Use proper type check.
11101
11102 (scm_m_expand_body): Remove redundant type checks.
11103
11104 (promise_print): Don't access promise cells as pairs.
11105
11106 * eval.c (EVALCAR, iqq, scm_m_expand_body, scm_eval_args,
11107 scm_deval_args SCM_CEVAL), guardians.c (scm_guard), hashtab.c
11108 (scm_internal_hash_fold), print.c (scm_iprlist): Use !SCM_CELLP
11109 for SCM_NCELLP, !SCM_CONSP for SCM_NCONSP, !SCM_IMP for SCM_NIMP,
11110 !SCM_FALSEP for SCM_NFALSEP, !SCM_NULLP for SCM_NNULLP
11111
11112 * eval.c (scm_m_define, scm_macroexp, SCM_CEVAL), print.c
11113 (scm_iprin1): Use new macro predicate and accessors.
11114
11115 * eval.h (scm_tc16_macro): Removed declaration. It is declared
11116 in macros.h.
11117
11118 * eval.h (EVALH), macros.h (MACROSH), ports.h (PORTSH), procs.h
11119 (PROCSH), tags.h (TAGSH), variable.h (VARIABLEH): Renamed to
11120 SCM_EVAL_H, SCM_MACROS_H, SCM_PORTS_H, SCM_PROCS_H, SCM_TAGS_H and
11121 SCM_VARIABLE_H. Even the macros that are used to inhibit
11122 including a header file twice should be in the SCM_ namespace.
11123
11124 * fluids.c (scm_swap_fluids, scm_swap_fluids_reverse),
11125 properties.c (scm_primitive_property_ref,
11126 scm_primitive_property_del_x): Prefer stronger predicates like
11127 SCM_NULLP or SCM_FALSEP over SCM_IMP.
11128
11129 * gc.c (MARK): Use proper macros to access procedure-with-setter
11130 cell elements and closure cell elements.
11131
11132 (gc_sweep_freelist_finish, scm_gc_sweep, init_heap_seg): Don't
11133 access free cells as pairs.
11134
11135 (scm_unprotect_object): scm_hashq_get_handle returns #f if
11136 no hashtab entry is found.
11137
11138 * gc.c (scm_gc_sweep), ports.c (scm_close_port): Use new macro
11139 SCM_CLR_PORT_OPEN_FLAG.
11140
11141 * guardians.c (TCONC_IN), print.c (scm_free_print_state): Don't
11142 use SCM_SET_C[AD]R for uninitialized cells.
11143
11144 * hashtab.c (scm_hash_fn_get_handle): Use SCM_VALIDATE_VECTOR.
11145 If the hashtable has no slots, return #f instead of '(). This
11146 unifies the return value with most assoc-functions.
11147
11148 (scm_hash_fn_ref): Use proper type check.
11149
11150 (scm_hashq_get_handle, scm_hashv_get_handle, scm_hash_get_handle):
11151 Removed references to non-existing functions from documentation.
11152
11153 * keywords.c (scm_keyword_dash_symbol): Use proper macros to
11154 access keyword cell elements.
11155
11156 * macros.h (SCM_MACROP, SCM_MACRO_TYPE, SCM_MACRO_CODE): New
11157 macros.
11158
11159 * ports.h (SCM_CLR_PORT_OPEN_FLAG): New macro.
11160
11161 * print.c (scm_iprlist): Added comment. Improved loop
11162 conditions.
11163
11164 * procs.h (SCM_ENV, SCM_SETENV): Don't access closure cells as
11165 pairs.
11166
11167 * smob.c (scm_markcdr): Don't access smob cells as pairs.
11168
11169 * tags.h (SCM_SLOPPY_CONSP, SCM_SLOPPY_NCONSP): Deprecated.
11170
11171 * throw.c (ACTIVATEJB, DEACTIVATEJB): Don't access jump buffer
11172 cells as pairs.
11173
11174 * variable.c (variable_print, variable_equalp, scm_variable_ref,
11175 scm_variable_set_x): Use proper macros to access variable cell
11176 elements.
11177
11178 (scm_variable_bound_p): Don't use SCM_NEGATE_BOOL.
11179
11180 * variable.h (SCM_VARVCELL): Don't access variable cells as
11181 pairs.
11182
11183 * vectors.c (scm_vector), weaks.c (scm_weak_vector): Simplified,
11184 added FIXME comment, removed register specifier.
11185
11186 2001-03-29 Keisuke Nishida <kxn30@po.cwru.edu>
11187
11188 * goops.c, goops.h (scm_init_oop_goops_goopscore_module): Deprecated.
11189 * init.c (scm_init_guile_1): Don't init goopscore module.
11190
11191 2001-03-27 Marius Vollmer <mvo@zagadka.ping.de>
11192
11193 * eval.c (SCM_APPLY): Check that arg1 is bound for scm_tc7_cxr.
11194
11195 2001-03-27 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11196
11197 * strop.c (scm_string_to_list): Fixed docstring markup.
11198 (scm_string_upcase_x, scm_string_upcase, scm_string_downcase_x),
11199 (scm_string_downcase, scm_string_capitalize_x),
11200 (scm_string_capitalize): Rewrote and corrected docstrings.
11201 (scm_string_ci_to_symbol): Made docstring more explicit.
11202
11203 2001-03-27 Marius Vollmer <mvo@zagadka.ping.de>
11204
11205 * values.h (scm_values_vtable, SCM_VALUESP): Moved here so that
11206 eval.c can use it.
11207 (scm_call_with_values): Removed.
11208 * values.c (values_vtable, scm_values_vtable): Added "scm_" prefix
11209 so that it can be exported.
11210 (scm_call_with_values): Removed.
11211
11212 * tags.h (SCM_IM_CALL_WITH_VALUES): New isym.
11213 * eval.c: Include "libguile/values.h"
11214 (scm_m_at_call_with_values, scm_sym_at_call_with_values):
11215 New.
11216 (unmemocopy, scm_ceval, scm_deval): Handle new isym.
11217 * eval.h (scm_sym_at_call_with_values, scm_m_at_call_with_values):
11218 New delcarations to support above change.
11219
11220 * eval.c (scm_primitive_eval_x, scm_primitive_eval): Fix syntax
11221 errors with last change.
11222
11223 2001-03-25 Marius Vollmer <mvo@zagadka.ping.de>
11224
11225 * eval.c (scm_primitive_eval_x, scm_primitive_eval, scm_i_eval_x,
11226 scm_i_eval): Moved the application of the system transformer from
11227 scm_i_eval to scm_primitive_eval.
11228
11229 2001-03-23 Neil Jerram <neil@ossau.uklinux.net>
11230
11231 * guile-snarf.awk.in: Substitute "\\" with "\" in .doc output.
11232
11233 * strop.c (scm_string_index): Fix docstring line break
11234 regression.
11235
11236 * list.c (scm_cons_star): Fix docstring typo.
11237
11238 2001-03-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
11239
11240 * gc.c (scm_init_storage), gdbint.c (scm_init_gdbint), numbers.c
11241 (big2str), ports.c (scm_drain_input), read.c (scm_read,
11242 scm_grow_tok_buf), strings.c (scm_string, scm_makfromstr,
11243 scm_make_string, scm_string_append), strports.c (st_resize_port,
11244 scm_object_to_string), unif.c (scm_make_uve): Replace calls to
11245 scm_makstr with calls to scm_allocate_string.
11246
11247 * strings.[ch] (scm_allocate_string): New function.
11248
11249 * strings.[ch] (scm_makstr): Deprecated.
11250
11251 2001-03-18 Gary Houston <ghouston@arglist.com>
11252
11253 * posix.c (scm_tmpnam): check that return value from tmpnam is not
11254 NULL. rewrote the docstring.
11255 (scm_mkstemp): new procedure implementing "mkstemp!".
11256 * posix.h: declare scm_mkstemp.
11257
11258 * net_db.c: declare h_errno if configure didn't define HAVE_H_ERRNO.
11259 normally it would be found in netdb.h.
11260
11261 2001-03-17 Gary Houston <ghouston@arglist.com>
11262
11263 * sort.c (scm_sort): move sortvec variable to avoid a compiler
11264 warning when HAVE_ARRAYS is not defined. move len too.
11265
11266 * Makefile.am (DOT_X_FILES): remove net_db.x, posix.x, socket.x.
11267 (EXTRA_DOT_X_FILES): let configure set the value.
11268 (DOT_DOC_FILES): remove net_db.doc, posix.doc, socket.doc.
11269
11270 * gc.c (scm_must_malloc): changed the comment explaining when
11271 scm_must variants of malloc/free etc., should be used, based on
11272 explanation from Dirk Herrmann.
11273 * fports.c (scm_fport_buffer_add): use FUNC_NAME instead of a local
11274 string with procedure name. use scm_must_malloc instead of malloc.
11275 (scm_setvbuf, scm_fdes_to_port, fport_close): use scm_must variants
11276 of malloc/free.
11277 * ports.c (scm_add_to_port_table, scm_remove_from_port_table,
11278 scm_ungetc): use scm_must variants of malloc/realloc/free.
11279 (scm_add_to_port_table, scm_ungetc): define FUNC_NAME.
11280
11281 2001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
11282
11283 * __scm.h (SCM_ASSERT, SCM_WTA_DISPATCH_0, SCM_WTA_DISPATCH_1,
11284 SCM_WTA_DISPATCH_2, SCM_WTA_DISPATCH_n): Don't call scm_wta, call
11285 scm_wrong_type_arg instead.
11286
11287 (SCM_WNA): Deprecated.
11288
11289 * error.[ch] (scm_wta): Deprecated.
11290
11291 * numbers.c (s_i_log): Minor comment fix.
11292
11293 * read.c (scm_lreadr), unif.c (scm_aind, scm_shap2ra,
11294 scm_make_shared_array, scm_transpose_array, scm_enclose_array,
11295 scm_array_in_bounds_p): Don't use SCM_ASSERT to check for
11296 wrong-num-args or misc errors.
11297
11298 * unif.c (scm_make_shared_array, scm_transpose_array,
11299 scm_enclose_array, scm_array_in_bounds_p, scm_array_set_x):
11300 Validate the rest argument (note: this is only done when guile is
11301 built with SCM_DEBUG_REST_ARGUMENT=1)
11302
11303 (scm_array_in_bounds_p, scm_uniform_vector_ref, scm_array_set_x):
11304 Replace calls to scm_wrong_num_args by SCM_WRONG_NUM_ARGS.
11305
11306 * validate.h (SCM_FUNC_NAME, SCM_VALIDATE_NUMBER_COPY,
11307 SCM_VALIDATE_NUMBER_DEF_COPY): Deprecated.
11308
11309 2001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
11310
11311 * validate.h (SCM_WRONG_NUM_ARGS): Call scm_error_num_args_subr
11312 instead of scm_wrong_num_args.
11313
11314 * coop-threads.c: Don't include libguile/strings.h. (Was only
11315 needed for former implementation of SCM_WRONG_NUM_ARGS.)
11316
11317 * debug.c (scm_m_start_stack): Don't use SCM_ASSERT to check for
11318 wrong-num-args errors.
11319
11320 2001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
11321
11322 * error.[ch] (scm_error_num_args_subr): New function.
11323
11324 2001-03-16 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11325
11326 * list.c (scm_list, scm_cons_star, scm_null_p, scm_list_p),
11327 (scm_length, scm_append, scm_reverse, scm_list_ref),
11328 (scm_memq, scm_memv, scm_member, scm_delv_x, scm_delete_x),
11329 (scm_delq, scm_delv, scm_delete, scm_delq1_x, scm_delv1_x),
11330 (scm_delete1_x), gc.c (scm_map_free_list),
11331 (scm_free_list_length), hash.c (scm_hashq, scm_hashv),
11332 (scm_hash), hashtab.c (scm_hashq_ref, scm_hashq_set_x),
11333 (scm_hashq_remove_x, scm_hashv_ref, scm_hashv_set_x),
11334 (scm_hashv_remove_x, scm_hash_ref, scm_hash_set_x),
11335 (scm_hash_remove_x), ports.c (scm_pt_size, scm_pt_member), print.c
11336 (scm_current_pstate), scmsigs.c (scm_usleep), goops.c
11337 (scm_get_keyword, scm_sys_compute_slots): Added texinfo markup.
11338
11339 * weaks.c (scm_weak_vector_p, scm_weak_key_hash_table_p),
11340 (scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
11341 rdelim.c (scm_read_delimited_x), strop.c (scm_string_index),
11342 symbols.c (scm_symbol_interned_p), numbers.c
11343 (scm_string_to_number), ports.c (scm_port_p): Corrected texinfo
11344 markup.
11345
11346 2001-03-16 Keisuke Nishida <kxn30@po.cwru.edu>
11347
11348 * snarf.h (SCM_CONST_LONG): Deprecated.
11349 * tag.c (CONST_INUM): New macro. Use it to define scm_utag_*.
11350
11351 2001-03-15 Marius Vollmer <marius.vollmer@uni-dortmund.de>
11352
11353 * numbers.c (scm_num2ulong): Check that a bignum is positive
11354 before looking at the magnitude. Correctly check for overflow
11355 during conversion.
11356 (scm_num2long_long): Likewise.
11357 (scm_num2ulong_long): New.
11358 (ULONG_LONG_MAX): Define if not already defined.
11359 * numbers.h: (scm_num2ulong_long): New prototype.
11360
11361 2001-03-15 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11362
11363 * validate.h (SCM_VALIDATE_OPOUTSTRPORT): New macro.
11364
11365 * strports.h (SCM_STRPORTP, SCM_OPSTRPORTP, SCM_OPINSTRPORTP),
11366 (SCM_OPOUTSTRPORTP): New predicate macros.
11367 (scm_open_input_string, scm_open_output_string),
11368 (scm_get_output_string): New prototypes.
11369
11370 * strports.c (scm_open_input_string, scm_open_output_string),
11371 (scm_get_output_string): New procedures (SRFI-6 compliant).
11372 Made scm_tc16_strport non-static.
11373
11374 2001-03-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
11375
11376 * macros.h (SCM_ASSYNT): Removed unused object argument from
11377 signature.
11378
11379 * eval.c (scm_m_body, scm_m_quote, scm_m_begin, scm_m_if,
11380 scm_m_set_x, scm_m_and, scm_m_or, scm_m_case, scm_m_cond,
11381 scm_m_letstar, scm_m_do, scm_m_quasiquote, scm_m_delay,
11382 scm_m_define, scm_m_letrec1, scm_m_letrec, scm_m_let, scm_m_apply,
11383 scm_m_cont, scm_m_nil_cond, scm_m_nil_ify, scm_m_t_ify,
11384 scm_m_0_cond, scm_m_0_ify, scm_m_1_ify, scm_m_atfop, scm_m_atbind,
11385 scm_m_expand_body), evalext.c (scm_m_generalized_set_x,
11386 scm_m_undefine), goops.c (scm_m_atslot_ref, scm_m_atslot_set_x,
11387 scm_m_atdispatch): Removed unused object argument from call to
11388 SCM_ASSYNT.
11389
11390 2001-03-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
11391
11392 * gh.h/gh_data.c (gh_ints2scm): Changed the signature to use a
11393 const int* to reflect that the input array of integers remains
11394 unchanged. Thanks to Brett Viren for the hint.
11395
11396 2001-03-14 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11397
11398 * gh_data.c (gh_scm2chars, gh_scm2shorts, gh_scm2longs),
11399 (gh_scm2floats, gh_scm2doubles): Check for malloc() returning NULL
11400 in various places.
11401 (gh_scm2newstr, gh_symbol2newstr): Change call to
11402 scm_must_malloc() to malloc(), because user-free()able memory is
11403 allocated.
11404
11405 * gc.c: Added declaration of `scm_debug_check_freelist'.
11406
11407 2001-03-13 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11408
11409 * ports.c (scm_port_mode): Changed `mode' array size to 4.
11410
11411 2001-03-12 Keisuke Nishida <kxn30@po.cwru.edu>
11412
11413 * strports.c (scm_object_to_string): New procedure.
11414 (scm_strprint_obj): Deprecated.
11415 * strports.h: Reflect the changes.
11416
11417 2001-03-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
11418
11419 * goops.h (SCM_VALIDATE_PUREGENERIC): New macro.
11420
11421 * goops.c (scm_m_atslot_ref, scm_m_atslot_set_x,
11422 scm_m_atdispatch): Provide definitions for FUNC_NAME. Don't use
11423 SCM_ASSYNT to check for correct argument types. Either use some
11424 SCM_VALIDATE_* macro or an explicit test.
11425
11426 (scm_make_foreign_object): Don't use SCM_ASSERT to check for
11427 misc-errors.
11428
11429 * macros.h (SCM_ASSYNT): On assertion failure, issue a misc-error
11430 instead of calling scm_wta.
11431
11432 2001-03-12 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11433
11434 * load.c (scm_primitive_load, scm_primitive_load_path),
11435 (scm_sys_search_load_path): Corrected docstrings (file ->
11436 filename).
11437
11438 * eval.c (scm_force): Added texinfo markup to docstring.
11439 (scm_promise_p): Renamed parameter to `obj' to match docstring.
11440
11441 * debug-malloc.c: Reinserted #include <stdio.h>.
11442
11443 2001-03-11 Keisuke Nishida <kxn30@po.cwru.edu>
11444
11445 * list.c (s_scm_reverse_x): Use SCM_VALIDATE_LIST.
11446
11447 * environments.c, error.c, eval.c, filesys.c, hashtab.c, load.c,
11448 net_db.c, procprop.c, read.c, scmsigs.c, socket.c, struct.c:
11449 Use SCM_LISTn instead of scm_listify.
11450
11451 2001-03-10 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11452
11453 * _scm.h: Removed #include <errno.h>.
11454
11455 * error.c, net_db.c, putenv.c, stime.c: Removed declaration of
11456 errno variable (can be a macro on some systems, for example when
11457 using linux libc with threads).
11458
11459 * error.c, filesys.c, gc.c, ioext.c, iselect.c, net_db.c, ports.c,
11460 posix.c, print.c, putenv.c, scmsigs.c, script.c, simpos.c, smob.c,
11461 socket.c, srcprop.c, stime.c, strop.c, unif.c, vports.c: Added
11462 #include <errno.h> in these 20 out of 100 files.
11463
11464 2001-03-10 Gary Houston <ghouston@arglist.com>
11465
11466 * socket.c: add a definition of SUN_LEN (from glibc) for when it's
11467 not already defined.
11468
11469 2001-03-09 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11470
11471 * coop.c: Inserted #include <stdio.h>.
11472
11473 * iselect.c: Reinserted #include <stdio.h>.
11474
11475 2001-03-10 Marius Vollmer <mvo@zagadka.ping.de>
11476
11477 * posix.c: Replaced `#define' of __USE_XOPEN right before
11478 including unistd.h with a define of _GNU_SOURCE at the very top of
11479 the file.
11480
11481 2001-03-09 Keisuke Nishida <kxn30@po.cwru.edu>
11482
11483 * alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,
11484 continuations.c, debug-malloc.c, debug.c, dynwind.c, eq.c, eval.c,
11485 feature.c, filesys.h, gc_os_dep.c, gh_data.c, gh_eval.c,
11486 gh_funcs.c, gh_io.c, gh_list.c, gh_predicates.c, hash.c,
11487 hashtab.c, iselect.c, keywords.c, list.c, load.c, mallocs.c,
11488 net_db.c, numbers.c, objprop.c, objprop.h, options.c, pairs.c,
11489 print.c, procprop.c, procs.c, properties.c, ramap.c,
11490 regex-posix.c, root.c, scmsigs.c, simpos.c, socket.c, srcprop.c,
11491 stackchk.c, stacks.c, strings.c, strop.c, strorder.c, struct.c,
11492 symbols.c, tag.c, threads.c, variable.c, vectors.c, weaks.c:
11493 Remove #include <stdio.h>
11494 * gc.c, gdbint.c, root.c, sort.c, unif.c: Add #include <string.h>.
11495
11496 * procs.c (scm_make_subr_opt): Init symcell to avoid warning.
11497
11498 2001-03-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11499
11500 * posix.c (scm_gethostname): Set initial name length to 256 for
11501 Solaris.
11502
11503 2001-03-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11504
11505 * posix.h (scm_crypt, scm_chroot, scm_getlogin, scm_cuserid),
11506 (scm_getpriority, scm_setpriority, scm_getpass, scm_flock),
11507 (scm_sethostname, scm_gethostname): New prototypes.
11508
11509 * posix.c: Added inclusion of <crypt.h>, <sys/resource.h> and
11510 <sys/file.h>, if present.
11511 (scm_init_posix): [PRIO_PROCESS, PRIO_PGRP, PRIO_USER, LOCK_SH,
11512 LOCK_EX, LOCK_UN, LOCK_NB]: New variables.
11513 (scm_crypt, scm_chroot, scm_getlogin, scm_cuserid),
11514 (scm_getpriority, scm_setpriority, scm_getpass, scm_flock),
11515 (scm_sethostname, scm_gethostname): New procedures.
11516
11517 2001-03-08 Neil Jerram <neil@ossau.uklinux.net>
11518
11519 * ports.c (scm_port_column): Docstring fixes: (i) port-line arg is
11520 not optional (ii) "recommend" spelling correction.
11521
11522 2001-03-08 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11523
11524 * ramap.c (racp): Removed optimization which caused array copying
11525 to fail if the two arrays shared storage. Re-inserted the IVDEP
11526 macros removed in the change of 2000-03-09. (Don't really have a
11527 complete grasp of what they are for, but they seem to be necessary
11528 on Crays. This needs testing!) Thanks to Miroslav Silovic.
11529
11530 * hash.c (scm_string_hash): Don't downcase characters.
11531
11532 2001-03-07 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11533
11534 * symbols.c (scm_symbols_prehistory): Changed symbol hash table
11535 size from 277 --> 1009.
11536
11537 * symbols.c, symbols.h (scm_sys_symbols): New function GUILE_DEBUG
11538 function.
11539
11540 * coop-threads.c: Fixed change of 2001-03-06.
11541
11542 * validate.h: Code formatting.
11543
11544 2001-03-07 Keisuke Nishida <kxn30@po.cwru.edu>
11545
11546 * Makefile.am (*.x): Add dependency on snarf.h and guile-doc-snarf.in.
11547 (*.doc): Add dependency on guile-snarf.awk.in.
11548
11549 * guile-snarf.awk.in: Neglect spaces at the end of
11550 SCM_SNARF_DOCSTRING_END. Skip lines "# NN ..." in the
11551 middle of docstrings. (To avoid the problem with gcc-2.96.)
11552
11553 2001-03-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
11554
11555 * coop-threads.c (scm_call_with_new_thread), load.c
11556 (scm_primitive_load, scm_sys_search_load_path), random.c
11557 (scm_c_default_rstate), struct.c (scm_make_struct_layout,
11558 scm_struct_ref, scm_struct_set_x): Don't use SCM_ASSERT to
11559 (potentially) issue a scm-misc-error or wrong-num-args error
11560 message.
11561
11562 * load.c (scm_search_path): Use SCM_ASSERT_TYPE to give details
11563 about the expected type with the wrong-type-arg error message.
11564
11565 * smob.c (scm_make_smob): Abort on misuse of smob - it indicates
11566 a C level bug that can't be fixed from scheme anyway.
11567
11568 2001-03-05 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11569
11570 * eval.c (scm_m_letstar): Removed check for duplicate bindings.
11571 Duplicate bindings are OK in a let* since a let* is semantically
11572 equivalent to a nested set of let:s.
11573
11574 2001-03-05 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11575
11576 * print.c (scm_print_options): Fixed texinfo in docstring.
11577
11578 * net_db.c (scm_getserv, scm_getproto, scm_getnet): Return #f if
11579 the underlying functions getservent, getprotoent or getnetent
11580 return NULL instead of signalling an error.
11581
11582 2001-03-04 Gary Houston <ghouston@arglist.com>
11583
11584 * socket.c (scm_fill_sockaddr): don't allow buffer overflows when
11585 taking an unexpectedly large filename for an AF_UNIX socket from
11586 bind/connect/sendto (thanks to Martin Grabmueller).
11587
11588 * socket.c (scm_sock_fd_to_port, SCM_SOCK_FD_TO_PORT): removed the
11589 former and adjusted the latter.
11590 (scm_socket, scm_socketpair): cosmetic changes.
11591 (scm_getsockopt, scm_setsockopt): declare optlen as int, not
11592 size_t as socklen_t substitute. don't restrict args/return values
11593 to INUM: allow full range of int or size_t.
11594 (scm_fill_sockaddr): check arguments before allocating memory, to
11595 avoid leakage. use malloc, not scm_must_malloc.
11596 (scm_connect, scm_bind, scm_sendto): use int, not size_t as socklen_t
11597 substitute. free the sockaddr structure before throwing an error.
11598 (scm_init_add_buffer): procedure removed, together with its static
11599 buffer scm_addr_buffer, which wouldn't be thread safe. instead,
11600 define a macro MAX_ADDR_SIZE and declare the buffer where needed.
11601 (scm_accept, scm_getpeername, scm_getsockname, scm_recvfrom,
11602 scm_sendto): use a local buffer instead of scm_addr_buffer.
11603 adjust for new SCM_SOCK_FD_TO_PORT. use int for address size,
11604 not size_t.
11605 (scm_recvfrom): set addr->sa_family to AF_UNSPEC before the recvfrom
11606 call to detect whether recvfrom could be bothered to set the address.
11607 (scm_init_socket): don't call scm_init_addr_buffer.
11608
11609 2001-03-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
11610
11611 * debug.c (scm_procedure_source, scm_procedure_environment),
11612 print.c (scm_get_print_state), ramap.c (scm_array_fill_int,
11613 scm_array_index_map_x), sort.c (scm_sort_x, scm_sort,
11614 scm_stable_sort_x, scm_stable_sort), stacks.c (scm_make_stack,
11615 scm_last_stack_frame), symbols.c (scm_sym2vcell, scm_sym2ovcell),
11616 unif.c (scm_list_to_uniform_array, scm_uniform_vector_length,
11617 scm_transpose_array, scm_enclose_array, scm_array_in_bounds_p,
11618 scm_uniform_vector_ref, scm_array_set_x, scm_uniform_array_read_x,
11619 scm_uniform_array_write, scm_bit_set_star_x, scm_bit_count_star,
11620 scm_array_to_list, scm_array_prototype), validate.h
11621 (SCM_VALIDATE_NUMBER_COPY): Don't call function scm_wta, call
11622 scm_misc_error or scm_wrong_type_arg instead.
11623
11624 * validate.h (SCM_WTA, RETURN_SCM_WTA): Deprecated.
11625
11626 2001-03-04 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11627
11628 * goops.c, goops.h (scm_sys_pre_expand_closure_x): Removed.
11629 (scm_sys_tag_body): Added.
11630
11631 2001-03-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
11632
11633 * continuations.c (continuation_apply), eval.c (scm_m_lambda,
11634 scm_m_letstar, scm_m_letrec1, scm_m_let, SCM_APPLY), eval.h
11635 (SCM_EVALIM2), evalext.c (scm_m_generalized_set_x), gc.c
11636 (get_bvec, MARK), goops.c (scm_primitive_generic_generic),
11637 options.c (scm_options), ports.c (scm_remove_from_port_table),
11638 ramap.c (scm_ramapc), read.c (skip_scsh_block_comment, scm_lreadr,
11639 scm_lreadparen, scm_lreadrecparen), script.c (script_get_octal,
11640 script_get_backslash, script_read_arg), unif.c (scm_cvref): Don't
11641 call function scm_wta, call scm_misc_error or scm_wrong_type_arg
11642 instead.
11643
11644 2001-03-04 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11645
11646 * goops.c (scm_sys_pre_expand_closure_x): New procedure.
11647
11648 2001-03-04 Marius Vollmer <mvo@zagadka.ping.de>
11649
11650 * eval.c (scm_s_duplicate_bindings): New error message.
11651 (scm_m_letrec1, scm_m_letstar): Check for duplicate bindings.
11652
11653 2001-03-03 Marius Vollmer <mvo@zagadka.ping.de>
11654
11655 * eval.h (SCM_EVALIM2): New macro. Use it when a
11656 immediate, literal constant should be evaluated.
11657 * eval.c (scm_s_duplicate_formals): New error message string.
11658 (scm_c_improper_memq): New function.
11659 (scm_m_lambda): Check for duplicate arguments.
11660 (scm_ceval, scm_deval): When executing a body: only cons a new
11661 toplevel environment frame when it is different from the
11662 existing one; use EVALCAR instead of SIDEVAL so that we can properly
11663 check for empty combinations; use SCM_EVALIM2 for the same reason
11664 in the non-toplevel loop.
11665 (nontoplevel_cdrxnoap, nontoplevel_cdrxbegin, nontoplevel_begin):
11666 New labels with the meaning of their non-"nontoplevel" partners,
11667 but they are used when it is known that the body is not evaluated at
11668 top-level.
11669 (scm_apply, scm_dapply): use SCM_EVALIM2 to get proper error
11670 reporting for empty combinations.
11671
11672 2001-03-02 Keisuke Nishida <kxn30@po.cwru.edu>
11673
11674 * Remove dump facilities.
11675 * dump.c, dump.h: Removed.
11676 * Makefile.am: Remove dump.c, dump.h, dump.x, dump.doc.
11677 * init.c: Remove #include "libguile/dump.h".
11678 (scm_init_guile_1): Remove scm_init_dump.
11679 * smob.h (scm_smob_descriptor): Remove slots: dump, undump.
11680 (scm_set_smob_dump, scm_set_smob_undump): Remove declaration.
11681 * smob.c (scm_make_smob_type): Remove initialization: dump, undump.
11682 (scm_set_smob_dump, scm_set_smob_undump): Removed.
11683
11684 * keywords.c: Remove #include "libguile/dump.h".
11685 (keyword_dump, keyword_undump): Removed.
11686 (scm_init_keywords): Remove scm_set_smob_dump and scm_set_smob_undump.
11687
11688 2001-03-02 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11689
11690 * vectors.c (s_scm_vector_p, list->vector, scm_vector)
11691 (scm_vector_ref, scm_vector_set_x, scm_vector_to_list)
11692 (scm_vector_fill_x), strorder.c (scm_string_equal_p)
11693 (scm_string_ci_equal_p, scm_string_less_p, scm_string_leq_p)
11694 (scm_string_gr_p, scm_string_geq_p, scm_string_ci_less_p)
11695 (scm_string_ci_geq_p), symbols.c (scm_symbol_p)
11696 (scm_symbol_to_string, scm_string_to_symbol): Changed use of @t{}
11697 to @code{} as the texinfo manual recommends, converted the
11698 examples to use a @lisp{}-environment.
11699
11700 * strports.c (scm_eval_string): Cleaned up the docstring.
11701
11702 * struct.c (scm_struct_p, scm_struct_vtable_p): Added texinfo
11703 markup.
11704
11705 * numbers.c (scm_exact_p, scm_odd_p, scm_even_p)
11706 (scm_number_to_string, scm_string_to_number, scm_number_p)
11707 (scm_real_p, scm_integer_p, scm_inexact_p, scm_make_rectangular)
11708 (scm_make_polar, scm_inexact_to_exact): Added texinfo markup.
11709 (scm_ash): Added texinfo markup and removed obsolete @refill.
11710 (scm_gr_p): Corrected comment.
11711 (scm_gr_p, scm_leq_p, scm_geq_p): Added texinfo markup to (future
11712 docstring) comments.
11713 (scm_positive_p, scm_less_p, scm_num_eq_p, scm_real_p)
11714 (scm_number_p, scm_negative_p, scm_max, scm_min, scm_sum)
11715 (scm_difference, scm_product, scm_divide, scm_asinh, scm_acosh)
11716 (scm_atanh, scm_truncate, scm_round, scm_exact_to_inexact)
11717 (floor, ceiling, $sqrt, $abs, $exp, $log, $sin, $cos, $tan, $asin)
11718 ($acos, $atan, $sinh, $cosh, $tanh, scm_real_part, scm_imag_part)
11719 (scm_magnitude, scm_angle, scm_abs, scm_quotient, scm_remainder)
11720 (scm_modulo, scm_gcd, scm_lcm): Added (future docstring) comments.
11721
11722 2001-02-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
11723
11724 * __scm.h (SCM_ASSERT_TYPE): Add missing macro parameter.
11725 (Obviously nobody compiles with SCM_RECKLESS defined...)
11726
11727 * validate.h (SCM_ASSERT_RANGE): Use the argument number.
11728
11729 2001-02-23 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11730
11731 * ports.c, ports.h (scm_c_read, scm_c_write): New functions.
11732
11733 * ports.h (SCM_READ_BUFFER_EMPTY_P): New macro.
11734
11735 2001-02-24 Neil Jerram <neil@ossau.uklinux.net>
11736
11737 * numbers.c (scm_two_doubles, scm_sys_expt, scm_sys_atan2,
11738 scm_make_polar): Rename arguments `z1' and `z2' to `x' and `y',
11739 since use of `z' suggests that the arguments may be complex.
11740
11741 * goops.c (scm_make), numbers.c (scm_sys_expt): Fix docstring
11742 typos.
11743
11744 2001-02-23 Neil Jerram <neil@ossau.uklinux.net>
11745
11746 * dump.c (scm_binary_write, scm_binary_read), eval.c
11747 (scm_primitive_eval), guardians.c (scm_guardian_destroyed_p,
11748 scm_guardian_greedy_p, scm_make_guardian), fports.c
11749 (scm_file_port_p): Minor docstring fixes.
11750
11751 2001-02-22 Marius Vollmer <mvo@zagadka.ping.de>
11752
11753 * load.c (load): Use scm_primitive_eval_x instead of scm_i_eval_x.
11754
11755 * goops.c (scm_add_method, DEFVAR): Use scm_eval instead of
11756 scm_i_eval.
11757 (make_class_from_template): Do not bother to set the current
11758 module around the call to DEFVAR, scm_eval takes care of that.
11759 (scm_init_goops): Make scm_module_goops and
11760 scm_goops_lookup_closure permanent objects.
11761
11762 * eval.c (scm_ceval, scm_deval): When evaluating expressions on
11763 top level, create a fresh top-level environment for each
11764 expression instead of mutating the exisint frame. This is
11765 important when that frame is closed over.
11766
11767 * numbers.c (s_scm_logior) [SCM_DIGSTOOBIG]: Also use
11768 SCM_DIGSPERLONG instead of DIGSPERLONG.
11769
11770 2001-02-21 Marius Vollmer <mvo@zagadka.ping.de>
11771
11772 * eval.c (scm_ceval, scm_deval): Check for wrong number of args
11773 before applying arrow procedure in `cond' and before applying
11774 receiver procedure in call-with-current-continuation.
11775 (scm_i_eval): Do not invoke scm_copy_tree in argument in SCM_XEVAL
11776 macro. The argument is expanded more than one time.
11777
11778 * numbers.c (scm_logior) [SCM_DIGSTOOBIG]: Correctly use
11779 SCM_BIGDIG instead of BIGDIG. Thanks to Steven G. Johnson!
11780
11781 2001-02-20 Marius Vollmer <mvo@zagadka.ping.de>
11782
11783 * guile-doc-snarf.in, guile-func-name-check.in: Added copyright
11784 notice and license.
11785
11786 2001-02-17 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11787
11788 * variable.c (scm_make_variable, scm_make_undefined_variable)
11789 (scm_variable_ref, scm_variable_set_x, scm_builtin_variable)
11790 (scm_variable_bound_p), values.c (scm_values)
11791 (scm_call_with_values), unif.c (scm_bit_count)
11792 (scm_bit_set_star_x), symbols.c (scm_gentemp)
11793 (scm_gensym), strings.c (scm_string_p, scm_make_string)
11794 (scm_read_only_string_p, scm_string_length, scm_string_ref)
11795 (scm_string_set_x, scm_substring, scm_string_append), stime.c
11796 (scm_strptime, scm_mktime), random.c (scm_seed_to_random_state)
11797 (scm_copy_random_state, scm_random), print.c (scm_newline)
11798 (scm_write_char, scm_simple_format), debug-malloc.c
11799 (scm_malloc_stats), environments.c (scm_environment_p)
11800 (scm_environment_bound_p, scm_environment_ref)
11801 (scm_environment_fold, scm_environment_define)
11802 (scm_environment_undefine, scm_environment_set_x)
11803 (scm_environment_cell, scm_environment_observe)
11804 (scm_environment_observe_weak, scm_environment_unobserve)
11805 (scm_make_eval_environment, scm_eval_environment_p)
11806 (scm_eval_environment_set_local_x, scm_eval_environment_local)
11807 (scm_eval_environment_imported)
11808 (scm_eval_environment_set_imported_x, scm_make_import_environment)
11809 (scm_import_environment_p, scm_import_environment_imports)
11810 (scm_import_environment_set_imports_x, scm_make_export_environment)
11811 (scm_export_environment_p, scm_export_environment_private)
11812 (scm_export_environment_set_private_x)
11813 (scm_export_environment_signature)
11814 (scm_export_environment_set_signature_x, scm_leaf_environment_p):
11815 Added texinfo markup.
11816
11817 * ports.c (scm_drain_input): Lowercased argument to @var.
11818 (scm_current_input_port, scm_current_output_port): Filled in
11819 missing explanation.
11820 (scm_current_load_port, scm_set_current_output_port)
11821 (scm_set_current_error_port, scm_port_line, scm_set_port_line_x):
11822 Added texinfo markup.
11823
11824 * arbiters.c (scm_make_arbiter, scm_try_arbiter)
11825 (scm_release_arbiter): Added texinfo markup to docstrings.
11826 Changed `Returns' to `Return'.
11827 (arbiter_print): Changed SCM_CDR to SCM_SMOB_DATA.
11828
11829 2001-02-16 Neil Jerram <neil@ossau.uklinux.net>
11830
11831 * guile-snarf.awk.in: Quote any `@'s that occur in Scheme names,
11832 by doubling them to `@@'.
11833
11834 2001-02-16 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11835
11836 * numbers.c (scm_lognot), random.c (scm_random,
11837 scm_random_normal, scm_random_solid_sphere_x,
11838 scm_random_hollow_sphere_x, scm_random_normal_vector_x,
11839 scm_random_exp), dynwind.c
11840 (scm_dynamic_wind): Removed unnecessary "" from docstrings.
11841
11842 * goops.c (scm_sys_initialize_object, scm_instance_p,
11843 scm_class_name, scm_class_precedence_list, scm_class_slots,
11844 scm_class_environment, scm_generic_function_name,
11845 scm_generic_function_methods, scm_method_generic_function,
11846 scm_method_specializers, scm_method_procedure, scm_make_unbound,
11847 scm_unbound_p, scm_assert_bound, scm_at_assert_bound_ref,
11848 scm_sys_fast_slot_ref, scm_sys_fast_slot_set_x, scm_slot_ref,
11849 scm_slot_set_x, _scm_slot_bound_p, scm_slots_exists_p,
11850 scm_sys_allocate_instance, scm_make, scm_pure_generic_p,
11851 scm_class_direct_supers, scm_class_direct_slots,
11852 scm_class_direct_subclasses, scm_class_direct_methods,
11853 scm_accessor_method_slot_definition, scm_sys_goops_loaded),
11854 debug.c (scm_with_traps, scm_memoized_p, scm_make_gloc,
11855 scm_gloc_p, scm_make_iloc, scm_iloc_p, scm_memcons,
11856 scm_mem_to_proc, scm_proc_to_mem, scm_unmemoize,
11857 scm_memoized_environment, scm_procedure_name,
11858 scm_procedure_source, scm_procedure_environment, scm_debug_hang),
11859 objects.c
11860 (scm_class_of, scm_entity_p, scm_operator_p,
11861 scm_set_object_procedure_x, scm_object_procedure,
11862 scm_make_class_object), hooks.c (scm_make_hook_with_name,
11863 scm_make_hook, scm_hook_p, scm_hook_empty_p, scm_add_hook_x,
11864 scm_remove_hook_x, scm_reset_hook_x, scm_run_hook,
11865 scm_hook_to_list), lang.c
11866 (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null, scm_nil_eq),
11867 numbers.c (scm_sys_expt, scm_sys_atan2), print.c
11868 (scm_print_options, scm_port_with_print_state,
11869 scm_get_print_state), procs.c (scm_make_cclo, scm_procedure_p,
11870 scm_closure_p, scm_thunk_p, scm_procedure_with_setter_p,
11871 scm_make_procedure_with_setter, scm_procedure), throw.c
11872 (scm_lazy_catch), modules.c (scm_standard_eval_closure), load.c
11873 (scm_parse_path, scm_search_path), stacks.c (scm_make_stack,
11874 scm_stack_ref, scm_stack_length, scm_frame_p,
11875 scm_last_stack_frame, scm_frame_number, scm_frame_source,
11876 scm_frame_procedure, scm_frame_arguments, scm_frame_previous,
11877 scm_frame_next, scm_frame_real_p, scm_frame_procedure_p,
11878 scm_frame_evaluating_args_p, scm_frame_overflow_p), filesys.c
11879 (scm_dirname, scm_basename), dynwind.c
11880 (scm_wind_chain), read.c (scm_read_options, scm_read,
11881 scm_read_hash_extend), gc.c
11882 (scm_unhash_name), eval.c (scm_eval_options_interface,
11883 scm_evaluator_traps, s_scm_nconc2last), backtrace.c
11884 (scm_display_error, scm_set_print_params_x,
11885 scm_display_application, scm_display_backtrace, scm_backtrace),
11886 async.c (scm_async, scm_system_async, scm_async_mark,
11887 scm_system_async_mark, scm_run_asyncs, scm_noop,
11888 scm_set_tick_rate, scm_set_switch_rate, scm_unmask_signals,
11889 scm_mask_signals): Added docstrings.
11890
11891 2001-02-15 Keisuke Nishida <kxn30@po.cwru.edu>
11892
11893 * dump.c (scm_undump): Use SCM_CARLOC/SCM_CDRLOC to obtain the
11894 address of car/cdr. (Thanks to Dirk Herrmann)
11895 Use scm_sizet to obtain the length of strings.
11896 (Thanks to Matthias Koeppe)
11897
11898 2001-02-15 Marius Vollmer <mvo@zagadka.ping.de>
11899
11900 * symbols.c (scm_mem2symbol): Put a empty statement after the
11901 next_symbol label. This is mandated by ANSI, appearantly.
11902
11903 2001-02-13 Marius Vollmer <marius.vollmer@uni-dortmund.de>
11904
11905 * gc_os_dep.c: Do not include <linux/version.h>. It makes no
11906 sense to compile for a specific kernel version. Do not include
11907 <asm/signal.h> while defining __KERNEL__. This hack should no
11908 longer be needed and caused problems.
11909
11910 2001-02-13 Marius Vollmer <mvo@zagadka.ping.de>
11911
11912 * eval.c (scm_ceval, scm_deval): use `SIDEVAL' instead of
11913 SCM_CEVAL when evaluating subforms of `begin' forms. SCM_CEVAL
11914 can not deal with immediates.
11915
11916 2001-02-12 Keisuke Nishida <kxn30@po.cwru.edu>
11917
11918 * list.c (scm_list_copy): Validate the first argument.
11919
11920 2001-02-11 Marius Vollmer <mvo@zagadka.ping.de>
11921
11922 Fix evaluator so that top-level expressions are correctly
11923 evaluated with respect to the module system.
11924
11925 * modules.h. modules.c (scm_current_module_lookup_closure): New
11926 function.
11927
11928 * eval.h (scm_primitive_eval, scm_primitive_eval_x): New
11929 prototypes.
11930 (scm_i_eval, scm_i_eval_x, scm_eval, scm_eval_x): Changed argument
11931 names to better reflect their meaning.
11932
11933 * eval.c (scm_ceval, scm_deval): Recognize when `begin' is being
11934 evaluated at top-level and synronize lookup closure before
11935 executing every subform.
11936 (scm_primitve_eval_x, scm_primitive_eval): New functions.
11937 (scm_eval_x, scm_eval): Reimplement in terms of
11938 scm_primitive_eval_x and scm_primitive_eval, respectively.
11939
11940 2001-02-09 Marius Vollmer <mvo@zagadka.ping.de>
11941
11942 * macros.c (scm_macro_name, scm_macro_transformer): Use
11943 SCM_SMOB_DATA instead of SCM_CDR. Provided by Martin Grabmueller.
11944 Thanks!
11945
11946 2001-02-10 Keisuke Nishida <kxn30@po.cwru.edu>
11947
11948 * dump.c (scm_store_bytes): Store data size before data.
11949 (scm_restore_bytes): Restore data size. Takes a pointer to size.
11950 * dump.h (scm_restore_bytes): Updated.
11951
11952 2001-02-09 Keisuke Nishida <kxn30@po.cwru.edu>
11953
11954 * dump.c: Use double cells for update schedule.
11955
11956 2001-02-08 Keisuke Nishida <kxn30@po.cwru.edu>
11957
11958 * ports.c (scm_unread_char): Take an optional argument.
11959
11960 2001-02-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
11961
11962 * modules.h (scm_selected_module, scm_current_module): Renamed
11963 scm_selected_module to scm_current_module to synchronize Scheme
11964 and C names.
11965 (scm_select_module, scm_set_current_module): Likewise. Changed
11966 all uses.
11967
11968 * ports.c (scm_port_for_each): Make a snapshot of the port table
11969 before iterating over it. The table might change while the user
11970 code is running. With the snapshot, the user can depend on the
11971 fact that each port that existed at the start of the iteration is
11972 encountered exactly once. (ice-9 popen) depends on this.
11973
11974 2001-02-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
11975
11976 * strings.h (SCM_STRING_MAX_LENGTH): New macro.
11977
11978 * strings.c (scm_makstr, scm_take_str, scm_make_string): Added
11979 range checking for the size parameter. Thanks to Martin
11980 Grabmueller for the hint.
11981
11982 (scm_makstr): Reordered string initialization to make interrupt
11983 deferring unnecessary.
11984
11985 * vectors.c (scm_make_vector): Fixed range checking.
11986
11987 2001-02-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
11988
11989 * vectors.h (SCM_VECTOR_MAX_LENGTH): New macro.
11990
11991 * vectors.c (scm_make_vector, scm_c_make_vector): Improved the
11992 checking of the size parameter for type correctness and valid
11993 range. Thanks to Rob Browning for reporting the problem. Instead
11994 of deferring interrupts, scm_remember_upto_here_1 is used.
11995
11996 2001-02-05 Keisuke Nishida <kxn30@po.cwru.edu>
11997
11998 * dump.c (scm_store_cell_object, scm_restore_cell_object): Removed.
11999 (scm_dump_cell_update): Removed.
12000 (scm_dump_update): Renamed from scm_dump_object_update.
12001 (scm_restore_string, scm_restore_bytes, scm_restore_word): Takes
12002 a pointer instead of returning a value.
12003 * keywords.c (keyword_undump): Updated.
12004
12005 2001-02-05 Keisuke Nishida <kxn30@po.cwru.edu>
12006
12007 * dump.c, dump.h: Modified a lot.
12008 (SCM_DUMP_COOKIE): Version 0.1
12009 (scm_dump_mark): Removed.
12010 (scm_restore_cell_object, scm_store_cell_object): New functions.
12011
12012 * smob.h (scm_smob_descriptor): Removed slots: dump_mark,
12013 dump_dealloc, dump_store, undump_alloc, undump_restore, undump_init.
12014 New slots: dump, undump.
12015 * smob.c (scm_make_smob_type, scm_set_smob_dump, scm_set_smob_undump):
12016 Updated.
12017
12018 * keywords.c (keyword_dump): Renamed from keyword_dealloc.
12019 (keyword_undump): Renamed from keyword_alloc.
12020 (scm_init_keywords): Set keyword_dump and keyword_undump.
12021
12022 2001-02-03 Michael Livshin <mlivshin@bigfoot.com>
12023
12024 * gc.c (DOUBLECELL_ALIGNED_P): new macro, a better-named analog of
12025 the deprecated SCM_DOUBLE_CELLP.
12026
12027 * tags.h (SCM_DOUBLE_CELLP): deprecated.
12028
12029 2001-02-02 Keisuke Nishida <kxn30@po.cwru.edu>
12030
12031 * dump.c, dump.h: New files.
12032 * Makefile.am: Added dump.c, dump.h, dump.x, dump.doc.
12033 * init.c: #include "libguile/dump.h".
12034 (scm_init_guile_1): Call scm_init_dump.
12035 * smob.h (scm_smob_descriptor): New slots: dump_mark,
12036 dump_dealloc, dump_store, undump_alloc, undump_restore,
12037 undump_init.
12038 * smob.c (scm_make_smob_type): Init the new slots.
12039 (scm_set_smob_dump, scm_set_smob_undump): New functions.
12040 * smob.h (scm_set_smob_dump, scm_set_smob_undump): Declared.
12041
12042 * keywords.c: #include "libguile/dump.h".
12043 (keyword_dealloc, keyword_alloc): New functions.
12044 (scm_init_keywords): Set smob_dump and smob_undump.
12045
12046 2001-02-01 Keisuke Nishida <kxn30@po.cwru.edu>
12047
12048 * vectors.c (scm_c_make_vector): New function.
12049 * vectors.h (scm_c_make_vector): Declared.
12050 * eval.c (scm_copy_tree), filesys.c (scm_stat2scm), fluids.c
12051 (scm_make_initial_fluids, grow_fluids), gc.c (scm_init_storage),
12052 gh_data.c (gh_ints2scm, gh_doubles2scm): goops.c
12053 (scm_make_method_cache, scm_i_vector2list,
12054 scm_compute_applicable_methods, scm_sys_method_more_specific_p),
12055 init.c (start_stack), net_db.c (scm_gethost, scm_getnet,
12056 scm_getproto, scm_return_entry), posix.c (scm_getgroups,
12057 scm_getpwuid, scm_getgrgid, scm_uname), print.c (make_print_state,
12058 grow_ref_stack), regex-posix.c (scm_regexp_exec), scmsigs.c
12059 (scm_init_scmsigs), socket.c (scm_addr_vector, scm_addr_vector),
12060 stime.c (scm_times, filltime), unif.c (scm_make_uve), vectors.c
12061 (scm_vector, scm_make_vector): Use scm_c_make_vector.
12062
12063 * hashtab.c (scm_c_make_hash_table): New function.
12064 * hashtab.h (scm_c_make_hash_table): Declared.
12065 * environments.c (scm_make_leaf_environment,
12066 scm_make_eval_environment), gc.c (scm_init_storage),
12067 keywords.c (scm_init_keywords), symbols.c (scm_builtin_bindings):
12068 Use scm_c_make_hash_table.
12069
12070 2001-01-31 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12071
12072 * unif.c (rapr1): Don't apply scm_uniform_vector_length on arrays.
12073
12074 2001-01-29 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12075
12076 * struct.c (scm_make_vtable_vtable): Removed unnecessary "" from
12077 end of docstring.
12078
12079 * struct.c (scm_struct_set_x, scm_struct_vtable_tag,
12080 scm_struct_vtable_name, scm_set_struct_vtable_name_x), weaks.c
12081 (scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table,
12082 scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
12083 srcprop.c (scm_source_properties, scm_set_source_properties_x,
12084 scm_source_property, scm_set_source_property_x), sort.c
12085 (scm_sort_list_x, scm_restricted_vector_sort_x, scm_sorted_p,
12086 scm_merge, scm_merge_x, scm_sort_x, scm_sort, scm_stable_sort_x,
12087 scm_stable_sort, scm_sort_list_x, scm_sort_list): Added
12088 docstrings.
12089
12090 2001-01-29 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12091
12092 * eval.c (SCM_APPLY): Check that primitives which take 1 arg
12093 really get that arg.
12094
12095 2001-01-26 Keisuke Nishida <kxn30@po.cwru.edu>
12096
12097 * goops.c (s_scm_get_keyword): Bug fix.
12098
12099 2001-01-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
12100
12101 The following patch was sent by Martin Grabmueller. It makes sure
12102 that in case of parameter errors the correct function name is
12103 shown, and that parameter types are only checked once.
12104
12105 * strop.c (string_copy, string_upcase_x, string_downcase_x,
12106 string_capitalize_x): New functions. Each one performs the core
12107 functionality of the corresponding scm_* function.
12108
12109 (scm_string_copy, scm_string_upcase_x, scm_string_upcase,
12110 scm_string_downcase_x, scm_string_downcase,
12111 scm_string_capitalize_x, scm_string_capitalize): Reduced to
12112 parameter checking wrappers of the above functions.
12113
12114 2001-01-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
12115
12116 * continuations.c, dynl.c, keywords.c, load.c: Include
12117 strings.h. Thanks to Bill Schottstaedt for the bug report.
12118
12119 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
12120
12121 * backtrace.c (display_header): Make sure that line and column
12122 information is shown independent of whether the port the code was
12123 read from had an associated filename. Thanks to Martin
12124 Grabmueller for providing this patch.
12125
12126 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
12127
12128 * fports.[ch] (scm_file_port_p): New primitive.
12129
12130 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
12131
12132 * tags.h (scm_tc16_fport, scm_tc16_strport, scm_tc16_sfport):
12133 These are now defined in fports.c, strports.c and vports.c.
12134
12135 * fports.[ch] (scm_tc16_fport), strports.c (scm_tc16_strport),
12136 vports.c (scm_tc16_sfport): Made variables (were macros defined in
12137 tags.h).
12138
12139 fports.c (scm_make_fptob), strports.c (scm_make_stptob), vports.c
12140 (scm_make_sfptob): Made static. These return a type code now.
12141
12142 fports.c (scm_init_fports), strports.c (scm_init_strports),
12143 vports.c (scm_init_vports): Create the corresponding port types.
12144
12145 * fports.h (SCM_FPORTP, SCM_OPFPORTP, SCM_OPINFPORTP,
12146 SCM_OPOUTFPORTP): Redefined in terms of scm_tc16_fport.
12147
12148 * init.c (scm_init_guile_1): Make sure strports are initialized
12149 before gdbint.
12150
12151 * ports.[ch] (scm_make_port_type): Changed the return type to
12152 scm_bits_t.
12153
12154 * ports.c (scm_ports_prehistory): Don't create any port types
12155 here.
12156
12157 * posix.c (scm_ttyname): Use SCM_FPORTP instead of comparing
12158 against scm_tc16_fport directly.
12159
12160 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
12161
12162 * srcprop.c (scm_set_source_property_x): Fix to handle
12163 (set-source-property! <obj> 'copy <datum>) correctly.
12164
12165 2001-01-24 Gary Houston <ghouston@arglist.com>
12166
12167 * filesys.c (scm_link): docstring fix.
12168 * fports.h (scm_setfileno): obsolete declaration removed.
12169 * posix.c: bogus popen declaration removed.
12170
12171 * rdelim.c: new file, split from ioext.c.
12172 * rdelim.h: new file, split from ioext.h
12173 * Makefile.am: add rdelim.c and related files.
12174 * init.c: call scm_init_rdelim. include rdelim.h.
12175
12176 2001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
12177
12178 This patch was sent by Martin Grabmueller and makes sure that
12179 parameter errors are reported correctly by the lexicographic
12180 ordering predicates.
12181
12182 * strorder.c (string_less_p, string_ci_less_p): New functions.
12183
12184 (scm_string_less_p, scm_string_ci_less_p): Extracted the core
12185 functionality into string_less_p, string_ci_less_p respectively.
12186 The remaining code is just a wrapper to do the parameter
12187 checking.
12188
12189 (scm_string_leq_p, scm_string_gr_p, scm_string_geq_p): Check the
12190 parameters and call string_less_p instead of scm_string_less_p.
12191
12192 (scm_string_ci_leq_p, scm_string_ci_gr_p, scm_string_ci_geq_p):
12193 Check the parameters and call string_less_ci_p instead of
12194 scm_string_ci_less_p.
12195
12196 2001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
12197
12198 This patch modifies scm_display_error to perform parameter
12199 checking. Thanks to Neil Jerram for the bug report.
12200
12201 * backtrace.[ch] (scm_i_display_error): New function.
12202
12203 * backtrace.c (scm_display_error): Added parameter check and
12204 extracted the core functionality into function
12205 scm_i_display_error.
12206
12207 * throw.c (handler_message): Call scm_i_display_error to display
12208 the error message.
12209
12210 2001-01-23 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12211
12212 * eval.c (SCM_APPLY): Added # args check for application of
12213 procedures with arity 3. (Thanks to Anders Holst.)
12214
12215 2001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
12216
12217 * filesys.h (SCM_DIR_FLAG_OPEN, SCM_DIR_OPEN_P): Added.
12218
12219 (SCM_OPDIRP): Deprecated.
12220
12221 * filesys.c (scm_opendir): Use SCM_DIR_FLAG_OPEN instead of
12222 SCM_OPN.
12223
12224 (scm_readdir, scm_rewinddir): Don't use SCM_VALIDATE_OPDIR.
12225 Instead, give an explicit error message in case the directory is
12226 closed.
12227
12228 (scm_closedir, scm_dir_print): Rewritten to use SCM_DIR_OPEN_P
12229 instead of SCM_OPENP and SCM_CLOSEDP.
12230
12231 * validate.h (SCM_VALIDATE_OPDIR): Deprecated.
12232
12233 2001-01-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
12234
12235 * eval.c (inner_eval, scm_eval): Move all real functionality into
12236 inner_eval. Avoid to copy the expression twice by inlining some
12237 code from scm_i_eval.
12238
12239 2001-01-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
12240
12241 * eval.c (scm_m_case): The 'else' clause of a 'case' statement
12242 now has to be the last clause, as required by R5RS. Thanks to
12243 Martin Grabmueller for the patch.
12244
12245 2001-01-18 Gary Houston <ghouston@arglist.com>
12246
12247 * ioext.c: further simplify scm_read_string_x_partial by defining
12248 a macro SCM_EBLOCK.
12249
12250 2001-01-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
12251
12252 * gh_data.c (gh_ints2scm): Simplified using SCM_FIXABLE.
12253
12254 2001-01-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
12255
12256 * __scm.h: Added comment about architecture and compiler
12257 properties that are required by guile.
12258
12259 (SCM_FIXNUM_BIT, SCM_MOST_POSITIVE_FIXNUM,
12260 SCM_MOST_NEGATIVE_FIXNUM): Moved to numbers.h.
12261
12262 (SCM_CHAR_BIT, SCM_LONG_BIT): Moved here from numbers.h.
12263
12264 * numbers.h (SCM_CHAR_BIT, SCM_LONG_BIT): Moved to __scm.h.
12265
12266 (SCM_FIXNUM_BIT, SCM_MOST_POSITIVE_FIXNUM,
12267 SCM_MOST_NEGATIVE_FIXNUM): Moved here from __scm.h.
12268
12269 2001-01-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
12270
12271 * __scm.h (SCM_FIXNUM_BIT): Added. The name is chosen in analogy
12272 to the names in limits.h.
12273
12274 * numbers.c (abs_most_negative_fixnum): Added.
12275
12276 (scm_quotient, scm_remainder): Fixed the fixnum-min / (abs
12277 fixnum-min) special case.
12278
12279 (scm_big_and): Fix for negative first parameter.
12280
12281 (scm_bit_extract): Fix for fixnum paramters.
12282 Thanks to Rob Browning for the bug report.
12283
12284 (scm_init_numbers): Initialize abs_most_negative_fixnum.
12285
12286 2001-01-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
12287
12288 * symbols.c (scm_symbol_bound_p): Fixed comment.
12289 Thanks to Chris Cramer.
12290
12291 2001-01-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
12292
12293 * smob.[ch] (scm_make_smob_type): Return type is scm_bits_t now.
12294 Thanks to Bill Schottstaedt.
12295
12296 2001-01-11 Michael Livshin <mlivshin@bigfoot.com>
12297
12298 from Matthias Köppe:
12299
12300 * objects.h (SCM_SET_ENTITY_SETTER): new macro. SCM_ENTITY_SETTER
12301 casts its result, so doesn't yield an lvalue per ANSI C.
12302
12303 * goops.c (s_scm_sys_set_object_setter_x): use
12304 SCM_SET_ENTITY_SETTER.
12305 (clear_method_cache): use SCM_SET_ENTITY_PROCEDURE.
12306
12307 * gc.h (SCM_GC_SET_CARD_BVEC): new macro. SCM_GC_CARD_BVEC casts
12308 its result, so doesn't yield an lvalue per ANSI C.
12309 (SCM_GC_SET_CARD_FLAGS): ditto for SCM_GC_GET_CARD_FLAGS.
12310 (SCM_GC_CLR_CARD_FLAGS): redefined in terms of
12311 SCM_GC_SET_CARD_FLAGS.
12312 (SCM_GC_SET_CARD_FLAG, SCM_GC_CLR_CARD_FLAGS): ditto.
12313
12314 * gc.c (INIT_CARD): use the explicit setter macro to set the bvec.
12315
12316 2001-01-08 Gary Houston <ghouston@arglist.com>
12317
12318 * validate.h (SCM_VALIDATE_SUBSTRING_SPEC_COPY): new macro.
12319 * ioext.c (scm_read_string_x_partial, scm_read_delimited_x),
12320 socket.c (scm_recvfrom): use the new macro, plus minor docstring
12321 changes.
12322 * ioext.c (scm_read_string_x_partial): don't crash if -1 is supplied
12323 for fdes. if current input port is used, check that it's a file
12324 port.
12325
12326 2001-01-06 Gary Houston <ghouston@arglist.com>
12327
12328 * ioext.c (scm_read_string_x_partial): new procedure, implements
12329 read-string!/partial.
12330 * ports.c (scm_take_from_input_buffers): new procedure used by
12331 scm_read_string_x_partial.
12332 (scm_drain_input): use scm_take_from_input_buffers.
12333
12334 2001-01-06 Marius Vollmer <mvo@zagadka.ping.de>
12335
12336 * validate.h (SCM_VALIDATE_NUMBER): New.
12337
12338 2001-01-03 Michael Livshin <mlivshin@bigfoot.com>
12339
12340 * guardians.c (F_GREEDY, F_LISTED, F_DESTROYED, GREEDY_P,
12341 SET_GREEDY, LISTED_P, SET_LISTED, CLR_LISTED, DESTROYED_P,
12342 SET_DESTROYED): new defines/macros.
12343 (GUARDIAN_LIVE, GUARDIAN_ZOMBIES, GUARDIAN_NEXT): deleted.
12344 (add_to_live_list): takes a `guardian_t *' now, not SCM.
12345 (guardian_print): print more info.
12346 (guardian_apply): check if the guardian is destroyed, and throw an
12347 error if so. take one more optional argument `throw_p'.
12348 (scm_guard): depending on the value of `throw_p', return a boolean
12349 result.
12350 (scm_get_one_zombie): remove redundant property test.
12351 (guardian_t): represent the various (currently 3, I hope nothing
12352 more gets added) boolean fields as bit flags.
12353 (scm_guardian_destroyed_p, scm_guardian_greedy_p): new predicates.
12354 (scm_destroy_guardian_x): new procedure.
12355
12356 * guardians.h: added prototypes for `scm_guardian_greedy_p' and
12357 `scm_guardian_destroyed_p'. changed prototype for `scm_guard'.
12358
12359 2001-01-01 Gary Houston <ghouston@arglist.com>
12360
12361 * fports.c (fport_write): bugfix: handle short writes for
12362 unbuffered ports too. optimize the buffered case by minimizing
12363 the number of write/flush calls.
12364 (write_all): new helper procedure.
12365
12366 The ChangeLog continues in the file: "ChangeLog-2000"