(signal_delivery_thread): Return a value, to avoid
[bpt/guile.git] / libguile / ChangeLog
1 2005-05-10 Neil Jerram <neil@ossau.uklinux.net>
2
3 * scmsigs.c (signal_delivery_thread): Return a value, to avoid
4 compile warning reported by Werner Scheinast.
5
6 2005-04-30 Han-Wen Nienhuys <hanwen@xs4all.nl>
7
8 * list.h: remove scm_list()
9
10 * fluids.c (DYNAMIC_STATE_NEXT_LOC): new macro for use with
11 SCM_DEBUG_CELL_ACCESSES
12 (FLUID_NEXT_LOC): idem.
13
14 2005-04-30 Kevin Ryde <user42@zip.com.au>
15
16 * numbers.c (scm_divide): Correction to 1/complex and <any>/complex,
17 need to test abs(re)<abs(im) for choice of cases, otherwise divide by
18 zero when re==0 and im<0. Reported by Jean Crepeau.
19
20 2005-04-25 Kevin Ryde <user42@zip.com.au>
21
22 * ramap.c (scm_array_map_x): Allow no source args, add num args checks
23 to subr_1, subr_2, subr_2o and dsubr cases.
24
25 2005-04-23 Kevin Ryde <user42@zip.com.au>
26
27 * hashtab.c (scm_hashx_remove_x): Need to pass "closure" to
28 scm_hash_fn_remove_x.
29
30 * list.c (scm_cons_star): Don't modify the rest list, it belongs to
31 the caller when cons* is reached through apply.
32
33 * list.c (list): Use scm_list_copy, so as to produce a fresh list when
34 list is called using apply, under the debugging evaluator.
35 (scm_list): Remove.
36
37 * list.c, list.h (scm_make_list): New code, moving make-list from
38 boot-9.scm.
39
40 2005-04-14 Kevin Ryde <user42@zip.com.au>
41
42 * numbers.c, numbers.h (scm_oneplus, scm_oneminus): New functions,
43 converted from scheme code in boot-9.scm.
44
45 2005-04-11 Kevin Ryde <user42@zip.com.au>
46
47 * srfi-13.c (scm_string_concatenate, scm_string_concatenate_shared):
48 Validate list argument, scm_string_append and scm_string_append_shared
49 don't do that to their rest argument (in a normal build).
50
51 2005-04-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
52
53 * hashtab.h, hashtab.c (scm_t_hashtable): Removed 'closure' field. The
54 closure can not be stored since it is no longer valid at GC time.
55 (make_hash_table): Initialize 'hash_fn' field.
56 (scm_i_rehash): Only store hash_fn in hash table when closre is
57 NULL.
58 (rehash_after_gc): Only call scm_i_rehash when 'hash_fn' is
59 non-NULL. Always use a NULL closure.
60 (scm_hash_fn_create_handle_x): Also rehash when table contains too
61 few entries.
62
63 2005-03-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
64
65 * hashtab.h, hashtab.c (scm_hash_fx_remove_x): Removed delete_fn
66 argument; always use scm_delq_x. The delete_fn function works on
67 the handle, not the key, and it therefore makes no sense to make
68 it configurable. Changed all callers.
69 (scm_hashx_remove_x): Likewise. Also, exported to Scheme.
70 (scm_hash_clear): Accept plain vectors as hashtables.
71 (scm_delx_x): Removed.
72
73 2005-03-28 Han-Wen Nienhuys <hanwen@xs4all.nl>
74
75 * inline.h (scm_double_cell): use __asm__ iso. asm, to maintain
76 compatibility with gcc -std=c99.
77
78 2005-03-24 Mikael Djurfeldt <djurfeldt@nada.kth.se>
79
80 * async.h (scm_mask_ints): Removed left over reference to
81 scm_root.
82
83 * threads.c: Removed fprintf debug statements.
84
85 2005-03-24 Neil Jerram <neil@ossau.uklinux.net>
86
87 * debug.c (scm_make_memoized): Restore use of SCM_UNPACK.
88
89 2005-03-23 Neil Jerram <neil@ossau.uklinux.net>
90
91 * debug.c (scm_make_memoized): Remove unnecessary critical
92 section, and simplify by using SCM_RETURN_NEWSMOB.
93
94 2005-03-20 Mikael Djurfeldt <djurfeldt@nada.kth.se>
95
96 * strings.h (SCM_STRING_UCHARS): Added missing argument.
97
98 2005-03-18 Kevin Ryde <user42@zip.com.au>
99
100 * arbiters.c (FETCH_STORE) [generic C]: Should be
101 scm_i_scm_pthread_mutex_lock/unlock now. Reported by Ludovic Courtès.
102
103 2005-03-13 Kevin Ryde <user42@zip.com.au>
104
105 * numbers.c, numbers.h (scm_i_clonebig): Remove static, so can use in
106 srfi-60.
107
108 * numbers.c (scm_logior): Must scm_i_normbig results as per scm_logand,
109 because OR-ing bits into a negative can reduce the value to an inum.
110
111 * numbers.c (scm_num_eq_p): On 64-bit systems, be careful about
112 casting inum to double since that can lose precision.
113
114 2005-03-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
115
116 * threads.h, threads.c (scm_i_thread): Added gc_running_p field.
117 (guilify_self_1): Initialize it.
118
119 * gc.h, gc.c (SCM_FREECELL_P): Removed for good.
120 (scm_block_gc, scm_gc_heap_lock): Removed. Removed all uses.
121 (scm_gc_running_p): Now a macro that refers to the scm_i_thread
122 field.
123 (scm_i_sweep_mutex): Now a non-recursive mutex. GC can not happen
124 recursively.
125 (scm_igc, scm_i_gc): Renamed former to latter. Changed all uses.
126 Do not lock scm_i_sweep_mutex, which is now non-recursive, or set
127 scm_gc_running_p. Do not run the scm_after_gc_c_hook.
128 (scm_gc): Lock scm_i_sweep_mutex, set scm_gc_running_p and run the
129 scm_after_gc_c_hook here.
130 (scm_gc_for_new_cell): Set scm_gc_running_p here and run the
131 scm_after_gc_c_hook when a full GC has in fact been performed.
132 (scm_i_expensive_validation_check): Call scm_gc, not scm_i_gc.
133
134 * gc-segment.c (scm_i_get_new_heap_segment): Do not check
135 scm_gc_heap_lock.
136
137 * gc-malloc.c (scm_realloc, increase_mtrigger): Set
138 scm_gc_running_p while the scm_i_sweep_mutex is locked.
139
140 * inline.h (scm_cell, scm_double_cell): Do not check
141 scm_gc_running_p, allocation during sweeping is OK.
142
143 * gdbint.c (SCM_BEGIN_FOREIGN_BLOCK, SCM_END_FOREIGN_BLOCK): Do
144 not set scm_block_gc.
145
146 * init.c (scm_i_init_guile): Do not set scm_block_gc.
147
148 * deprecation.c (scm_c_issue_deprecation_warning): Use malloc
149 instead of scm_malloc. The latter can not be used during GC.
150
151 2005-03-09 Marius Vollmer <mvo@zagadka.de>
152
153 * script.c (scm_compile_shell_switches): Added 2005 to Copyright
154 years.
155
156 2005-03-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
157
158 * gc-card.c (scm_i_sweep_card): Do not increase/decrease
159 scm_gc_running_p. Sweeping can happen in parallel with
160 allocation.
161
162 * inline.h: Updated comments for current threading implementation.
163
164 * threads.h, threads.c (scm_i_frame_single_threaded): Removed.
165 (scm_i_thread): Removed unused signal_asyncs field.
166 (threads_mark): Do not mark it.
167 (guilify_self_1): Do not initialize it. Do initialize
168 continuation_root field.
169 (do_thread_exit): Do not remove thread from all_threads list.
170 (on_thread_exit): Do it here, after leaving guile mode.
171 (sleep_level): Removed.
172 (scm_i_thread_put_to_sleep): Leave thread_admin_mutex locked when
173 returning. Do not support recursive sleeps.
174 (scm_i_thread_wake_up): Expect thread_admin_mutex to be locked on
175 entry. Do not support recursive sleeps.
176
177 * fluids.c (ensure_state_size, ensure_all_state_sizes,
178 resize_all_states): Collapsed ensure_state_size and
179 ensure_all_state_sizes into one function named resize_all_states.
180 Allocate new vectors outside of single threaded region. Do only
181 simple things inside that region.
182 (scm_make_fluid, scm_make_dynamic_state): Lock fluid_admin_mutex
183 while adding to the global lists.
184
185
186 2005-03-08 Marius Vollmer <mvo@zagadka.de>
187
188 libltdl is no longer distributed. We expect it to be installed
189 already.
190
191 * Makefile.am (INCLUDES): Removed @LTDLINCL@.
192 (libguile_la_LIBADD): Removed @LIBLTDL@.
193
194 2005-03-07 Marius Vollmer <mvo@zagadka.de>
195
196 * threads.h, async.h, threads.c (SCM_CRITICAL_SECTION_START,
197 SCM_CRITICAL_SECTION_END): Moved here from threads.h since now
198 they also block/unblock execution of asyncs and call
199 scm_async_click which is declared in async.h but threads.h can not
200 include async.h since async.h already includes threads.h.
201 (scm_i_critical_section_level): New, for checking mistakes in the
202 use of the SCM_CRITICAL_SECTION_* macros.
203 (scm_i_critical_section_mutex): Make it a recursive mutex so that
204 critical sections can be nested.
205
206 * throw.c (scm_ithrow): Abort when scm_i_critical_section_level is
207 not zero.
208
209 * threads.h, threads.c (scm_frame_lock_mutex): New.
210 (scm_frame_critical_section): Take mutex as argument.
211 (framed_critical_section_mutex): New, used as default for above.
212 (scm_init_threads): Initialize it.
213 (scm_threads_prehistory): Do not initialize thread_admin_mutex and
214 scm_i_critical_section_mutex; both are initialized statically.
215
216 * continuation.c, deprecated.c, goops.c, guardians.c keywords.c,
217 libguile_la-arrays.loT, objprop.c, ports.c, smob.c, sort.s,
218 srcprop.c, stime.c, struct.c, throw.c, regex-posix.c: Include
219 "libguile/async.h" for SCM_CRITICAL_SECTION_START/END.
220
221 * debug.c (scm_debug_options): Replace
222 SCM_CRITICAL_SECTION_START/END with a frame and
223 scm_frame_critical_section.
224
225 * continuations.c (scm_make_continuation): No longer a critical
226 section.
227 (scm_dynthrow): Abort when scm_i_critical_section_level is
228 not zero.
229
230 2005-03-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
231
232 * threads.c (scm_try_mutex): Renamed argument for consistency.
233
234 * root.c (scm_call_with_dynamic_root): New docstring.
235
236 * eval.c: Define _GNU_SOURCE.
237
238 2005-03-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
239
240 Big merge from the mvo-thread-cleanup branch. The main changes
241 are:
242
243 - The dynamic roots functionality has been split into dynamic
244 states and continuations barriers. Fluids have been
245 reimplemented and can now be garbage collected.
246
247 - Initialization of Guile now works in a multi-thread friendly
248 manner. Threads can freely enter and leave guile mode.
249
250 - Blocking on mutexes or condition variables or while selecting
251 can now be reliably interrupted via system asyncs.
252
253 - The low-level threading interface has been removed.
254
255 - Signals are delivered via a pipe to a dedicated 'signal delivery
256 thread'.
257
258 - SCM_DEFER_INTS, SCM_ALLOW_INTS etc have been deprecated.
259
260 * throw.c (scm_handle_by_message): Exit only the current thread,
261 not the whole process.
262 (scm_handle_by_message_noexit): Exit when catching 'quit.
263
264 * scmsigs.c (take_signal, signal_delivery_thread,
265 start_signal_delivery_thread, ensure_signal_delivery_thread,
266 install_handler): Reimplemented signal delivery as explained in
267 the comments.
268
269 * pthreads-threads.h (scm_i_pthread_t, scm_i_pthread_self,
270 scm_i_pthread_create, scm_i_pthread_detach, scm_i_pthread_exit,
271 scm_i_sched_yield, scm_i_pthread_sigmask,
272 SCM_I_PTHREAD_MUTEX_INITIALIZER,
273 SCM_I_PTHREAD_RECURSIVE_MUTEX_INITIALIZER, scm_i_pthread_mutex_t ,
274 scm_i_pthread_mutex_init, scm_i_pthread_mutex_destroy,
275 scm_i_pthread_mutex_trylock, scm_i_pthread_mutex_lock,
276 scm_i_pthread_mutex_unlock, SCM_I_PTHREAD_COND_INITIALIZER,
277 scm_i_pthread_cond_t, scm_i_pthread_cond_init,
278 scm_i_pthread_cond_destroy, scm_i_pthread_cond_signal,
279 scm_i_pthread_cond_broadcast, scm_i_pthread_cond_wait,
280 scm_i_pthread_cond_timedwait, scm_i_pthread_once_t,
281 SCM_I_PTHREAD_ONCE_INIT, scm_i_pthread_once, scm_i_pthread_key_t ,
282 scm_i_pthread_key_create, scm_i_pthread_setspecific,
283 scm_i_pthread_getspecific, scm_i_scm_pthread_mutex_lock,
284 scm_i_frame_pthread_mutex_lock, scm_i_scm_pthread_cond_wait,
285 scm_i_scm_pthread_cond_timedwait): Provide the obvious mapping
286 when using pthreads.
287 * null-threads.c, null-threads.h: Provide dummy definitions for
288 the above symbols when not using pthreads.
289
290 * modules.h, modules.c (scm_frame_current_module): New.
291
292 * load.c (scm_primitive_load): Use scm_i_frame_current_load_port
293 instead of scm_internal_dynamic_wind.
294
295 * init.h, init.c (restart_stack, start_stack): Removed.
296 (scm_boot_guile, invoke_main_func): Simply use scm_with_guile.
297 (scm_boot_guile_1): Removed.
298 (scm_i_init_mutex): New.
299 (really_cleanup_for_exit, cleanup_for_exit): New.
300 (scm_init_guile_1, scm_i_init_guile): Renamed former to latter.
301 Moved around some init funcs. Call
302 scm_init_threads_default_dynamic_state. Register cleanup_for_exit
303 with atexit.
304
305 * hashtab.c (scm_hash_fn_create_handle_x, scm_hash_fn_remove_x):
306 Use "!scm_is_eq" instead of "!=".
307
308 * ge-scmconfig.c, gen-scmconfig.h.in (SCM_I_GSC_USE_COOP_THREADS,
309 SCM_USE_COOP_THREADS): Removed.
310
311 * gc.c (scm_igc): Take care that scm_gc_running_p is properly
312 maintained. Unlock scm_i_sweep_mutex before running
313 scm_after_gc_c_hook.
314 (scm_permanent_object): Allocate outside of critical section.
315 (cleanup): Removed.
316
317 * fluids.h, fluids.c: Reimplemented completely.
318 (SCM_FLUID_NUM, SCM_FAST_FLUID_REF,
319 SCM_FAST_FLUID_SET): Reimplemented as functions.
320 (scm_is_fluid): New.
321 (scm_i_make_initial_fluids, scm_i_copy_fluids): Removed.
322 (scm_make_dynamic_state, scm_dynamic_state_p,
323 scm_is_dynamic_state, scm_current_dynamic_state,
324 scm_set_current_dynamic_state, scm_frame_current_dynamic_state,
325 scm_c_with_dynamic_state, scm_with_dynamic_state,
326 scm_i_make_initial_dynamic_state, scm_fluids_prehistory): New.
327
328 * feature.c (progargs_fluid): New.
329 (scm_program_arguments, scm_set_program_arguments): Use it instead
330 of scm_progargs.
331 (scm_init_feature): Allocate it. Also, only add "threads" feature
332 when SCM_USE_PTHREAD_THREADS is true.
333
334 * eval.c (scm_makprom): Use scm_make_recursive_mutex instead of
335 scm_make_rec_mutex, with all the consequences.
336 (scm_eval_x, scm_eval): Use scm_frame_begin etc instead of
337 scm_internal_dynamic_wind. Handle dynamic states as second
338 argument.
339
340 * threads.h, threads.c (scm_internal_select): Renamed to
341 scm_std_select and discouraged old name.
342 (scm_thread_sleep, scm_thread_usleep): Likewise, as scm_std_sleep
343 and scm_std_usleep.
344 (scm_tc16_fair_mutex, scm_tc16_fair_condvar, SCM_MUTEXP,
345 SCM_FAIR_MUTEX_P, SCM_MUTEX_DATA, SCM_CONDVARP,
346 SCM_FAIR_CONDVAR_P, SCM_CONDVAR_DATA, SCM_THREADP,
347 SCM_THREAD_DATA): Removed.
348 (SCM_I_IS_THREAD, SCM_I_THREAD_DATA): New.
349 (scm_i_thread): New.
350 (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR):
351 Use scm_assert_smob_type.
352 (scm_c_scm2thread, scm_thread_join, scm_thread_detach,
353 scm_thread_self, scm_thread_yield, scm_mutex_init,
354 scm_mutex_destroy, scm_mutex_trylock, scm_mutex_unlock,
355 scm_rec_mutex_init, scm_rec_mutex_destroy, scm_make_rec_mutex,
356 scm_rec_mutex_free, scm_rec_mutex_lock, scm_rec_mutex_trylock,
357 scm_cond_init, scm_cond_destroy, scm_cond_wait,
358 scm_cond_timedwait, scm_cond_signal, scm_cond_broadcast,
359 scm_key_create, scm_key_delete, scm_setspecific, scm_getspecific,
360 scm_thread_select): Removed. Replaced with scm_i_pthread
361 functions as appropriate.
362 (scm_in_guile, scm_outside_guile): Removed.
363 (scm_t_guile_ticket, scm_leave_guile, scm_enter_guile): Return and
364 take a ticket.
365 (scm_with_guile, scm_without_guile, scm_i_with_guile_and_parent):
366 New.
367 (scm_i_frame_single_threaded): New.
368 (scm_init_threads_default_dynamic_state): New.
369 (scm_i_create_thread): Removed.
370 (scm_make_fair_mutex, scm_make_fair_condition_variable): Removed.
371 (scm_make_recursive_mutex): New.
372 (scm_frame_critical_section): New.
373 (SCM_CURRENT_THREAD, SCM_I_CURRENT_THREAD): Renamed former to
374 latter, changed all uses.
375 (scm_i_dynwinds, scm_i_setdynwinds, scm_i_last_debug_frame,
376 scm_i_set_last_debug_frame): New, use them instead of scm_root
377 stuff.
378 (SCM_THREAD_LOCAL_DATA, SCM_SET_THREAD_LOCAL_DATA,
379 scm_i_root_state_key,m scm_i_set_thread_data): Removed.
380 (scm_pthread_mutex_lock, scm_frame_pthread_mutex_lock,
381 scm_pthread_cond_wait, scm_pthread_cond_timedwait).
382 (remqueue): Allow the removal of already removed cells. Indicate
383 whether a real removal has happened.
384 (scm_thread): Removed, replaced with scm_i_thread.
385 (make_thread, init_thread_creatant): Removed.
386 (cur_thread): Removed.
387 (block_self, unblock_from_queue): New.
388 (block, timed_block, unblock): Removed.
389 (guilify_self_1, guilify_self_2, do_thread_exit,
390 init_thread_key_once, init_thread_key,
391 scm_i_init_thread_for_guile, get_thread_stack_base,
392 scm_init_guile): New initialisation method.
393 (scm_call_with_new_thread, scm_spawn_thread): Use it to simplify
394 thread creation.
395 (fair_mutex, fat_mutex, etc, fair_condvar, fat_condvar): Renamed
396 "fair" to fat and implemented new semantics, including reliable
397 interruption.
398 (all_threads): Now a pointer to a scm_i_thread, not a SCM.
399 (scm_threads_mark_stacks): Explicitly mark handle.
400 (scm_std_select): Allow interruption by also selecting on the
401 sleep_pipe.
402 (scm_i_thread_put_to_sleep): Handle recursive requests for
403 single-threadedness.
404 (scm_threads_prehistory, scm_init_threads): Put current thread
405 into guile mode via guileify_self_1 and guileify_self_2,
406 respectively.
407
408 * fluid.h (SCM_FLUIDP): Deprecated.
409
410 * coop-threads.c: Removed.
411
412 * continuations.h, continuations.c (scm_with_continuation_barrier,
413 scm_c_with_continuation_barrier, scm_i_with_continuation_barrier):
414 New.
415
416 * async.h, async.c (scm_i_setup_sleep, scm_i_reset_sleep): New.
417 (async_mutex): New.
418 (scm_async_click): Protected with async_mutex. Do not deal with
419 signal_asyncs, which are gone. Set cdr of handled async cell to
420 #f.
421 (scm_i_queue_async_cell): Protected with async_mutex. Interrupt
422 current sleep.
423 (scm_system_async_mark_for_thread): Do not use scm_current_thread
424 since that might not work during early initialization.
425
426 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS, SCM_REDEFER_INTS,
427 SCM_REALLOW_INTS): Deprecated by moving into deprecated.h and
428 deprecated.c. Replaced all uses with SCM_CRITICAL_SECTION_START
429 and SCM_CRITICAL_SECTION_END.
430 (SCM_ENTER_A_SECTION, SCM_EXIT_A_SECTION): Removed. Replaced with
431 SCM_CRITICAL_SECTION_START/END.
432
433 * Makefile.am (modinclude_HEADER): Removed threads-plugin.h.
434 (libguile_la_SOURCES): Added null-threads.c
435 (EXTRA_libguile_la_SOURCES): Removed pthread-threads.c and
436 threads-plugin.c.
437 * pthread-threads.c, threads-plugin.c, threads-plugin.h: Removed.
438
439 * root.h, root.c (scm_tc16_root, SCM_ROOTP, SCM_ROOT_STATE,
440 scm_root_state, scm_stack_base, scm_save_regs_gc_mark,
441 scm_errjmp_bad, scm_rootcont, scm_dynwinds, scm_progargs,
442 scm_last_debug_frame, scm_exitval, scm_cur_inp, scm_outp,
443 scm_cur_err, scm_cur_loadp, scm_root, scm_set_root,
444 scm_make_root): Removed or deprecated. Replaced with references
445 to the current thread, dynamic state, continuation barrier, or
446 some fluid, as appropriate.
447 (root_mark, root_print): Removed.
448 (scm_internal_cwdr): Reimplemented guts with
449 scm_frame_current_dynamic_state and
450 scm_i_with_continuation_barrier.
451 (scm_dynamic_root): Return current continuation barrier.
452
453
454 2005-02-28 Marius Vollmer <mvo@zagadka.de>
455
456 * socket.c (scm_setsockopt): Handle IP_ADD_MEMBERSHIP and
457 IP_DROP_MEMBERSHIP options. Also, reorganized the code a bit for
458 cleanliness.
459 (scm_init_socket): Define IP_ADD_MEMBERSHIP and
460 IP_DROP_MEMBERSHIP.
461 Thanks to Greg Troxel!
462
463 2005-02-27 Mikael Djurfeldt <djurfeldt@nada.kth.se>
464
465 * gh.h: Bugfix: Include <libguile.h> outside of the extern "C"
466 block.
467
468 2005-02-25 Marius Vollmer <mvo@zagadka.de>
469
470 * hashtab.c (scm_i_rehash): Remove elements from old bucket vector
471 so that no two weak alist vectors share a spine.
472 (scm_hash_fn_create_handle_x): Deal with a possible rehashing
473 during GC before inserting the new alist cell.
474
475 2005-02-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
476
477 * hashtab.c (scm_i_rehash): Cope with the case that a GC modifies
478 the hashtable.
479 (scm_hash_fn_create_handle_x): Likewise.
480 * vectors.h (SCM_I_SET_WVECT_TYPE): New, for use in scm_i_rehash.
481
482 2005-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
483
484 * unif.c (prototype_to_type): Bugfix: Don't compare prototype to
485 the prototypical examples mentioned in the old reference manual.
486 Instead keep the old semantics of dispatching on type. (Yes, this
487 is extremely ugly, but the whole point of keeping the deprecated
488 interface is not to break old code.)
489
490 2005-02-08 Mikael Djurfeldt <djurfeldt@nada.kth.se>
491
492 * deprecated.h (SCM_ARRAY_DIMS): Rename scm_i_attay_dims -->
493 scm_i_array_dims.
494
495 2005-01-28 Kevin Ryde <user42@zip.com.au>
496
497 * numbers.c (scm_ash): Rewrite using shifts, much faster than
498 integer-expt and multiply/divide. Inexacts and fractions no longer
499 supported (they happened to work before for left shifts, but not
500 right). Don't really need inexacts and fractions, since ash is
501 documented as a "bitwise operation", and all the rest of those only
502 take exact integers.
503
504 2005-01-27 Han-Wen Nienhuys <hanwen@xs4all.nl>
505
506 * gc-card.c (scm_i_card_statistics): map structs, closures and
507 subrs to one tag.
508
509 * gc.c (s_scm_gc_live_object_stats): return alist, not hashtable.
510 (tag_table_to_type_alist): ignore unknown types.
511
512 * gc-segment.c (scm_i_all_segments_statistics): new function.
513 (scm_i_heap_segment_statistics): new function
514
515 * gc.c (s_scm_gc_live_object_stats): new GUILE callable: return
516 statistics on the number of live objects of each type.
517
518 * gc-card.c (scm_i_tag_name): new function.
519 (scm_i_card_statistics): new function.
520
521 2005-01-24 Kevin Ryde <user42@zip.com.au>
522
523 * posix.c (scm_setlocale): Force errno=EINVAL for an error, since
524 POSIX and C99 don't document errno being set. Reported by Bruno
525 Haible.
526 (scm_flock): Update docstring from manual.
527
528 * random.c (scm_i_init_rstate): Compare w to -1 not 0xffffffffUL, now
529 that it's an scm_t_int32. Otherwise gcc 3.4 says it's always false on
530 a 64-bit system.
531
532 * scmsigs.c (scm_sigaction_for_thread): Use scm_to_long for
533 sa_handler, needs to be a long on 64-bit systems where int is only 32
534 bits.
535
536 2005-01-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
537
538 * environments.c (obarray_enter, obarray_replace): Call
539 SCM_HASHTABLE_INCREMENT when adding a new entry.
540
541 * objects.c: Include goops.h for the scm_class_of prototype.
542
543 * hashtab.c (hashtable_size, HASHTABLE_SIZE_N): Restrict hashtable
544 sizes to be smaller than the maximum lengths of vectors.
545
546 2005-01-18 Marius Vollmer <marius.vollmer@uni-dortmund.de>
547
548 * ports.c, smob.c: Include "libguile/goops.h".
549
550 * objects.h, objects.c, goops.c, goops.h (scm_class_boolean,
551 scm_class_char, scm_class_pair, scm_class_procedure,
552 scm_class_string, scm_class_symbol,
553 scm_class_procedure_with_setter, scm_class_primitive_generic,
554 scm_class_vector, scm_class_null, scm_class_real,
555 scm_class_complex, scm_class_integer, scm_class_fraction,
556 scm_class_unknown, scm_port_class, scm_smob_class,
557 scm_no_applicable_method, scm_class_of): Moved from objects to
558 goops since they are only useable once goops has been loaded.
559 (scm_classes_initialized): Removed.
560 (scm_class_of): Do not check it.
561 (create_standard_classes): Do not set it.
562
563 2005-01-17 Marius Vollmer <marius.vollmer@uni-dortmund.de>
564
565 * objects.h, objects.c (scm_classes_initialized): New.
566 (scm_class_of): Signal error when scm_classes_initialized is zero.
567 * goops.c (create_standard_classes): Set scm_classes_initialized
568 to one.
569
570 * random.c (scm_random_solid_sphere_x): Use
571 scm_c_generalized_vector_length instead of
572 scm_uniform_vector_length.
573
574 2005-01-16 Marius Vollmer <mvo@zagadka.de>
575
576 * script.c (scm_compile_shell_switches): Removed debugging output.
577
578 2005-01-15 Kevin Ryde <user42@zip.com.au>
579
580 * numbers.c (scm_logtest, scm_logbit_p, scm_integer_expt): Update
581 docstrings from manual.
582 * random.c (scm_random_solid_sphere_x): Update docstring from manual.
583
584 2005-01-14 Marius Vollmer <marius.vollmer@uni-dortmund.de>
585
586 * random.c: Don't check for definedness of SCM_HAVE_T_INT64, check
587 its value.
588
589 Implement u64 and s64 uniform numeric vectors with bignums when
590 scm_t_uint64 and scm_t_int64 are not available.
591
592 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_take_u64vector,
593 scm_array_handle_u64_elements,
594 scm_array_handle_u64_writable_elements, scm_u64vector_elements,
595 scm_u64vector_writable_elements): Do not define when scm_t_uint64
596 is not available.
597 (scm_take_s64vector, scm_array_handle_s64_elements,
598 scm_array_handle_s64_writable_elements, scm_s64vector_elements,
599 scm_s64vector_writable_elements): Likewise for scm_t_int64.
600 (uvec_sizes, uvec_print, uvec_equalp): Use SCM bignums when
601 scm_t_int64/scm_t_uint64 are not available.
602 (uvec_mark): New, to mark the bignums.
603 (alloc_uvec): Initialize bignums.
604 (uvec_fast_ref): Return bignums directly.
605 (scm_uint64_min, scm_uint64_max, scm_int64_min, scm_int64_max,
606 assert_exact_integer): New.
607 (uvec_fast_set): Use them to validate the bignums.
608 (scm_init_srfi_4): Set mark function of smob when needed.
609 Initialize scm_uint64_min, scm_uint64_max, scm_int64_min,
610 scm_int64_max.
611
612 Recognize 1.4 -e syntax.
613
614 * script.c (sym_at, sym_atat, sym_main, all_symbols): New.
615 (scm_compile_shell_switches): Use them to recognize and convert
616 1.4 "-e" syntax.
617
618 2005-01-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
619
620 * deprecated.h, deprecated.c, strings.h, strings.c: Turn all
621 deprecated features that once were macros but are now functions
622 back into macros.
623
624 2005-01-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
625
626 * eval.c, debug.h (SCM_WARN_DEPRECATED): New debug option.
627 * deprecation.c (scm_issue_deprecation_warning,
628 scm_c_issue_deprecation_warning_fmt): Use it.
629 (mode): Removed.
630 (print_summary): New.
631 (scm_init_deprecation): Initialize SCM_WARN_DEPRECATED instead of
632 mode.
633
634 Deprecated SCM_ARRAY* macros.
635
636 * unif.h, unif.c, ramap.c, vectors.c, srfi-4.c, srfi-4.i.c
637 (SCM_ARRAYP, SCM_I_ARRAYP): Renamed former to latter internal
638 version. Changed all uses.
639 (scm_tc16_array, scm_i_tc16_array,
640 scm_tc16_enclosed_array, scm_i_tc16_enclosed_array,
641 SCM_ARRAY_FLAG_CONTIGUOUS, SCM_I_ARRAY_FLAG_CONTIGUOUS,
642 SCM_ENCLOSE_ARRAYP, SCM_I_ENCLOSE_ARRAYP,
643 SCM_ARRAY_NDIM, SCM_I_ARRAY_NDIM,
644 SCM_ARRAY_CONTP, SCM_I_ARRAY_CONTP,
645 SCM_ARRAY_MEM, SCM_I_ARRAY_MEM,
646 SCM_ARRAY_V, SCM_I_ARRAY_V,
647 SCM_ARRAY_BASE, SCM_I_ARRAY_BASE,
648 SCM_ARRAY_DIMS, SCM_I_ARRAY_DIMS,
649 scm_t_array, scm_i_t_array): Likewise.
650 (SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG):
651 Moved from unif.h to unif.c.
652 (scm_c_array_rank): New.
653 (scm_array_rank): Reimplement using it.
654
655 * deprecated.h, deprecated.c (SCM_ARRAYP, SCM_ARRAY_NDIM,
656 SCM_ARRAY_CONTP, SCM_ARRAY_MEM, SCM_ARRAY_V, SCM_ARRAY_BASE,
657 SCM_ARRAY_DIMS, scm_t_array): New deprecated versions.
658
659 2005-01-11 Marius Vollmer <mvo@zagadka.de>
660
661 * ramap.c: Replace uses of scm_make_ra with scm_i_make_ra.
662 (GVREF, GVSET): New abbreviations. Use them everywhere instead of
663 scm_c_generalized_vector_ref and scm_cvref, and
664 scm_c_generalized_vector_set_x, respectively.
665 (RVREF, IVDEP, BINARY_ELTS_CODE, BINARY_PAIR_ELTS_CODE,
666 UNARY_ELTS_CODE, UNARY_PAIR_ELTS_CODE): Removed since unused.
667
668 * unif.h, unif.c (indices_to_pos, scm_array_handle_pos): Renamed
669 former to latter and made public. Changed all uses.
670 (scm_i_make_ra): Made public, changed tag param to enclosed flag.
671 (scm_make_ra): Deprecated, changed all uses to scm_i_make_ra.
672 (scm_i_shap2ra): New internal version of scm_shap2ra.
673 (scm_shap2ra): Deprecated, changed all uses to scm_i_shap2ra.
674 (scm_i_ra_set_contp): New internal version of scm_ra_set_contp.
675 (scm_ra_set_contp): Deprecated, changed all uses to
676 scm_i_ra_set_contp.
677 (scm_cvref, scm_aind, scm_raprin1): Deprecated.
678
679 2005-01-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
680
681 * eval.c (scm_eval): Added example to docstring. Thanks to Issac
682 Trotts!
683
684 * unif.c (scm_list_to_typed_array): Allow the specification of the
685 upper bound as well. This is needed for empty arrays.
686 (l2ra): Give needed number of elements in error message.
687 (scm_i_print_array): Print length information for arrays that need
688 it.
689 (scm_i_read_array): Parse it.
690
691 * deprecated.h, deprecated.c (SCM_CHARS, SCM_UCHARS, SCM_LENGTH,
692 scm_i_object_chars, scm_i_object_length): Brought back from the
693 dead.
694
695 2005-01-10 Marius Vollmer <mvo@zagadka.de>
696
697 * ramap.c: Replaced single-index uses of scm_array_set_x with
698 scm_c_generalized_vector_set_x.
699
700 * unif.c (scm_array_rank, scm_array_dimensions,
701 scm_shared_array_offset, scm_shared_array_increments,
702 scm_array_ref, scm_array_set_x): Use scm_t_array_handle operations
703 to simplify code and make it more general.
704 (scm_shared_array_root): Work with all kinds of arrays, including
705 naked vectors.
706 (indices_to_pos): New.
707 (scm_make_shared_array): Use it instead of scm_aind; use handle
708 for oldra.
709
710 2005-01-10 Kevin Ryde <user42@zip.com.au>
711
712 * posix.c (scm_mkstemp): Update docstring from manual.
713
714 * stime.c (scm_mktime): Missing default errno=EINVAL from prev change.
715
716 2005-01-09 Marius Vollmer <mvo@zagadka.de>
717
718 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_i_uniform_vector_ref_proc,
719 scm_i_uniform_vector_set_proc): New.
720 (u8ref, u8set, s8ref, s8set, etc): New.
721 (uvec_reffers, uvec_setters): New.
722 (uvec_to_list): Use generic scm_array_handle_ref instead of
723 uvec_fast_ref since scm_array_handle_ref should be faster now.
724 (coerce_to_uvec, scm_c_uniform_vector_ref,
725 scm_c_uniform_vector_set_x): Likewise.
726
727 * unif.h, unif.c, inline.h (scm_i_t_array_ref, scm_i_t_array_set):
728 New.
729 (scm_t_array_handle): Added ref, set, elements and
730 writable_elements for fast inline operation of
731 scm_array_handle_ref and scm_array_handle_set.
732 (scm_array_handle_ref, scm_array_handle_set): Moved to inline.h
733 and replaced with inline code that simply calls the ref/set
734 members of the handle.
735 (enclosed_ref, vector_ref, string_ref, bitvector_ref, memoize_ref,
736 enclosed_set, vector_set, string_set, bitvector_set, memoize_set):
737 New.
738 (scm_array_handle_get): Initialize ref/set fields to memoize_ref
739 and memoize_set.
740 (scm_bitvector_fill_x, scm_bitvector_to_list, scm_bit_count,
741 scm_bit_position, scm_bit_set_star_x, scm_bit_count_star,
742 scm_bit_invert_x): Correctly multiply index with increment in the
743 general case.
744
745 * unif.c (scm_array_handle_set): Correctly execute only one
746 alternative. D'Oh!
747 (scm_list_to_typed_array, l2ra): Use scm_t_array_handle to fill
748 the array; this covers all cases with much simpler code.
749
750 * srfi-4.c (scm_uniform_element_size): Deprecated implementation
751 as well.
752
753 2005-01-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
754
755 * srfi-4.c (uvec_type): New.
756 (uvec_to_list, uvec_ref, uvec_set_x, scm_c_uniform_vector_ref,
757 scm_c_uniform_vector_x): Use it to get concrete type.
758
759 * unif.h (scm_t_array_dim): Changed type of members to ssize_t, to
760 fit the docs.
761
762 * unif.c (ra2l): Handle zero rank arrays.
763 (scm_i_print_array): Print zero rank arrays specially.
764 (tag_to_type): Return #t for an empty tag, not the empty symbol.
765 (scm_i_read_array): Allow zero rank arrays.
766
767 2005-01-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
768
769 * hashtab.h, hashtab.c (SCM_HASHTAB_BUCKET_LOC): Removed.
770 (scan_weak_hashtables): Rewrote its use with SCM_HASHTAB_BUCKET
771 and SCM_SET_HASHTAB_BUCKET.
772
773 * print.h, print.c (scm_print_state, SCM_PRINT_STATE_LAYOUT):
774 Removed ref_stack field.
775 (PSTATE_STACK_REF, PSTATE_STACK_SET): New, for accessing the stack
776 of a print state. Use them everywhere instead of ref_stack.
777
778 * srfi-4.h (scm_uniform_element_size): Deprecated for real.
779
780 * srfi-4.c: Include deprecation.h.
781
782 * vectors.h, vectors.c, unif.h, unif.c, deprecated.h,
783 deprecated.c, eq.c
784 (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR): Removed.
785 (scm_vector_elements, scm_vector_writable_elements,
786 scm_generalized_vector_get_handle): Moved to vectors.[hc] from
787 unif.[hc].
788 (SCM_SIMPLE_VECTOR_LOC): Removed.
789 (SCM_VECTOR_MAX_LENGTH, SCM_VECTOR_LENGTH, SCM_VELTS,
790 SCM_WRITABLE_VELTS, SCM_VECTOR_REF, SCM_VECTOR_SET,
791 scm_vector_equal_p): Moved from vectors.[hc] to deprecated.[hc].
792 (scm_vector_equal_p, scm_i_vector_equal_p): Renamed former to
793 latter. Changed use in eq.c.
794
795 2005-01-07 Marius Vollmer <mvo@zagadka.de>
796
797 Make the uniform vector routines also deal with one dimensional
798 arrays.
799
800 * srfi-4.c (SCM_IS_UVEC): New, use it instead of
801 SCM_SMOB_PREDICATE in this file.
802 (is_uvec): Also recognize one-dimensional uniform numeric arrays
803 of the right type.
804 (scm_is_uniform_vector): Likewise.
805 (uvec_fast_ref): Made BASE param const.
806 (uvec_writable_elements, uvec_elements): New.
807 (uvec_to_list, uvec_ref, uvec_set_x, uvec_length,
808 scm_c_uniform_vector_length, scm_c_uniform_vector_ref,
809 scm_c_uniform_set_x): Use them to also deal with one-dimensional
810 arrays.
811 (scm_uniform_vector_ref, scm_uniform_vector_set_x): Deprecate old
812 argument convention.
813 (scm_uniform_vector_to_list): Let uvec_to_list do all the
814 checking.
815 (scm_uniform_vector_length): Use uvec_length.
816
817 2005-01-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
818
819 * srfi-4.h, srfi-4.c (scm_c_uniform_vector_element_size,
820 scm_c_uniform_vector_size): Removed.
821 (scm_array_handle_uniform_element_size): New.
822
823
824 * unif.h (scm_array_handle_ref, scm_array_handle_set): Changed
825 type of POS parameter to be signed, positions can be negative.
826 (scm_array_handle_release): New, changed all uses of
827 scm_t_array_handle to properly call it.
828 (scm_vector_get_handle, scm_generalized_vector_get_handle):
829 Renamed former to latter, changed all uses.
830
831 2005-01-05 Marius Vollmer <mvo@zagadka.de>
832
833 Updated bitvector routines to also use scm_t_array_handles.
834
835 * unif.h (scm_bitvector_elements,
836 scm_bitvector_writable_elements): Use a scm_t_array_handle and
837 deliver offset, length and increment to caller. Changed all uses.
838 (scm_bitvector_release_elements,
839 scm_frame_bitvector_release_elements,
840 scm_bitvector_release_writable_elements,
841 scm_frame_bitvector_release_writable_elements): Removed.
842 (scm_array_handle_bit_elements,
843 scm_array_handle_bit_writable_elements,
844 scm_array_handle_bit_elements_offset): New.
845 (scm_make_typed_array): The special value for non-initialized
846 arrays is now SCM_UNSPECIFIED. The old special value SCM_BOOL_F
847 was a valid value to fill bitvectors with, so it can't really be
848 specialed out.
849
850 2005-01-04 Kevin Ryde <user42@zip.com.au>
851
852 * stime.c (scm_strftime): Free t.tm_zone produced by bdtime2c.
853 Reported by Bill Schottstaedt.
854
855 2005-01-02 Marius Vollmer <mvo@zagadka.de>
856
857 * sort.c (quicksort): Added INC parameter for non-contigous
858 vectors.
859 (quicksort1): New, for contigous vectors. Both functions are
860 generated from the same code by including "quicksort.i.c".
861 (scm_restricted_vector_sort_x): Call one of quicksort and
862 quicksort1, depending on increment of vector.
863 (scm_sort): Simply call scm_sort_x on a copy of the list or
864 vector.
865 (scm_merge_vector_x, scm_merge_vector_step): Changed indices to
866 size_t, added inc parameter.
867 (scm_stable_sort_x): Allocate temporary storage as Scheme vector
868 so that it doesn't leak.
869 (scm_stable_sort): Simply call scm_stable_sort_x on a copy of the
870 list or vector.
871
872 * ramap.c (scm_array_map_x): Do not try to convert fill value
873 before filling, any necessary conversion is done while storing.
874
875 * gc-card.c (scm_i_sweep_card): Call scm_i_vector_free instead of
876 doing it inline.
877
878 * hashtab.c, hashtab.h (SCM_HASHTABLE_BUCKETS): Removed.
879 (SCM_HASHTABLE_BUCKET, SCM_HASHTABLE_BUCKET_LOC): New. Replaced
880 all uses of SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET.
881
882 * tags.h, weaks.c, vports.c, hashtab.c, convert.c, sort.c,
883 convert.c, convert.h, convert.i.c, deprecated.c, environments.c,
884 eval.c, filesys.c, fluids.c, gc-mark.c, gh.h, gh_data.c, goops.c,
885 hash.c, init.c, libguile_la-arrays.loT, modules.c, net_db.c,
886 objects.c, ports.c, posix.c, print.c, random.c, read.c,
887 regex-posix.c, scmsigs.c, socket.c, stime.c, symbols.c: Use new
888 vector elements API or simple vector API, as appropriate. Removed
889 SCM_HAVE_ARRAYS ifdefery. Replaced all uses of
890 SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET.
891
892 * srfi-4.h, srfi-4.c,
893 srfi-4.i.c (scm_array_handle_uniform_elements,
894 scm_array_handle_uniform_writable_elements,
895 scm_uniform_vector_elements,
896 scm_uniform_vector_writable_elements):
897 (scm_<foo>vector_elements, scm_<foo>vector_writable_elements): Use
898 scm_t_array_handle, deliver length and increment.
899 (scm_array_handle_<foo>_elements,
900 scm_array_handle_<foo>_writable_elements): New.
901
902 * gen-scmconfig.h.in (SCM_I_GSC_HAVE_ARRAYS): Removed.
903 * gen-scmconfig.c: Hard code SCM_HAVE_ARRAYS to "1".
904
905 * unif.h, unif.c (scm_t_array_handle, scm_array_get_handle,
906 scm_array_handle_rank, scm_array_handle_dims, scm_array_handle_ref
907 scm_array_handle_set, scm_array_handle_elements
908 scm_array_handle_writable_elements, scm_vector_get_handle): New.
909 (scm_make_uve, scm_array_prototype, scm_list_to_uniform_array,
910 scm_dimensions_to_uniform_array): Deprecated for real.
911 (scm_array_p, scm_i_array_p): Use latter for SCM_DEFINE since
912 snarfing wont allow a mismatch between C and Scheme arglists.
913 (scm_make_shared_array, scm_enclose_array): Correctly use
914 scm_c_generalized_vector_length instead of
915 scm_uniform_vector_length.
916
917 * validate.h (SCM_VALIDATE_VECTOR,
918 SCM_VALIDATE_VECTOR_OR_DVECTOR): use scm_is_simple_vector instead
919 of SCM_VECTORP.
920
921 * weaks.h, weaks.c: Use new internal weak vector API from
922 vectors.h.
923
924 * Makefile.am (libguile_la_SOURCES, DOT_X_FILES, DOT_DOC_FILES,
925 EXTRA_libguile_la_SOURCES): Changed ramap.c and unif.c from being
926 'extra' to being regular sources.
927 (noinst_HEADERS): Added quicksort.i.c.
928 * quicksort.i.c: New file.
929
930 * vectors.h, vector.c (SCM_VECTORP, SCM_VECTOR_LENGTH, SCM_VELTS,
931 SCM_WRITABLE_VELTS, SCM_VECTOR_REF, SCM_VECTOR_SET): Deprecated
932 and reimplemented. Replaced all uses with scm_vector_elements,
933 scm_vector_writable_elements, or SCM_SIMPLE_VECTOR_*, as
934 appropriate.
935 (scm_is_simple_vector, SCM_SIMPLE_VECTOR_LENGTH,
936 SCM_SIMPLE_VECTOR_REF, SCM_SIMPLE_VECTOR_SET,
937 SCM_SIMPLE_VECTOR_LOC): New.
938 (SCM_VECTOR_BASE, SCM_SET_VECTOR_BASE, SCM_VECTOR_MAX_LENGTH,
939 SCM_MAKE_VECTOR_TAG, SCM_SET_VECTOR_LENGTH,
940 SCM_VELTS_AS_STACKITEMS, SCM_SETVELTS, SCM_GC_WRITABLE_VELTS):
941 Removed.
942 (scm_vector_copy): New.
943 (scm_vector_elements, scm_vector_writable_elements): Use
944 scm_t_array_handle, deliver length and increment. Moved to
945 unif.h. Changed all uses.
946 (scm_vector_release_elements,
947 scm_vector_release_writable_elements,
948 (scm_frame_vector_release_elements,
949 scm_frame_vector_release_writable_elements): Removed.
950 (SCM_I_IS_VECTOR, SCM_I_VECTOR_ELTS, SCM_I_VECTOR_WELTS,
951 SCM_I_VECTOR_LENGTH, scm_i_vector_free): New internal API.
952 (SCM_I_WVECTP SCM_I_WVECT_LENGTH SCM_I_WVECT_VELTS
953 SCM_I_WVECT_GC_WVELTS SCM_I_WVECT_TYPE SCM_I_WVECT_GC_CHAIN
954 SCM_I_SET_WVECT_GC_CHAIN, scm_i_allocate_weak_vector): New, for
955 weak vectors.
956
957 2004-12-29 Marius Vollmer <mvo@zagadka.de>
958
959 No longer use creators to specify the type of an array. Creators
960 expose the fact that arrays are wrapped around vectors, but that
961 might change.
962
963 * srfi-4.h (scm_i_proc_make_u8vector, scm_i_proc_make_s8vector,
964 scm_i_proc_make_u16vector, scm_i_proc_make_s16vector,
965 scm_i_proc_make_u32vector, scm_i_proc_make_s32vector,
966 scm_i_proc_make_u64vector, scm_i_proc_make_s64vector,
967 scm_i_proc_make_f32vector, scm_i_proc_make_f64vector,
968 scm_i_proc_make_c32vector, scm_i_proc_make_c64vector,
969 uvec_proc_vars): Removed.
970 (scm_i_generalized_vector_creator): Removed.
971 (scm_i_generalized_vector_type): New.
972
973 * unif.h, unif.c (scm_typed_array_p, scm_make_array,
974 scm_make_typed_array, scm_array_type, scm_list_to_array,
975 scm_list_to_typed_array, scm_is_array, scm_is_typed_array): New.
976 (scm_array_creator): Removed.
977 (scm_array_p): Deprecated second PROT argument.
978 (scm_dimensions_to_uniform_array, scm_list_to_uniform_array):
979 Deprecated, reimplemented in terms of scm_make_typed_array and
980 scm_list_to_typed_array.
981 (scm_i_proc_make_vector, scm_i_proc_make_string,
982 scm_i_proc_make_bitvector): Removed.
983 (type_creator_table, init_type_creator_table, type_to_creator,
984 make_typed_vector): New.
985 (scm_i_convert_old_prototype): Removed.
986 (prototype_to_type): New.
987 (scm_make_uve): Deprecated, reimplemented using make_typed_vector.
988 (scm_array_dimensions): Use scm_list_1 instead of scm_cons for
989 minor added clarity.
990 (scm_make_shared_array, scm_ra2contig): Use make_typed_vector
991 instead of scm_make_uve.
992 (tag_creator_table, scm_i_tag_to_creator): Removed.
993 (tag_to_type): New.
994 (scm_i_read_array): Use scm_list_to_typed_array instead of
995 scm_list_to_uniform_array.
996
997 2004-12-27 Marius Vollmer <mvo@zagadka.de>
998
999 * unif.h, unif.c (scm_bitvector_elements): Made return value "const".
1000 (scm_bitvector_writable_elements): New.
1001 (scm_bitvector_release, scm_bitvector_release_elements):
1002 Renamed former to latter. Added explicit call to
1003 scm_remember_upto_here_1.
1004 (scm_frame_bitvector_release,
1005 scm_frame_bitvector_release_elements): Renamed former to latter.
1006 (scm_bitvector_release_writable_elements,
1007 scm_bitvector_release_writable_elements): New.
1008 Changed all uses as required by the changes above.
1009
1010 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_uniform_vector_elements,
1011 scm_u8vector_elements, etc): Made return value "const".
1012 (scm_uniform_vector_writable_elements,
1013 scm_u8vector_writable_elements, etc): New.
1014 (scm_uniform_vector_release, scm_uniform_vector_release_elements):
1015 Renamed former to latter. Added explicit call to
1016 scm_remember_upto_here_1.
1017 (scm_frame_uniform_vector_release,
1018 scm_frame_uniform_vector_release_elements): Renamed former to latter.
1019 (scm_uniform_vector_release_writable_elements,
1020 scm_frame_uniform_vector_release_writable_elements): New. Takes
1021 crown of longest identifier yet.
1022 Changed all uses as required by the changes above.
1023
1024 * vectors.h, vectors.c (scm_c_vector_set_x): Make return type
1025 void.
1026 (scm_is_vector, scm_vector_p, scm_vector_length,
1027 scm_c_vector_length, scm_vector_ref, scm_c_vector_ref,
1028 scm_vector_set_x, scm_c_vector_set_x, scm_vector_to_list,
1029 scm_vector_move_left_x, scm_vector_move_right_x,
1030 scm_vector_fill_x): handle one-dimensional arrays.
1031 (scm_vector_elements, scm_vector_release_elements,
1032 scm_vector_frame_release_elements, scm_vector_writable_elements,
1033 scm_vector_release_writable_elements,
1034 scm_vector_frame_release_writable_elements): New.
1035 (scm_list_to_vector, scm_vector_to_list, scm_vector_fill,
1036 scm_vector_move_left_x, scm_vector_move_right_x): Use them.
1037
1038 * ramap.c (scm_ramapc, scm_raeql): Use
1039 scm_c_generalized_vector_length instead of
1040 scm_uniform_vector_length.
1041 (scm_ramap, rafe): Use scm_c_vector_ref instead of SCM_VELTS. use
1042 scm_c_generalized_vector_ref instead of scm_uniform_vector_ref.
1043
1044 2004-12-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1045
1046 * continuations.h, continuations.c (scm_t_contregs): New 'offset'
1047 member for relocating debug frames.
1048 (scm_make_continuation): Set it.
1049
1050 * stacks.c (read_frame, read_frames, scm_make_stack,
1051 scm_last_stack_frame, scm_stack_id): Use the new 'offset' member
1052 of continuations instead of calculating the offset ourselves.
1053 Relocate 'vect' member of scm_t_debug_frame.
1054
1055 2004-12-16 Kevin Ryde <user42@zip.com.au>
1056
1057 * ramap.c (scm_array_map_x): Check for at least one source argument.
1058
1059 2004-12-14 Kevin Ryde <user42@zip.com.au>
1060
1061 * srfi-13.c (string-any, string-every): Use a scheme wrapper around
1062 the C code so for the final call to the predicate procedure is a tail
1063 call, per SRFI-13 spec.
1064
1065 2004-12-10 Kevin Ryde <user42@zip.com.au>
1066
1067 * eq.c (scm_eq_p, scm_eqv_p, scm_equal_p): Update docstrings from
1068 recent revision to the reference manual.
1069
1070 * numbers.c (scm_modulo): Amend fixme comment about negative divisor
1071 with "%", C99 says it's well-defined.
1072
1073 * socket.c (scm_from_ipv6): Just use mpz_import. Don't bother trying
1074 to fit scm_from_ulong_long, since that uses mpz_import anyway. Don't
1075 bother trying to fit scm_from_ulong, not really worth the trouble if
1076 addresses are more than 4 bytes usually.
1077
1078 2004-11-30 Kevin Ryde <user42@zip.com.au>
1079
1080 * gc_os_dep.c (NetBSD): Test __m68k__ and __arm__ as well as m68k and
1081 arm32. Reported by Greg Troxel.
1082
1083 2004-11-14 mvo <mvo@zagadka.de>
1084
1085 * unif.c, unif.h (scm_i_cvref): Made non-static for ramap.c.
1086
1087 * Makefile.am (INCLUDES): It is "@LTDLINCL@", not "@LTDLINC@".
1088
1089 2004-11-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1090
1091 Enclosed arrays are now their own smob. This has been done to
1092 make the code more explicit about them and to prepare for the time
1093 when generalized vectors include arbitrary one-dimensional
1094 arrays. (Uptonow, enclosed arrays have been recognized by their
1095 use of an array as their storage 'vector'. When all generalized
1096 vectors are allowed as storage, including one-dimensional arrays,
1097 this will no longer work.)
1098
1099 * unif.h, unif.c: (scm_tc16_enclosed_array, SCM_ENCLOSED_ARRAYP):
1100 New.
1101 (exactly_one_third, singp): Removed.
1102 (scm_array_p, scm_array_dimensions, scm_shared_array_root,
1103 scm_shared_array_offset, scm_shared_array_increments): Handle
1104 enclosed arrays explicitely.
1105 (scm_array_rank): Likewise. Also, do not return zero for
1106 non-arrays, signal an error instead since arrays with rank zero do
1107 exist.
1108 (scm_i_make_ra): New, for specifying the tag of the new array.
1109 (scm_make_enclosed_array): Use it.
1110 (scm_make_ra): Reimplemented in terms of scm_i_make_ra.
1111 (scm_make_shared_array): Use scm_c_generalized_vector_length
1112 instead of scm_uniform_vector_length.
1113 (scm_array_in_bounds_p): Rewritten to be much cleaner.
1114 (scm_i_cvref): New, doing the job of scm_cvref.
1115 (scm_cvref): Use scm_i_cvref.
1116 (scm_array_ref): Do not accept non-arrays when no indices are
1117 given. Use scm_i_cvref to do the actual access.
1118 ("uniform-array-set1"): Do not register.
1119 (scm_array_set_x, scm_uniform_array_read_x,
1120 scm_uniform_array_write): Handle enclosed arrays explicitly.
1121 (ra2l): Use scm_i_cvref instead of scm_uniform_vector_ref to also
1122 handle enclosed arrays.
1123 (scm_array_to_list): Handle enclosed arrays explicitly.
1124 (rapr1): Removed.
1125 (scm_i_print_array_dimension): Use scm_i_cvref to also handle
1126 enclosed arrays.
1127 (scm_i_print_enclosed_array): New.
1128 (tag_proto_table, tag_creator_table): Renamed former to latter.
1129 Added "a" and "b" for strings and bitvectors, resp.
1130 (scm_i_tag_to_prototype, scm_i_tag_to_creator): Renamed former to
1131 latter. Tag "a" is in the table now, no need to handle it as a
1132 legacy tag.
1133 (scm_raprin1): Just call scm_iprin1.
1134 (scm_array_creator, scm_array_prototype): Handle enclosed arrays
1135 explicitly.
1136 (scm_init_unif): Initialize scm_tc16_enclosed_array smob.
1137 Use scm_i_print_array as printer for scm_tc16_array.
1138
1139 2004-11-10 Marius Vollmer <mvo@zagadka.de>
1140
1141 * ramap.c (cind): Changed second arg to be pointer to long instead
1142 of uniform vector.
1143 (scm_ramapc): Allocate index vector with scm_malloc and not as
1144 uniform vector. Wrap it in a frame so that it gets properly freed.
1145 (scm_array_index_map_x): Likewise.
1146
1147 * unif.c: Changed all uses of scm_array_prototype to
1148 scm_array_creator. (scm_i_get_old_prototype): Signal error when no
1149 prototype is known.
1150 (scm_uniform_array_read_x, scm_uniform_array_write): Reimplemented
1151 in terms of scm_uniform_vector_read_x and
1152 scm_uniform_vector_write, respectively. Strings and
1153 bitvector support has been dropped.
1154
1155 * srfi-4.h, srfi-4.c: Do not include <libguile.h>, include the
1156 needed files directly. Include config.h, <unistd.h> and <io.h>
1157 when available.
1158 (scm_uniform_vector_read_x, scm_uniform_vector_write): New.
1159
1160 2004-11-09 Marius Vollmer <mvo@zagadka.de>
1161
1162 * gh_data.c (gh_uniform_vector_length): Properly use
1163 scm_c_uniform_vector_length instead of scm_uniform_vector_length.
1164
1165 2004-11-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1166
1167 * srfi-4.h (scm_c_uniform_vector_ref, scm_c_uniform_vector_set_x):
1168 New.
1169 (scm_i_uniform_vector_creator): Removed.
1170 (scm_i_generalized_vector_creator): New.
1171 (scm_uniform_vector_length, scm_uniform_element_size): Do not
1172 handle generalized vectors, only uniform numeric vectors.
1173 (alloc_uvec): Do length check here...
1174 (make_uvec): ...but not here.
1175 (coerce_to_uvec): Use new generalized vector functions to handle
1176 all kinds of vectors in one go.
1177
1178 * tags.h (scm_tc7_bvect): Renamed to scm_tc7_unused7, renaming the
1179 remaining scm_tc7_unused tags to get a neatly ordered list.
1180
1181 * eq.c, evalext.c, gc-card.c, gc-mark.c, objects.c, print.c: Do no
1182 longer handle scm_tc7_bvect bitvectors.
1183
1184 * ramap.c: Use the new generalized vector functions to handle all
1185 vector like things.
1186
1187 * vectors.h, vectors.c (scm_is_vector, scm_c_vector_length,
1188 scm_c_vector_ref, scm_c_vector_set_x, scm_generalized_vector_p,
1189 scm_generalized_vector_length, scm_generalized_vector_ref,
1190 scm_generalized_vector_set_x, scm_generalized_vector_to_list,
1191 scm_is_generalized_vector, scm_c_generalized_vector_length,
1192 scm_c_generalized_vector_ref, scm_c_generalized_vector_set_x):
1193 New.
1194
1195 * unif.h, unif.c (scm_bitvector_p, scm_bitvector,
1196 scm_make_bitvector, scm_bitvector_length, scm_bitvector_ref,
1197 scm_bitvector_set_x, scm_list_to_bitvector, scm_bitvector_to_list,
1198 scm_bitvector_fill_x, scm_is_bitvector, scm_c_make_bitvector,
1199 scm_c_bitvector_length, scm_c_bitvector_ref,
1200 scm_c_bitvector_set_x, scm_bitvector_elements,
1201 scm_bitvector_release, scm_frame_bitvector_release,
1202 scm_tc16_bitvector, bitvector_free, bitvector_print,
1203 bitvector_equalp, count_ones, find_first_one): New.
1204 (scm_bit_count, scm_bit_position, scm_bit_set_star_x,
1205 scm_bit_count_star, scm_bit_invert_x, scm_istr2bve): Rewritten
1206 using the new C API for bitvectors and maybe count_ones or
1207 find_first_one, as appropriate.
1208 (SCM_I_MAX_LENGTH, SCM_BITVECTOR_P, SCM_BITVECTOR_BASE,
1209 SCM_SET_BITVECTOR_BASE, SCM_BITVECTOR_MAX_LENGTH,
1210 SCM_BITVECTOR_LENGTH, SCM_MAKE_BITVECTOR_TAG,
1211 SCM_SET_BITVECTOR_LENGTH): Removed. Replaced all uses with the
1212 new functions from above.
1213 (scm_i_proc_make_vector, scm_i_proc_make_string,
1214 scm_i_proc_make_bitvector): Made non-static for use in
1215 scm_i_generalized_vector_creator.
1216 (scm_make_u1vector): Removed, replaced by scm_make_bitvector.
1217 (scm_make_uve): Validate that the created object is a generalized
1218 vector.
1219 (scm_i_legacy_tag): Removed.
1220 (scm_i_print_array): Do it here.
1221 (scm_raprin1): Only print enclosed arrays.
1222
1223 * Makefile.am (DOT_DOC_FILES): Added srfi-4.doc.
1224
1225 2004-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1226
1227 * srfi-4.c (make_uvec): Use SCM_I_SIZE_MAX instead of SIZE_MAX for
1228 added portability.
1229
1230 * chars.c (scm_charnames, scm_charnums): Added "sp" as an alias
1231 for "space". Thanks to Bruce Korb!
1232
1233 * rw.c (scm_read_string_x_partial): Bugfix, apply offset to dest
1234 only after dest has been set. Thanks to Hyper Division!
1235
1236 * gh_data.c (gh_uniform_vector_length): Use
1237 scm_uniform_vector_length instead of SCM_UVECTOR_LENGTH.
1238
1239 2004-11-03 Marius Vollmer <mvo@zagadka.de>
1240
1241 * unif.h (SCM_UVECTOR_BASE, SCM_SET_UVECTOR_BASE,
1242 SCM_UVECTOR_MAXLENGTH, SCM_UVECTOR_LENGTH, SCM_MAKE_UVECTOR_TAG,
1243 SCM_SET_UVECTOR_LENGTH): Removed.
1244
1245 2004-11-02 Marius Vollmer <mvo@zagadka.de>
1246
1247 Mac OS X and OpenBSD compatibility patches from Andreas Vögele.
1248 Thanks!
1249
1250 * backtrace.c (scm_display_backtrace_with_highlights): Join the
1251 first and the second line of the SCM_DEFINE macro call, since old
1252 preprocessors cannot handle definitions that are split into two
1253 lines.
1254
1255 * inline.h (scm_cell, scm_double_cell): Don't use C99 variable
1256 declarations.
1257
1258 * pairs.c (scm_i_chase_pairs): Replace scm_t_bits with
1259 scm_t_uint32 to fix the mismatch between the function declaration
1260 and definition.
1261
1262 * sort.c (quicksort): Don't use C99 variable declarations.
1263
1264 * srfi-4.c (uvec_fast_ref): Avoid a compiler warning by returning
1265 SCM_BOOL_F if no type matches.
1266
1267 * threads.c (thread_print): Cast a pointer to size_t when printing
1268 with scm_uintprint.
1269
1270 * unif.c (scm_i_tag_to_prototype): Make sure that "instead" gets
1271 defined.
1272 (scm_array_prototype): Deprecated.
1273
1274 2004-11-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1275
1276 * srfi-4.h, srfi-4.c (scm_frame_uniform_vector_release): New.
1277 * unif.c (scm_bit_set_star_x, scm_bit_count_star_x): Use it to get
1278 more efficient access to the u32vector.
1279
1280 * tags.h (scm_tc7_llvect, scm_tc7_uvect, scm_tc7_fvect,
1281 scm_tc7_dvect, scm_tc7_cvect, scm_tc7_svect, scm_tc7_byvect,
1282 scm_tc7_ivect): Renamed to scm_tc7_unused_1 to scm_tc7_unused_8.
1283
1284 * validate.h (SCM_VALIDATE_VECTOR_OR_DVECTOR): Accept f64vectors
1285 instead of the old-style dvectors.
1286
1287 * gh_data.c: Use new-style uniform arrays in place of old-style
1288 ones.
1289
1290 * eq.c, evalext.c, gc-card.c, gc-mark.c, objects.c, print.c,
1291 ramap.c, unif.c: Do no longer handle old-style uniform vectors.
1292
1293 * unif.c (scm_bit_set_star_x, scm_bit_count_star_x): Use u32vectors
1294 instead of old-sytle uvectors.
1295
1296 * convert.c, convert.i.c: Rewritten completely, using
1297 scm_any_to_u8vector, etc and other new-style uniform vector
1298 functions.
1299
1300 * random.c (scm_random_solid_sphere_x,
1301 scm_random_hollow_sphere_x): Do not validate vector argument, this
1302 is already done elsewhere.
1303
1304 * srfi-4.h, srfi-4.i.c, srfi-4.c (coerce_to_uvec,
1305 scm_any_to_u8vector, etc): New.
1306 (scm_uniform_element_size, scm_uniform_vector_length): Do no
1307 longer handle old-style uniform vectors.
1308
1309 * read.c (scm_lreadr): Bugfix: include the last bit in the
1310 bit vector.
1311
1312 2004-10-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1313
1314 * unif.h, unif.c (scm_array_creator): New.
1315 (scm_i_get_old_prototype): New.
1316 (scm_array_prototype): use it to return old-style prototype, never
1317 return creators.
1318 (scm_make_uve): Use scm_call_1 instead of scm_call_2 with a second
1319 arg of SCM_UNDEFINED. The latter is wrong.
1320
1321 * unif.h, unif.c (scm_make_u1vector): New, but only temporary.
1322 (make_uve): Removed.
1323 (scm_i_proc_make_vector, scm_i_proc_make_string,
1324 scm_i_proc_make_u1vector): New.
1325 (scm_init_unif): Initialize them.
1326 (scm_i_convert_old_prototype): New.
1327 (scm_make_uve): Use it to get the creator procedure. Removed all
1328 old code that created old-style uniform vectors.
1329 (scm_array_p): Handle generic vectors.
1330 (scm_dimensions_to_uniform_array): Do not fill new array with
1331 prototype when that is a procedure.
1332 (scm_list_to_uniform_array): Also accept a list of lower bounds as
1333 the NDIM argument.
1334 (scm_i_print_array): Print rank for shared or non-zero-origin
1335 vectors.
1336 (tag_proto_table, scm_i_tag_to_prototype, scm_i_read_array): New.
1337 (scm_raprin1): Do not call scm_i_array_print for enclosed arrays,
1338 which I do not understand yet.
1339 (scm_array_prototype): Explicitely handle generic vectors.
1340
1341 * numbers.c, number.h (scm_i_print_complex, icmplx2str): New.
1342 (iflo2str): Use icmplx2str for complex numbers.
1343
1344 * srfi-4.c, srfi-4.h (scm_i_read_homogenous_vector,
1345 scm_i_uniform_vector_prototype): Removed.
1346 (scm_i_uniform_vector_creator): New.
1347 (SCM_UVEC_C32, scm_c32vector, scm_make_c32vector, etc,
1348 SCM_UVEC_C64, scm_c64vector, scm_make_c64vector, etc): New.
1349 Updated all tables and generic functions to support them.
1350 (scm_i_proc_make_u8vector, scm_i_proc_make_s8vector, etc): New.
1351 (scm_init_srfi_4): Initialize them.
1352
1353 * srfi-4.i.c (scm_take_u8vector, etc): use uvec_sizes instead of
1354 sizeof(CTYPE) as explained in the comment.
1355
1356 * read.c (scm_lreadr): Call scm_i_read_array for all characters
1357 following '#' that can start an array. Explicitely disambiguate
1358 'i' and 'e' between introducing numbers and uniform vectors. Do
1359 not call scm_i_read_homogenous_vector, since that is also handled
1360 by scm_i_read_array now.
1361
1362 2004-10-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1363
1364 First cut at integrating uniform vectors from srfi-4 with the rest
1365 of Guile. This change replaces scm_tc7_byvect with a s8 uniform
1366 vector. The plan is to gradually replace one type after the other
1367 until none is left and then to consider general cleanups and
1368 optimizations.
1369
1370 * srfi-4.h, srfi-4.i.c (scm_u8vector_elements, etc): New.
1371
1372 * srfi-4.h, srfi-4.c (scm_uniform_vector_p,
1373 scm_uniform_vector_ref, scm_uniform_vector_set_x,
1374 scm_uniform_vector_to_list, scm_is_uniform_vector,
1375 scm_c_uniform_vector_lengths, scm_c_uniform_vector_size,
1376 scm_uniform_vector_elements, scm_uniform_vector_element_size,
1377 scm_uniform_vector_release): New.
1378 (scm_i_uniform_vector_prototype, scm_i_uniform_vector_tag): New.
1379 (scm_uniform_element_size, scm_uniform_vector_length): Moved here
1380 from unif.h, unif.c and extended to handle both the old and new
1381 uniform vectors.
1382
1383 * tags.h (scm_tc7_byvect): Commented out.
1384
1385 * unif.h, unif.c (scm_uniform_vector_ref, scm_array_ref): Renamed
1386 the former to the latter.
1387 (scm_uniform_vector_length, scm_uniform_element_size): Moved to
1388 srfi-4.h, srfi-4.c.
1389 (scm_make_uve): Call scm_make_s8vector for #\nul prototype.
1390 (scm_array_p, scm_array_rank, scm_array_dimensions,
1391 scm_transpose_array, scm_enclose_array, scm_array_ref, scm_cvref,
1392 scm_array_set_x, scm_array_contents, scm_uniform_array_read_x,
1393 scm_array_to_list, scm_array_prototype): Handle srfi-4 uniform
1394 vectors. Removed code for scm_tc7_byvect.
1395 (scm_dimensions_to_uniform_array): Fill array with 0 when
1396 prototype is #\nul.
1397 (scm_i_print_array_dimension, scm_i_legacy_tag,
1398 scm_i_print_array): New.
1399 (scm_raprin1): Call scm_i_print_array for arrays. Removed code
1400 for scm_tc7_byvect.
1401
1402 * ramap.c (scm_ra_matchp, scm_array_fill_int, racp,
1403 scm_array_index_map_x, raeql_1, scm_array_equal_p): Handle srfi-4
1404 uniform vectors. Removed code for scm_tc7_byvect
1405
1406 * print.c (iprin1): Removed code for scm_tc7_byvect.
1407 * objects.c (scm_class_of): Likewise.
1408 * gc-mark.c (scm_gc_mark_dependencies): Likewise.
1409 * gc-card.c (scm_i_sweep_card): Likewise.
1410 * evalext.c (scm_self_evaluating_p): Likewise.
1411 * eq.c (scm_equal_p): Likewise.
1412
1413 * gh_data.c (gh_chars2byvect): Reimplemented with
1414 scm_make_s8vector.
1415 (gh_scm2chars): Handle s8vectors, removed code for scm_tc7_byvect.
1416
1417 * srfi-4.c (take_uvec): New.
1418 (alloc_uvec): Use it.
1419 * srfi-4.h, srfi-4.i.c (scm_take_u8vector, etc): New.
1420
1421 * random.c (vector_scale, vector_scale_x): Renamed former to the
1422 latter, since it modifies its argument.
1423 (vector_scale_x, vector_sum_squares, scm_random_normal_vector_x):
1424 Do not use scm_universal_vector_length for non-uniform vectors.
1425 Use scm_f64vector_elements to access innards of uniform vectors.
1426
1427 * convert.i.c: Convert srfi-4 style uniform vectors when
1428 requested.
1429 * convert.c (scm_c_scm2chars, scm_c_chars2scm,
1430 scm_c_chars2byvect): Use a s8vector instead of a scm_tc7_byvect.
1431
1432 2004-10-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1433
1434 * numbers.h, numbers.c (scm_i_print_double): New.
1435
1436 * srfi-4.c, srfi-4.h, srfi-4.i.c: New files, initially from
1437 ../srfi/ but heavily modified.
1438 * Makefile.am: Add them in all the right places.
1439 * init.c (scm_init_guile_1): Call scm_init_srfi_4.
1440 * read.c (scm_lreadr): Call scm_i_read_homogenous_vector for '#f',
1441 '#u', and '#s'.
1442
1443 * read.h, read.c (scm_i_input_error): Renamed from scm_input_error
1444 and made non-static. Changed all uses.
1445
1446 2004-10-22 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1447
1448 * variable.c, threads.c, struct.c, stackchk.c, smob.c, root.c,
1449 print.c, ports.c, mallocs.c, hooks.c, hashtab.c, fports.c,
1450 guardians.c, filesys.c, coop-pthreads.c, continuations.c: Use
1451 scm_uintprint to print unsigned integers, raw heap words, and
1452 adresses, using a cast to scm_t_bits to turn pointers into
1453 integers.
1454
1455 * unif.c: Include "libguile/print.h".
1456
1457 * numbers.h, numbers.c (SCM_T_INTBUFLEN): Increased to cover
1458 scm_t_intmax values.
1459 (scm_uint2str): New, for scm_t_uintmax.
1460 (scm_iint2str): Argument type changed to scm_t_intmax,
1461 reimplemented in terms of scm_uint2str.
1462
1463 * print.c, print.h (scm_uintprint): New, for printing
1464 scm_t_uintmax values.
1465 (scm_intprint): Argument type changed to scm_t_intmax.
1466
1467 * sort.c (quicksort, scm_merge, scm_merge_list_x,
1468 scm_merge_list_step, scm_merge_vector_step): Inserted SCM_TICKs at
1469 strategic places so that the loops can be interrupted.
1470
1471 * Makefile.am (INCLUDES): Use @LTDLINC@ instead of
1472 "-I$(top_srcdir)/libguile-ltdl".
1473 (libguile_la_LIBADD): Use @LIBLTDL@ instead of
1474 "../libguile-ltdl/libguile-ltdl.a".
1475
1476 * guile.c, dynl.c: Switched to using libltdl directly. Replaced
1477 all references to scm_lt_* with just lt_*. Include <ltdl.h>
1478 instead of <libguile-ltdl.h>.
1479
1480 2004-10-20 Marius Vollmer <mvo@zagadka.de>
1481
1482 * sort.c (quicksort): Copy pivot out of the array while
1483 constructing the partitions; it could get overwritten otherwise.
1484 Because of the ultimate insertion sort, this bug did not cause
1485 quicksort to fail, it just put all the burdon on the insertion
1486 sort and was thus very slow. Thanks to Rolan Orre for reporting
1487 the slowness!
1488
1489 2004-10-19 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1490
1491 * numbers.c (scm_i_range_error): New.
1492 * conv-integer.i.c, conv-uinteger.i.c: Use it instead of
1493 scm_out_of_range.
1494
1495 * sort.c (scm_restricted_vector_sort_x): Validate startpos <=
1496 endpos. State inclusiveness/exclusiveness of bounds in docstring.
1497
1498 * unif.c (scm_array_p): When no prototype is given, explicitely
1499 test for allowable types, do not simply return true. Thanks to
1500 Roland Orre for reporting this!
1501
1502 * private-gc.h (SCM_DEFAULT_MAX_SEGMENT_SIZE): Increase to 20 Mib.
1503
1504 * gc-segment.c (scm_i_get_new_heap_segment): Limit size of new
1505 segment to scm_max_segment_size.
1506
1507 2004-10-08 Han-Wen Nienhuys <hanwen@xs4all.nl>
1508
1509 * gc.c (scm_igc): put scm_gc_running-- before running hooks.
1510
1511 * inline.h (scm_double_cell): abort if GC running.
1512 (scm_cell): idem.
1513
1514 2004-10-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1515
1516 * error.c (scm_wrong_type_arg): Do not talk about "argument" for
1517 pos == 0.
1518
1519 Keywords no longer store a 'dash symbol'. Instead, they store a
1520 symbol with their real name.
1521
1522 * keywords.h, keywords.c, deprecated.h, deprecated.c
1523 (SCM_KEYWORDP, SCM_KEYWORDSYM): Deprecated and implemented in
1524 terms of scm_is_keyword and scm_keyword_dash_symbol.
1525
1526 * keywords.h, keywords.c, discouraged.h, discouraged.c
1527 (scm_make_keyword_from_dash_symbol, scm_keyword_dash_symbol,
1528 scm_c_make_keyword): Discouraged.
1529
1530 * keywords.h, keywords.c (scm_symbol_to_keyword,
1531 scm_keyword_to_symbol): Implemented in C.
1532 (scm_is_keyword, scm_from_locale_keyword,
1533 scm_from_locale_keywordn): New.
1534
1535 * goops.c: Replaced SCM_KEYWORDP with scm_is_keyword.
1536
1537 * snarf.h (SCM_KEYWORD, SCM_GLOBAL_KEYWORD): Use
1538 scm_from_locale_keyword instead of scm_c_make_keyword.
1539
1540 * keywords.c (scm_symbol_to_keyword): Use SCM_ASSERT_TYPE for a
1541 better error message.
1542
1543 * deprecated.c: Include discouraged.h and keywords.h.
1544
1545 * read.c (scm_lreadr): Simply do (symbol->keyword (read)) after
1546 reading '#:' or ':'. See NEWS for consequences.
1547
1548 2004-09-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1549
1550 * read.c (scm_lreadr): Revert change from 2004-09-22: string
1551 literals are now read-write again (until SCM_STRING_CHARS is
1552 removed).
1553
1554 * strings.c (SCM_STRING_CHARS): Explicitely reject read-only
1555 strings with an error message that blames SCM_STRING_CHARS.
1556
1557 * options.c (change_option_setting): Use scm_car instead of
1558 explicit type check plus SCM_CAR.
1559
1560 * print.h, print.c (SCM_PRINT_HIGHLIGHT_PREFIX,
1561 SCM_PRINT_HIGHLIGHT_SUFFIX): New printer options.
1562 (scm_iprin1): Use them instead of the previoulsy hardcoded
1563 strings.
1564 (scm_init_print): Initialize them.
1565
1566 * backtrace.c (display_frame_expr): Do not remove control
1567 characters from the final string. Print it directly using
1568 scm_display.
1569
1570 * ramap.c (scm_array_equal_p): Include scm_tc7_svect in switch.
1571 Thanks to Roland Orre!
1572
1573 2004-09-29 Kevin Ryde <user42@zip.com.au>
1574
1575 * regex-posix.c (scm_regexp_exec): Correction to last change, should
1576 be whole original string in match struct, not offsetted substring.
1577
1578 2004-09-24 Han-Wen Nienhuys <hanwen@xs4all.nl>
1579
1580 * gc.c (scm_gc_unprotect_object): abort if called during GC.
1581
1582 2004-09-24 Marius Vollmer <mvo@zagadka.de>
1583
1584 * Makefile.am (EXTRA_DIST): Added gettext.h.
1585
1586 * smob.c, smob.h (scm_assert_smob_type): New.
1587
1588 * Makefile.am (guile_CFLAGS, guile_LDFLAGS, libguile_la_CFLAGS):
1589 Include GUILE_CFLAGS.
1590 (libguile_la_LIBADD): Removed THREAD_LIBS_LOCAL, which is unused
1591 now.
1592 (libpath.h): Put GUILE_CFLAGS in the build-info.
1593
1594 2004-09-23 Marius Vollmer <mvo@zagadka.de>
1595
1596 * print.h (scm_print_state): Added highlight_objects.
1597 * print.c (make_print_state, scm_free_print_state): Initialize it
1598 to SCM_EOL.
1599 (scm_iprin1): Wrap output in '{...}' when object is contained in
1600 highlight_objects.
1601
1602 * backtrace.h, backtrace.c (scm_display_backtrace_with_highlights,
1603 scm_backtrace_with_highlights): New. Set highlight_objects of
1604 printstate.
1605
1606 * error.c (scm_error_scm): Document new meaning of data/rest
1607 argument for out-of-range and wrong-type-arg errors.
1608 (scm_out_of_range, scm_out_of_range_pos, scm_wrong_type_arg,
1609 scm_wrong_type_arg_msg): Pass bad_value in rest argument of
1610 exception so that it gets highlighted in the backtrace.
1611 Don't talk about "argument" when not giving a position.
1612
1613 * throw.c (handler_message): The rest argument is the fourth
1614 argument, not everything after the third. Call
1615 scm_display_backtrace_with_highlights, passing the rest argument
1616 when appropriate.
1617
1618 2004-09-22 Marius Vollmer <mvo@zagadka.de>
1619
1620 From Jan Nieuwenhuizen <janneke@gnu.org> and Bruno Haible
1621 <bruno@clisp.org>:
1622
1623 * i18n.c: Handle --disable-nls (thanks Bruno).
1624
1625 * posix.c (scm_init_posix): Add LC_PAPER, LC_NAME, LC_ADDRESS,
1626 LC_TELEPHONE, LC_MEASUREMENT, LC_IDENTIFICATION.
1627
1628 * i18n.c (scm_i_to_lc_category): New name and export. Support all
1629 LC categories.
1630 * posix.c (scm_setlocale): Use it.
1631
1632 * i18n.h, i18n.c (scm_textdomain, scm_bindtextdomain,
1633 scm_bind_textdomain_codeset): Make wrappers similar to C function
1634 they wrap.
1635
1636 * i18n.h: New file.
1637 * i18n.c: New file.
1638 * gettext.h: New file, taken from GNU gettext.
1639 * init.c: Include libguile/i18n.h.
1640 (scm_init_guile_1): Add call to scm_init_i18n().
1641 * Makefile.am (libguile_la_SOURCES): Add i18n.c.
1642 (DOT_X_FILES): Add i18n.x.
1643 (DOT_DOC_FILES): Add i18n.doc.
1644 (libguile_la_LDFLAGS): Add @LTLIBINTL@.
1645 (modinclude_HEADERS): Add i18n.h.
1646
1647 2004-09-22 Marius Vollmer <mvo@zagadka.de>
1648
1649 * gh_list.c: Replaced SCM_CAR, etc with scm_car, etc.
1650
1651 * discouraged.h, tags.h (SCM_CONSP, SCM_NCONSP): Moved to
1652 discouraged.h. Replaced all uses with scm_is_pair.
1653 (SCM_I_CONSP): New name for SCM_CONSP.
1654
1655 * pairs.h, pairs.c (scm_is_pair, scm_is_null, scm_car, scm_cdr,
1656 scm_i_chase_pairs, SCM_I_A_PAT, SCM_I_D_PAT, etc, scm_caar,
1657 scm_cadr, etc): New.
1658 (SCM_NULLP, SCM_NNULLP): Moved to discouraged.h. Replaced all
1659 uses with scm_is_null.
1660
1661 * eval.c (scm_eval, scm_apply, call_cxr_1): Use scm_i_chase_pairs
1662 instead of explicit code.
1663
1664 2004-09-22 Marius Vollmer <mvo@zagadka.de>
1665
1666 * srfi-13.c (scm_string_contains, scm_string_contains_ci):
1667 Reworded logic a bit so that #f is returned immediately when s1 is
1668 too short to contain s2.
1669
1670 * regex-posix.c (scm_regexp_exec): Convert string to
1671 zero-terminated locale string before matching against it.
1672
1673 * strings.h, strings.c (scm_substring_read_only,
1674 scm_c_substring_read_only, scm_i_substring_read_only): New.
1675 (RO_STRING_TAG, IS_RO_STRING): New.
1676 (scm_i_string_writable_chars): Bail on read-only strings.
1677
1678 * read.c (scm_lreadr): use scm_c_substring_read_only for string
1679 literals, thus making them read-only as specified by R5RS.
1680
1681 2004-09-22 Marius Vollmer <mvo@zagadka.de>
1682
1683 * eq.c (scm_equal_p): Allow smobs with different flags to be equal
1684 by testing for smobs before insisting on equal SCM_CELL_TYPES.
1685
1686 2004-09-21 Marius Vollmer <mvo@zagadka.de>
1687
1688 * numbers.h, numbers.c: Include <gmp.h> in numbers.h, not in
1689 numbers.c.
1690 (scm_to_mpz, scm_from_mpz): New.
1691 Thanks to Andreas Vögele!
1692
1693 * read.c (skip_scsh_block_comment): Recognize "!#" everywhere, not
1694 just on a line of its own.
1695
1696 * srfi-13.c (scm_string_any, scm_string_every,
1697 scm_string_tabulate, string_upcase_x, string_down_case_x,
1698 string_titlecase_x, string_reverse_x, scm_string_tokenize): Use
1699 size_t instead of int for indices into strings. Make sure that no
1700 over- or underflow occurs. Thanks to Andreas Vögele!
1701 (scm_xsubstring, scm_string_xcopy_x): Use ints for 'extended'
1702 indices, which can also be negative.
1703
1704 2004-09-20 Marius Vollmer <mvo@zagadka.de>
1705
1706 * gc-mark.c (SCM_MARK_BACKING_STORE): Removed, it was unused.
1707
1708 * threads.c (scm_threads_mark_stacks): Call
1709 SCM_MARK_BACKING_STORE. Also, do not use stack_len local, it was
1710 only used once.
1711
1712 2004-09-13 Jan Nieuwenhuizen <janneke@gnu.org>
1713
1714 * srfi-13.c (scm_string_contains, scm_string_contains_ci):
1715 Bugfix: when subtracting unsigned values, make sure that result
1716 does not wrap.
1717
1718 2004-09-09 Kevin Ryde <user42@zip.com.au>
1719
1720 * filesys.c, stime.c (_POSIX_C_SOURCE): Use this only on hpux, it
1721 causes too many problems elsewhere (glibc, freebsd, mingw). Reported
1722 by Andreas Vögele.
1723
1724 2004-09-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1725
1726 * Makefile.am (EXTRA_libguile_la_SOURCES): Removed "alloca.c".
1727
1728 * eq.c (real_eqv): Pretend that all NaNs are equal.
1729
1730 * numbers.c (scm_integer_expt): Do not accept inexact integers.
1731
1732 2004-09-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1733
1734 * srfi-13.c (scm_string_trim_right, scm_string_xcopy_x): Correctly
1735 use size_t for some locals instead of int.
1736
1737 * read.c (scm_flush_ws): Detect "#!"-style comments here.
1738 (scm_lreadr): Abort on seeing "#!", which should no longer happen.
1739 (skip_scsh_block_comment): Use scm_input_error instead of
1740 scm_misc_error in case of EOF.
1741
1742 2004-09-07 Kevin Ryde <user42@zip.com.au>
1743
1744 * numbers.c (scm_integer_expt): Reject exponent +/-inf.
1745 Bug report by Bill Schottstaedt.
1746
1747 * ports.c (scm_getc, scm_lfwrite): Recognise \a \b and \r for port
1748 column.
1749 * ports.h (SCM_ZEROCOL, SCM_DECCOL): New macros.
1750
1751 * posix.c (scm_access): Update docstring per manual.
1752
1753 * posix.c (scm_nice): Correction to error detection. Reported by
1754 Matthias Koeppe.
1755
1756 * stime.c (scm_current_time, scm_gettimeofday, scm_strptime): Don't
1757 throw error before unlocking mutex with SCM_ALLOW_INTS.
1758
1759 2004-09-06 Kevin Ryde <user42@zip.com.au>
1760
1761 * stime.h (SCM_TIME_UNITS_PER_SECOND): Use sysconf(_SC_CLK_TCK) when
1762 available. This also gets around CLK_TCK being absent when
1763 _GNU_SOURCE and _POSIX_C_SOURCE are defined in stime.c.
1764
1765 2004-09-03 Stefan Jahn <stefan@lkcc.org>
1766
1767 * threads.c (scm_threads_mark_stacks): Fixed local variable
1768 definitions.
1769
1770 * strings.c (scm_i_substring_copy, scm_string_append): Fixed
1771 local variable definitions.
1772
1773 * stime.c (_POSIX_C_SOURCE): Do not define this item on
1774 MinGW32 because it conflicts with its pthread headers.
1775 (scm_mktime): Consider the HAVE_STRUCT_TM_TM_ZONE define.
1776 (scm_strftime): Using scm_from_locale_string() instead of
1777 scm_makfrom0str().
1778
1779 * posix.c (scm_putenv): Fixed typo in the !HAVE_UNSETENV
1780 part.
1781
1782 * numbers.c (scm_init_numbers): Removed check_sanity() call
1783 inside GUILE_DEBUG. The function has been removed somewhen...
1784
1785 * filesys.c (_POSIX_C_SOURCE): Do not define this item on
1786 MinGW32 because it conflicts with its pthread headers.
1787
1788 2004-08-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1789
1790 * strings.c (SCM_STRINGP): Accept all strings.
1791 (SCM_STRING_CHARS): Reject shared substrings here.
1792
1793 * script.c (scm_compile_shell_switches): Added 2003 and 2004 to
1794 the Copyright years.
1795
1796 2004-08-27 Kevin Ryde <user42@zip.com.au>
1797
1798 * socket.c (scm_fill_sockaddr): Use HAVE_STRUCT_SOCKADDR_SIN_LEN and
1799 HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN for sockaddr fields, SIN_LEN and
1800 SIN_LEN6 are not defined on all systems. Reported by Michael Tuexen.
1801
1802 2004-08-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1803
1804 * strings.h, strings.c (scm_i_make_symbol): Added FLAGS parameter.
1805 * symbols.h, symbols.c (SCM_I_F_SYMBOL_UNINTERNED,
1806 scm_i_symbol_is_interned, scm_i_mem2symbol,
1807 scm_i_mem2uninternedsymbol): Use it to store uninternedness flag.
1808
1809 2004-08-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1810
1811 * srfi-13.c: First cut at thread-safeness and proper use of
1812 scm_i_string_chars et al. Copious scm_remember_upto_heres have
1813 been inserted. Made sure that no internal string pointer is used
1814 across a SCM_TICK or a possible GC.
1815
1816 * script.c (scm_compile_shell_switches): Use
1817 scm_from_locale_string instead of scm_makfrom0str.
1818
1819 * srfi-13.c (scm_string_rindex): Export to Scheme, as it has
1820 always been.
1821
1822 2004-08-25 Marius Vollmer <mvo@zagadka.de>
1823
1824 Moved SRFI-13 and SRFI-14 into the core, taking over the role of
1825 strop.c.
1826
1827 * srfi-13.c, srfi-13.h, srfi-14.c, srfi-14.h: New files.
1828 * strop.h, strop.c: Removed, they are now empty.
1829 * Makefile.am: Updated for new and removed files.
1830
1831 * symbols.h, symbols.c (scm_string_ci_to_symbol): Moved here, next
1832 to scm_string_to_symbol.
1833
1834 * chars.c (scm_char_alphabetic_p, scm_char_numeric_p,
1835 scm_char_whitespace_p, scm_upper_case_p, scm_lower_case_p,
1836 scm_char_is_both_p): Use scm_char_set_contains_p with the proper
1837 charset instead of libc functions.
1838
1839 * strorder.c (scm_string_equal_p, scm_string_ci_equal_p,
1840 scm_string_less_p, scm_string_leq_p, scm_string_gr_p,
1841 scm_string_geq_p, scm_string_ci_less_p, scm_string_ci_leq_p,
1842 scm_string_ci_gr_p, scm_string_ci_geq_p): Use scm_string_eq, etc
1843 instead of explicit code.
1844
1845 * deprecated.c, load.c, posix.c, unif.c, symbols.c: Include
1846 "srfi-13.h" instead of "strop.h".
1847
1848 * init.c (scm_init_guile_1): Call scm_init_srfi_13 and
1849 scm_init_srfi_14. Do not call scm_init_strop.
1850
1851 2004-08-24 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1852
1853 * numbers.c (scm_inf_p): Synced docstring back from manual.
1854
1855 2004-08-22 Marius Vollmer <mvo@zagadka.de>
1856
1857 * strings.c (get_str_buf_start): New helper function.
1858 (scm_i_substring, scm_i_substring_copy, scm_i_substring_shared,
1859 scm_i_string_char, scm_i_string_writable_chars): Use it.
1860 (scm_i_substring_copy): Make START argument optional for C
1861 callers, for upcoming SRFI-13 integration.
1862
1863 2004-08-21 Marius Vollmer <mvo@zagadka.de>
1864
1865 From Richard Todd, Thanks!
1866
1867 * script.c (scm_compile_shell_switches): added '-L' switch to add
1868 to the %load-path.
1869
1870 2004-08-21 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
1871
1872 * eval.c (unmemoize_exprs): When dropping internal body markers
1873 from the output during unmemoization, also drop those that are not
1874 immediately at the beginning of a body.
1875
1876 2004-08-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1877
1878 * eval.c (scm_lookupcar1): Report "Variable used before given a
1879 value" insetad of an "Unbound" one for variables that are found
1880 but still contain SCM_UNDEFINED.
1881
1882 * posix.c (scm_mkstemp): Correction to the correction, mkstemp
1883 expects a null-terminated string in the locale encoding, but
1884 scm_i_string_writable_chars doesn't give that. Fixed by letting
1885 mkstemp modify a locale version of the tmpl argument and copying
1886 the result back into tmpl.
1887
1888 * strop.c (scm_substring_move_x): Store into str2, not str1.
1889
1890 2004-08-20 Kevin Ryde <user42@zip.com.au>
1891
1892 * posix.c (scm_mkstemp): Correction to new locale_string stuff, need
1893 to modify the input string.
1894
1895 2004-08-19 Marius Vollmer <mvo@zagadka.de>
1896
1897 * deprecated.c (SCM_SYMBOL_CHARS): Cast away const in return.
1898 (SCM_SYMBOL_LENGTH): It's scm_i_symbol_length, not
1899 scm_c_symbol_length.
1900
1901 2004-08-19 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1902
1903 New string implementation, with copy-on-write strings and
1904 mutation-sharing substrings, and a new internal string API.
1905 Symbols can now share memory with strings.
1906
1907 * tags.h (scm_tc7_stringbuf): New tag.
1908
1909 * strings.h, strings.c: (scm_i_string_chars, scm_i_string_length,
1910 scm_i_string_writable_chars, scm_i_string_stop_writing): New, to
1911 replace SCM_I_STRING_CHARS and SCM_I_STRING_LENGTH. Updated all
1912 uses.
1913 (scm_i_make_string, scm_c_make_string): New, to replace
1914 scm_allocate_string. Updated all uses.
1915 (SCM_STRINGP, SCM_STRING_CHARS, SCM_STRING_UCHARS,
1916 SCM_STRING_LENGTH): Deprecated.
1917 (scm_allocate_string, scm_take_str, scm_take0str, scm_mem2string,
1918 scm_str2string, scm_makfrom0str, scm_makfrom0str_opt):
1919 Discouraged. Replaced all uses with scm_from_locale_string or
1920 similar, as appropriate.
1921 (scm_c_string_length, scm_c_string_ref, scm_c_string_set_x,
1922 scm_c_substring, scm_c_substring_shared, scm_c_substring_copy,
1923 scm_substring_shared, scm_substring_copy): New.
1924
1925 * symbols.c, symbols.h (SCM_SYMBOLP, SCM_SYMBOL_FUNC,
1926 SCM_SET_SYMBOL_FUNC, SCM_SYMBOL_PROPS, SCM_SET_SYMBOL_PROPS,
1927 SCM_SYMBOL_HASH, SCM_SYMBOL_INTERNED_P, scm_mem2symbol,
1928 scm_str2symbol, scm_mem2uninterned_symbol): Discouraged.
1929 (SCM_SYMBOL_LENGTH, SCM_SYMBOL_CHARS, scm_c_symbol2str):
1930 Deprecated.
1931 (SCM_MAKE_SYMBOL_TAG, SCM_SET_SYMBOL_LENGTH, SCM_SET_SYMBOL_CHARS,
1932 SCM_PROP_SLOTS, SCM_SET_PROP_SLOTS): Removed.
1933 (scm_is_symbol, scm_from_locale_symbol, scm_from_locale_symboln):
1934 New, to replace scm_str2symbol and scm_mem2symbol, respectively.
1935 Updated all uses.
1936 (scm_gensym): Generate only the number suffix in the buffer, just
1937 string-append the prefix.
1938
1939 * error.c (scm_memory_error): Do not try to throw, just abort.
1940 Throwing will not work anyway.
1941
1942 * gh.h, gh-data.c (gh_set_substr): Made src const.
1943
1944 * ports.c (scm_i_mode_bits_n): New, for counted strings.
1945 (scm_mode_bits): Use it.
1946 (scm_c_port_for_each): Blocking GC does not seem to work, allocate
1947 a vector normally and fill that instead of consing a list with a
1948 blocked GC.
1949
1950 * read.c (scm_i_casei_streq): New, for counted strings.
1951
1952 * threads.c (gc_section_count): Removed, thread-sleeping can not
1953 be nested.
1954 (scm_i_thread_put_to_sleep): Call scm_i_leave_guile before locking
1955 admin mutex so that we can be put to sleep by other threads while
1956 blocking on that mutex. Lock all the heap mutex of all threads,
1957 including ourselves.
1958 (scm_i_thread_wake_up): Unlock all threads, including ourselves,
1959 call scm_i_enter_guile.
1960 (scm_thread_mark_stacks): Expect all threads to be suspended.
1961
1962 * gc.h, gc.c (scm_i_gc_admin_mutex): New, to protect
1963 scm_gc_mallocated, for now.
1964 (scm_init_storage): Initialize it.
1965 * gc-malloc.c (descrease_mtrigger, increase_mtrigger): Use it.
1966
1967 * gc-mark.c (scm_gc_mark_dependencies): Call scm_i_string_mark,
1968 scm_i_stringbuf_mark and scm_i_symbol_mark, as appropriate.
1969 * gc-card.c (scm_i_sweep_card): Call scm_i_string_free,
1970 scm_i_stringbuf_free and scm_i_symbol_free, as appropriate.
1971
1972 * strop.c (scm_string_copy): Use scm_c_substring to get a
1973 copy-on-write string.
1974
1975 2004-08-18 Kevin Ryde <user42@zip.com.au>
1976
1977 * arbiters.c (FETCH_STORE): New macro.
1978 (SCM_LOCK_VAL, SCM_UNLOCK_VAL): New constants.
1979 (SCM_LOCK_ARB, SCM_UNLOCK_ARB): Remove, effectively absorbed into
1980 scm_try_arbiter and scm_release_arbiter.
1981 (scm_try_arbiter, scm_release_arbiter): Use FETCH_STORE to get xchg
1982 for speed on i386, otherwise using mutex.
1983
1984 * eq.c (scm_equal_p): Remove real==fraction and fraction==real, they
1985 must be #f according to R5RS. (equal? follows eqv?, and for eqv? an
1986 exact and inexact is #f.)
1987
1988 * fports.c (fport_print): Use scm_ttyname instead of ttyname directly,
1989 to get thread safety of scm_ttyname.
1990
1991 * ports.c (ttyname): Remove prototype, unused.
1992
1993 * socket.c (scm_init_socket): Add SOCK_SEQPACKET and SOCK_RDM.
1994 Reported by Michael Tuexen.
1995
1996 2004-08-13 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1997
1998 * load.c (scm_init_load_path): Do not pass NULL to
1999 scm_to_locale_string, which would happen when GUILE_LOAD_PATH is
2000 not set. Thanks to Bill Schottstaedt.
2001
2002 2004-08-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2003
2004 * socket.c (scm_inet_aton, scm_inet_pton): Convert SCM strings to
2005 locale strings instead of accessing their internals.
2006 (scm_recv, scm_send, scm_recvfrom, scm_sendto): Use
2007 SCM_I_STRING_CHARS and SCM_I_STRING_LENGTH instead of
2008 SCM_STRING_CHARS and SCM_STRING_LENGTH.
2009
2010 * simpos.c (scm_system): Convert SCM strings to locale strings
2011 instead of accessing their internals.
2012
2013 * script.c (scm_compile_shell_switches): Convert version to locale
2014 string before printing it.
2015
2016 * rdelim.c (scm_read_delimited_x): Avoid
2017 SCM_VALIDATE_SUBSTRING_SPEC_COPY and use scm_from_size_t instead
2018 of scm_from_long for the returned number of read characters.
2019
2020 * ioext.c (scm_fdopen): Use scm_i_fdes_to_port together with
2021 scm_i_mode_bits to avoid accessing internals of SCM string from C.
2022
2023 * filesys.c (STRING_SYSCALL, STRING2_SYSCALL): New helper macros.
2024 Use them instead of SCM_SYSCALL when one or two strings need to be
2025 converted into locale strings.
2026 (my_rename): New, gathers platform dependent code for renaming.
2027 (scm_rename): Use it.
2028 (scm_readlink, scm_copy_file): Convert SCM strings to locale
2029 strings instead of accessing their internals.
2030 (scm_basename, scm_dirname): Use SCM_I_STRING_CHARS and
2031 SCM_I_STRING_LENGTH instead of SCM_STRING_CHARS and
2032 SCM_STRING_LENGTH.
2033
2034 * extensions.c (load_extension): Convert lib and init to locale
2035 strings instead of accessing the internals directly.
2036 (scm_c_load_extension): Use scm_from_locale_string instead of
2037 scm_makfrom0str.
2038
2039 * fports.h, fports.c (scm_i_fdes_to_port): New, like
2040 scm_fdes_to_port, but take mode bits directly instead of as a C
2041 string.
2042 (scm_i_fdes_to_port): Implement using above.
2043 (scm_open_file): Use scm_i_fdes_to_port together with
2044 scm_i_mode_bits to avoid accessing internals of SCM string from C.
2045 * vports.c (scm_make_soft_port): Use scm_i_fdes_to_port together
2046 with scm_i_mode_bits to avoid accessing internals of SCM string
2047 from C.
2048
2049 * ports.h (scm_i_mode_bits): New, same as scm_mode_bits but with a
2050 SCM string as argument.
2051
2052 * ports.c (scm_i_void_port): New, like scm_void_port but take mode
2053 bits directly instead of C string.
2054 (scm_void_port): Implement using above.
2055 (scm_sys_make_void_port): Use scm_i_void_port together with
2056 scm_i_mode_bits to avoid accessing internals of SCM string.
2057
2058 * strings.h, strings.c (scm_i_get_substring_spec): New.
2059
2060 * socket.c, rw.c, deprecated.h, validate.h
2061 (SCM_VALIDATE_STRING_COPY): Deprecated. Replaced all uses with
2062 SCM_VALIDATE_STRING plus SCM_I_STRING_CHARS or
2063 scm_to_locale_string, etc.
2064 (SCM_VALIDATE_SUBSTRING_SPEC_COPY): Deprecated. Replaced as
2065 above, plus scm_i_get_substring_spec.
2066
2067 * regex-posix.c, read.c, random.c, ramap.c, print.c, numbers.c,
2068 hash.c, gc.c, gc-card.c, convert.i.c, backtrace.c, strop.c,
2069 strorder.c, strports.c, struct.c, symbols.c, unif.c, ports.c: Use
2070 SCM_I_STRING_CHARS, SCM_I_STRING_UCHARS, and SCM_I_STRING_LENGTH
2071 instead of SCM_STRING_CHARS, SCM_STRING_UCHARS, and
2072 SCM_STRING_LENGTH, respectively. Also, replaced scm_return_first
2073 with more explicit scm_remember_upto_here_1, etc, or introduced
2074 them in the first place.
2075
2076 * posix.c (WITH_STRING): New helper macro. Use it where one
2077 locale string is needed for a short piece of code.
2078 (STRING_SYSCALL): New helper macro. Use it instead of SCM_SYSCALL
2079 when one locale string is needed.
2080 (scm_mkstemp): Convert tmpl to a locale string.
2081 (scm_putenv): Rewritten to use only C strings.
2082 (scm_setlocale, scm_crpt): Convert argument strings to locale
2083 strings.
2084
2085 2004-08-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2086
2087 * load.c (scm_primitive_load_path): Do not check for absolute
2088 filenames when scm_sys_search_load_path returns false, which will
2089 return absolute filenames unchanged.
2090
2091 2004-08-11 Marius Vollmer <mvo@zagadka.de>
2092
2093 * gc.c, procprop.c (scm_init_storage, scm_stand_in_procs,
2094 scm_stand_in_proc): Use a hastable for scm_stand_in_procs instead
2095 of an alist. Thanks to Matthias Koeppe!
2096
2097 2004-08-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2098
2099 * strings.h, deprecated.h (SCM_STRING_COERCE_0TERMINATION_X):
2100 Moved from string.h to deprecated.h.
2101
2102 * deprecated.c, deprecated.h (SCM_CHARS, SCM_LENGTH): Removed.
2103
2104 * strings.h, strings.c (SCM_MAKE_STRING_TAG): Renamed to
2105 SCM_I_MAKE_STRING_TAG, changed all uses.
2106 (SCM_STRING_CHARS, SCM_STRING_UCHARS, SCM_STRING_LENGTH): Renamed
2107 to SCM_I_STRING_CHARS, SCM_I_STRING_UCHARS, and SCM_I_LENGTH
2108 respectively. For a short time, the old names are still there as
2109 aliases. Not all uses have been changed yet, but the ones in
2110 strings.c have.
2111 (SCM_STRING_MAX_LEN): Do not hardcode to 24 bits, compute from
2112 SCM_T_BITS_MAX.
2113 (scm_is_string, scm_from_locale_string, scm_from_locale_stringn,
2114 scm_take_locale_string, scm_take_locale_stringn,
2115 scm_to_locale_string, scm_to_locale_stringn,
2116 scm_to_locale_stringbuf): New.
2117 (scm_c_string2str, scm_c_substring2str): Deprecated by moving to
2118 deprecated.[hc]. Implemented in terms of the new functions above.
2119 (scm_take_str, scm_take0str, scm_mem2string, scm_str2string,
2120 scm_makfrom0str): Reimplemented in terms of the new functions from
2121 above. They will be discouraged shortly.
2122 (scm_substring): Do not use scm_mem2string.
2123 (scm_i_allocate_string_pointers, scm_i_free_string_pointers): New,
2124 to replace similar code from posix.c, simpos.c, and dynl.c.
2125 (scm_string_append): Use memcpy instead of explicit loop. Do not
2126 use register keyword. Use plain 'char' instead of 'unsigned
2127 char'.
2128
2129 * strports.c (scm_mkstrport): Use SCM_I_STRING_UCHARS instead of
2130 SCM_STRING_UCHARS. Use SCM_I_STRINGP instead of SCM_STRINGP.
2131
2132 * strop.c (scm_i_index): Replaced SCM_STRINGP, SCM_STRING_CHARS,
2133 and SCM_STRING_LENGTH with SCM_I_STRINGP, SCM_I_STRING_CHARS, and
2134 SCM_I_STRING_LENGTH, respectively. Pass string object directly,
2135 not as a pointer. Use scm_remember_upto_here_1 to protect it.
2136
2137 * read.c (scm_input_error): Use a SCM value for 'fn', not a C
2138 string. This avoids a conversion round-trip.
2139
2140 * gh_data.c: Replaced SCM_STRINGP, SCM_STRING_CHARS, and
2141 SCM_STRING_LENGTH with SCM_I_STRINGP, SCM_I_STRING_CHARS, and
2142 SCM_I_STRING_LENGTH, respectively.
2143 (gh_scm2newstr): Implement in terms of scm_to_locale_string.
2144
2145 * environments.c: Instead calling scm_puts on the SCM_STRING_CHARS
2146 of a string, call scm_display on the string itself.
2147
2148 * dynwind.c, dynwind.h (scm_frame_free): New.
2149
2150 * stime.c, socket.c, simpos.c, procs.c, posix.c, ports.c,
2151 net_db.c, fports.c, filesys.c, eval.c, deprecation.c, dynl.c:
2152 Replaced uses of SCM_STRING_CHARS with proper uses of
2153 scm_to_locale_string. Replaced SCM_STRINGP with scm_is_string.
2154 Replaced scm_mem2string with scm_from_locale_string.
2155
2156 * simpos.c, posix.c (allocate_string_pointers, environ_list_to_c):
2157 Removed, replaced all uses with scm_i_allocate_string_pointers.
2158
2159 * load.h, load.c (scm_internal_parse_path): Removed.
2160 (scm_parse_path): Use scm_string_split to do the work.
2161 (scm_init_load_path): Use scm_parse_path instead of
2162 scm_internal_parse_path.
2163 (scm_search_path): Rewritten string handling part of the code in
2164 terms of scm_to_locale_stringbuf and so that it is thread safe.
2165
2166 * error.c (scm_error_scm): Throw directly instead of calling
2167 scm_error, this avoids the back and forth conversion of SUBR and
2168 MESSAGE and also plugs a memory leak.
2169 (scm_error): Call scm_error_scm.
2170
2171 * backtrace.c: Replaced SCM_STRINGP with scm_is_string.
2172 (display_header): Print FNAME when it is true, not
2173 merely when it is a string.
2174
2175 * strings.h (SCM_SET_STRING_LENGTH, SCM_SET_STRING_CHARS): Removed
2176 unceremoniously. They were unused by Guile itself, and external
2177 use should stop immediately.
2178
2179
2180 2004-08-10 Marius Vollmer <mvo@zagadka.de>
2181
2182 * numbers.h, number.c, deprecated.h, deprecated.c (scm_round,
2183 scm_truncate): Renamed to scm_c_round and scm_c_truncate;
2184 deprecated versions installed in deprecated.h and deprecated.c.
2185 Changed all uses.
2186
2187 2004-08-06 Rob Browning <rlb@defaultvalue.org>
2188
2189 * net_db.c (scm_resolv_error): don't cause an exception while
2190 trying to throw an exception -- call scm_misc_error with correct
2191 arguments. The previous arguments needed a format escape that
2192 wasn't in any of the format strings.
2193
2194 2004-08-06 Kevin Ryde <user42@zip.com.au>
2195
2196 * ramap.c (scm_array_fill_x): For byvect char fill, force signed char
2197 so as not to depend on signedness of plain char. For byvect range
2198 check, throw out-of-range rather than wrong-type-arg.
2199
2200 * unif.c (scm_uniform_vector_ref, scm_array_set_x): For byvect, force
2201 signed byte range checks by using scm_to_schar and scm_from_schar,
2202 don't want to depend on signedness of C char.
2203
2204 2004-08-05 Kevin Ryde <user42@zip.com.au>
2205
2206 * arbiters.c (scm_try_arbiter): Use scm_i_misc_mutex instead of
2207 SCM_DEFER_INTS.
2208 (scm_release_arbiter): Use scm_i_misc_mutex so return value can be
2209 guaranteed if multiple threads compete to unlock.
2210 Update docstrings per doc/ref/api-scheduling.texi.
2211
2212 * filesys.c (scm_copy_file): Use fstat on the input fd rather than
2213 stat on the filename, to be certain a file rename can't mean we get
2214 info on one filesystem object but open another. This fstat usage is
2215 similar to Emacs copy-file.
2216
2217 * posix.c (scm_setgroups): Enhance docstring, per doc/ref/posix.texi.
2218
2219 * simpos.c (scm_system_star): Change scm_from_long to scm_from_int on
2220 SIGINT and SIGQUIT, since those values are ints.
2221
2222 2004-08-03 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2223
2224 * num2integral.i.c, num2float.i.c: Removed.
2225 * Makefile.am (noinst_HEADERS): Updated.
2226
2227 * numbers.h. numbers.c (scm_make_ratio): Renamed to
2228 scm_i_make_ratio and made static, replaced uses with scm_divide.
2229 (scm_complex_p): New, export as "complex?" to Scheme.
2230 (scm_number_p): Export as "number?" to Scheme.
2231 (scm_is_complex, scm_is_number): New.
2232 (scm_c_make_rectangular, scm_c_make_polar): New.
2233 (scm_make_rectangular, scm_make_polar): Use above.
2234 (scm_c_real_part, scm_c_imag_part, scm_c_magnitude, scm_c_angle):
2235 New.
2236 (scm_make_complex): Discouraged by moving to discouraged.h and
2237 discouraged.c. Replaced all uses with scm_c_make_rectangular.
2238
2239 * discouraged.h, discouraged.c, numbers.c, numbers.h
2240 (scm_is_rational): New.
2241 (scm_i_short2big, scm_i_int2big, scm_i_uint2big, scm_i_size2big,
2242 scm_i_ptrdiff2big, scm_i_long_long2big, scm_i_ulong_long2big):
2243 Removed prototypes.
2244 (scm_make_real, scm_num2dbl, scm_float2num, scm_double2num):
2245 Discouraged by moving to discouraged.h and discouraged.c.
2246 Replaced all uses with scm_from_double.
2247 (scm_num2float, scm_num2double): Discouraged by moving prototype
2248 to discouraged.h and rewriting in terms of scm_to_double.
2249 Replaced all uses with scm_to_double.
2250 (scm_to_double): Do not implement in terms of scm_num2dbl, use
2251 explicit code.
2252 (scm_from_double): Do not implement in terms of scm_make_real, use
2253 explicit code.
2254
2255 2004-08-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2256
2257 * init.c (scm_init_guile_1): Call scm_i_init_discouraged.
2258
2259 * gen-scmconfig.h.in (SCM_I_GSC_ENABLE_DISCOURAGED): New.
2260 * gen-scmconfig.c (SCM_ENABLE_DISCOURAGED): Emit based on above.
2261
2262 * eval.c (SCM_EVALIM, SCM_EVALIM2, SCM_XEVAL, SCM_XEVALCAR):
2263 Renamed to SCM_I_* in order to avoid collisions with the versions
2264 defined in deprecated.h.
2265
2266 * discouraged.h, discouraged.c: New files.
2267
2268 * deprecated.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_EQ_P,
2269 SCM_NEGATE_BOOL, SCM_BOOL, SCM_BOOT_NOT): Promoted from being
2270 deprecated to being discouraged by moving to discouraged.h.
2271
2272 * numbers.h, numbers.c, discouraged.h, discouraged.c
2273 (scm_short2num, scm_ushort2num, scm_int2num, scm_uint2num,
2274 scm_long2num, scm_ulong2num, scm_size2num, scm_ptrdiff2num,
2275 scm_num2short, scm_num2ushort, scm_num2int, scm_num2uint,
2276 scm_num2long, scm_num2ulong, scm_num2size, scm_num2ptrdiff,
2277 scm_long_long2num, scm_ulong_long2num, scm_num2long_long,
2278 scm_num2ulong_long): Discouraged by moving to discouraged.h and
2279 discouraged.c and reimplementing in terms of scm_from_* and
2280 scm_to_*. Changed all uses to the new scm_from_* and scm_to_*
2281 functions.
2282
2283 * numbers.h, numbers.c: Removed GUILE_DEBUG code.
2284 (scm_i_short2big, scm_i_ushort2big, scm_i_int2big, scm_i_uint2big,
2285 scm_i_size2big, scm_i_ptrdiff2big): Removed.
2286 (scm_i_long2big, scm_i_ulong2big): New, explicit definitions.
2287 * conv-integer.i.c, conv-uinteger.i.c: Use them instead of
2288 explicit code.
2289
2290 2004-08-02 Kevin Ryde <user42@zip.com.au>
2291
2292 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Add comments about past
2293 and current usage and migration.
2294
2295 2004-07-31 Kevin Ryde <user42@zip.com.au>
2296
2297 * error.c (scm_strerror): Use scm_i_misc_mutex around strerror since
2298 it's not thread safe.
2299 (scm_syserror): Use scm_strerror rather than SCM_I_STRERROR, to take
2300 advantage of this.
2301 * fports.c (scm_open_file): Use scm_strerror likewise.
2302 * filesys.c (scm_stat, scm_lstat): Ditto.
2303
2304 * filesys.c (scm_copy_file): Avoid fd leak when destination file
2305 cannot be opened.
2306
2307 * symbols.c (scm_gensym): Use scm_i_misc_mutex around gensym_counter
2308 update, for thread safety.
2309 (gensym_counter): Move into scm_gensym which is its only user.
2310 (scm_init_symbols): No need to explicitly initialize gensym_counter.
2311
2312 2004-07-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2313
2314 * numbers.h (scm_to_schar, scm_to_uchar, scm_to_char,
2315 scm_to_short, scm_to_ushort, scm_to_int, scm_to_uint, scm_to_long,
2316 scm_to_ulong, scm_to_long_long, scm_to_ulong_long, scm_to_intmax,
2317 scm_to_uintmax, scm_to_size_t, scm_to_ssize_t scm_from_schar,
2318 scm_from_uchar, scm_from_char, scm_from_short, scm_from_ushort,
2319 scm_from_int, scm_from_uint, scm_from_long, scm_from_ulong,
2320 scm_from_long_long, scm_from_ulong_long, scm_from_intmax,
2321 scm_from_uintmax, scm_from_size_t, scm_from_ssize_t): No longer
2322 defined in terms of scm_to_signed_integer, etc, but in terms of
2323 scm_to_int8, etc.
2324
2325 * gen-scmconfig.c (SCM_SIZEOF_INTMAX, SCM_SIZEOF_SIZE_T): New.
2326
2327 * gen-scmconfig.h.in: Removed SCM_I_GSC_*_LIMITS macros, they are
2328 no longer used.
2329
2330 * __scm.h (SCM_I_UTYPE_MAX, SCM_I_TYPE_MAX, SCM_I_TYPE_MIN,
2331 SCM_I_SIZE_MAX, SCM_I_SSIZE_MIN, SCM_I_SSIZE_MAX): New.
2332
2333 * __scm.h, gen-scmconfig.c (SCM_I_LLONG_MAX, SCM_I_LLONG_MIN,
2334 SCM_I_ULLONG_MAX, SCM_T_INT8_MIN, SCM_T_INT8_MAX, SCM_T_UINT8_MAX,
2335 SCM_T_INT16_MIN, SCM_T_INT16_MAX, SCM_T_UINT16_MAX,
2336 SCM_T_INT32_MIN, SCM_T_INT32_MAX, SCM_T_UINT32_MAX,
2337 SCM_T_INT64_MIN, SCM_T_INT64_MAX, SCM_T_UINT64_MAX,
2338 SCM_T_INTMAX_MIN, SCM_T_INTMAX_MAX, SCM_T_UINTMAX_MAX): Moved
2339 definition into __scm.h, using new SCM_I_TYPE_MIN, etc.
2340
2341 * conv-integer.i.c, conv-uinteger.i.c: New files, used to generate
2342 the functions below.
2343
2344 * Makefile.am (noinst_HEADERS): Added conv-integer.i.c and
2345 conv-uinteger.i.c.
2346
2347 * numbers.c, numbers.h (scm_to_int8, scm_to_uint8, scm_to_int16,
2348 scm_to_uint16, scm_to_int32, scm_to_uint32, scm_to_int64,
2349 scm_to_uint64, scm_from_int8, scm_from_uint8, scm_from_int16,
2350 scm_from_uint16, scm_from_int32, scm_from_uint32, scm_from_int64,
2351 scm_from_uint64): Turned from macros into proper functions.
2352 (scm_to_signed_integer, scm_to_unsigned_integer,
2353 scm_from_signed_integer, scm_from_unsigned_integer): Generate via
2354 conv-integer.i.c and conv-uinteger.i.c, as well.
2355
2356 * number.h (scm_to_ssize_t, scm_to_size_t): Use the new
2357 SCM_I_SSIZE_MIN, SCM_I_SSIZE_MAX, and SCM_I_SIZE_MAX macros for
2358 the limits. Those are always defined.
2359
2360 2004-07-29 Kevin Ryde <user42@zip.com.au>
2361
2362 * posix.c (scm_ttyname): Use scm_i_misc_mutex for thread safety.
2363
2364 2004-07-28 Kevin Ryde <user42@zip.com.au>
2365
2366 * posix.c (scm_ctermid): Use an L_ctermid buf on the stack, for thread
2367 safety.
2368
2369 * unif.c (scm_array_set_x): For svect, use scm_num2short for
2370 consistency with other vector types and to get arg and func name into
2371 error message.
2372
2373 2004-07-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2374
2375 * deprecated.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_BOOL):
2376 Reimplement using scm_is_false, scm_is_true, scm_is_bool, and
2377 scm_from_bool, respectively.
2378 (SCM_NINUMP): Added.
2379
2380 * tags.h, deprecated.h (SCM_EQ_P): Deprecated by moving it into
2381 deprecated.h. Replaced all uses with scm_is_eq.
2382
2383 2004-07-24 Kevin Ryde <user42@zip.com.au>
2384
2385 * threads.c, threads.h (scm_i_misc_mutex): New SCM_GLOBAL_MUTEX.
2386 * posix.c (scm_crypt): Use it to protect static data in crypt().
2387
2388 2004-07-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2389
2390 * deprecated.h, deprecated.c, numbers.h (SCM_INUMP, SCM_NINUMP,
2391 SCM_INUM): Deprecated by renaming them to SCM_I_INUMP,
2392 SCM_I_NINUMP and SCM_I_INUM, respectively and adding deprecated
2393 versions to deprecated.h and deprecated.c. Changed all uses to
2394 either use the SCM_I_ variants or scm_is_*, scm_to_*, or
2395 scm_from_*, as appropriate.
2396
2397 * dynwind.c (scm_i_dowinds): Removed unused code that would call
2398 the unexisting scm_cross_dynwind_binding_scope for inums on the
2399 windlist.
2400
2401 2004-07-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2402
2403 * socket.c (ipv6_net_to_num, scm_from_ipv6): Renamed
2404 ipv6_net_to_num to scm_from_ipv6, for converting from an IPv6
2405 byte-wise address to a SCM integer. Changed all uses.
2406 (ipv6_num_to_net, scm_to_ipv6): Renamed ipv6_num_to_net to
2407 scm_to_ipv6 and added type and range checking, for converting from
2408 an IPv& byte-wise address to a SCM integer. Changed all uses.
2409 (bignum_in_ipv6_range_p, VALIDATE_INET6): Removed, their function
2410 is now done by scm_to_ipv6.
2411
2412 * numbers.c (scm_to_signed_integer, scm_to_unsigned_integer): dot
2413 not accept inexact integers.
2414
2415 * validate.h, deprecated.h (SCM_VALIDATE_INUM,
2416 SCM_VALIDATE_INUM_COPY, SCM_VALIDATE_BIGINT,
2417 SCM_VALIDATE_INUM_MIN, SCM_VALIDATE_INUM_MIN_COPY,
2418 SCM_VALIDATE_INUM_MIN_DEF_COPY,SCM_VALIDATE_INUM_DEF,
2419 SCM_VALIDATE_INUM_DEF_COPY, SCM_VALIDATE_INUM_RANGE,
2420 SCM_VALIDATE_INUM_RANGE_COPY): Deprecated because they make the
2421 fixnum/bignum distinction visible. Changed all uses to
2422 scm_to_size_t or similar.
2423
2424 2004-07-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2425
2426 * cpp_cnvt.awk: Use scm_from_int instead of SCM_MAKINUM.
2427
2428 2004-07-10 Kevin Ryde <user42@zip.com.au>
2429
2430 * hash.c (scm_hashq, scm_hashv, scm_hash): Restrict to size>=1 rather
2431 than size>=0, since 0<=hash<size cannot be satisfied for size==0, and
2432 such a size causes divide-by-zeros in scm_hasher.
2433
2434 * regex-posix.c (scm_make_regexp): Free rx on error, to avoid memory
2435 leak.
2436
2437 2004-07-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2438
2439 * numbers.c (scm_is_signed_integer, scm_is_unsigned_integer):
2440 Rewritten using the same logic as scm_to_signed_integer and
2441 scm_to_unsigned_integer, respectively, which is better(tm). Also,
2442 use CHAR_BIT instead of hardcoding 8.
2443 (LLONG_MIN, LLONG_MAX, ULLONG_MAX): Removed and used
2444 SCM_I_LLONG_MIN etc. instead.
2445
2446 * numbers.h (SCM_MAKINUM, SCM_I_MAKINUM): Renamed SCM_MAKINUM to
2447 SCM_I_MAKINUM and changed all uses.
2448 * deprecated.h, deprecated.c (SCM_MAKINUM): Newly deprecated.
2449
2450 * gen-scmconfig.c (SCM_I_LLONG_MIN, SCM_I_LLONG_MAX,
2451 SCM_I_ULLONG_MAX): Instead of hard-coding the numbers, compute
2452 them by assuming twos-complement.
2453
2454 2004-07-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2455
2456 * gen-scmconfig.h.in: Added all the new SCM_I_GSC_*_LIMITS that
2457 configure now produces.
2458 * gen-scmconfig.c: Use them to output SCM_T_INT8_MIN, etc
2459 definitions, giving the limits of the integer types defined by
2460 Guile. Also, output a hard coded SCM_I_LLONG_MIN, etc since
2461 LLONG_MIN or LONG_LONG_MIN is hard to get at.
2462
2463 * numbers.h (scm_to_short, scm_to_ushort): It's SHRT_MIN, etc, not
2464 SHORT_MIN.
2465 (scm_to_size_t): Use SIZE_MAX instead of cooking our own.
2466 (scm_to_long_long, scm_to_ulong_long, scm_to_int8, scm_to_uint8,
2467 scm_to_int16, scm_to_uint16, scm_to_int32, scm_to_uint32,
2468 scm_to_int64, scm_to_uint64, scm_to_intmax, scm_to_uintmax,
2469 scm_from_long_long, scm_from_ulong_long, scm_from_int8,
2470 scm_from_uint8, scm_from_int16, scm_from_uint16, scm_from_int32,
2471 scm_from_uint32, scm_from_int64, scm_from_uint64, scm_from_intmax,
2472 scm_from_uintmax): New.
2473
2474 2004-07-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2475
2476 * tags.h (scm_is_eq): New.
2477
2478 * deprecated.h, boolean.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOL,
2479 SCM_NEGATE_BOOL, SCM_BOOLP): Deprecated by moving into
2480 "deprecated.h". Replaced all uses with scm_is_false, scm_is_true,
2481 scm_from_bool, and scm_is_bool, respectively.
2482
2483 * boolean.h (scm_is_bool): Fix bug in prototype.
2484 (scm_from_bool): The argument is "x" not "f", stupid.
2485
2486 * boolean.c (scm_is_bool): Fix typo.
2487
2488 * numbers.h, numbers.c (scm_is_integer, scm_is_signed_integer,
2489 scm_is_unsigned_integer, scm_to_signed_integer,
2490 scm_to_unsigned_integer, scm_to_schar, scm_to_uchar, scm_to_char,
2491 scm_to_short, scm_to_ushort, scm_to_long, scm_to_ulong,
2492 scm_to_size_t, scm_to_ssize_t, scm_from_schar, scm_from_uchar,
2493 scm_from_char, scm_from_short, scm_from_ushort, scm_from_int,
2494 scm_from_uint, scm_from_long, scm_from_ulong, scm_from_size_t,
2495 scm_from_ssize_t, scm_is_real, scm_to_double, scm_from_double):
2496 New.
2497
2498 2004-07-05 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2499
2500 * boolean.h, boolean.c (scm_is_true, scm_is_false, scm_from_bool,
2501 scm_to_bool): New.
2502
2503 2004-06-27 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2504
2505 * backtrace.c (display_expression, display_frame): Call
2506 scm_i_unmemoize_expr for unmemoizing a memoized object holding a
2507 single memoized expression.
2508
2509 * debug.c (memoized_print): Don't try to unmemoize the memoized
2510 object, since we can't know whether it holds a single expression
2511 or a body.
2512
2513 (scm_mem_to_proc): Removed check for lambda expression, since it
2514 was moot anyway. Whoever uses these functions for debugging
2515 purposes should know what they do: Creating invalid memoized code
2516 will cause crashes, independent of whether this check is present
2517 or not.
2518
2519 (scm_proc_to_mem): Take the closure's code as it is and don't
2520 append a SCM_IM_LAMBDA isym. To allow easier debugging, the
2521 memoized code should not be modified.
2522
2523 * debug.[ch] (scm_unmemoize, scm_i_unmemoize_expr): Removed
2524 scm_unmemoize from public use, but made scm_i_unmemoize_expr
2525 available as a guile internal function instead. However,
2526 scm_i_unmemoize_expr will only work on memoized objects that hold
2527 a single memoized expression. It won't work with bodies.
2528
2529 * debug.c (scm_procedure_source), macros.c (macro_print), print.c
2530 (scm_iprin1): Call scm_i_unmemocopy_body for unmemoizing a body,
2531 i. e. a list of expressions.
2532
2533 * eval.c (unmemoize_exprs): Drop internal body markers from the
2534 output during unmemoization.
2535
2536 * eval.[ch] (scm_unmemocopy, scm_i_unmemocopy_expr,
2537 scm_i_unmemocopy_body): Removed scm_unmemocopy from public use,
2538 but made scm_i_unmemocopy_expr and scm_i_unmemocopy_body available
2539 as guile internal functions instead. scm_i_unmemoize_expr will
2540 only work on a single memoized expression, while
2541 scm_i_unmemocopy_body will only work on bodies.
2542
2543 2004-06-21 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2544
2545 * eval.c (unmemoize_exprs): Handle semi-memoized code.
2546
2547 (scm_cons_source, scm_primitive_eval): Prefer higher level
2548 predicate SCM_FALSEP over SCM_IMP.
2549
2550 2004-06-15 Rob Browning <rlb@defaultvalue.org>
2551
2552 * script.c (scm_shell_usage): minor phrasing change.
2553
2554 * gc_os_dep.c: update ifdefery for macosx.
2555 (scm_get_stack_base): separate result initialization from
2556 declaration to slience warnings with macosx and hp-ux using gcc
2557 3.3. Thanks to Andreas Vögele.
2558
2559 2004-06-13 Han-Wen Nienhuys <hanwen@xs4all.nl>
2560
2561 * eval.c (unmemoize_exprs): use SCM_CONSP for the loop condition.
2562
2563 2004-06-06 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2564
2565 * list.[ch] (scm_i_finite_list_copy): New internal function to
2566 copy lists that are known to be finite (though not necessarily
2567 proper).
2568
2569 * debug.c (scm_procedure_source): Don't have scm_unmemocopy treat
2570 a closure's argument list like an expression of a body.
2571
2572 * eval.c (unmemoize_expression, unmemoize_exprs, unmemoize_and,
2573 unmemoize_begin, unmemoize_case, unmemoize_cond, unmemoize_delay,
2574 unmemoize_do, unmemoize_if, unmemoize_lambda, unmemoize_let,
2575 unmemoize_letrec, unmemoize_letstar, unmemoize_or,
2576 unmemoize_set_x, unmemoize_apply, unmemoize_atcall_cc,
2577 unmemoize_at_call_with_values, unmemoize_future, sym_atslot_ref,
2578 unmemoize_atslot_ref, sym_atslot_set_x, unmemoize_atslot_set_x,
2579 unmemoize_builtin_macro): New static functions and symbols.
2580
2581 (scm_unmemocopy): Rewritten in terms of the above. scm_unmemocopy
2582 now has a slightly different meaning: The memoized form that is
2583 receives as its argument is now interpreted as a sequence of
2584 expressions from a body.
2585
2586 (unmemocar, scm_unmemocar): Since the whole functionality of
2587 unmemocar and scm_unmemocar is not needed any more, scm_unmemocar
2588 has its old content back and is deprecated, while unmemocar has
2589 been removed.
2590
2591 (SCM_BIT7): Removed.
2592
2593 (CEVAL): For unmemoizing a single expression, call
2594 unmemoize_expression instead of scm_unmemocopy, which now expects
2595 a sequence of body expressions. Eliminated unnecessary empty
2596 environment frame when executing let* forms. Eliminated
2597 unmemoization step from evaluator.
2598
2599 2004-06-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2600
2601 * eval.c (scm_macroexp, macroexp): Renamed scm_macroexp to
2602 macroexp and made static. Added new version of scm_macroexp that
2603 emits a deprecation warning and then calls macroexp.
2604 (scm_m_undefine): Issue deprecation warning.
2605
2606 2004-05-30 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2607
2608 * eval.c (lookup_global_symbol, literal_p, try_macro_lookup):
2609 Modified to make set! work on symbols that represent syntactic
2610 keywords.
2611
2612 2004-05-26 Han-Wen Nienhuys <hanwen@xs4all.nl>
2613
2614 * gc.h (SCM_CELL_OBJECT_LOC): use SCM_GC_CELL_OBJECT to prevent
2615 compound expression as lvalue errors.
2616
2617 2004-05-24 Marius Vollmer <mvo@zagadka.de>
2618
2619 * dynwind.c (winder_mark): Use SCM_PACK to correctly convert the
2620 WINDER_DATA to a SCM.
2621
2622 2004-05-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2623
2624 * goops.c (compute_getters_n_setters, create_standard_classes,
2625 scm_add_slot): Compute closures by calling scm_i_eval_x on a
2626 lambda expression rather than creating them with scm_closure.
2627
2628 2004-05-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2629
2630 * eval.c (s_macro_keyword, scm_m_set_x): Remove checking for
2631 misplaced syntactic keywords. This will not work unless guile's
2632 defmacro feature is deprecated.
2633
2634 (scm_m_case): Fixed a bug that caused the list of labels to grow
2635 with every case form.
2636
2637 2004-05-19 Kevin Ryde <user42@zip.com.au>
2638
2639 * numbers.c (scm_round_number): For inum and big, just return x. For
2640 real, use scm_round for 2^54-1 etc problems covered there.
2641
2642 * numbers.c (trunc): Remove #define to scm_truncate when the C library
2643 doesn't provide trunc. This was for when `truncate' was done as a
2644 scm_tc7_dsubr, no longer required.
2645
2646 * threads.c (scm_threads_mark_stacks) [SCM_STACK_GROWS_UP]: Correction
2647 to stack marking call, two parameters and no cast on t->base.
2648
2649 2004-05-18 Marius Vollmer <mvo@zagadka.de>
2650
2651 * hashtab.c (rehash_after_gc): Bug fix: properly link the
2652 processed hashtables back into the weak_hashtables list. Thanks
2653 to Bill Schottstaedt!
2654
2655 2004-05-16 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2656
2657 * eval.c (unmemoize_quote): New static function.
2658
2659 (scm_m_quote, scm_m_atslot_ref, SCM_CEVAL): Changed the byte code
2660 representation of 'quote' and '@slot-ref' to an improper list.
2661 This reduces execution time, the number of cells used to hold the
2662 memoized code, and thus also reduces garbage collection time.
2663
2664 (scm_unmemocopy): Use unmemoize_quote for quote expressions.
2665
2666 (SCM_CEVAL): Changed macro handling to also work with macros that
2667 return improper lists. Added an assertion, that the code returned
2668 by a macro transformer will not lead to cycles in the memoized
2669 code.
2670
2671 2004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2672
2673 No functional change, just rearrangements of functions within the
2674 file.
2675
2676 * eval.c (scm_ilookup, scm_unbound_variable_key,
2677 error_unbound_variable, scm_lookupcar1, scm_lookupcar): Moved to
2678 the definitions used for execution, since that's where they will
2679 belong to later.
2680
2681 2004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2682
2683 * numbers.h (SCM_SLOPPY_FRACTIONP): Removed. It was not used
2684 throughout guile, has not been part of an official release yet,
2685 and the concept of sloppy predicates has never been a good idea.
2686
2687 (SCM_FRACTION_NUMERATOR, SCM_FRACTION_DENOMINATOR,
2688 SCM_FRACTION_SET_NUMERATOR, SCM_FRACTION_SET_DENOMINATOR):
2689 Simplified.
2690
2691 2004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2692
2693 * throw.c (SETJBJMPBUF, SCM_SETJBDFRAME): Add cast to scm_t_bits
2694 to make explicit what happens.
2695
2696 2004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2697
2698 * dynl.c (SET_DYNL_HANDLE): Add cast to scm_t_bits to make
2699 explicit what happens.
2700
2701 * guardians.c (TCONC_IN): Use SCM_SET_CELL_OBJECT_x rather than
2702 SCM_SET_CELL_WORD_x when writing scheme objets to cell elements.
2703
2704 2004-05-11 Marius Vollmer <mvo@zagadka.de>
2705
2706 * scmsigs.c (scm_sigaction_for_thread): Validate that the handler
2707 is indeed a procedure when it isn't a number.
2708
2709 2004-05-10 Marius Vollmer <mvo@zagadka.de>
2710
2711 Convert floating point numbers into strings with an arbitrary
2712 radix. Thanks to Richard Todd!
2713
2714 * numbers.c (FLOBUFLEN): Increase so that radix 2 strings will
2715 fit.
2716 (fx): Removed.
2717 (scm_dblprec, fx_per_radix, init_dblprec, init_fx_radix,
2718 number_chars): New, to support variable radices.
2719 (idbl2str): Use above instead of the old base-10 only tables.
2720 (iflo2str): Pass on new RADIX argument to idbl2str.
2721 (scm_number_to_string): Pass radix to iflo2str.
2722 (scm_print_real, scm_print_complex): Explicitly pass radix 10 to
2723 iflo2str.
2724 (scm_init_numbers): Call init_dblprec and init_fx_radix for all
2725 possible radices.
2726
2727 2004-05-10 Kevin Ryde <user42@zip.com.au>
2728
2729 * numbers.c (scm_logbit_p): Correction to test above the end of an
2730 inum. Reported by Jan Konecny.
2731
2732 2004-05-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2733
2734 * gc.h (scm_t_cell): Fields are now of type SCM instead of
2735 scm_t_bits. Updated all users.
2736 (SCM_GC_CARD_SIZE_MASK): Use SCM_GC_SIZEOF_CARD instead of
2737 duplicating the code.
2738 (SCM_CELL_OBJECT_LOC): New.
2739 (SCM_CARLOC, SCM_CDRLOC): Use it instead of SCM_CELL_WORD_LOC.
2740 (SCM_CELL_WORD_LOC): Moved to "deprecated.h".
2741
2742 * smob.h (SCM_SMOB_DATA_2, SCM_SMOB_DATA_3, SCM_SMOB_FLAGS,
2743 SCM_SET_SMOB_DATA_2, SCM_SET_SMOB_DATA_3, SCM_SET_SMOB_FLAGS,
2744 SCM_SMOB_OBJECT, SCM_SMOB_OBJECT_2, SCM_SMOB_OBJECT_3,
2745 SCM_SET_SMOB_OBJECT, SCM_SET_SMOB_OBJECT_2, SCM_SET_SMOB_OBJECT_3,
2746 SCM_SMOB_OBJECT_LOC, SCM_SMOB_OBJECT_2_LOC,
2747 SCM_SMOB_OBJECT_3_LOC): New.
2748 * smob.c (scm_i_set_smob_flags): New function.
2749
2750 * dynl.c, dynwind.c, eval.h, fluids.h, futures.h, hashtab.h,
2751 hooks.h, keywords.h, macros.h, macros.c, mallocs.c, mallocs.h,
2752 random.h, regex-posix.h, root.h, srcprop.h, srcprop.c, threads.h:
2753 Use SCM_SMOB_* instead of SCM_CELL_* as appropriate. Use
2754 SCM_SMOB_FLAGS and SCM_SET_SMOB_FLAGS instead of accessing the
2755 zeroth word directly. Use SCM_SMOB_PREDICATE as appropriate.
2756
2757 * numbers.h (SCM_I_BIG_MPZ): Use SCM_CELL_OBJECT_LOC instead of
2758 taking the address of SCM_CELL_WORD_1, the latter being no longer
2759 an lvalue.
2760
2761 * variable.h (SCM_VARIABLE_LOC): Use SCM_CELL_OBJECT_LOC instead
2762 of casting SCM_CELL_WORD_LOC.
2763
2764 2004-05-02 Kevin Ryde <user42@zip.com.au>
2765
2766 * eval.c (scm_macroexp): Add prototype, since it's not in eval.h under
2767 --disable-deprecated. Reported by Andreas Vögele.
2768
2769 * filesys.c (_POSIX_C_SOURCE): Define to 199506L to get readdir_r (in
2770 particular on HP-UX). Reported by Andreas Vögele.
2771
2772 * list.c (varargs.h): Remove, leave just stdarg.h which is all the
2773 code has support for. Fixes building with AIX cc, which is ansi but
2774 doesn't define __STDC__. Reported by Keith Crane.
2775 (var_start): Remove macro, this variation no longer required.
2776 (scm_list_n): Use va_start directly.
2777
2778 2004-05-01 Kevin Ryde <user42@zip.com.au>
2779
2780 * continuations.c (scm_dynthrow): Use >= instead of SCM_PTR_GE which
2781 is now gone. Reported by Andreas Vögele.
2782
2783 2004-04-28 Kevin Ryde <user42@zip.com.au>
2784
2785 * backtrace.c (display_frame_expr), numbers.c (XDIGIT2UINT,
2786 mem2uinteger, mem2decimal_from_point, mem2ureal): Cast char to int for
2787 ctype.h tests, to avoid warnings from gcc on HP-UX about char as array
2788 subscript. Reported by Andreas Vögele.
2789 Also cast through unsigned char to avoid passing negatives to those
2790 macros if input contains 8-bit values.
2791
2792 * num2integral.i.c (NUM2INTEGRAL): Under non-BIGMPZ_FITSP case,
2793 corrections to range check for signed numbers. Remove
2794 scm_remember_upto_here_1(num) from these checks, since num is used
2795 subsequently anyway.
2796
2797 * num2integral.i.c (NUM2INTEGRAL): Test BIGMPZ_FITSP with "!= 0" to
2798 avoid warning from gcc 3.4. Reported by Hyperdivision.
2799
2800 * numbers.c (scm_bit_extract): Use min instead of MIN.
2801 (MIN): Remove, this conflicts with similar macro defined by limits.h
2802 on HP-UX. Reported by Andreas Vögele.
2803
2804 * stime.c (_POSIX_C_SOURCE): Define to 199506L to get gmtime_r (in
2805 particular on HP-UX). Reported by Andreas Vögele.
2806
2807 * threads.c (scm_threads_mark_stacks): Correction sizet -> size_t.
2808 Reported by Andreas Vögele.
2809
2810 * threads-plugin.h (SCM_MUTEX_MAXSIZE): Increase to 25*sizeof(long),
2811 for the benefit of hpux11 where pthread_mutex_t is 88 bytes. Reported
2812 by Andreas Vögele.
2813
2814 2004-04-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2815
2816 * eval.c (s_macro_keyword): New static identifier.
2817
2818 (scm_m_define): Change order to first create binding and
2819 evaluating the expression afterwards.
2820
2821 (scm_m_set_x): Memoize complete set! expression. Only leave
2822 symbols if no binding exists at memoization time. Throw error if
2823 assigning to a syntactic keyword.
2824
2825 (lazy_memoize_variable): New function.
2826
2827 (CEVAL): When execution set!, perform lazy memoization if
2828 unmemoized symbol is detected.
2829
2830 * modules.c (module_variable): Return variables with unbound
2831 value.
2832
2833 * tags.h: Fix comment.
2834
2835 2004-04-25 Kevin Ryde <user42@zip.com.au>
2836
2837 * chars.c (scm_char_upcase, scm_char_downcase, scm_c_upcase,
2838 scm_c_downcase): Use ctype.h toupper and tolower. This will be useful
2839 in 8-bit locales, and ensures consistency with char-upper-case? and
2840 char-lower-case? which already use ctype.h.
2841 (scm_c_upcase_table, scm_c_downcase_table, scm_lowers, scm_uppers):
2842 Remove.
2843 * chars.c, chars.h, init.c (scm_tables_prehistory): Remove.
2844
2845 * socket.c (VALIDATE_INET6): Correction to bignum_in_ipv6_range_p
2846 call. Reported by Hyperdivision.
2847
2848 * threads.c (scm_yield): Correction, actually call scm_thread_yield.
2849 Reported by Hyperdivision.
2850
2851 * unif.c (s_scm_make_uve): Remove unused local variable. Reported by
2852 Hyperdivision.
2853
2854 2004-04-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2855
2856 Hide the implementation of ilocs and isyms in eval.c.
2857
2858 * deprecated.h (SCM_IFRINC, SCM_ICDR, SCM_IFRAME, SCM_IDIST,
2859 SCM_ICDRP), eval.c (SCM_IFRINC, SCM_ICDR, SCM_IFRAME, SCM_IDIST,
2860 SCM_ICDRP), eval.h (SCM_ICDR, SCM_IFRINC, SCM_IFRAME, SCM_IDIST,
2861 SCM_ICDRP): Deprecated and added to deprecated.h. Moved from
2862 eval.h to eval.c.
2863
2864 * deprecated.c (scm_isymnames), deprecated.h (scm_isymnames,
2865 SCM_ISYMNUM, SCM_ISYMCHARS), eval.c (SCM_ISYMNUM, isymnames,
2866 scm_unmemocopy, CEVAL), print.c (scm_isymnames), tags.h
2867 (SCM_ISYMNUM, scm_isymnames, SCM_ISYMCHARS): Deprecated
2868 scm_isymnames, SCM_ISYMNUM and SCM_ISYMCHARS and added to
2869 deprecated.[hc]. Moved scm_isymnames from print.c to eval.c and
2870 renamed to isymnames. Moved SCM_ISYMNUM from tags.h to eval.c and
2871 renamed to ISYMNUM.
2872
2873 * eval.c (scm_i_print_iloc, scm_i_print_isym), eval.h
2874 (scm_i_print_iloc, scm_i_print_isym), print.c (scm_iprin1):
2875 Extracted printing of ilocs and isyms to guile internal functions
2876 scm_i_print_iloc, scm_i_print_isym of eval.c.
2877
2878 2004-04-22 Kevin Ryde <user42@zip.com.au>
2879
2880 * numbers.c (scm_bit_extract): Use SCM_SRS for signed right shift.
2881
2882 * numbers.c (scm_round): Test for x already an integer, to avoid bad
2883 rounding in x+0.5 when x is a big value already an integer. In
2884 certain hardware rounding cases x+0.5 can give an adjacent integer,
2885 leading to that as the result, when we really just wanted x itself.
2886
2887 2004-04-19 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2888
2889 * eval.c (scm_unmemocopy): Fixed unmemoization of let*.
2890
2891 (deval_args, CEVAL): Minor improvements: Reduced variable scopes,
2892 added const qualifiers, cast intentionally unused expressions to
2893 void for emphasis, improved comment.
2894
2895 2004-04-18 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2896
2897 * tags.h (scm_tags, scm_tc8_tags, scm_tc9_flag, scm_tc8_flag,
2898 scm_tc8_isym): Renamed scm_tags to scm_tc8_tags. Renamed
2899 scm_tc9_flag to scm_tc8_flag. Introduced new identifier
2900 scm_tc8_isym. Defined tc8-tags relative to scm_tc3_imm24.
2901 Defined the tc8-tag for flags to be 0x04, which will mean that
2902 SCM_BOOL_F will also have the value 0x04 instead of 0x013c. Due
2903 to the reduced number of bits and the simpler bit pattern for
2904 SCM_BOOL_F, certain machines may be able to use more efficient
2905 processor instructions to deal with SCM_BOOL_F.
2906
2907 (SCM_ITAG9, SCM_MAKE_ITAG9, SCM_ITAG9_DATA): Removed. These have
2908 never been defined in a released version, thus no need to
2909 deprecate them.
2910
2911 (SCM_IFLAGP, SCM_MAKIFLAG, SCM_IFLAGNUM): Flags now use tc8
2912 instead of tc9 tags.
2913
2914 (SCM_ISYMP, SCM_MAKISYM, SCM_ISYMNUM): Isyms now use tc8 instead
2915 of tc9 tags.
2916
2917 (SCM_MAKSPCSYM): Removed. It is almost impossible that user code
2918 could have used this definition.
2919
2920 (SCM_IM_AND, SCM_IM_BEGIN, SCM_IM_CASE, SCM_IM_COND, SCM_IM_DO,
2921 SCM_IM_IF, SCM_IM_LAMBDA, SCM_IM_LET, SCM_IM_LETSTAR,
2922 SCM_IM_LETREC, SCM_IM_OR, SCM_IM_QUOTE, SCM_IM_SET_X): Now encoded
2923 as isyms, as special isyms don't exist any more.
2924
2925 2004-04-18 Kevin Ryde <user42@zip.com.au>
2926
2927 * filesys.c (scm_readdir): Use readdir_r when available, for thread
2928 safety.
2929
2930 * numbers.c (scm_max, scm_min): For big/real, use SCM_SWAP rather than
2931 explicit swapping code.
2932
2933 2004-04-15 Kevin Ryde <user42@zip.com.au>
2934
2935 * cpp_sig_symbols.in: Add SIGSYS.
2936
2937 * list.c (scm_append_x): Use iterative style, to avoid non-tail
2938 recursion.
2939
2940 * numbers.c (scm_max, scm_min): For inum/frac, frac/inum, big/frac,
2941 frac/big and frac/frac, use scm_less_p for exact comparison.
2942
2943 * numbers.c (scm_gcd): For inum/big, use mpz_gcd_ui by sharing code
2944 with big/inum.
2945
2946 * numbers.c (xisinf): Add a comment about solaris 7 lacking isinf.
2947
2948 2004-04-06 Han-Wen Nienhuys <hanwen@xs4all.nl>
2949
2950 * inline.h (scm_cell): use SCM_GC_CELL_WORD for checking tag.
2951
2952 * chars.h (scm_init_chars): change scm_{upcase,downcase} to
2953 scm_c_{up,down}case.
2954 (SCM_MAKE_CHAR): add (unsigned char) cast. This prevents havoc
2955 when hi-bit ASCII is subjected to SCM_MAKE_CHAR().
2956
2957 2004-04-06 Kevin Ryde <user42@zip.com.au>
2958
2959 * numbers.c (scm_ash): Remove stray "}" in docstring.
2960
2961 * numbers.c (scm_make_ratio): For inum/bignum integer detection, use
2962 x==SCM_MOST_NEGATIVE_FIXNUM explicitly, for clarity and to avoid
2963 calling mpz_cmp_ui in most cases.
2964
2965 * numbers.c (scm_quotient, scm_remainder): In inum/big, use mpz_cmp_ui
2966 for big == abs(most-negative-fixnum) special case.
2967 (abs_most_negative_fixnum): Remove, no longer used.
2968
2969 * scmsigs.c (scm_sigaction_for_thread): Correction to signum range
2970 test, avoids SCM_VECTOR_REF outside bounds of signal_handlers on
2971 calling (sigaction NSIG).
2972
2973 * simpos.c (scm_system_star): Fix execargv memory leak, merge parent
2974 and fork error cases to do this.
2975
2976 2004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2977
2978 * eval.c (CEVAL): Don't distinguish between short and long
2979 instructions when dispatching - just always dispatch on the
2980 instruction code, which is common for short and long instructions.
2981 Further, removed unnecessary goto statements and added comment.
2982
2983 2004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2984
2985 * eval.c (scm_unmemocopy): Don't distinguish between short and
2986 long instructions when dispatching - just always dispatch on the
2987 instruction code, which is common for short and long instructions.
2988 Further, removed unnecessary goto statements, fixed indentation
2989 and replaced SCM_IMP predicates by SCM_NULLP.
2990
2991 2004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2992
2993 * eval.c (scm_lookupcar1, CEVAL): Use SCM_ILOCP instead of
2994 comparison with SCM_ILOC00. In CEVAL, eliminate goto-label
2995 'checkmacro'.
2996
2997 2004-03-31 Kevin Ryde <user42@zip.com.au>
2998
2999 * simpos.c: Include <signal.h> for SIG_IGN and friends.
3000
3001 2004-03-29 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3002
3003 Introduce scm_debug_mode_p as a replacement for scm_debug_mode and
3004 SCM_DEBUGGINGP:
3005
3006 * debug.h (scm_debug_mode_p, scm_debug_mode, SCM_DEBUGGINGP),
3007 eval.c (scm_debug_mode_p): Deprecated scm_debug_mode and
3008 SCM_DEBUGGINGP. Provided scm_debug_mode_p instead, to have one
3009 single interface that also matches the naming conventions.
3010 Probably scm_debug_mode_p should be part of the private interface
3011 anyway.
3012
3013 * debug.h (scm_debug_mode_p), backtrace.c (display_error_body),
3014 eval.c (SCM_APPLY, scm_trampoline_0, scm_trampoline_1,
3015 scm_trampoline_2): Change uses of scm_debug_mode or SCM_DEBUGGINGP
3016 to scm_debug_mode_p.
3017
3018
3019 Deprecate direct access to scm_ceval, scm_deval and scm_ceval_ptr:
3020
3021 * eval.h (scm_ceval, scm_deval, scm_ceval_ptr), debug.h
3022 (scm_ceval_ptr): Deprecated. Moved declaration of scm_ceval_ptr
3023 from debug.h to eval.h.
3024
3025 * debug.h (SCM_RESET_DEBUG_MODE): Don't access scm_ceval_ptr any
3026 more, just leave it with setting scm_debug_mode_p, which is
3027 equivalent for practical purposes.
3028
3029 * deprecated.h (SCM_XEVAL, SCM_XEVALCAR): Call scm_i_eval_x
3030 instead of *scm_ceval_ptr. Leave all evaluating to scm_i_eval_x.
3031
3032 * gdbint.c (gdb_eval): Call scm_i_eval_x instead of scm_ceval.
3033
3034 * eval.c (ceval, deval, scm_ceval, scm_deval): Made scm_ceval
3035 static and renamed it to ceval throughout. Provide a new exported
3036 but deprecated function scm_ceval as a wrapper for backwards
3037 compatibility. The same is done for the deval/scm_deval pair of
3038 functions.
3039
3040 * eval.c (CEVAL, SCM_CEVAL): Renamed SCM_CEVAL to CEVAL
3041 throughout. Defined CEVAL to ceval or deval, based on compilation
3042 phase.
3043
3044 * eval.c (SCM_XEVAL, SCM_XEVALCAR): Dispatch on scm_debug_mode_p
3045 to ceval and deval instead of calling *scm_ceval_ptr.
3046
3047 * eval.c (dispatching_eval): New deprecated static function.
3048
3049 * eval.c (scm_ceval_ptr): Initialized to dispatching_eval in order
3050 to emulate its old behaviour as closely as possible.
3051
3052
3053 Change the evaluator such that only expressions for which pair? is
3054 true are passed to CEVAL, and such that all other expressions are
3055 evaluated outside of CEVAL:
3056
3057 * eval.c (EVAL): New, provided in analogy to EVALCAR. Evaluate an
3058 expression that is assumed to be memoized already. All but
3059 expressions of the form '(<form> <form> ...)' are evaluated inline
3060 without calling an evaluator.
3061
3062 * eval.c (SCM_XEVAL, SCM_XEVALCAR, EVALCAR): Evaluate all but
3063 expressions of the form '(<form> <form> ...)' inline without
3064 calling an evaluator.
3065
3066 * eval.c (scm_i_eval_x, scm_i_eval, scm_ceval, scm_deval): Handle
3067 the special case of unmemoized symbols passed on the top level.
3068
3069 * eval.c (CEVAL): Change calls to CEVAL to EVAL, except where it
3070 is known that the expression passed to CEVAL is of the form
3071 '(<form> <form> ...)'. Remove handling of the tc7-objects, since
3072 now it is known that the input expression of CEVAL is a pair.
3073
3074 2004-03-29 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3075
3076 * eval.c (is_self_quoting_p): New static function.
3077
3078 (scm_m_quote): Use is_self_quoting_p.
3079
3080 (copy_tree): Corrected typo in comment.
3081
3082 2004-03-28 Han-Wen Nienhuys <hanwen@xs4all.nl>
3083
3084 * eval.c (s_scm_copy_tree): idem.
3085
3086 * list.c (s_scm_filter): remove "pointer" from doc string.
3087
3088 * gc.h (SCM_GC_CELL_TYPE): SCM_GC_CELL_TYPE uses SCM_GC_CELL_OBJECT.
3089
3090 * goops.h (SCM_NUMBER_OF_SLOTS): don't SCM_UNPACK the result.
3091
3092 * backtrace.c ("display_backtrace_body"): SCM_PACK before SCM_EQ_P
3093 (display_frame): idem.
3094 (display_backtrace_file_and_line): idem.
3095
3096 * tags.h (SCM_UNPACK): stricter typechecking on SCM_UNPACK
3097 arguments.
3098
3099 2004-03-26 Kevin Ryde <user42@zip.com.au>
3100
3101 * filesys.c (scm_getcwd, scm_readlink): Avoid memory leak on errors.
3102
3103 * numbers.c (scm_modulo): For inum/big and big/big, remove test of
3104 big==0 since that never occurs.
3105
3106 * numbers.c, numbers.h (scm_modulo_expt): Renamed from
3107 scm_modular_expt, matching scheme level name `modulo-expt'.
3108
3109 * numbers.c (scm_modular_expt): Return a negative remainder for a
3110 negative divisor, the same as `modulo' does.
3111
3112 2004-03-26 Eric Hanchrow <offby1@blarg.net>
3113
3114 * numbers.c, numbers.h (scm_modular_expt): New function.
3115
3116 2004-03-25 Kevin Ryde <user42@zip.com.au>
3117
3118 * numbers.c (scm_min, scm_max): Correction to big/real and real/big,
3119 return inexact as required by r5rs.
3120
3121 2004-03-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3122
3123 * eval.c: Separated some definitions relevant for execution from
3124 the memoization part of the file.
3125
3126 (copy_tree): New static function
3127
3128 (scm_copy_tree): Rewritten to fix two kinds or bugs: First, cyclic
3129 structures are detected now and will lead to an exception instead
3130 of forcing guile to run in an endless loop, using up all the
3131 system's memory. Second, arrays in the cdr of an improper list
3132 are now copied. See the new test cases in eval.test.
3133
3134 2004-03-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3135
3136 * posix.c (scm_gethostname): Make sure len is initialised before
3137 it is used. Restructured to (hopefully) represent possible
3138 configurations more clearly in the code. Added unwind handler.
3139
3140 2004-03-23 Kevin Ryde <user42@zip.com.au>
3141
3142 * posix.c (scm_gethostname): Use sysconf(_SC_HOST_NAME_MAX) and/or
3143 MAXHOSTNAMELEN when available.
3144
3145 2004-03-21 Marius Vollmer <mvo@zagadka.de>
3146
3147 * read.c (skip_scsh_block_comment): Also recognize '\r' as a line
3148 terminator. Rewritten the logic as a state machine, I must have
3149 been doing too much VHDL lately...
3150
3151 * eval.c (scm_ceval, scm_deval): Explicitely evaluate ports to
3152 themselves. Thanks to Han-Wen Nienhuys!
3153
3154 * list.c: Changed docstrings so that they no longer talk about
3155 returning 'pointers' to something.
3156
3157 2004-03-20 Han-Wen Nienhuys <hanwen@xs4all.nl>
3158
3159 * gc.c: remove set_debug_cell_accesses! when
3160 SCM_DEBUG_CELL_ACCESSES is not defined. Scheme source code should
3161 use (if (defined? 'set-debug-cell-accesses!) .. ) to switch on
3162 debugging conditionally.
3163
3164 2004-03-21 Kevin Ryde <user42@zip.com.au>
3165
3166 * stime.c (scm_gmtime): Use gmtime_r when available, for thread safety.
3167
3168 2004-03-20 Kevin Ryde <user42@zip.com.au>
3169
3170 * posix.c (scm_gethostname): Preserve errno across free() call.
3171
3172 2004-03-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
3173
3174 * gc-card.c (sweep_card): use SCM_GC_SET_CELL_WORD for setting
3175 free cells.
3176
3177 2004-03-14 Kevin Ryde <user42@zip.com.au>
3178
3179 * stime.c: Define _GNU_SOURCE for strptime prototype from glibc.
3180 (strptime): Use HAVE_DECL_STRPTIME for when to give own prototype.
3181
3182 2004-03-07 Kevin Ryde <user42@zip.com.au>
3183
3184 * stime.c (scm_gmtime): Return bd_time->tm_zone when available, rather
3185 than "GMT" always.
3186 (filltime): Make zname parameter "const".
3187
3188 2004-03-03 Mikael Djurfeldt <mdj@chunk.mit.edu>
3189
3190 * threads.c, threads.h (scm_c_scm2thread): New function.
3191
3192 2004-02-29 Kevin Ryde <user42@zip.com.au>
3193
3194 * numbers.c (guile_ieee_init): Use C99 INFINITY and NAN when
3195 available. Test HAVE_DINFINITY and HAVE_DQNAN for those globals, in
3196 particular don't assume "defined (__alpha__) && ! defined (linux)"
3197 means OSF. Remove "SCO" code, which was not really SCO specific and
3198 which John W. Eaton advises should be long past being needed.
3199
3200 * posix.c (scm_execl, scm_execlp, scm_execle): Avoid memory leak under
3201 error throw.
3202
3203 2004-02-24 Kevin Ryde <user42@zip.com.au>
3204
3205 * posix.c (scm_cuserid): Use a private result buffer, for thread safe.
3206
3207 2004-02-22 Kevin Ryde <user42@zip.com.au>
3208
3209 * numbers.c (scm_max, scm_min): For one arg, dispatch to generic for
3210 complex, same as for two args. (Handle only inum, big, real, frac).
3211
3212 2004-02-21 Kevin Ryde <user42@zip.com.au>
3213
3214 * posix.c (scm_crypt): Use new HAVE_CRYPT.
3215 (<crypt.h>): Remove HAVE_LIBCRYPT condition.
3216 Reported by Andreas Voegele.
3217
3218 2004-02-20 Neil Jerram <neil@ossau.uklinux.net>
3219
3220 * list.c (scm_list_n): Add #if SCM_DEBUG_CELL_ACCESSES_P around
3221 validation.
3222
3223 * read.c (scm_lreadparen): Removed.
3224 (scm_lreadparen1): Renamed scm_i_lreadparen.
3225
3226 2004-02-20 Han-Wen Nienhuys <hanwen@xs4all.nl>
3227
3228 * list.c (scm_list_n): validate non-immediate arguments;
3229 this will catch forgotten a SCM_UNDEFINED.
3230
3231 2004-02-18 Marius Vollmer <mvo@zagadka.de>
3232
3233 * gc.h (scm_gc_cells_collected): Removed duplicated declaration.
3234 Thanks to Bill Schottstaedt!
3235
3236 * socket.h (scm_gethost): Removed prototype it is already in
3237 "net_db.h". Thanks to Bill Schottstaedt!
3238
3239 2004-02-18 Kevin Ryde <user42@zip.com.au>
3240
3241 * num2integral.i.c (INTEGRAL2BIG): WORDS_BIGENDIAN not right for word
3242 order parameter to mpz_import, in fact with just one word there's no
3243 order to worry about at all.
3244
3245 * numbers.c (scm_num_eq_p): For real==frac, complex==frac, frac==real
3246 and frac==complex, make an exact comparison rather than converting
3247 with fraction2double.
3248
3249 * posix.c, putenv.c, stime.c (environ): Use _NSGetEnviron in Darwin
3250 shared library, since environ is not directly available there.
3251
3252 * script.c (scm_shell_usage): Print to stdout for --help, per GNU
3253 standard.
3254
3255 * stime.c (scm_localtime, scm_gmtime, scm_mktime): Provide a default
3256 errno EINVAL in case localtime and gmtime don't set it.
3257 (scm_mktime, scm_strptime): Forcibly use errno EINVAL for our
3258 SCM_SYSERROR, since mktime and strptime generally don't set errno.
3259
3260 2004-02-16 Kevin Ryde <kevin@swox.se>
3261
3262 * gc-malloc.c (scm_done_malloc, scm_done_free): Allow negative sizes,
3263 which were permitted in the past for these.
3264
3265 * num2float.i.c (NUM2FLOAT): Expand isfinite to !xisinf, as per
3266 previous change to numbers.c.
3267
3268 * script.c (scm_shell_usage): Print bug-guile email address, as per
3269 GNU standard. Reported by Han-Wen Nienhuys.
3270
3271 2004-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
3272
3273 * unif.c (scm_make_uve): Removed local variable and simplified
3274 code in order to avoid compiler used uninitialized warnings.
3275
3276 * hashtab.c, hashtab.h (scm_hash_map_to_list): Renamed from
3277 scm_hash_map.
3278 (scm_hash_fold): Use scm_call_3 directly in the call to
3279 scm_internal_hash_fold instead of going via fold_proc (which is
3280 now removed).
3281 (scm_hash_for_each): Use a trampoline +
3282 scm_internal_hash_for_each_handle.
3283 (scm_internal_hash_for_each_handle, scm_hash_for_each_handle): New
3284 functions.
3285
3286 2004-02-12 Kevin Ryde <user42@zip.com.au>
3287
3288 * ports.c (scm_port_line): In docstring, note first line is 0.
3289 (scm_set_port_line_x): In docstring, note first line is 0.
3290 (scm_port_column): In docstring, there's no default to current input
3291 port, and remove shared port-line @defun.
3292 (scm_set_port_column_x): In docstring, there's no default to current
3293 input port, note first column is 0, remove shared set-port-line!
3294 @defun.
3295
3296 * ramap.c (scm_array_fill_x): For fvect and dvect, use scm_num2dbl to
3297 convert args the same way that array-set! does.
3298
3299 * unif.c (scm_make_uve, scm_array_p): Allow fraction 1/3 as prototype
3300 for dvect.
3301 (scm_array_p): Add missing "break"s in switch, fix llvect test look
3302 for "l" not "s", fix dvect to be false for singp(prot) since such a
3303 value is for fvect.
3304 (scm_array_prototype): Return 1/3 for dvect, rather than 0.33..33.
3305 (exactly_one_third): New variable.
3306 (scm_init_unif): Initialize it.
3307
3308 2004-02-10 Neil Jerram <neil@ossau.uklinux.net>
3309
3310 * read.c (scm_read_opts): Change `escaped-parens' to
3311 `elisp-strings'.
3312
3313 2004-02-08 Neil Jerram <neil@ossau.uklinux.net>
3314
3315 * read.c (scm_read_opts): New opts `elisp-vectors' and
3316 `escaped-parens'.
3317 (s_vector): New.
3318 (scm_lreadr): Use scm_lreadparen1 instead of scm_lreadparen. Make
3319 handling of elisp vector syntax dependent on SCM_ENABLE_ELISP and
3320 `elisp-vectors' option instead of SCM_ELISP_READ_EXTENSIONS.
3321 Allow "\(" and "\)" in strings when SCM_ENABLE_ELISP defined and
3322 `escaped-parens' option set.
3323 (scm_read_token): If elisp vector syntax active, disallow [ and ]
3324 in tokens.
3325 (scm_lreadparen): Rewrite as interface to scm_lreadparen1.
3326 (scm_lreadparen1): New.
3327
3328 * read.h: Remove conditionally compiled last arg to
3329 scm_lreadparen.
3330 (SCM_ELISP_VECTORS_P, SCM_ESCAPED_PARENS_P): New.
3331
3332 2004-01-23 Han-Wen Nienhuys <hanwen@xs4all.nl>
3333
3334 * eval.c (m_expand_body): remove stray variable new_body.
3335
3336 2004-01-22 Marius Vollmer <mvo@zagadka.de>
3337
3338 * eval.c (m_expand_body): Rewrite the expression in place (by
3339 overwriting FORMS) also when a letrec is constructed, not only
3340 when no definitions are found. Do not return rewritten expression
3341 to emphasize the in-place rewriting. Changed all users.
3342
3343 2004-01-19 Han-Wen Nienhuys <hanwen@xs4all.nl>
3344
3345 * gc.c: add protected_object_count, a number that is dumped from
3346 gc_stats()
3347
3348 2004-01-11 Marius Vollmer <mvo@zagadka.de>
3349
3350 * dynwind.h, dynwind.c (scm_frame_unwind,
3351 scm_frame_unwind_handler): Renamed and changed all uses.
3352 (scm_frame_rewind, scm_frame_rewind_handler): Likewise.
3353
3354 2004-01-11 Kevin Ryde <user42@zip.com.au>
3355
3356 * unif.c (scm_bit_count, scm_bit_position, s_scm_bit_set_star_x,
3357 s_scm_bit_count_star, s_scm_bit_invert_x): Clarify docstrings, as per
3358 changes made to scheme-compound.texi.
3359
3360 2004-01-10 Marius Vollmer <mvo@zagadka.de>
3361
3362 * print.c (scm_print_symbol_name): Handle #{`foo}#, #{,foo}#,
3363 #{.}#, and all numeric strings specially. Thanks to Paul Jarc!
3364
3365 * guile-snarf.in: Use mkdir to create a unique temporary directory
3366 that we can safely use. Thanks to Stefan Nordhausen!
3367
3368 2004-01-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3369
3370 * dynwind.h, dynwind.c (scm_i_dowinds): Removed 'explicit'
3371 argument since it is always zero now. Changed all callers.
3372 Removed code for handling fluids.
3373
3374 * fluids.c (scm_c_with_fluids): Use frames instead of adding to
3375 the wind chain explicitely. Use scm_c_with_fluid for the common
3376 case of only one fluid.
3377 (scm_with_fluid): New.
3378 (scm_c_with_fluid): Use frames instead of scm_c_with_fluids.
3379
3380 * fluids.h, fluids.c (scm_frame_fluid): New.
3381 (scm_with_fluid): New.
3382 (scm_i_swap_fluids, scm_i_swap_fluids_reverse): Removed.
3383
3384 * dynwind.c (scm_frame_end): Do not use scm_i_dowinds. Instead,
3385 do the unwinding directly. It is simple enough.
3386
3387 * dynwind.h, dynwind.c: Did the following renamings:
3388 scm_begin_frame -> scm_frame_begin,
3389 scm_end_frame -> scm_frame_end,
3390 scm_on_unwind -> scm_frame_unwind,
3391 scm_on_rewind -> scm_frame_rewind,
3392 scm_on_unwind_with_scm -> scm_frame_unwind_with_scm,
3393 scm_on_rewind_with_scm -> scm_frame_rewind_with_scm.
3394 Changed all uses.
3395
3396 * aync.h, async.c: Did the follwing renamings:
3397 scm_with_blocked_asyncs -> scm_frame_block_asyncs,
3398 scm_with_unblocked_asyncs -> scm_frame_unblock_asyncs.
3399 Changed all uses.
3400
3401 * ports.h, ports.c: Did the follwing renamings:
3402 scm_with_current_input_port -> scm_frame_current_input_port,
3403 scm_with_current_output_port -> scm_frame_current_output_port,
3404 scm_with_current_error_port -> scm_frame_current_error_port.
3405 Changed all uses.
3406
3407 2004-01-07 Kevin Ryde <user42@zip.com.au>
3408
3409 * numbers.c (s_bignum): Remove, not used since gmp bignums.
3410 Reported by Richard Todd.
3411
3412 * threads-plugin.h (SCM_MUTEX_MAXSIZE): Increase to 12*sizeof(long),
3413 for the benefit of powerpc-apple-darwin5.5. Reported by Richard Todd.
3414
3415 * unif.c (scm_aind): Test SCM_CONSP rather than !SCM_NULLP while
3416 traversing the args list, fixes segv if an improper list is given.
3417 Reported by Rouben Rostamian.
3418
3419 2004-01-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3420
3421 * ports.c (swap_ports, scm_with_current_foo_port): Do not allocate
3422 swap_data on stack, use a 'malloc obj'.
3423
3424 * fluids.h, fluids.c (scm_make_initial_fluids, scm_copy_fluids,
3425 scm_swap_fluids, scm_swap_fluids_reverse): Renamed to
3426 scm_i_... since they are internal. Changed all uses.
3427
3428 * dynwind.c (frame_print): Removed, use the default printer.
3429 (WINDER_F_MARK, WINDER_MARK_P, winder_mark): New.
3430 (scm_on_unwind_with_scm, scm_on_rewind_with_scm): New. Use above
3431 to protect SCM values.
3432
3433 * dynwind.h (SCM_F_WIND_EXPLICITELY,
3434 SCM_F_WIND_EXPLICITLY): It's "explicitly" not "explicitely", damn.
3435 Changed all uses.
3436 (scm_on_unwind_with_scm, scm_on_rewind_with_scm): New.
3437
3438 2004-01-05 Marius Vollmer <mvo@zagadka.de>
3439
3440 * ports.h, ports.c (scm_with_current_input_port,
3441 scm_with_current_output_port, scm_with_current_error_port): New.
3442
3443 * async.h, async.c (scm_with_blocked_asyncs,
3444 scm_with_unblocked_asyncs): New.
3445
3446 2004-01-03 Marius Vollmer <mvo@zagadka.de>
3447
3448 * dynwind.h, scm_dynwind.c (scm_t_frame_flags, scm_t_wind_flags,
3449 scm_begin_frame, scm_end_frame, scm_on_unwind, scm_on_rewind):
3450 New.
3451 (scm_dowinds, scm_i_dowinds): scm_dowinds has been renamed to
3452 scm_i_dowinds and extended to handle frames and to invoke a 'turn'
3453 function when the outermost wind point has been reached. The
3454 latter is used to copy a continuation stack at the right time.
3455 scm_dowinds remains available.
3456 (SCM_GUARDSP, SCM_BEFORE_GUARD, SCM_AFTER_GUARD, SCM_GUARD_DATA,
3457 tc16_guard, guards_print): Removed.
3458 (scm_internal_dynamic_wind): Reimplemented using frames.
3459
3460 * continuations.c (copy_stack): New, do only the stack copying
3461 part of copy_stack_and_call.
3462 (copy_stack_and_call): Copy the stack after unwinding and before
3463 rewinding.
3464 (scm_dynthrow): Do not call scm_dowinds, this is now done by
3465 copy_stack_and_call.
3466
3467 2004-01-04 Kevin Ryde <user42@zip.com.au>
3468
3469 * numbers.c (scm_less_p): Don't convert frac to float for compares,
3470 can give bad results due to rounding.
3471
3472 * stime.c (scm_current_time, scm_gettimeofday): Add a comment about
3473 setzone/restorezone protection for DOS.
3474
3475 2003-12-26 Marius Vollmer <mvo@zagadka.de>
3476
3477 * gen-scmconfig.h.in, gen-scmconfig.c: Arrange for scm_t_intmax
3478 and scm_t_uintmax to be defined in scmconfig.h
3479
3480 2003-12-03 Kevin Ryde <user42@zip.com.au>
3481
3482 * numbers.c (scm_less_p): Remove spurious xisnan from frac+big case.
3483
3484 * numbers.c (scm_make_ratio): Check for numerator equal to
3485 SCM_MOST_NEGATIVE_FIXNUM and bignum denominator the negative of that,
3486 giving integer -1.
3487
3488 * numbers.c (scm_real_part): Return fraction unchanged rather than
3489 converting to flonum.
3490
3491 2003-11-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
3492
3493 * modules.c (module_variable): Fixed (and thus simplified) the
3494 definition of SCM_BOUND_THING_P to reflect the fact that since
3495 after the 1.4 series of guile, obarrays only hold variable
3496 objects.
3497
3498 2003-11-30 Marius Vollmer <mvo@zagadka.de>
3499
3500 * numbers.c (scm_logand): It's "#b...", not "#\b...".
3501
3502 From Paul Jarc:
3503
3504 * read.c (scm_lreadr): Signal an error for invalid escape
3505 sequences in strings. Code cleanups too.
3506
3507 * print.c (scm_iprin1): use \xNN hexadecimal sequences when
3508 writing control characters in strings.
3509
3510 2003-11-21 Marius Vollmer <mvo@zagadka.de>
3511
3512 * ports.c (scm_drain_input): Bug fix: only access the port after
3513 checking that it indeed is one.
3514
3515 2003-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
3516
3517 * eval.c (s_bad_define): New static identifier.
3518
3519 (m_body): Fixed comment.
3520
3521 (scm_m_define): Don't generate memoized code for definitions that
3522 are not on the top level. As a consequence, no memoized code at
3523 all is generated for definitions any more: Top level definitions
3524 are executed immediately during memoization and internal
3525 definitions are handled separately in m_expand_body.
3526
3527 (scm_unmemocopy, unmemocopy): Removed code for unmemoizing
3528 definitions. Consequently, there is no unmemoizing code any more
3529 that might modify the environment. Thus, the old scm_unmemocopy
3530 is removed and the old unmemocopy is renamed to scm_unmemocopy.
3531
3532 (SCM_CEVAL): The SCM_IM_DEFINE keyword can no longer occur in
3533 memoized code. Call EVALCAR for continuations. Prefer !SCM_NULLP
3534 over SCM_NIMP in places, where the argument is known to be part of
3535 a proper list.
3536
3537 2003-11-21 Kevin Ryde <user42@zip.com.au>
3538
3539 * numbers.c (scm_abs): Allocate a new real only for negatives, as done
3540 for bignums.
3541
3542 * numbers.c (scm_bit_extract): Use mpz functions, rearrange inum case
3543 to share some shifting.
3544
3545 * numbers.c (scm_integer_expt): Don't mpz_init after scm_i_clonebig or
3546 scm_i_mkbig, since they do so already. Don't mpz_clear a bignum SCM,
3547 since gc does this.
3548
3549 2003-11-19 Marius Vollmer <mvo@zagadka.de>
3550
3551 * numbers.c (scm_make_ratio): Rewritten to have a simpler
3552 structure. Previously, not all cases with a negative denominator
3553 were covered.
3554
3555 * numbers.c (mem2decimal_from_point): use scm_divide instead of
3556 scm_divide2real when forming the fractional part. This allows
3557 "#e1.2" to yield 6/5.
3558
3559 * numbers.c (scm_i_fraction_equalp): Do not treat the return value
3560 of scm_equal_p as a C boolean, use SCM_FALSEP. Previously, all
3561 fractions were equal to each other regardless of value. Ooops.
3562
3563 * numbers.c (scm_rationalize): Return an inexact result when given
3564 inexact arguments.
3565
3566 * numbers.c (scm_exact_p, scm_inexact_p): Throw error for
3567 non-numbers.
3568
3569 2003-11-18 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3570
3571 Support for exact fractions from Bill Schottstaedt! Thanks!
3572
3573 * print.c (scm_iprin1): Handle fractions.
3574
3575 * objects.h (scm_class_fraction): New.
3576 * objects.c (scm_class_fraction): New.
3577 (scm_class_of): Handle fractions.
3578
3579 * hash.c (scm_hasher): Handle fractions.
3580
3581 * numbers.c: New code for handling fraction all over the place.
3582 (scm_odd_p, scm_even_p): Handle inexact integers.
3583 (scm_rational_p): New function, same as scm_real_p.
3584 (scm_round_number, scm_truncate_number, scm_ceiling, scm_floor):
3585 New exact functions that replace the inexact 'dsubr'
3586 implementations.
3587 (scm_numerator, scm_denominator): New.
3588
3589 * numbers.h (SCM_NUMP): Recognize fractions.
3590 (SCM_FRACTIONP, SCM_SLOPPY_FRACTIONP, SCM_FRACTION_NUMERATOR,
3591 SCM_FRACTION_DENOMINATOR, SCM_FRACTION_SET_NUMERATOR,
3592 SCM_FRACTION_SET_DENOMINATOR, SCM_FRACTION_REDUCED_BIT,
3593 SCM_FRACTION_REDUCED_SET, SCM_FRACTION_REDUCED_CLEAR,
3594 SCM_FRACTION_REDUCED): New.
3595 (scm_floor, scm_ceiling, scm_truncate_number, scm_round_number):
3596 New prototypes.
3597 (scm_make_ratio, scm_rationalize, scm_numerator, scm_denominator,
3598 scm_rational_p): New prototypes.
3599 (scm_i_dbl2num, scm_i_fraction2double, scm_i_fraction_equalp,
3600 scm_i_print_fraction): New prototypes.
3601
3602 * goops.c (create_standard_classes): Create "<fraction>" class.
3603
3604 * gc-mark.c (scm_gc_mark_dependencies): Handle fractions.
3605
3606 * gc-card.c (scm_i_sweep_card): Include scm_tc16_fraction as a
3607 case in the switch, but do nothing for now.
3608
3609 * eval.c (SCM_CEVAL, SCM_APPLY, call_dsubr_1): Convert fractions
3610 to doubles when calling 'dsubr' functions.
3611
3612 * eq.c (scm_eqv_p, scm_equal_p): Handle fractions.
3613
3614 2003-11-18 Rob Browning <rlb@defaultvalue.org>
3615
3616 * gen-scmconfig.c (main): remove public definition of
3617 SCM_SIZEOF___INT64 and SCM_SIZEOF_UNSIGNED___INT64 and add
3618 direct typedef of long_long and ulong_long inside deprecated block
3619 when appropriate.
3620
3621 * deprecated.h: move long_long and ulong_long definitions to
3622 gen-scmconfig.c so that we don't need to add SCM_SIZEOF___INT64
3623 and SCM_SIZEOF_UNSIGNED___INT64 to the public namespace.
3624
3625 2003-11-17 Marius Vollmer <mvo@zagadka.de>
3626
3627 * hash.c (scm_string_hash): New hashing algorithm that takes the
3628 complete string into account.
3629
3630 * eval.c (scm_m_generalized_set_x): Macroexpand the target when it
3631 is a list. This allows (@ ...) to work with set!.
3632 (scm_m_generalized_set_x): Use ASSERT_SYNTAX_2 instead of
3633 SCM_ASSYNT.
3634
3635 * script.c (scm_compile_shell_switches): Use scm_c_read_string for
3636 the "-e" option instead of scm_str2symbol. This allows things
3637 like (@ ...) to be specified for the entry point.
3638
3639 2003-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
3640
3641 * eval.c (scm_m_letstar): Create memoized code in place to
3642 minimize consing.
3643
3644 2003-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
3645
3646 * eval.c (s_splicing): Commented and reformulated.
3647
3648 (lookup_global_symbol, lookup_symbol): New static functions.
3649
3650 (s_test, s_bindings, s_duplicate_bindings, s_variable): Removed.
3651
3652 (try_macro_lookup, literal_p): Use lookup_symbol instead of
3653 creating a temporary pair for scm_lookupcar.
3654
3655 (scm_unmemocar, unmemocar): Renamed scm_unmemocar to unmemocar,
3656 created deprecated wrapper function scm_unmemocar.
3657
3658 (SCM_VALIDATE_NON_EMPTY_COMBINATION, scm_sym_else,
3659 scm_sym_unquote, scm_sym_uq_splicing, scm_sym_enter_frame,
3660 scm_sym_apply_frame, scm_sym_exit_frame, scm_sym_trace, f_apply,
3661 undefineds, sym_three_question_marks): Moved around without
3662 modifications.
3663
3664 * eval.c, eval.h (scm_macroexp, scm_unmemocar): Deprecated.
3665
3666 2003-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
3667
3668 * eval.c (try_macro_lookup, expand_user_macros, is_system_macro_p,
3669 m_expand_body, scm_m_expand_body): Grouped together with m_body.
3670 No further modifications.
3671
3672 2003-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
3673
3674 * eval.c (s_mixed_body_forms): New static identifier.
3675
3676 (canonicalize_define, scm_m_define): The check for a bad
3677 expression is performed in canonicalize_define now.
3678
3679 (try_macro_lookup, expand_user_macros, is_system_macro_p): New
3680 static helper functions for m_expand_body.
3681
3682 (m_expand_body): Use ASSERT_SYNTAX to signal syntax errors. Only
3683 expand user defined macros. Fixed handling of the definition/
3684 expression boundary. Fixed handling of definitions grouped with
3685 'begin. Use canonicalize_define to expand definitions.
3686
3687 2003-11-13 Marius Vollmer <mvo@zagadka.de>
3688
3689 * read.c (scm_lreadr): detect EOF after backslash, and interpret
3690 \xNN hexadecimal sequences. From Paul Jarc, thanks!
3691
3692 * snarf.h (SCM_SMOB, SCM_GLOBAL_SMOB, SCM_SMOB_MARK,
3693 SCM_GLOBAL_SMOB_MARK, SCM_SMOB_FREE, SCM_GLOBAL_SMOB_FREE,
3694 SCM_SMOB_PRINT, SCM_GLOBAL_SMOB_PRINT, SCM_SMOB_EQUALP,
3695 SCM_GLOBAL_SMOB_EQUALP, SCM_SMOB_APPLY, SCM_GLOBAL_SMOB_APPLY):
3696 New macros from Paul Jarc. Thanks!
3697
3698 * gc_os_dep.c (scm_get_stack_base): Provide a definition that
3699 return NULL when the machine type is unknown. Previously,
3700 gc_os_dep.c would refuse to compile.
3701
3702 2003-11-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
3703
3704 * eval.c (scm_m_body, m_body, scm_m_lambda, memoize_named_let,
3705 scm_m_let, scm_m_letrec, m_expand_body): Renamed static function
3706 scm_m_body to m_body.
3707
3708 2003-11-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
3709
3710 * eval.c, eval.h (scm_m_expand_body, m_expand_body): Deprecated
3711 public use of scm_m_expand_body in eval.h. In eval.c, renamed
3712 scm_m_expand_body to m_expand_body and made it static. Added
3713 deprecated wrapper scm_m_expand_body.
3714
3715 (scm_eval_body, SCM_CEVAL, SCM_APPLY): Use m_expand_body instead
3716 of scm_m_expand_body.
3717
3718 2003-11-09 Kevin Ryde <user42@zip.com.au>
3719
3720 * dynl.c (scm_dynamic_unlink): Need scm_list_1 on error message
3721 argument. Reported by Mike Gran.
3722
3723 2003-11-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
3724
3725 * eval.c (s_missing_body_expression): New static identifier.
3726
3727 (s_body): Removed.
3728
3729 (scm_m_expand_body): Fixed core dump when passing a body with
3730 defines, but without expressions (see additions to syntax.test).
3731 Use ASSERT_SYNTAX to signal syntax errors.
3732
3733 2003-11-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
3734
3735 * eval.c (canonicalize_define): New static helper function.
3736
3737 (memoize_define, canonicalize_define): Extract handling of
3738 function currying to canonicalize_define.
3739
3740 2003-11-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
3741
3742 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
3743 Make sure that error checking in debug mode is not worse than in
3744 standard mode.
3745
3746 2003-11-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
3747
3748 * eval.c (scm_m_body, scm_m_lambda): Documentation strings are not
3749 handled in scm_m_body any more, but rather in scm_m_lambda.
3750
3751 (scm_m_body, memoize_named_let, scm_m_let, scm_m_letstar,
3752 scm_m_letrec, scm_m_expand_body): Check for validity is done by
3753 calling functions of scm_m_body.
3754
3755 (scm_m_lambda): Avoid unnecessary consing when creating the
3756 memoized code.
3757
3758 2003-11-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
3759
3760 * eval.c (s_expression): Added comment.
3761
3762 (s_empty_combination, error_unbound_variable): New static
3763 identifiers.
3764
3765 (SCM_VALIDATE_NON_EMPTY_COMBINATION, SCM_EVALIM2, scm_lookupcar1):
3766 Use ASSERT_SYNTAX, syntax_error or error_unbound_variable to
3767 signal syntax errors.
3768
3769 (SCM_CEVAL): Separated handling of evaluator bytecodes and other
3770 scheme objects.
3771
3772 2003-10-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
3773
3774 * eval.c (unmemocar, sym_three_question_marks, scm_unmemocar):
3775 Grouped together with unmemocopy, without modifications.
3776
3777 (build_binding_list, unmemocopy): Renamed names of list arguments
3778 and variables to reflect the actual order of the list elements.
3779
3780 2003-10-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
3781
3782 * eval.c (s_defun): New static identifier.
3783
3784 (scm_m_nil_cond, scm_m_atfop, scm_m_undefine): Add comments. Use
3785 ASSERT_SYNTAX to signal syntax errors. Avoid unnecessary consing
3786 when creating the memoized code.
3787
3788 2003-10-19 Kevin Ryde <user42@zip.com.au>
3789
3790 * numbers.c (scm_ash): Revise docstring as per recent update to manual.
3791
3792 * numbers.c (scm_i_big2dbl): Rewrite, carefully rounding to "closest"
3793 in accordance with R5RS, which just mpz_get_d doesn't really give.
3794
3795 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
3796
3797 * eval.c (s_bad_slot_number): New static identifier.
3798
3799 (scm_m_atslot_ref, scm_m_atslot_set_x): Use ASSERT_SYNTAX to
3800 signal syntax errors. Avoid unnecessary consing when creating the
3801 memoized code.
3802
3803 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
3804
3805 * eval.c (scm_m_cont, scm_m_at_call_with_values,
3806 scm_m_generalized_set_x): Use ASSERT_SYNTAX to signal syntax
3807 errors. Avoid unnecessary consing when creating the memoized
3808 code.
3809
3810 (scm_m_generalized_set_x): Let scm_m_set_x handle the R5RS
3811 standard case. Make sure line and file information are copied to
3812 every created expression.
3813
3814 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
3815
3816 * eval.c (scm_m_set_x, scm_m_apply, scm_m_atbind): Use
3817 ASSERT_SYNTAX to signal syntax errors. Avoid unnecessary consing
3818 when creating the memoized code.
3819
3820 (scm_m_atbind): Reversed the order, in which the init expressions
3821 are stored and executed. The order of execution is now equal to
3822 the order in which the initializers of the let-forms are executed.
3823 Use check_bindings and transform_bindings.
3824
3825 (SCM_CEVAL): Eliminated SCM_NIMP in favor of more appropriate
3826 !SCM_NULLP. Added some comments.
3827
3828 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
3829
3830 * eval.c: Sorted include files alphabetically.
3831
3832 (scm_m_begin): Added comment.
3833
3834 (scm_m_or): Use ASSERT_SYNTAX to signal syntax errors. Avoid
3835 unnecessary consing when creating the memoized code.
3836
3837 (iqq, scm_m_quasiquote, scm_m_quote): Use ASSERT_SYNTAX to signal
3838 syntax errors. Be more specific about the kind of error that was
3839 detected.
3840
3841 (scm_m_quote, unmemocopy): As an optimization, vector constants
3842 are now inserted unquoted into the memoized code. During
3843 unmemoization the quotes are added again to provide syntactically
3844 correct code.
3845
3846 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
3847
3848 * eval.c (scm_m_let, scm_m_letstar, scm_m_letrec,
3849 scm_m_expand_body, check_bindings): Extracted syntax checking of
3850 bindings to new static function check_bindings.
3851
3852 (scm_m_let, memoize_named_let): Extracted handling of named let to
3853 new static function memoize_named_let.
3854
3855 (transform_bindings, scm_m_let, scm_m_letstar, scm_m_letrec): Use
3856 ASSERT_SYNTAX to signal syntax errors. Be more specific about the
3857 kind of error that was detected. Avoid use of SCM_CDRLOC. Avoid
3858 unnecessary consing when creating the memoized code.
3859
3860 2003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
3861
3862 * eval.c (s_bad_formals, s_bad_formal, s_duplicate_formal): New
3863 static identifiers.
3864
3865 (s_clauses, s_formals, s_duplicate_formals): Removed.
3866
3867 (scm_m_lambda): Use ASSERT_SYNTAX to signal syntax errors. Be more
3868 specific about the kind of error that was detected. Prepare for
3869 easier integration of changes for separated memoization.
3870
3871 2003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
3872
3873 * eval.c (s_duplicate_binding): New static identifier.
3874
3875 (scm_m_case): Call scm_c_memq instead of implementing it inline.
3876
3877 (scm_m_define): Added comment about how we check for duplicate
3878 formals.
3879
3880 (scm_m_do): Added check for duplicate bindings.
3881
3882 (scm_m_if): Use ASSERT_SYNTAX to signal syntax errors. Avoid
3883 unnecessary consing when creating the memoized code.
3884
3885 (scm_c_improper_memq, c_improper_memq, scm_m_lambda): Renamed
3886 scm_c_improper_memq to c_improper_memq, since it is not exported.
3887
3888 (transform_bindings): Call scm_c_memq rather than
3889 scm_c_improper_memq.
3890
3891 (SCM_CEVAL): Simplified handling of SCM_IM_IF forms.
3892
3893 2003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
3894
3895 * eval.c (s_bad_bindings, s_bad_binding, s_bad_exit_clause): New
3896 static identifiers.
3897
3898 (scm_m_do): Use ASSERT_SYNTAX to signal syntax errors. Be more
3899 specific about the kind of error that was detected. Avoid use of
3900 SCM_CDRLOC. Avoid unnecessary consing when creating the memoized
3901 code, this way also making sure that file name, line number
3902 information etc. remain available.
3903
3904 2003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
3905
3906 * eval.c (memoize_as_thunk_prototype): New static function.
3907
3908 (scm_m_delay, scm_m_future): Use memoize_as_thunk_prototype.
3909 Avoid unnecessary consing when creating the memoized code.
3910
3911 2003-10-12 Kevin Ryde <user42@zip.com.au>
3912
3913 * list.c (scm_append): Track argument number and use in error.
3914
3915 2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
3916
3917 * eval.c (s_missing_expression, s_bad_variable): New static
3918 identifiers.
3919
3920 (scm_m_define): Use ASSERT_SYNTAX to signal syntax errors. Prefer
3921 R5RS terminology for the naming of variables. Be more specific
3922 about the kind of error that was detected. Make sure file name,
3923 line number etc. are added to all freshly created expressions.
3924 Avoid unnecessary consing when creating the memoized code.
3925
3926 2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
3927
3928 * eval.c (s_extra_expression, s_misplaced_else_clause,
3929 s_bad_cond_clause, s_missing_recipient): New static identifiers.
3930
3931 (s_extra_case_clause): Removed.
3932
3933 (scm_m_case, scm_m_cond): If a clause appears after an else
3934 clause, report a misplaced else clause.
3935
3936 (scm_m_cond): Use ASSERT_SYNTAX to signal syntax errors. Be more
3937 specific about the kind of error that was detected. Handle bound
3938 'else and '=>. Avoid unnecessary consing when creating the
3939 memoized code.
3940
3941 (scm_m_cond, unmemocopy, SCM_CEVAL): Use SCM_IM_ELSE to memoize
3942 the syntactic keyword 'else and SCM_IM_ARROW to memoize the
3943 syntactic keyword '=>.
3944
3945 2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
3946
3947 * eval.c (scm_m_case): Allow empty lists of case labels.
3948
3949 2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
3950
3951 * tags.h (SCM_IM_ELSE, SCM_IM_ARROW): New memoizer codes.
3952
3953 * print.c (scm_isymnames): Add names for the new memoizer codes.
3954
3955 * eval.c (s_missing_clauses, s_bad_case_clause,
3956 s_extra_case_clause, s_bad_case_labels, s_duplicate_case_label,
3957 literal_p): New static identifiers.
3958
3959 (scm_m_case): Use ASSERT_SYNTAX to signal syntax errors. Be more
3960 specific about the kind of error that was detected. Check for
3961 duplicate case labels. Handle bound 'else. Avoid unnecessary
3962 consing when creating the memoized code.
3963
3964 (scm_m_case, unmemocopy, SCM_CEVAL): Use SCM_IM_ELSE to memoize
3965 the syntactic keyword 'else.
3966
3967 2003-10-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
3968
3969 * eval.c (s_bad_expression, syntax_error_key, syntax_error,
3970 ASSERT_SYNTAX, ASSERT_SYNTAX_2): New static identifiers.
3971
3972 (scm_m_and): Use ASSERT_SYNTAX to signal syntax errors. Avoid
3973 unnecessary consing when creating the memoized code.
3974
3975 2003-10-09 Kevin Ryde <user42@zip.com.au>
3976
3977 * numbers.c (scm_inexact_to_exact): Don't depend on what double->long
3978 cast gives for values bigger than a long, or for nan or inf.
3979
3980 2003-10-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
3981
3982 * smob.h (scm_make_smob_type): Made the declaration match the
3983 definition.
3984
3985 2003-10-07 Marius Vollmer <mvo@zagadka.de>
3986
3987 * goops.c, objects.h, smob.c, smob.h: Make type names char
3988 const * instead of char *. Thanks to Paul Jarc!
3989
3990 2003-10-02 Kevin Ryde <user42@zip.com.au>
3991
3992 * strports.c (scm_call_with_output_string): scm_get_output_string
3993 rather than scm_strport_to_string, so as to guard against the port
3994 having been closed by the called procedure. Reported by Nic Ferrier.
3995
3996 2003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
3997
3998 * numbers.h (SCM_INEXACTP): Removed uses of SCM_TYP16S.
3999
4000 * tags.h, deprecated.h (SCM_TYP16S): Deprecated and moved from
4001 tags.h to deprecated.h.
4002
4003 2003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
4004
4005 This set of patches introduces a new tc7 code scm_tc7_number for
4006 numbers. Bignums, reals and complex numbers are turned from smobs
4007 into subtypes of scm_tc7_number.
4008
4009 * tags.h (scm_tc7_number): New.
4010
4011 * eq.c (scm_equal_p), eval.c (SCM_CEVAL), evalext.c
4012 (scm_self_evaluating_p), gc-card.c (scm_i_sweep_card), gc-mark.c
4013 (scm_gc_mark_dependencies), goops.c (create_smob_classes), hash.c
4014 (scm_hasher), numbers.c, numbers.h (SCM_NUMP), objects.c
4015 (scm_class_of), print.c (scm_iprin1), smob.c
4016 (scm_smob_prehistory): Don't handle bignums, reals and complex
4017 numbers as subtypes of scm_tc7_smob any more.
4018
4019 * numbers.h, tags.h (scm_tc16_big, scm_tc16_real,
4020 scm_tc16_complex): Moved definitions from tags.h to numbers.h.
4021
4022 2003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
4023
4024 * numbers.c (scm_make_complex), gc-card.c (scm_i_sweep_card): Use
4025 sizeof (scm_t_complex) to determine the memory size of the
4026 malloc'd area for complex numbers.
4027
4028 2003-09-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
4029
4030 * numbers.c (scm_bigequal): Fixed.
4031
4032 2003-09-16 Marius Vollmer <mvo@zagadka.de>
4033
4034 * stime.c (scm_current_time): 'time' does not set errno so don't
4035 use SCM_SYSERROR for reporting errors.
4036
4037 2003-09-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
4038
4039 This set of patches eliminates the dependency between the
4040 implementation of evaluator specific memoization codes and special
4041 constants like #f, '() etc. ('flags'), which are not evaluator
4042 specific. The goal is to remove definitions of evaluator
4043 memoization codes completely from the public interface. This will
4044 make it possible to experiment more freely with optimizations of
4045 guile's internal representation of memoized code.
4046
4047 * objects.c (scm_class_of): Eliminate dependency on SCM_ISYMNUM.
4048
4049 * print.c (iflagnames): New array, holding the printed names of
4050 guile's special constants ('flags').
4051
4052 (scm_isymnames): Now holds only the printed names of the
4053 memoization codes.
4054
4055 (scm_iprin1): Separate the handling of memoization codes and
4056 guile's special constants.
4057
4058 * tags.h (scm_tc9_flag, SCM_ITAG9, SCM_MAKE_ITAG9, SCM_ITAG9_DATA,
4059 SCM_IFLAGNUM): new
4060
4061 (scm_tc8_char, scm_tc8_iloc, SCM_BOOL_F, SCM_BOOL_T,
4062 SCM_UNDEFINED, SCM_EOF_VAL, SCM_EOL, SCM_UNSPECIFIED, SCM_UNBOUND,
4063 SCM_ELISP_NIL, SCM_IM_DISPATCH, SCM_IM_SLOT_REF,
4064 SCM_IM_SLOT_SET_X, SCM_IM_DELAY, SCM_IM_FUTURE,
4065 SCM_IM_CALL_WITH_VALUES, SCM_IM_NIL_COND, SCM_IM_BIND): Changed
4066 values.
4067
4068 (SCM_IFLAGP): SCM_IFLAGP now only tests for flags.
4069
4070 (SCM_IFLAGP, SCM_MAKIFLAG, SCM_IFLAGNUM): Generalized to use the
4071 tc9 macros and scm_tc9_flag.
4072
4073 2003-09-15 Marius Vollmer <mvo@zagadka.de>
4074
4075 * posix.c (scm_setgroups): Check that the gid list is not too
4076 long. Thanks to Paul Jarc!
4077
4078 2003-09-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
4079
4080 * tags.h: Reduced the number of short instructions from 14 to 13.
4081 The typecode of the former 14th short instruction is now used to
4082 represent long instructions. Changed some comments to reflect
4083 this fact.
4084
4085 (SCM_MAKISYM): ISYMs get a new tc7 code, namely the one that was
4086 previously used by SCM_IM_DEFINE.
4087
4088 (SCM_IM_DEFINE): Turned into a long instruction.
4089
4090 * eval.c (unmemocopy, SCM_CEVAL): Treat SCM_IM_DEFINE as a long
4091 instruction.
4092
4093 * eval.c (SCM_CEVAL): Since characters and iflags have now a tc7
4094 code that is separate from all instructions, one level of dispatch
4095 for long instructions can be eliminated.
4096
4097 * print.c (scm_isymnames): Removed some commented code.
4098
4099 2003-09-12 Marius Vollmer <mvo@zagadka.de>
4100
4101 * __scm.h (SCM_FENCE): Use __memory_barrier with the Intel
4102 compiler on IA64.
4103
4104 * hashtab.h (scm_tc16_hashtable): Added "extern" declaration.
4105
4106 * modules.c (scm_module_reverse_lookup): Check that the obarray
4107 really is a hashtable and do nothing if not.
4108
4109 * inline.h: Use "extern inline" only with GCC. Use "static
4110 inline" else.
4111
4112 2003-09-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
4113
4114 * numbers.h (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Removed uses
4115 of SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
4116
4117 * numbers.h, deprecated.h (SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP,
4118 SCM_SLOPPY_COMPLEXP): Deprecated and moved from numbers.h to
4119 deprecated.h.
4120
4121 2003-09-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
4122
4123 * eq.c (scm_eqv_p, scm_equal_p): Removed uses of
4124 SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
4125
4126 * eq.c (scm_eqv_p, scm_equal_p): Reordered comparisons from
4127 0.0==some_expression to some_expression==0.0. The latter is
4128 better readable. The former is preferred by some people, since it
4129 leads to a compiler error when confusing == with =. However, when
4130 using gcc, a warning will be issued if in an if-statement an
4131 assigment appears. Since many Guile developers are using gcc,
4132 such errors will not remain unnoticed anyway. We can therefore
4133 focus on better readability.
4134
4135 2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
4136
4137 * tags.h: Added description of Guile's type system. Removed some
4138 old and misleading comments.
4139
4140 2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
4141
4142 * unit.c (scm_cvref): Eliminate unnecessary uses of SCM_NIMP,
4143 SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
4144
4145 2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
4146
4147 * numbers.h (SCM_MAKINUM): Define in terms of scm_tc2_int.
4148
4149 (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Define in terms of the
4150 respective SLOPPY macro.
4151
4152 2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
4153
4154 * eq.c (scm_equal_p): Use SCM_TYP7 to check if an object is of
4155 type string, not SCM_TYP7S.
4156
4157 2003-09-03 Kevin Ryde <user42@zip.com.au>
4158
4159 * numbers.c (scm_lognot): Correction to docstring, ones-complement not
4160 2s-complement.
4161
4162 * stime.c (scm_strptime): Add comment about glibc strptime %s and
4163 current timezone requiring SCM_DEFER_INTS.
4164
4165 2003-08-30 Neil Jerram <neil@ossau.uklinux.net>
4166
4167 * script.c (scm_compile_shell_switches): Make -s switch optional
4168 if file to be loaded does not begin with a `-'. (Thanks to Aaron
4169 VanDevender for the patch!)
4170
4171 2003-08-30 Kevin Ryde <user42@zip.com.au>
4172
4173 * numbers.c (scm_lognot): Rewrite using ~ and mpz_com, for directness
4174 and to have non-integer types rejected as per other logical funcs.
4175
4176 2003-08-28 Kevin Ryde <user42@zip.com.au>
4177
4178 * gc.h (scm_remember_upto_here_1): Revise comments on the asm form.
4179
4180 2003-08-23 Kevin Ryde <user42@zip.com.au>
4181
4182 * simpos.c (scm_system): Remove SCM_DEFER_INTS, system() should be
4183 thread safe, and could take a long time too.
4184
4185 2003-08-22 Kevin Ryde <user42@zip.com.au>
4186
4187 * numbers.c (scm_difference): Correction to bignum - negative inum.
4188
4189 2003-08-14 Kevin Ryde <user42@zip.com.au>
4190
4191 * gc.h (scm_remember_upto_here_1, scm_remember_upto_here_2)
4192 [__GNUC__]: Use volatile asm macros rather than a function call.
4193 * gc.c (scm_remember_upto_here_1, scm_remember_upto_here_2): Undefine
4194 macros while defining functions.
4195
4196 * simpos.c (getenv): Use <stdlib.h> for prototype.
4197 (scm_system): In docstring, refer to status:exit-val rather than
4198 "functions above".
4199
4200 2003-08-09 Kevin Ryde <user42@zip.com.au>
4201
4202 * srcprop.c (scm_source_properties): Return plist from hash if it's a
4203 list set by source-properties! rather than an SRCPROPS object,
4204
4205 2003-07-29 Kevin Ryde <user42@zip.com.au>
4206
4207 * properties.c (scm_primitive_property_ref): In docstring, note
4208 parameters to not-found-proc, use hyphens rather than underscores for
4209 that parameter name.
4210 (scm_primitive_property_set_x): In docstring, VAL is the value
4211 parameter not CODE.
4212
4213 2003-07-27 Marius Vollmer <mvo@zagadka.de>
4214
4215 * print.c (scm_print_symbol_name): handle more weird characters by
4216 escaping the symbol name properly. Thanks to Paul Jarc!
4217
4218 * posix.h (scm_setgroups): New prototype.
4219 * posix.c (scm_setgroups): New. Thanks to Paul Jarc!
4220 (scm_getgroups): Handle groups ids that don't fit into a fixnum.
4221 Don't use SCM_WRITABLE_VELTS.
4222
4223 * gc.h (SCM_GC_SET_CELL_BVEC): New.
4224 * gc-card.c (scm_i_init_card_freelist): Use it. Thanks to
4225 Matthias Koeppe!
4226
4227 * __scm.h (SCM_C_INLINE_KEYWORD): New.
4228 * numbers.c: Use it in place of SCM_C_INLINE so that the code
4229 compiles when SCM_C_INLINE is undefined.
4230
4231 2003-07-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
4232
4233 * __scm.h: Reformulated the architecture and compiler properties
4234 in terms of properties of scm_t_bits and SCM variables rather than
4235 in terms of c standard types. This is since it is not known which
4236 of the standard types scm_t_bits and SCM variables will be defined
4237 to.
4238
4239 2003-07-24 Kevin Ryde <user42@zip.com.au>
4240
4241 * numbers.c (scm_angle): Use scm_flo0 for non-negative inum, bignum
4242 and real.
4243
4244 2003-07-18 Kevin Ryde <user42@zip.com.au>
4245
4246 * numbers.c (scm_product): In complex * bignum, correction to
4247 REAL/IMAG fetch, x is the complex, not y.
4248
4249 2003-07-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4250
4251 * numbers.c (scm_odd_p, scm_even_p): Bugfix: Treat result of
4252 scm_inf_p test as Scheme values.
4253 (scm_sum): Bugfix: Normalize bignum created from a negative bignum
4254 and a positive inum.
4255 Use GNU indentation style.
4256
4257 2003-07-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
4258
4259 * values.c (scm_values): Build lists of length 1 by using
4260 scm_list_1 instead of using scm_cons.
4261
4262 2003-07-10 Kevin Ryde <user42@zip.com.au>
4263
4264 * deprecation.c (scm_c_issue_deprecation_warning_fmt): Add va_end.
4265 * list.c (scm_list_n): Ditto.
4266
4267 * gc-malloc.c (scm_gc_realloc): Define "ptr" at start of function.
4268
4269 2003-07-08 Matthias Koeppe <mkoeppe@merkur.math.uni-magdeburg.de>
4270
4271 * tags.h (scm_t_bits, scm_t_signed_bits, etc): Avoid solaris empty
4272 defines of INTPTR_MAX and UINTPTR_MAX, combine conditionals for
4273 scm_t_bits and scm_t_signed_bits to avoid any chance of one and not
4274 the other using intptr_t.
4275
4276 2003-07-08 Kevin Ryde <user42@zip.com.au>
4277
4278 * numbers.c (scm_make_polar): Use sincos, when available.
4279 (scm_magnitude): Use hypot.
4280
4281 * ports.c (scm_char_ready_p, scm_peek_char): In docstrings, don't use
4282 @footnote since it doesn't go through to guile-procedures.txt.
4283
4284 * threads.c (scm_call_with_new_thread): In docstring, use "( )"
4285 outside @var to quieten makeinfo, and use @code.
4286
4287 2003-07-06 Han-Wen Nienhuys <hanwen@cs.uu.nl>
4288
4289 * gc-malloc.c (decrease_mtrigger): new function
4290 (increase_mtrigger): new function, separate debug registering and
4291 mtrigger administration.
4292 (scm_gc_realloc): bugfix: do mtrigger administration before the
4293 actual realloc, for the realloc might invalidate a GC-d segment of
4294 memory. Thanks to Sam Hocevar for pointing this out.
4295 (scm_gc_realloc): use scm_malloc_reregister instead of
4296 unregistering and registering in sequence.
4297
4298 2003-07-03 Han-Wen Nienhuys <hanwen@cs.uu.nl>
4299
4300 * __scm.h (SCM_ASSERT): change "else" expansion to "do { } while (0)"
4301
4302 2003-07-02 Han-Wen Nienhuys <hanwen@cs.uu.nl>
4303
4304 * __scm.h (SCM_ASRTGO): add "else" to macro expansions with if
4305 clauses.
4306
4307 2003-06-29 Marius Vollmer <mvo@zagadka.de>
4308
4309 * deprecated.h (SCM_OPDIRP, scm_fport, scm_option, scm_srcprops,
4310 scm_srcprops_chunk, scm_info_frame, scm_stack, scm_array,
4311 scm_array_dim, SCM_ARRAY_CONTIGUOUS, SCM_FUNC_NAME, SCM_WTA,
4312 RETURN_SCM_WTA, SCM_VALIDATE_NUMBER_COPY,
4313 SCM_VALIDATE_NUMBER_DEF_COPY, SCM_VALIDATE_OPDIR): Re-added from
4314 the release_1_6 branch.
4315
4316 2003-06-25 Stefan Jahn <stefan@lkcc.org>
4317
4318 * continuations.c: Redeclaration of getcontext() via the
4319 __asm__ ("getcontext") directive.
4320
4321 * continuations.h: Include <ucontext.h> instead of
4322 <sys/ucontext.h>.
4323
4324 2003-06-21 Kevin Ryde <user42@zip.com.au>
4325
4326 * numbers.c (_GNU_SOURCE): #define, to get C99 things.
4327 (scm_asinh, scm_acosh, scm_atanh, scm_truncate, $asinh, $acosh,
4328 $atanh, truncate): Use C library asinh, acosh, atanh and trunc, when
4329 available.
4330 (scm_inexact_to_exact): Expand isfinite to its definition !xisinf.
4331 (isfinite): Remove, conflicts with C99 isfinite().
4332
4333 2003-06-19 Marius Vollmer <mvo@zagadka.de>
4334
4335 * deprecated.h, deprecated.c (scm_strhash, scm_sym2ovcell_soft,
4336 scm_sym2ovcell, scm_intern_obarray_soft, scm_intern_obarray,
4337 scm_symbol_value0, scm_string_to_obarray_symbol scm_intern_symbol,
4338 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned_p,
4339 scm_symbol_bound_p, scm_symbol_set_x, scm_gentemp): Re-added from
4340 the release_1_6 branch.
4341
4342 2003-06-14 Stefan Jahn <stefan@lkcc.org>
4343
4344 * threads.h: Redefined scm_getspecific() and scm_setspecific()
4345 to be functions instead of macros.
4346
4347 * threads.c: Conditionalized inclusion of <sys/time.h> and
4348 <unistd.h>.
4349 (scm_getspecific, scm_setspecific): Made these two function
4350 real part of the API.
4351
4352 * posix.c (s_scm_putenv): Added some code to make a
4353 (putenv "FOO="), i.e. setting an empty string, work also on
4354 Win32 systems. Thanks to Kevin Ryde for the proposal.
4355
4356 2003-06-12 Kevin Ryde <user42@zip.com.au>
4357
4358 * posix.c (scm_putenv): Free temporary ptr in mingw unset. Add
4359 freebsd to comment about need to use unsetenv.
4360
4361 2003-06-02 Marius Vollmer <mvo@zagadka.de>
4362
4363 * ports.c (scm_peek_char): Safe the column of the port around the
4364 getc/ungetc calls. Thanks to Dr. Peter Ivanyi!
4365
4366 2003-06-07 Kevin Ryde <user42@zip.com.au>
4367
4368 * tags.h: Use inttypes.h and stdint.h when available, for INTPTR_MAX
4369 and friends required by scm_t_bits setups.
4370
4371 2003-06-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
4372
4373 * tags.h (scm_tc2_int): Added.
4374
4375 * tags.h (scm_tc3_int_1, scm_tc3_int_2): Expressed in terms of
4376 scm_tc2_int.
4377
4378 * tags.h (scm_tcs_cons_imcar, scm_tcs_cons_nimcar, scm_tcs_struct,
4379 scm_tcs_closures): Hard coded values replaced by symbolic ones.
4380
4381 2003-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
4382
4383 * eval.c: Partially undid my patch from 2003-05-31. This patch
4384 caused the segfault referenced in the previous changelog entry.
4385
4386 2003-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
4387
4388 * tags.h: Fixed comment about the immediate type code layout.
4389
4390 * eval.c: Fixed handling of non-special instructions. Without
4391 this patch, guile will segfault on (#\0) and similar instructions.
4392
4393 2003-06-05 Kevin Ryde <user42@zip.com.au>
4394
4395 * numbers.c (scm_max, scm_min): For inum, bignum and real, if other
4396 operand is NaN, then return NaN. Also avoid passing NaN to mpz_cmp_d.
4397
4398 * read.c (scm_input_error): Pass arg list parameter to scm_error_scm,
4399 rather than SCM_EOL. Needed by "Unknown # object" case in scm_lreadr.
4400
4401 2003-06-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
4402
4403 * __scm.h, gc-card.c (SCM_DEBUG_DEBUGGER_SUPPORT,
4404 SCM_DEBUG_DEBUGGING_SUPPORT): Renamed macro
4405 SCM_DEBUG_DEBUGGER_SUPPORT to SCM_DEBUG_DEBUGGING_SUPPORT and
4406 generalized it to apply not only to C level functions but also to
4407 scheme level functions.
4408
4409 * debug.c, debug.h, eval.c (make-iloc, scm_make_iloc, iloc?,
4410 scm_iloc_p, dbg-make-iloc, scm_dbg_make_iloc, dbg-iloc?,
4411 scm_dbg_iloc_p): Moved functions scm_make_iloc, scm_iloc_p to
4412 eval.c, made them available under SCM_DEBUG_DEBUGGING_SUPPORT == 1
4413 only and renamed them to scm_dbg_make_iloc, scm_dbg_iloc_p,
4414 respectively.
4415
4416 * deprecated.h, eval.c, eval.h (SCM_ILOC00, SCM_IDINC,
4417 SCM_IDSTMSK): Deprecated. The macro definitions are moved from
4418 eval.h into eval.c and a copy is placed into deprecated.h.
4419
4420 * eval.c, eval.h (SCM_MAKE_ILOC): Removed from eval.h and placed
4421 into eval.c. This definition was not part of the API in any
4422 officially released version of guile and thus does not need to go
4423 through a phase of deprecation.
4424
4425 2003-06-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
4426
4427 * deprecated.c, deprecated.h, eval.c, eval.h (scm_s_expression,
4428 scm_s_test, scm_s_body, scm_s_bindings, scm_s_variable,
4429 scm_s_clauses, scm_s_formals): Deprecated. In eval.c the
4430 definitions are make static and renamed from scm_s_xxx to s_xxx.
4431 In deprecated.c the original definitions are copied.
4432
4433 * deprecated.h, eval.c, eval (SCM_EVALIM2, SCM_EVALIM, SCM_XEVAL,
4434 SCM_XEVALCAR): Deprecated. The macro definitions are moved from
4435 eval.h into eval.c and a copy (slightly modified to work in user
4436 code) is placed into deprecated.h.
4437
4438 * eval.c: Use the local static s_xxx definitions instead of the
4439 scm_s_xxx definitions throughout.
4440
4441 2003-06-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
4442
4443 This set of patches separates the representation of the cxr family
4444 of functions (car, cdr etc.) from the dsubr family of functions
4445 (i. e. functions that take a double precision floating point
4446 argument). Further, the algorithm for handling the cxr function
4447 is improved.
4448
4449 * eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_1), numbers.c
4450 (scm_asinh, scm_acosh, scm_atanh, scm_truncate, scm_round, floor,
4451 ceil, sqrt, fabs, exp, log, sin, cos, tan, asin, acos, atan, sinh,
4452 cosh, tanh), objects.c (scm_class_of), procprop.c
4453 (scm_i_procedure_arity), ramap.c (scm_array_map_x), tags.h
4454 (scm_tc7_dsubr, scm_tcs_subrs): Introduce scm_tc7_dsubr as new
4455 typecode for the dsubr family of functions.
4456
4457 * ramap.c (ramap_cxr, ramap_dsubr): Renamed ramap_cxr to
4458 ramap_dsubr.
4459
4460 * eval.c (SCM_CEVAL, SCM_APPLY, call_cxr_1), pairs.c
4461 (scm_init_pairs): Make use of the (now usable) second cell element
4462 of a scm_tc7_cxr function to implement the cxr family of functions
4463 more efficiently.
4464
4465 2003-05-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
4466
4467 * eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_0,
4468 scm_trampoline_1, scm_trampoline_2): Postpone error cases to the
4469 end of an if-else-if-sequence of checks.
4470
4471 2003-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
4472
4473 * eval.c (SCM_CEVAL): Improved readability of call-with-values
4474 execution. Generalize apply_closure to apply_proc and use that
4475 for call-with-values.
4476
4477 2003-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
4478
4479 * eval.c (SCM_CEVAL): Avoid one level of indirection when applying
4480 a non closure.
4481
4482 2003-05-30 Stefan Jahn <stefan@lkcc.org>
4483
4484 * posix.c (s_scm_putenv): Use the new HAVE_UNSETENV
4485 appropriately for mingw32 hosts.
4486
4487 * numbers.h: Defining copysign(), isnan() and finite() to
4488 be prefixed by a single '_' for mingw32 hosts.
4489
4490 2003-05-30 Kevin Ryde <user42@zip.com.au>
4491
4492 * numbers.c (z_negative_one): New variable.
4493 (scm_init_numbers): Initialize it.
4494 (scm_logcount): Use it and mpz_hamdist to count zeros for negatives.
4495
4496 2003-05-29 Stefan Jahn <stefan@lkcc.org>
4497
4498 * win32-dirent.c: Use malloc() instead of scm_malloc().
4499
4500 * stime.c (s_scm_strftime): Add a type cast to avoid compiler
4501 warning.
4502
4503 * posix.c (s_scm_putenv): Disable use of unsetenv() for the
4504 mingw32 build.
4505
4506 * modules.c (s_scm_module_import_interface): Renamed local
4507 variable interface to _interface. Seems like 'interface'
4508 is a special compiler directive for the mingw32 compiler.
4509
4510 * mkstemp.c: Provide prototype to avoid compiler warning.
4511
4512 * load.c (s_scm_search_path): Fixed absolute and relative
4513 path detections for native Windows platforms.
4514
4515 * gc.h, threads.h: Export some more symbols using SCM_API (necessary
4516 to build on mingw32).
4517
4518 * gc-freelist.c ("s_scm_map_free_list",
4519 "s_scm_gc_set_debug_check_freelist_x"): Fixed use of FUNC_NAME.
4520
4521 * fports.c (fport_fill_input): Disable use of
4522 fport_wait_for_input() on Win32 platforms.
4523
4524 * filesys.c (s_scm_basename): Fixed __MINGW32__ code.
4525
4526 * Makefile.am: Modified some rules for cross compiling.
4527
4528 2003-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
4529
4530 * eval.c (SCM_CEVAL): In case of an application, all checks for a
4531 proper function object and the correct number of arguments are now
4532 performed in the application part of SCM_CEVAL.
4533
4534 (scm_badformalsp): Removed.
4535
4536 2003-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
4537
4538 * deprecated.c (scm_read_and_eval_x): Fixed C99-ism.
4539
4540 2003-05-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4541
4542 * num2integral.i.c (NUM2INTEGRAL): Avoid warning about conditional
4543 always being false by inserting preprocessor conditional. (Thanks
4544 to Bruce Korb.)
4545
4546 * __scm.h (SCM_STACK_PTR): New macro. (Cast argument through
4547 (void *) in order to avoid an aliasing warning; thanks to Bruce
4548 Korb.)
4549
4550 * stackchk.h (SCM_STACK_OVERFLOW_P): Use SCM_STACK_PTR.
4551
4552 * threads.c (suspend, launch_thread, scm_threads_mark_stacks): Use
4553 SCM_STACK_PTR.
4554
4555 * threads.c (scm_threads_mark_stacks): Bugfix: Changed
4556 thread->base --> t->base.
4557
4558 * eval.c (SCM_CEVAL): Don't cast argument of SCM_STACK_OVERFLOW_P.
4559
4560 2003-05-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4561
4562 * deprecated.h, deprecated.c (scm_makstr, scm_makfromstr,
4563 scm_variable_set_name_hint, scm_builtin_variable,
4564 scm_internal_with_fluids, scm_make_gsubr,
4565 scm_make_gsubr_with_generic, scm_create_hook, SCM_LIST0,
4566 SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5, SCM_LIST6,
4567 SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify, scm_sloppy_memq,
4568 scm_sloppy_memv, scm_sloppy_member, scm_read_and_eval_x,
4569 scm_subr_entry, SCM_SUBR_DOC, scm_make_subr,
4570 scm_make_subr_with_generic, scm_make_subr_opt,
4571 scm_call_catching_errors, scm_make_smob_type_mfpe,
4572 scm_set_smob_mfpe, scm_strprint_obj, scm_read_0str, scm_eval_0str,
4573 SCM_CHARS, SCM_UCHARS, SCM_LENGTH): Re-added from the release_1_6
4574 branch. Some have been slightly rewritten.
4575 (scm_i_object_chars, scm_i_object_length): New, to support
4576 SCM_CHARS, SCM_UCHARS, and SCM_LENTH.
4577
4578 2003-05-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
4579
4580 * eval.c (scm_m_do, unmemocopy, SCM_CEVAL): Reversed order of
4581 names and inits in the memoized code of do.
4582
4583 2003-05-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4584
4585 * c-tokenize.lex (yyget_lineno, yyget_in, yyget_out, yyget_leng,
4586 yyget_text, yyset_lineno, yyset_in, yyset_out, yyget_debug,
4587 yyset_debug, yylex_destroy): Added prototypes (otherwise we'll get
4588 a compilation error if error-on-warning is enabled).
4589
4590 2003-05-17 Marius Vollmer <mvo@zagadka.de>
4591
4592 * c-tokenize.lex: Gobble up complete lines after a '#'. This
4593 removes preprocessor directives from the snarfage that might
4594 otherwise confuse us. These directives appear when compiling with
4595 "-g3", for example.
4596
4597 2003-05-16 Han-Wen Nienhuys <hanwen@cs.uu.nl>
4598
4599 * ChangeLog: add my surname
4600
4601 * srcprop.c (scm_finish_srcprop): use
4602 scm_gc_register_collectable_memory()
4603 (scm_make_srcprops): idem.
4604
4605 2003-05-14 Han-Wen Nienhuys <hanwen@cs.uu.nl>
4606
4607 * gc-malloc.c (scm_gc_register_collectable_memory): avoid
4608 wrap-around for scm_mtrigger
4609 (scm_gc_register_collectable_memory): abort on overflowing
4610 scm_mallocated().
4611
4612 2003-05-13 Kevin Ryde <user42@zip.com.au>
4613
4614 * numbers.c (xmpz_cmp_d): New macro, handling infs if gmp doesn't.
4615 (scm_num_eq_p, scm_less_p, scm_max, scm_min): Use it.
4616
4617 2003-05-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4618
4619 * backtrace.c (scm_display_error_message): Introduced fancy
4620 printing with max level 7 and length 10. (Purpose: avoid printing
4621 gigantic objects in error messages.)
4622
4623 * print.c, print.h (scm_i_port_with_print_state): New function.
4624
4625 * print.c (scm_iprin1, scm_printer_apply,
4626 scm_port_with_print_state): Use scm_i_port_with_print_state.
4627 (scm_simple_format): Modified not to destroy print states.
4628 (print_state_mutex): New mutex.
4629 (scm_make_print_state, scm_free_print_state, scm_prin1):
4630 Lock/unlock print_state_mutex.
4631
4632 * deprecated.h (SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK):
4633 Use current names in definitions.
4634
4635 2003-05-10 Kevin Ryde <user42@zip.com.au>
4636
4637 * numbers.c (scm_num_eq_p, scm_less_p): Don't pass NaN to mpz_cmp_d.
4638
4639 * numbers.c (scm_integer_length): On negative bignums, adjust
4640 mpz_sizeinbase to account for it looking at absolute value where we
4641 want ones-complement.
4642
4643 * numbers.c (scm_gcd): In bignum/inum, don't pass yy==0 to mpz_gcd_ui
4644 since we're only using the ulong return value, and x might not fit.
4645
4646 2003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
4647
4648 * eval.c, eval.h, read.c, read.h (scm_sym_dot): Moved from eval to
4649 read. This will allow to make the definition in read.c static.
4650
4651 2003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
4652
4653 * eval.c, eval.h, evalext.c, evalext.h (scm_m_undefine): Moved
4654 from evalext to eval. This will allow to make some of the
4655 definitions in eval.c static.
4656
4657 2003-05-06 Kevin Ryde <user42@zip.com.au>
4658
4659 * numbers.c (scm_difference): In inum - bignum, handle negative inum.
4660 (scm_logcount): Use mpz_com, not mpz_neg.
4661
4662 2003-05-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
4663
4664 The purpose of this patch is to make guile's internal memoizers
4665 distinguishable from memoizing macros created on the scheme level
4666 or from user provided primitive memoizing macros. The reason is,
4667 that the internal memoizers are the only ones that are allowed to
4668 transform their scheme input into memoizer byte code, while all
4669 other memoizing macros may only transform scheme code into new
4670 scheme code.
4671
4672 To achieve this, a new macro type 'builtin-macro!' is introduced.
4673 Currently, 'builtin-macro!'s are handled as memoizing macros, but
4674 this will change when the memoizer and executor are separated.
4675
4676 * macros.[ch] (scm_i_makbimacro): New.
4677
4678 * macros.h (SCM_BUILTIN_MACRO_P): New.
4679
4680 * macros.c (macro_print, scm_macro_type): Support builtin-macro!s.
4681
4682 * eval.c, goops.c: All of guile's primitive memoizing macros are
4683 primitive builtin-macros now.
4684
4685 * eval.c (scm_macroexp, SCM_CEVAL): Make sure the primitive
4686 builtin-macros are handled equally to memoizing macros.
4687
4688 2003-05-04 Marius Vollmer <mvo@zagadka.de>
4689
4690 * throw.c (scm_ithrow): Remove "asm volatile" hack. It used to
4691 work around a bug in GCC 2.95.2 but is now a bug in itself.
4692
4693 2003-05-02 Marius Vollmer <mvo@zagadka.de>
4694
4695 * deprecated.h (scm_rstate, scm_rng, SCM_SLOPPY_CONSP,
4696 SCM_SLOPPY_NCONSP, scm_tc7_ssymbol, scm_tc7_msymbol,
4697 scm_tcs_symbols): New.
4698
4699 2003-04-30 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4700
4701 * deprecated.h, deprecated.c (scm_protect_object,
4702 scm_unprotect_object, SCM_SETAND_CAR, SCM_SETOR_CAR,
4703 SCM_SET_AND_CDR, SCM_SET_OR_CDR, SCM_FREEP, SCM_NFREEP,
4704 SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16,
4705 SCM_GCCDR, scm_remember, scm_the_root_module, scm_make_module,
4706 scm_ensure_user_module, scm_load_scheme_module, scm_port,
4707 scm_ptob_descriptor, scm_port_rw_active,
4708 scm_close_all_ports_except): New.
4709
4710 * ports.c (scm_c_port_for_each): New function, mostly copied from
4711 scm_port_for_each.
4712 (scm_port_for_each): Reimplemented using scm_c_port_for_each.
4713 * ports.h (scm_c_port_for_each): New prototype.
4714
4715 2003-04-28 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4716
4717 * eval.c (scm_m_atdispatch): Removed until actually needed. (This
4718 macro was introduced in anticipation of GOOPS method compilation
4719 code.)
4720
4721 * goops.c: Removed binding of @dispatch.
4722
4723 2003-04-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
4724
4725 * eval.c, goops.c (@dispatch, @slot-ref, @slot-set!): Move the
4726 instructions that bind the macros on the scheme level back to
4727 goops.c in order to make sure again that the bindings go into the
4728 (oop goops) module and are not visible from the outside.
4729
4730 2003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
4731
4732 * eval.c: Non functional change: Separated R5RS and non-R5RS
4733 macros into different sections of the file and ordered the
4734 memoizers alphabetically.
4735
4736 2003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
4737
4738 * eval.c (scm_ilookup): Rewritten to improve readability.
4739
4740 2003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
4741
4742 * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2):
4743 Partially reverted patch from 2003-04-23 in oder to find a better
4744 compromise between readability and debuggability.
4745
4746 2003-04-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
4747
4748 * eval.c, eval.h, goops.c, goops.h (scm_m_atslot_ref,
4749 scm_m_atslot_set_x, scm_m_atdispatch): Move the declarations and
4750 definitions of the special goops memoizers from goops.[ch] to
4751 eval.[ch]. Hmm... it seems that scm_m_atdispatch is not used
4752 throughout guile.
4753
4754 2003-04-24 Mikael Djurfeldt <mdj@kvast.blakulla.net>
4755
4756 * ports.c, ports.h (scm_i_port_table_mutex): New mutex.
4757
4758 * fports.c (scm_evict_ports): Lock/unlock scm_i_port_table_mutex.
4759
4760 * ports.c (scm_close_port, scm_flush_all_ports): Ditto.
4761
4762 * ioext.c (scm_fdes_to_ports): Ditto.
4763
4764 * vports.c (scm_make_soft_port): Changed SCM_DEFER/ALLOW_INTS into
4765 lock/unlock scm_i_port_table_mutex.
4766
4767 * strports.c (scm_mkstrport): Ditto.
4768
4769 * ports.c (scm_void_port, scm_port_for_each): Ditto.
4770
4771 * fports.c (scm_fdes_to_port): Ditto.
4772
4773 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
4774
4775 This set of patches contains no functional changes, only debatable
4776 minor stylistic ones. Still, in order to prepare a patch between
4777 my local copy and the CVS version, I decided to submit the changes
4778 below. Then, the patch will hopefully only contain relevant
4779 modifications :-)
4780
4781 * eval.c (iqq): Added const specifier.
4782
4783 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
4784 Use NULL instead of 0 to indicate that a pointer is returned.
4785 Removed some misleading 'fall through' comments.
4786
4787 * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2):
4788 Split up long expressions into smaller ones to be more debugging
4789 friendly.
4790
4791 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
4792
4793 * eval.h (SCM_ENTER_FRAME_HDLR, SCM_APPLY_FRAME_HDLR,
4794 SCM_EXIT_FRAME_HDLR): Use SCM_PACK to convert data to a SCM value
4795 rather than casting to SCM.
4796
4797 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
4798
4799 * sort.c, pairs.h: Removed unnecessary includes.
4800
4801 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
4802
4803 * sort.c: Replaced hand-made trampline code by the new official
4804 mechanism from eval.c. This fixes a segfault in the new test file
4805 sort.test.
4806
4807 (quicksort, compare_function, scm_restricted_vector_sort_x,
4808 scm_sorted_p, scm_merge, scm_merge_list_x, scm_merge_x,
4809 scm_merge_list_step, scm_sort_x, scm_sort, scm_merge_vector_x,
4810 scm_merge_vector_step, scm_stable_sort_x, scm_stable_sort,
4811 scm_sort_list_x, scm_sort_list): Use trampoline mechanism from
4812 eval.c.
4813
4814 (subr2less, lsubrless, closureless, applyless, scm_cmp_function,
4815 cmp_fun_t): Removed.
4816
4817 (compare_function): Added.
4818
4819 * sort.c (quicksort, SWAP, stack_node): Replaced pointer
4820 arithmetics with index arithmetics. Changed quicksort to work on
4821 an array of SCM values instead of an array of characters. Avoid
4822 bytewise copying of SCM elements. Avoid allocating memory on the
4823 stack with alloca. Fixed some comments.
4824
4825 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
4826
4827 * eval.c (EXTEND_ENV): Eliminated.
4828
4829 (unmemocopy, SCM_CEVAL, SCM_APPLY): Use SCM_EXTEND_ENV instead of
4830 EXTEND_ENV.
4831
4832 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
4833
4834 * __scm.h (SCM_DEBUG_DEBUGGER_SUPPORT): New compile-time option.
4835
4836 * gc.card.c (scm_gc_marked_p): Fixed compiler warning when
4837 compiling with SCM_DEBUG==1 by moving definition behind prototype.
4838
4839 * gc.card.c (scm_dbg_t_list_cell, scm_dbg_t_double_cell,
4840 scm_dbg_gc_marked_p, scm_dbg_gc_get_card, scm_dbg_gc_get_bvec,
4841 scm_t_list_cell_struct, scm_t_list_cell, scm_t_double_cell,
4842 scm_gc_marked_p, scm_gc_get_card, scm_gc_get_bvec): Fixed
4843 functions such that they check if the object is a non-immediate.
4844 Further, renamed identifiers to use the scm_dbg_ prefix and made
4845 their inclusion into the lib dependent of the
4846 SCM_DEBUG_DEBUGGER_SUPPORT compile time option.
4847
4848 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
4849
4850 * __scm.h: Fixed comment about the SCM_DEBUG_TYPING_STRICTNESS
4851 debug option.
4852
4853 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
4854
4855 * list.c (scm_ilength, scm_last_pair), unif.c (l2ra): Prefer
4856 !SCM_CONSP over SCM_NCONSP. Now, guile itself does not include
4857 any calls to SCM_NCONSP any more.
4858
4859 * unif.c (l2ra): Eliminate redundant check.
4860
4861 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
4862
4863 * list.c (scm_cons_star), ramap.c (scm_ra_sum, scm_ra_product,
4864 scm_array_map_x), unif.c (l2ra): Prefer !SCM_NULLP over
4865 SCM_NNULLP. Now, guile itself does not include any calls to
4866 SCM_NNULLP any more.
4867
4868 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
4869
4870 * eval.c (unmemocopy, SCM_APPLY, scm_map, scm_for_each,
4871 scm_copy_tree): Place assignment expressions which are part of
4872 other expressions into an expression of their own.
4873
4874 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
4875
4876 * goops.c (TEST_CHANGE_CLASS, scm_sys_initialize_object): Don't
4877 compare SCM values with !=.
4878
4879 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
4880
4881 * eval.c, eval.h, evalext.c, evalext.h (scm_sym_setter,
4882 scm_m_generalized_set_x, scm_init_evalext): Move the declaration
4883 and definition of the memoizer for the generalized set! macro from
4884 evalext.[ch] to eval.[ch]. Use the SCM_SYNTAX snarfer macro to
4885 define the macro object.
4886
4887 * eval.c, eval.h (s_set_x, scm_s_set_x, scm_m_set_x,
4888 scm_m_generalized_set_x): Since now scm_s_set_x is only used in
4889 eval.c, it is made static and renamed to s_set_x.
4890
4891 * evalext.c (scm_defined_p, scm_m_undefine): Prefer !SCM_<foo>
4892 over SCM_N<foo>.
4893
4894 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
4895
4896 * eval.c, root.h (scm_undefineds, SCM_NUM_PROTECTS, undefineds,
4897 scm_init_eval): Made scm_undefineds static in eval.c, renamed it
4898 to undefineds and registered the object as a permanent object.
4899
4900 * eval.c, eval.h (scm_f_apply, scm_init_eval): Made scm_f_apply
4901 static in eval.c, renamed it to f_apply and registered the object
4902 as a permanent object.
4903
4904 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
4905
4906 * eval.c (SCM_BIT7, SCM_BIT8, unmemocopy, SCM_CEVAL): Renamed
4907 file-local macro SCM_BIT8 to SCM_BIT7, which is more appropriate.
4908
4909 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
4910
4911 * numbers.c (scm_logtest): Fixed argument bug in the call to
4912 mpz_and, which showed up when compiling with SCM_DEBUG defined.
4913
4914 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
4915
4916 * gc-card.c (scm_i_sweep_card, scm_i_init_card_freelist): Fixed
4917 type errors that showed up when compiling with SCM_DEBUG defined.
4918
4919 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
4920
4921 * continuations.c, continuations.h, eval.c, eval.h, extensions.c,
4922 gsubr.c, guile.c, init.c, read.c, root.c, root.h, stackchk.h,
4923 throw.c: Removed uses of DEBUG_EXTENSIONS and DYNAMIC_LINKING to
4924 fix compile errors with --disable-deprecated.
4925
4926 2003-04-17 Rob Browning <rlb@defaultvalue.org>
4927
4928 * numbers.c (scm_integer_expt): fix case where we were declaring
4929 vars in the middle of a statement block. Thanks to Thamer
4930 Al-Harbash.
4931
4932 2003-04-17 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4933
4934 * goops.c (TEST_CHANGE_CLASS): Update variable class after class
4935 change.
4936
4937 * eq.c (scm_eqv_p): Turned into a primitive generic.
4938
4939 2003-04-16 Rob Browning <rlb@defaultvalue.org>
4940
4941 * gc_os_dep.c: Added patch for UnixWare and OpenUNIX support.
4942 Thanks to Boyd Gerber.
4943 Added check for __arm__ in addition to arm for LINUX and copied
4944 __s390__ defines from upstream libgc. Thanks to James Treacy for
4945 reporting the problems.
4946
4947 * numbers.c (PTRDIFF_MIN): use SCM_CHAR_BIT.
4948
4949 * socket.c: use SCM_CHAR_BIT.
4950
4951 * random.c (scm_c_random_bignum): use SCM_CHAR_BIT.
4952
4953 * num2integral.i.c (NUM2INTEGRAL): use SCM_CHAR_BIT.
4954
4955 2003-04-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
4956
4957 * feature.c (scm_init_feature): Always add threads feature.
4958
4959 2003-04-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4960
4961 * goops.c (scm_sys_fast_slot_ref): Use SCM_SLOT instead of
4962 scm_at_assert_bound_ref. (We don't want the unbound check. See
4963 oop/goops/active-slot.scm.)
4964
4965 2003-04-14 Rob Browning <rlb@defaultvalue.org>
4966
4967 * tags.h: scm_t_intptr should have been intptr_t.
4968
4969 2003-04-13 Rob Browning <rlb@defaultvalue.org>
4970
4971 * __scm.h (SCM_FLUSH_REGISTER_WINDOWS): don't just rely on "sparc"
4972 test. Instead use
4973 #if defined (sparc) || defined (__sparc__) || defined (__sparc)
4974 as gc_os_dep.c suggests is appropriate.
4975
4976 * goops.c (prep_hashsets): make static to match prototype.
4977 (scm_sym_args): SCM_SYMBOL -> SCM_GLOBAL_SYMBOL. Thanks to Albert
4978 Chin.
4979
4980 * c-tokenize.lex: remove trailing comma from enum. Thanks to
4981 Albert Chin.
4982
4983 * gc_os_dep.c: add NetBSD powerpc config info. Thanks to Thomas
4984 Klausner.
4985
4986 2003-04-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4987
4988 * goops.c (scm_sys_prep_layout_x): Instance allocation is now
4989 indicated through extra fields in getters-n-setters.
4990 (scm_add_slot): Adapted to new format of getters_n_setters slot.
4991 (Thanks to Andy Wingo.)
4992
4993 2003-02-25 Han-Wen Nienhuys <hanwen@cs.uu.nl>
4994
4995 * gc-segment.c: add comment
4996
4997 2003-04-07 Rob Browning <rlb@defaultvalue.org>
4998
4999 * debug.h: change "id" arg name to "info_id" to avoid objective-c
5000 clash.
5001
5002 * num2integral.i.c (NUM2INTEGRAL): fix bug pointed out by Mikael
5003 and add regression test to standalone/.
5004
5005 2003-04-06 Rob Browning <rlb@defaultvalue.org>
5006
5007 * strings.c (scm_mem2string): use memcpy rather than by-hand loop.
5008 Thanks to Dale P. Smith.
5009
5010 * random.c: #include gmp.h.
5011 (scm_c_random_bignum): normalize result on return.
5012
5013 * init.c: #include gmp.h.
5014
5015 * numbers.h: remove the gmp.h #include (not needed now).
5016
5017 * posix.h: change occurences of "id" to something else so we don't
5018 cause trouble when included via objective-c (can't hurt, might
5019 help). Still have usage in debug.h, though.
5020
5021 2003-04-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5022
5023 * random.c (scm_c_random_bignum): Don't generate a random number
5024 equal to m (the second argument of scm_c_random_bignum); only
5025 generate numbers in the range 0 <= r < m.
5026 (scm_c_default_rstate): Use SCM_VARIABLE_REF to access
5027 scm_var_random_state.
5028
5029 * num2integral.i.c (INTEGRAL2BIG): Put negation of n inside then
5030 clause.
5031
5032 2003-04-05 Rob Browning <rlb@defaultvalue.org>
5033
5034 * modules.c (scm_module_import_interface): move declaration of
5035 uses before any code.
5036
5037 2003-04-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5038
5039 * Makefile.am (scmconfig.h): Look for config.h in top_builddir,
5040 not top_srcdir.
5041
5042 * hashtab.c (rehash_after_gc): Clear to_rehash list before
5043 processing it in order to avoid an infinite loop.
5044
5045 * print.c (scm_prin1): Remember old state of pstate->writingp.
5046
5047 2003-04-05 Marius Vollmer <mvo@zagadka.de>
5048
5049 * Changed license terms to the plain LGPL thru-out.
5050
5051 2003-04-04 Rob Browning <rlb@defaultvalue.org>
5052
5053 * socket.c (FLIPCPY_NET_HOST_128): new macro.
5054 (ipv6_net_to_num, ipv6_num_to_net, bignum_in_ipv6_range_p):
5055 rewrite to handle GMP bignums.
5056
5057
5058 * random.c (scm_c_random_bignum): rewrite to handle GMP bignums.
5059
5060 * ports.c (scm_getc): minor tweak.
5061
5062 * numbers.h: remove SCM_BIGDIG conditionals, reorganize, and
5063 rewrite to handle GMP bignums.
5064
5065 * numbers.c: rewrite *many* functions to handle GMP bignums.
5066
5067 * num2integral.i.c (NUM2INTEGRAL, INTEGRAL2NUM, INTEGRAL2BIG):
5068 handle GMP bignums.
5069
5070 * num2float.i.c (NUM2FLOAT): handle GMP bignums.
5071
5072 * init.c (check_config): remove SCM_BIGDIG conditionals.
5073 (scm_init_guile_1): test to make sure mpz_t fits in a double_cell.
5074
5075 * gc-card.c ("sweep_card"): handle new mpz_t bignums.
5076
5077 * eval.c: remove SCM_BIGDIG conditionals.
5078
5079 * eq.c (s_scm_eqv_p): scm_i_bigcomp -> scm_i_bigcmp.
5080
5081 2003-03-31 Rob Browning <rlb@defaultvalue.org>
5082
5083 * Makefile.am (scmconfig.h): change srcdir to builddir. (Thanks
5084 to Kevin Ryde.)
5085
5086 2003-03-27 Rob Browning <rlb@defaultvalue.org>
5087
5088 * threads.h: fix various preprocessor usages of new public
5089 symbols to expect 0 or 1 values rather than 1 or undefined.
5090 i.e. change #ifdef to #if, etc.
5091
5092 * threads.c: fix various preprocessor usages of new public
5093 symbols to expect 0 or 1 values rather than 1 or undefined.
5094 i.e. change #ifdef to #if, etc.
5095
5096 * tags.h: fix various preprocessor usages of new public
5097 symbols to expect 0 or 1 values rather than 1 or undefined.
5098 i.e. change #ifdef to #if, etc.
5099
5100 * stacks.c: fix various preprocessor usages of new public
5101 symbols to expect 0 or 1 values rather than 1 or undefined.
5102 i.e. change #ifdef to #if, etc.
5103
5104 * stackchk.h: fix various preprocessor usages of new public
5105 symbols to expect 0 or 1 values rather than 1 or undefined.
5106 i.e. change #ifdef to #if, etc.
5107
5108 * stackchk.c: fix various preprocessor usages of new public
5109 symbols to expect 0 or 1 values rather than 1 or undefined.
5110 i.e. change #ifdef to #if, etc.
5111
5112 * sort.c: fix various preprocessor usages of new public
5113 symbols to expect 0 or 1 values rather than 1 or undefined.
5114 i.e. change #ifdef to #if, etc.
5115
5116 * read.c: fix various preprocessor usages of new public
5117 symbols to expect 0 or 1 values rather than 1 or undefined.
5118 i.e. change #ifdef to #if, etc.
5119
5120 * random.c: fix various preprocessor usages of new public
5121 symbols to expect 0 or 1 values rather than 1 or undefined.
5122 i.e. change #ifdef to #if, etc.
5123
5124 * print.c: fix various preprocessor usages of new public
5125 symbols to expect 0 or 1 values rather than 1 or undefined.
5126 i.e. change #ifdef to #if, etc.
5127
5128 * objects.c: fix various preprocessor usages of new public
5129 symbols to expect 0 or 1 values rather than 1 or undefined.
5130 i.e. change #ifdef to #if, etc.
5131
5132 * numbers.h: fix various preprocessor usages of new public
5133 symbols to expect 0 or 1 values rather than 1 or undefined.
5134 i.e. change #ifdef to #if, etc.
5135
5136 * null-threads.c: fix various preprocessor usages of new public
5137 symbols to expect 0 or 1 values rather than 1 or undefined.
5138 i.e. change #ifdef to #if, etc.
5139
5140 * lang.c: fix various preprocessor usages of new public
5141 symbols to expect 0 or 1 values rather than 1 or undefined.
5142 i.e. change #ifdef to #if, etc.
5143
5144 * lang.h: fix various preprocessor usages of new public
5145 symbols to expect 0 or 1 values rather than 1 or undefined.
5146 i.e. change #ifdef to #if, etc.
5147
5148 * iselect.h: fix various preprocessor usages of new public
5149 symbols to expect 0 or 1 values rather than 1 or undefined.
5150 i.e. change #ifdef to #if, etc.
5151
5152 * init.c: fix various preprocessor usages of new public
5153 symbols to expect 0 or 1 values rather than 1 or undefined.
5154 i.e. change #ifdef to #if, etc.
5155
5156 * gh_data.c: fix various preprocessor usages of new public
5157 symbols to expect 0 or 1 values rather than 1 or undefined.
5158 i.e. change #ifdef to #if, etc.
5159
5160 * gh.h: fix various preprocessor usages of new public
5161 symbols to expect 0 or 1 values rather than 1 or undefined.
5162 i.e. change #ifdef to #if, etc.
5163
5164 * gen-scmconfig.c: change most new public symbols to be defined to
5165 0 or 1 rather than being either 1 or undefined.
5166
5167 * gc_os_dep.c: fix various preprocessor usages of new public
5168 symbols to expect 0 or 1 values rather than 1 or undefined.
5169 i.e. change #ifdef to #if, etc.
5170 (STACK_GROWS_DOWN): define to 0 or 1 rather than 1 or undef.
5171
5172 * gc.h: fix various preprocessor usages of new public
5173 symbols to expect 0 or 1 values rather than 1 or undefined.
5174 i.e. change #ifdef to #if, etc.
5175
5176 * gc-card.c: fix various preprocessor usages of new public
5177 symbols to expect 0 or 1 values rather than 1 or undefined.
5178 i.e. change #ifdef to #if, etc.
5179
5180 * gc-mark.c: fix various preprocessor usages of new public
5181 symbols to expect 0 or 1 values rather than 1 or undefined.
5182 i.e. change #ifdef to #if, etc.
5183
5184 * feature.c: fix various preprocessor usages of new public
5185 symbols to expect 0 or 1 values rather than 1 or undefined.
5186 i.e. change #ifdef to #if, etc.
5187
5188 * evalext.c: fix various preprocessor usages of new public
5189 symbols to expect 0 or 1 values rather than 1 or undefined.
5190 i.e. change #ifdef to #if, etc.
5191
5192 * eval.h: fix various preprocessor usages of new public
5193 symbols to expect 0 or 1 values rather than 1 or undefined.
5194 i.e. change #ifdef to #if, etc.
5195
5196 * eval.c: fix various preprocessor usages of new public
5197 symbols to expect 0 or 1 values rather than 1 or undefined.
5198 i.e. change #ifdef to #if, etc.
5199
5200 * eq.c: fix various preprocessor usages of new public
5201 symbols to expect 0 or 1 values rather than 1 or undefined.
5202 i.e. change #ifdef to #if, etc.
5203
5204 * coop.c: fix various preprocessor usages of new public
5205 symbols to expect 0 or 1 values rather than 1 or undefined.
5206 i.e. change #ifdef to #if, etc.
5207
5208 * coop-threads.c: fix various preprocessor usages of new public
5209 symbols to expect 0 or 1 values rather than 1 or undefined.
5210 i.e. change #ifdef to #if, etc.
5211
5212 * coop-pthreads.c: fix various preprocessor usages of new public
5213 symbols to expect 0 or 1 values rather than 1 or undefined.
5214 i.e. change #ifdef to #if, etc.
5215
5216 * coop-defs.h: fix various preprocessor usages of new public
5217 symbols to expect 0 or 1 values rather than 1 or undefined.
5218 i.e. change #ifdef to #if, etc.
5219
5220 * convert.i.c: fix various preprocessor usages of new public
5221 symbols to expect 0 or 1 values rather than 1 or undefined.
5222 i.e. change #ifdef to #if, etc.
5223
5224 * continuations.c: fix various preprocessor usages of new public
5225 symbols to expect 0 or 1 values rather than 1 or undefined.
5226 i.e. change #ifdef to #if, etc.
5227
5228 * _scm.h: fix various preprocessor usages of new public symbols to
5229 expect 0 or 1 values rather than 1 or undefined. i.e. change
5230 #ifdef to #if, etc.
5231
5232 2003-03-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
5233
5234 * init.c (scm_init_guile_1): Call scm_i_init_deprecated.
5235
5236 * deprecated.c, deprecated.h: New files, to collect deprecated
5237 things in one place.
5238 * Makefile.am: Added them in all the right places.
5239
5240 * Makefile.am (EXTRA_DIST): Added "scmconfig.h.top".
5241 (scmconfig.h): Get "scmconfig.h.top" from $(srcdir) so that VPATH
5242 builds work.
5243 (DOT_X_FILES): Removed "iselect.x".
5244 (DOT_DOC_FILES): Removed "iselect.doc".
5245
5246 2003-03-25 Rob Browning <rlb@defaultvalue.org>
5247
5248 * win32-socket.h: #include "libguile/__scm.h". Replace usage of
5249 HAVE_WINSOCK2_H with SCM_HAVE_WINSOCK2_H.
5250
5251 * win32-socket.c: #include <config.h> if HAVE_CONFIG_H.
5252
5253 * vports.c: #include <config.h> if HAVE_CONFIG_H.
5254
5255 * unif.c: #include <config.h> if HAVE_CONFIG_H. Replace usage of
5256 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
5257
5258 * threads.h: replace usage of struct timespect with
5259 scm_t_timespec. Replace usage of USE_PTHREAD_THREADS with
5260 SCM_USE_PTHREAD_THREADS. Remove typedef for struct timespec in
5261 favor of scm_t_timespec from scmconfig.h.
5262
5263 * threads.c: move libguile/_scm.h include to the top so we pick up
5264 any critical defines like _GNU_SOURCE early. Replace usage of
5265 struct timespect with scm_t_timespec. Replace usage of
5266 STACK_GROWS_UP with SCM_STACK_GROWS_UP. Replace usage of
5267 USE_PTHREAD_THREADS with SCM_USE_PTHREAD_THREADS.
5268
5269 * threads-plugin.h: replace usage of struct timespect with
5270 scm_t_timespec.
5271
5272 * threads-plugin.c: #include <config.h> if HAVE_CONFIG_H. Replace
5273 usage of struct timespect with scm_t_timespec.
5274
5275 * tags.h: move HAVE_STDINT_H handling to scmconfig.h. Move
5276 HAVE_INTTYPES_H handling to scmconfig.h. #include
5277 "libguile/__scm.h". Rework handling for scm_t_bits,
5278 scm_t_signed_bits, SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
5279 SCM_T_SIGNED_BITS_MIN, and SIZEOF_SCM_T_BITS to use scm_t_intptr,
5280 scm_t_uintptr, SCM_SIZEOF_INTPTR_T, and SCM_SIZEOF_UINTPTR_T, and
5281 SCM_SIZEOF_UNSIGNED_LONG. Rename usage of HAVE_ARRAYS to
5282 SCM_HAVE_ARRAYS.
5283
5284 * symbols.c: #include <config.h> if HAVE_CONFIG_H.
5285
5286 * struct.c: #include <config.h> if HAVE_CONFIG_H.
5287
5288 * strports.c: #include <config.h> if HAVE_CONFIG_H.
5289
5290 * strop.c: #include <config.h> if HAVE_CONFIG_H.
5291
5292 * stime.h: move handling of time related headers to scmconfig.h.
5293
5294 * stime.c: #include <config.h> if HAVE_CONFIG_H.
5295
5296 * stacks.c: replace usage of STACK_GROWS_UP with
5297 SCM_STACK_GROWS_UP.
5298
5299 * sort.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
5300 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5301
5302 * socket.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
5303 of uint32 and HAVE_UINT_32 with scm_t_int32.
5304
5305 * smob.c: #include <config.h> if HAVE_CONFIG_H.
5306
5307 * simpos.c: #include <config.h> if HAVE_CONFIG_H.
5308
5309 * script.c: #include <config.h> if HAVE_CONFIG_H.
5310
5311 * scmsigs.c: #include <config.h> if HAVE_CONFIG_H.
5312
5313 * scmconfig.h.top: new file -- preamble for scmconfig.h.
5314
5315 * rw.c: #include <config.h> if HAVE_CONFIG_H.
5316
5317 * regex-posix.c: #include <config.h> if HAVE_CONFIG_H.
5318
5319 * read.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5320
5321 * rdelim.c: #include <config.h> if HAVE_CONFIG_H.
5322
5323 * random.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
5324 of LONG32, LONG64, SIZEOF_LONG, and HAVE_LONG_LONGS with
5325 scm_t_int32, scm_t_int64, and SCM_HAVE_T_INT64. Rename usage of
5326 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5327
5328 * ramap.c: replace usage of HAVE_LONG_LONGS with
5329 "SCM_SIZEOF_LONG_LONG != 0".
5330
5331 * putenv.c: #include <config.h> if HAVE_CONFIG_H. #include
5332 "libguile/scmconfig.h".
5333
5334 * pthread-threads.c: #include <config.h> if HAVE_CONFIG_H.
5335
5336 * print.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5337 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
5338
5339 * posix.c: #include <config.h> if HAVE_CONFIG_H.
5340
5341 * ports.c: #include <config.h> if HAVE_CONFIG_H.
5342
5343 * objects.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5344
5345 * numbers.h: replace usage of HAVE_FLOATINGPOINT_H with
5346 SCM_HAVE_FLOATINGPOINT_H. Replace usage of HAVE_IEEEFP_H with
5347 SCM_HAVE_IEEEFP_H. Replace usage of HAVE_NAN_H with
5348 SCM_HAVE_NAN_H. Replace usage of STDC_HEADERS with
5349 SCM_HAVE_STDC_HEADERS. Replace usage of ptrdiff_t with
5350 scm_t_ptrdiff. Replace usage of HAVE_LONG_LONGS with
5351 "SCM_SIZEOF_LONG_LONG != 0".
5352
5353 * numbers.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
5354 of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0". Replace
5355 usage of ptrdiff_t with scm_t_ptrdiff. Replace usage of
5356 SIZEOF_PTRDIFF_T with SCM_SIZEOF_SCM_T_PTRDIFF.
5357
5358 * num2integral.i.c: #include <config.h> if HAVE_CONFIG_H.
5359
5360 * null-threads.h: replace usage of struct timespect with
5361 scm_t_timespec.
5362
5363 * net_db.c: #include <config.h> if HAVE_CONFIG_H.
5364
5365 * mkstemp.c: #include <config.h> if HAVE_CONFIG_H. #include
5366 "libguile/__scm.h". Remove definition of gcc_uint64_t in favor of
5367 scm_t_uint64 and rename usages.
5368
5369 * mallocs.c: #include <config.h> if HAVE_CONFIG_H.
5370
5371 * load.c: #include <config.h> if HAVE_CONFIG_H.
5372
5373 * iselect.h: move handling of time related headers to scmconfig.h.
5374 Rename usage of HAVE_SYS_SELECT_H to SCM_HAVE_SYS_SELECT_H.
5375 Rename usage of HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Rename
5376 usage of USE_COOP_THREADS to SCM_USE_COOP_THREADS.
5377
5378 * iselect.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
5379 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
5380 USE_NULL_THREADS to SCM_USE_NULL_THREADS.
5381
5382 * ioext.c: #include <config.h> if HAVE_CONFIG_H.
5383
5384 * inline.h: #include "libguile/__scm.h" at the top. Change code
5385 to use SCM_C_INLINE and SCM_INLINE_C_INCLUDINT_INLINE_H to decide
5386 what to do instead of creating a new public #define. Rename usage
5387 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
5388 USE_NULL_THREADS to SCM_USE_NULL_THREADS. Rename usage of
5389 USE_COPT_THREADS to SCM_USE_COPT_THREADS.
5390
5391 * inline.c: rearrange handling -- now we just #define
5392 SCM_INLINE_C_INCLUDING_INLINE_H to 1 and #include
5393 "libguile/inline.h". scmconfig.h will define SCM_C_INLINE as
5394 appropriate, and we use that in inline.h along with the above
5395 define to determine how to respond.
5396
5397 * init.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
5398 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5399
5400 * guile.c: #include <config.h> if HAVE_CONFIG_H.
5401
5402 * gh_data.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
5403 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5404
5405 * gh.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5406
5407 * gen-scmconfig.h.in: new file -- see gen-scmconfig.c for details.
5408
5409 * gen-scmconfig.c: new file -- see comments in file for details.
5410
5411 * gdbinit.c: #include <config.h> if HAVE_CONFIG_H.
5412
5413 * gc_os_dep.c: #include <config.h> if HAVE_CONFIG_H. Replace
5414 usage of STACK_GROWS_UP with SCM_STACK_GROWS_UP.
5415
5416 * gc.h: replace usage of SIZEOF_LONG with
5417 SCM_SIZEOF_UNSIGNED_LONG. Replace usage of USE_PTHREAD_THREADS
5418 with SCM_USE_PTHREAD_THREADS. Remove SCM_SIZEOF_LONG definition
5419 since we handle that in scmconfig.h now.
5420
5421 * gc.c: #include <config.h> if HAVE_CONFIG_H.
5422
5423 * gc-mark.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
5424 of HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of
5425 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
5426
5427 * gc-malloc.c: #include <config.h> if HAVE_CONFIG_H.
5428
5429 * gc-card.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5430 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
5431
5432 * fports.c: #include <config.h> if HAVE_CONFIG_H.
5433
5434 * filesys.c: #include <config.h> if HAVE_CONFIG_H.
5435
5436 * feature.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
5437 of USE_NULL_THREADS to SCM_USE_NULL_THREADS.
5438
5439 * extensions.c: #include <config.h> if HAVE_CONFIG_H.
5440
5441 * evalext.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5442 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
5443
5444 * eval.c: #include <config.h> if HAVE_CONFIG_H. #include
5445 "libguile/__scm.h" rather than scmconfig.h. Rename usage of
5446 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
5447 with "SCM_SIZEOF_LONG_LONG != 0".
5448
5449 * error.c: #include <config.h> if HAVE_CONFIG_H.
5450
5451 * eq.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
5452 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
5453 with "SCM_SIZEOF_LONG_LONG != 0".
5454
5455 * deprecation.c: #include <config.h> if HAVE_CONFIG_H.
5456
5457 * coop.c: replace usage of struct timespect with scm_t_timespec.
5458 #include <config.h> if HAVE_CONFIG_H.
5459
5460 * coop-threads.c: #include "libguile/_scm.h" early. Replace
5461 usage of struct timespect with scm_t_timespec. Replace usage of
5462 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
5463
5464 * coop-pthreads.c: #include "libguile/_scm.h" early. Replace
5465 usage of struct timespect with scm_t_timespec. Replace usage of
5466 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
5467
5468 * coop-defs.h: move handling of time related headers to
5469 scmconfig.h. Add #include "libguile/__scm.h". Rename usage of
5470 HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Replace usage of struct
5471 timespect with scm_t_timespec.
5472
5473 * convert.i.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5474
5475 * convert.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5476
5477 * convert.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
5478 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5479
5480 * continuations.c: move libguile/_scm.h include to the top so we
5481 pick up any critical defines like _GNU_SOURCE early.
5482
5483 * backtrace.c: #include <config.h> if HAVE_CONFIG_H.
5484
5485 * async.c: #include <config.h> if HAVE_CONFIG_H.
5486
5487 * alloca.c: #include <config.h> if HAVE_CONFIG_H.
5488
5489 * _scm.h: #include <config.h> if HAVE_CONFIG_H.
5490 Rename usage of USE_PTHREAD_THREADS to SCM_USE_PTHREAD_THREADS.
5491
5492 * __scm.h: move libguile/scmconfig.h include up to the top, so
5493 we're sure to pick up any critical defines like _GNU_SOURCE early.
5494 #include <limits.h> removed in favor of scmconfig.h inclusion when
5495 appropriate. STDC_HEADERS based inclusion of stdlib.h,
5496 sys/types.h, stddef.h, and sys/stdtypes.h removed in favor of
5497 scmconfig.h inclusion when appropriate. Various Win32 related
5498 definitions removed in favor of scmconfig.h inclusion when
5499 appropriate.
5500 (HAVE_UINTPTR_T): definition removed (see NEWS).
5501 (SIZEOF_PTRDIFF_T): definition removed (see NEWS).
5502 (HAVE_LONG_LONGS): definition removed (see NEWS).
5503 (HAVE_LONG_LONG): definition removed (see NEWS).
5504 (HAVE_PTRDIFF_T): definition removed (see NEWS).
5505
5506 * Makefile.am: scmconfig.h is now generated by building and
5507 running gen-scmconfig.h and capturing its output. gen-scmconfig
5508 uses config.h and the configure.in generated gen-scmconfig.h to
5509 decide what to output. See gen-scmconfig.c for details.
5510 (noinst_PROGRAMS): add gen-scmconfig.
5511 (gen_scmconfig_SOURCES): new variable.
5512 (gen-scmconfig.$(OBJEXT)): new target - be careful to handle
5513 cross-compiling right.
5514 (scmconfig.h): build scmconfig.h from gen-scmconfig's output.
5515 (BUILT_SOURCES): add scmconfig.h.
5516
5517 2003-03-19 Marius Vollmer <mvo@zagadka.de>
5518
5519 * gc_os_dep.c: Added defines for sparc-unknown-netbsdelf1.5 from
5520 Adrian Bunk. Thanks!
5521
5522 2003-03-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5523
5524 * goops.c (make_class_from_template): New fourth arg:
5525 applicablep.
5526 (scm_class_extended_generic_with_setter, scm_class_self): Fixed
5527 cpls.
5528
5529 * smob.c (scm_set_smob_apply): Call scm_i_inherit_applicable.
5530
5531 * goops.c, objects.c, objects.h (scm_make_extended_class): New
5532 second arg: applicablep.
5533 (scm_i_inherit_applicable): New function.
5534
5535 * goops.c, goops.h (scm_class_applicable,
5536 scm_class_extended_accessor): New classes.
5537
5538 2003-03-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5539
5540 * procs.c (scm_procedure_documentation): Removed redundant
5541 SCM_NIMP test and replaced other calls to SCM_IMP by more explicit
5542 predicates.
5543
5544 2003-03-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5545
5546 * list.c, list.h (scm_filter, scm_filter_x): New functions.
5547
5548 * modules.c (scm_module_import_interface): New function.
5549
5550 * goops.c, goops.h (scm_class_accessor_method): Renamed from
5551 scm_class_accessor.
5552 (scm_class_accessor): New class.
5553
5554 2003-03-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5555
5556 * goops.c (scm_primitive_generic_generic): Enable primitive
5557 generic if not enabled.
5558 (scm_sys_goops_loaded): Setup unextended primitive generics.
5559
5560 * goops.c, goops.h (scm_c_extend_primitive_generic): New function.
5561
5562 * snarf.h (SCM_PRIMITIVE_GENERIC, SCM_PRIMITIVE_GENERIC_1): New
5563 snarf macros.
5564
5565 * numbers.c (scm_abs): Use SCM_PRIMITIVE_GENERIC. (This is only a
5566 testing example. All uses of SCM_GPROC should be converted.)
5567
5568 * procprop.c (scm_stand_in_scm_proc): Use scm_assq instead of
5569 scm_assoc.
5570
5571 * eq.c (scm_equal_p): Turned into a primitive generic.
5572
5573 2003-02-27 Rob Browning <rlb@defaultvalue.org>
5574
5575 * Makefile.am (scmconfig.h): new target -- generate file from
5576 ../config.h.
5577 (modinclude_HEADERS): remove version.h.
5578 (nodist_modinclude_HEADERS): add version.h.
5579
5580 2003-02-24 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5581
5582 This fixes a serious GC bug, introduced during the latest
5583 reorganization of the GC, which disabled freeing of structs and
5584 GOOPS objects:
5585
5586 * struct.c (scm_struct_prehistory): Init scm_i_structs_to_free to
5587 SCM_EOL.
5588 (scm_struct_prehistory): Move scm_free_structs to
5589 scm_before_mark_c_hook.
5590
5591 * gc-card.c (sweep_card): Check that we haven't swept structs on
5592 this card before. That can happen if scm_i_sweep_all_segments has
5593 been called from some other place than scm_igc.
5594
5595 2003-02-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5596
5597 * environments.c (DEFAULT_OBARRAY_SIZE): Changed from 137 to 31
5598 (since hash tables now adapt their size).
5599
5600 * modules.c (scm_modules_prehistory): Changed from 2001 to 1533
5601 (current number of prehistory bindings; hashtable code will select
5602 a prime which is greater than this value).
5603
5604 * symbols.c (scm_symbols_prehistory): Changed from 1009 to 2139
5605 (current number of initial symbols).
5606
5607 * properties.c (scm_init_properties): Don't specify size of
5608 scm_properties_whash.
5609
5610 * objprop.c (scm_init_objprop): Don't specify size of
5611 scm_object_whash.
5612
5613 * keywords.c (scm_init_keywords): Don't specify a hash table size.
5614
5615 * hooks.c (scm_c_hook_add): Fixed bug in append mode.
5616
5617 The following changes introduce the use of resizable hash tables
5618 throughout Guile. It also renames the old *-hash-table* functions
5619 to *-alist-vector* and places them, together with the rest of the
5620 weak vector support, in the module (ice-9 weak-vector). We should
5621 probably introduce a new, better, API for weak references, for
5622 example "weak pairs" a la MIT-Scheme. (In Chez scheme, they even
5623 look like and are used like ordinary pairs.)
5624
5625 * environments.c (obarray_enter, obarray_retrieve, obarray_remove,
5626 leaf_environment_fold, obarray_remove_all): Use hashtable
5627 accessors.
5628
5629 * gc.c (scm_init_storage): Moved hook initialization to
5630 scm_storage_prehistory.
5631 (scm_storage_prehistory): New function.
5632 (scm_igc): Added commentary about placement of
5633 scm_after_sweep_c_hook.
5634
5635 * gc-mark.c (scm_mark_all): Use hashtable accessors.
5636 (scm_gc_mark_dependencies): Use SCM_WVECT_WEAK_KEY_P and
5637 SCM_WVECT_WEAK_VALUE_P.
5638
5639 * hashtab.c, hashtab.h (scm_hash_for_each, scm_hash_map): New
5640 functions.
5641 (scm_vector_to_hash_table, scm_c_make_resizing_hash_table):
5642 Removed.
5643 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table,
5644 scm_make_doubly_weak_hash_table): Moved here from weaks.c.
5645
5646 * init.c (scm_init_guile_1): Removed call to scm_init_weaks; Added
5647 calls to scm_storage_prehistory and scm_hashtab_prehistory.
5648
5649 * modules.c (module-reverse-lookup): Use hashtable accessors.
5650
5651 * symbols.c, symbols.h (scm_i_hash_symbol): New function.
5652
5653 * weaks.c, weaks.h (scm_make_weak_key_alist_vector,
5654 scm_make_weak_value_alist_vector,
5655 scm_make_doubly_weak_alist_vector): New functions.
5656
5657 * weaks.c (scm_init_weaks_builtins): New function.
5658
5659 * weaks.h (SCM_WVECTF_WEAK_KEY, SCM_WVECTF_WEAK_VALUE,
5660 SCM_WVECTF_NOSCAN, SCM_WVECT_WEAK_KEY_P, SCM_WVECT_WEAK_VALUE_P,
5661 SCM_WVECT_NOSCAN_P): New macros.
5662
5663 * weaks.c (scm_scan_weak_vectors): Use SCM_WVECT_WEAK_KEY_P
5664 and SCM_WVECT_WEAK_VALUE_P.
5665
5666 * weaks.c, weaks.h (scm_i_allocate_weak_vector): Renamed from
5667 allocate_weak_vector and exported.
5668
5669 2003-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5670
5671 * hashtab.c: Undid thread safety. (We decided that it's better to
5672 let the user explicitly protect the tables (or not) according what
5673 is suitable for the application.)
5674
5675 2003-02-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5676
5677 * hashtab.c (scm_hash_fn_remove_x, scm_internal_hash_fold): Made
5678 thread safe and handle resizing tables.
5679 (scm_ihashx, scm_sloppy_assx, scm_delx_x): Removed
5680 SCM_DEFER/ALLOW_INTS.
5681
5682 2003-02-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5683
5684 * hashtab.c (scm_vector_to_hash_table,
5685 scm_c_make_resizing_hash_table, scm_make_hash_table): New
5686 functions.
5687 (scm_hash_fn_get_handle, scm_hash_fn_create_handle_x): Made thread
5688 safe and handle resizing tables.
5689
5690 * weaks.c (scm_make_weak_key_hash_table,
5691 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
5692 Size argument made optional. Return resizable table if not
5693 specified.
5694
5695 2003-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5696
5697 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
5698 Fixed formals tests for closures. (Thanks to Kevin Ryde.)
5699
5700 2003-02-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5701
5702 * debug.c (scm_procedure_source): Handle all objects for which
5703 procedure? is #t. (Thanks to Bill Schottstaedt.)
5704
5705 2003-01-23 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5706
5707 * futures.c (mark_futures): Don't need to mark data of recycled
5708 futures.
5709 (scan_futures, cleanup_undead): Be smarter about marking
5710 futures---avoid unnecessary passes through future lists.
5711
5712 * futures.h, futures.c: New files; Introduced recycling of
5713 futures. For fine-grained threading this lifts performance to
5714 another level. We can now use parallelization in inner loops of
5715 Guile programs without impossible overhead.
5716
5717 * threads.h, threads.c: Moved futures to their own file.
5718
5719 * Makefile.am (libguile_la_SOURCES): Added futures.c.
5720 (DOT_X_FILES): Added futures.x.
5721 (DOT_DOC_FILES): Added futures.doc.
5722 (modinclude_HEADERS): Added futures.h.
5723
5724 * threads.c, threads.h (scm_i_create_thread): Renamed from
5725 create_thread and made global.
5726
5727 * futures.c (scm_make_future): New procedure.
5728
5729 * eval.c: #include "libguile/futures.h".
5730
5731 * init.c: #include "futures.h"
5732 (scm_init_guile_1): Call scm_init_futures.
5733
5734 * stime.c (SCM_TIME_UNITS_PER_SECOND): Renamed from CLKTCK.
5735
5736 * stime.h (SCM_TIME_UNITS_PER_SECOND): Definition moved here.
5737
5738 * eval.c, eval.h (scm_trampoline_0, scm_i_call_closure_0): New
5739 functions.
5740
5741 * eval.c (scm_trampoline_1): Fixed arguments test for closures.
5742
5743 2003-01-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5744
5745 * threads.c (create_thread): Don't unwind dynwind chain of parent
5746 thread before creation. Just start the new thread with an empty
5747 dynwind chain.
5748
5749 2003-01-20 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5750
5751 * evalext.c, evalext.h (scm_self_evaluating_p): New function.
5752
5753 2003-01-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5754
5755 * threads.c (scm_timed_wait_condition_variable): Support timed
5756 waiting also for simple condition variables.
5757
5758 * goops.c (TEST_CHANGE_CLASS): Use scm_change_object_class instead
5759 of calling the procedure change-object-class.
5760
5761 2003-01-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5762
5763 * ramap.c (scm_ramapc): Typo in error message.
5764
5765 2003-01-08 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5766
5767 * goops.c (scm_sys_prep_layout_x): Bugfix: Only create layout for
5768 slots with instance allocation.
5769
5770 * goops.c, goops.h (scm_class_extended_generic_with_setter): New
5771 class.
5772 (scm_compute_applicable_methods): Use scm_generic_function_methods.
5773
5774 * goops.c (scm_generic_function_methods): Support extended
5775 generic functions.
5776
5777 2002-12-29 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5778
5779 * eval.c (unmemocopy): Bugfix: scm_sym_delay --> scm_sym_future.
5780 Thanks to Neil for pointing this out!
5781
5782 2002-12-29 Neil Jerram <neil@ossau.uklinux.net>
5783
5784 * lang.h: Remove declarations matching definitions removed from
5785 lang.c (just below).
5786
5787 2002-12-28 Neil Jerram <neil@ossau.uklinux.net>
5788
5789 * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null,
5790 scm_m_while, scm_nil_eq): Remove definitions that were superfluous
5791 and already commented out.
5792
5793 * read.h (scm_lreadparen), read.c (scm_lreadr, scm_read_token,
5794 scm_lreadparen): Support reading vectors with Elisp syntax if
5795 SCM_ELISP_READ_EXTENSIONS is defined. (SCM_ELISP_READ_EXTENSIONS
5796 is not currently defined, and there isn't even a configure switch
5797 to enable it yet.)
5798
5799 2002-12-26 Marius Vollmer <mvo@zagadka.ping.de>
5800
5801 * Makefile.am (c-tokenize.o): Refer to source via $< so that vpath
5802 builds work.
5803 (EXTRA_DIST): Added version.h.in.
5804
5805 2002-12-21 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5806
5807 This change makes it possible for one thread to do lazy sweeping
5808 while other threads are running. Now only the mark phase need to
5809 have all threads asleep. We should look further into this issue.
5810 Presently, I've put the locking of scm_i_sweep_mutex at
5811 "conservative" places due to my current lack of knowledge about
5812 the garbage collector. Please feel free to restrict these regions
5813 further to allow for maximal parallelism!
5814
5815 * gc.c, gc.h (scm_i_sweep_mutex): New mutex.
5816
5817 * gc.c (scm_gc_for_newcell), gc-malloc.c (scm_realloc,
5818 scm_gc_register_collectable_memory): Substitute locking of
5819 scm_i_sweep_mutex for calls to scm_i_thread_put_to_sleep.
5820 (scm_igc): Lock sweep mutex here instead of in callers; Calls to
5821 scm_i_thread_put_to_sleep/scm_i_thread_wake_up used to demarkate
5822 the single-thread section (which now only contains the mark
5823 phase).
5824 (scm_gc): Don't lock sweeo mutex here since scm_igc locks it;
5825 Removed SCM_DEFER/ALLOW_INTS. Simply call scm_igc directly.
5826
5827 * threads.c (gc_section_mutex): Removed.
5828
5829 2002-12-19 Mikael Djurfeldt <mdj@kvast.blakulla.net>
5830
5831 * threads.c (create_thread): Clear parent field in root state in
5832 order not to unnecessarily remember dead threads.
5833
5834 * eval.c (call_subr2o_1, call_lsubr2_2): New functions.
5835 (scm_trampoline_1, scm_trampoline_2): Use them.
5836
5837 2002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
5838
5839 Partial introduction of real plugin interface.
5840
5841 * Makefile.am (modinclude_HEADERS): Added threads-plugin.h.
5842 (EXTRA_DIST): Added threads-plugin.c.
5843
5844 * threads-plugin.h, threads-plugin.c: New files.
5845
5846 * threads.h: #include "libguile/threads-plugin.h".
5847
5848 * threads.c: #include "libguile/threads-plugin.c".
5849
5850 * pthread-threads.c: Temporarily remove debugging functions.
5851
5852 * threads.c, threads.h (scm_yield): Added back.
5853
5854 2002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
5855
5856 * threads.c (really_launch): Detach before unlocking
5857 thread_admin_mutex in order not to risk being joined.
5858 (scm_i_thread_put_to_sleep, scm_i_thread_wake_up): Keep
5859 thread_admin_mutex locked during GC.
5860
5861 * pthread-threads.c, pthread-threads.h: Improvements to debugging
5862 functions.
5863
5864 2002-12-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
5865
5866 * pthread-threads.c, pthread-threads.h (SCM_DEBUG_THREADS): Added
5867 support for debugging mutex operations.
5868
5869 * threads.c (scm_thread): Removed filed joining_threads.
5870 (thread_print): Print thread number as well as address of thread
5871 structure.
5872 (scm_join_thread): Bugfix.
5873 (scm_lock_mutex, scm_try_mutex, scm_unlock_mutex,
5874 scm_timed_wait_condition_variable, scm_signal_condition_variable,
5875 scm_broadcast_condition_variable): Use the low-level API.
5876 (scm_all_threads): Return copy of thread list (to prevent
5877 unintended destruction).
5878 (scm_threads_prehistory): Initialize heap_mutex of fake thread.
5879
5880 * pthread-threads.c, pthread-threads.h, threads.c: Fixes to
5881 pthread "native" recursive mutex support.
5882
5883 2002-12-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5884
5885 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): New definitions.
5886 Simply lock a thread C API recursive mutex.
5887 (SCM_NONREC_CRITICAL_SECTION_START,
5888 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
5889 SCM_REC_CRITICAL_SECTION_END): Removed.
5890
5891 * eval.c: Replaced SOURCE_SECTION_START / SOURCE_SECTION_END with
5892 direct calls to scm_rec_mutex_lock / unlock around the three calls
5893 to scm_m_expand_body.
5894
5895 * eval.c, eval.h (promise_free): New function.
5896 (scm_force): Rewritten; Now thread-safe; Removed
5897 SCM_DEFER/ALLOW_INTS.
5898
5899 * pthread-threads.h: Added partially implemented plugin interface
5900 for recursive mutexes. These are, for now, only intended to be
5901 used internally within the Guile implementation.
5902
5903 * pthread-threads.c: New file.
5904
5905 * threads.c: Conditionally #include "pthread-threads.c".
5906
5907 * eval.c, eval.h (scm_makprom, scm_force): Rewritten to be
5908 thread-safe;
5909
5910 * snarf.h (SCM_MUTEX, SCM_GLOBAL_MUTEX, SCM_REC_MUTEX,
5911 SCM_GLOBAL_REC_MUTEX): New macros.
5912
5913 * eval.c, threads.c, threads.h, snarf.h: Rewrote critical section
5914 macros---use mutexes instead.
5915
5916 * tags.h (SCM_IM_FUTURE): New tag.
5917
5918 * eval.c (scm_m_future): New primitive macro.
5919 (SCM_CEVAL): Support futures.
5920 (unmemocopy): Support unmemoization of futures.
5921
5922 * print.c (scm_isymnames): Name of future isym.
5923
5924 * version.c: Unmade some changes to my private copy that got
5925 committed by mistake.
5926
5927 2002-12-11 Mikael Djurfeldt <mdj@kvast.blakulla.net>
5928
5929 * gc-malloc.c, gc.h, init.c: Reverted gc-malloc change of
5930 2002-12-10.
5931
5932 * gc.c (scm_igc): Don't call scm_i_thread_invalidate_freelists.
5933
5934 * gc.c (scm_gc_sweep): Call it here instead, which is a more
5935 logical place.
5936
5937 * threads.c (create_thread): Remember root object until the handle
5938 of the new thread is on all_threads list.
5939
5940 * root.c (scm_make_root): Moved copying of fluids until after
5941 creation of root handle so that the fluids are GC protected. Also
5942 removed the critical section.
5943
5944 2002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
5945
5946 * gc-malloc.c, gc.h (scm_gc_malloc_prehistory): New function.
5947
5948 * gc-malloc.c (malloc_mutex): New mutex.
5949 (scm_gc_malloc_prehistory): Initialize it.
5950 (scm_realloc): Serialize call to realloc
5951 (scm_calloc): Same for calloc.
5952 Thanks to Wolfgang Jaehrling!
5953 (Now we have to make sure all calls to malloc/realloc are made
5954 through scm_malloc.)
5955
5956 * init.c (scm_init_guile_1): Call scm_gc_malloc_prehistory.
5957
5958 * threads.c (really_launch): Release heap (to prevent deadlock).
5959 (create_thread): Release heap before locking thread admin mutex.
5960
5961 2002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
5962
5963 * threads.c (scm_i_thread_invalidate_freelists): New
5964 function.
5965
5966 * gc.c (scm_igc): Call scm_i_thread_invalidate_freelists.
5967
5968 * modules.c (scm_export): Inserted a return statement.
5969
5970 2002-12-10 Han-Wen Nienhuys <hanwen@cs.uu.nl>
5971
5972 * modules.c (scm_export): new function
5973
5974 * gc-card.c: add a note about malloc()/free() overhead.
5975
5976 2002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
5977
5978 * Makefile.am (c-tokenize.$(OBJEXT)): Don't look for c-tokenize.c
5979 in srcdir.
5980
5981 2002-12-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5982
5983 These changes remove scm_ints_disabled (which hasn't has any
5984 effect in Guile for quite some time).
5985
5986 * async.c, error.h (scm_ints_disabled): Removed.
5987
5988 * gc.c (scm_gc_for_newcell), init.c (scm_init_guile_1),
5989 root.c (scm_internal_cwdr), gdbint.c (SCM_BEGIN_FOREIGN_BLOCK,
5990 SCM_END_FOREIGN_BLOCK): Don't touch scm_ints_disabled.
5991 (old_ints): Removed.
5992
5993 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Define as a recursive
5994 critical section.
5995 (SCM_REDEFER_INTS, SCM_ALLOW_INTS): Define as SCM_DEFER_INTS and
5996 SCM_ALLOW_INTS.
5997
5998 2002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5999
6000 * threads.c (scm_mutex_lock, scm_cond_wait, scm_cond_timedwait):
6001 Removed accidental #if 0 around these functions.
6002
6003 These changes are the start of support for preemptive
6004 multithreading. Marius and I have agreed that I commit this code
6005 into the repository although it isn't thoroughly tested and surely
6006 introduces many bugs. The bugs should only be exposed when using
6007 threads, though. Signalling and error handling for threads is
6008 very likely broken. Work on making the implementation cleaner and
6009 more efficient is needed.
6010
6011 * __scm.h (SCM_ALLOW_INTS_ONLY): Removed.
6012 (SCM_NONREC_CRITICAL_SECTION_START,
6013 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
6014 SCM_REC_CRITICAL_SECTION_END): New macros.
6015 (SCM_CRITICAL_SECTION_START/END): Defined here.
6016
6017 * eval.c: Insert SOURCE_SECTION_START / SOURCE_SECTION_END around
6018 the three calls to scm_m_expand_body.
6019
6020 * gc.h: #include "libguile/pthread-threads.h";
6021 (SCM_FREELIST_CREATE, SCM_FREELIST_LOC): New macros.
6022
6023 * gc.c (scm_i_freelist, scm_i_freelist2): Defined to be of type
6024 scm_t_key;
6025
6026 * gc.c, gc-freelist.c, inline.h: Use SCM_FREELIST_LOC for freelist
6027 access.
6028
6029 * gc-freelist.c (scm_gc_init_freelist): Create freelist keys.
6030
6031 * gc-freelist.c, threads.c (really_launch): Use
6032 SCM_FREELIST_CREATE.
6033
6034 * gc-malloc.c (scm_realloc, scm_gc_register_collectable_memory):
6035
6036 * gc.c (scm_i_expensive_validation_check, scm_gc,
6037 scm_gc_for_newcell): Put threads to sleep before doing GC-related
6038 heap administration so that those pieces of code are executed
6039 single-threaded. We might consider rewriting these code sections
6040 in terms of a "call_gc_code_singly_threaded" construct instead of
6041 calling the pair of scm_i_thread_put_to_sleep () and
6042 scm_i_thread_wake_up (). Also, we would want to have as many of
6043 these sections eleminated.
6044
6045 * init.c (scm_init_guile_1): Call scm_threads_prehistory.
6046
6047 * inline.h: #include "libguile/threads.h"
6048
6049 * pthread-threads.h: Macros now conform more closely to the
6050 pthreads interface. Some of them now take a second argument.
6051
6052 * threads.c, threads.h: Many changes.
6053
6054 2002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6055
6056 * Makefile.am (version.h): Changed $^ --> $< in rule for
6057 version.h.
6058
6059 2002-12-08 Rob Browning <rlb@defaultvalue.org>
6060
6061 * version.h.in (SCM_MICRO_VERSION): use @--@ substitution now.
6062 (SCM_MINOR_VERSION): use @--@ substitution now.
6063 (SCM_MICRO_VERSION): use @--@ substitution now.
6064 (scm_effective_version): new function prototype.
6065
6066 * version.c (scm_effective_version): new function, also add
6067 effective-version.
6068
6069 * Makefile.am (schemelibdir): VERSION -> GUILE_EFFECTIVE_VERSION.
6070 (libpath.h): use GUILE_EFFECTIVE_VERSION to compute
6071 SCM_LIBRARY_DIR.
6072 (version.h): generate this here rather than configure.in. This
6073 approach tracks source edits better (i.e. more immediately).
6074 Might be worth considering for other .in files too.
6075
6076 2002-12-02 Marius Vollmer <mvo@zagadka.ping.de>
6077
6078 Reorganized thread package selection. A thread package now only
6079 implements a small set of pthread like functions and Guile
6080 implements the rest on top of that. Guile's implementation is
6081 what the "coop-pthreads" package has been previously. Support for
6082 "coop" threads has been removed until I get time to add it again.
6083
6084 * Makefile.am (libguile_la_SOURCES): Removed iselect.c.
6085 (noinst_HEADERS): Removed coop-threads.c, coop-threads.h, coop.c,
6086 null-threads.c, coop-pthreads.c.
6087 (modinclude_HEADERS): Removed coop-defs.h, coop-pthreads.h. Added
6088 pthread-threads.h.
6089
6090 * validate.h (SCM_VALIDATE_THREAD): Moved to threads.h.
6091
6092 * threads.h: Do not include "libguile/coop-defs.h". Include
6093 "libguile/pthread-threads.h" for USE_COPT_THREADS. Removed
6094 (previously deprecated) C level thread API prototypes. They are
6095 now in the thread package specific headers, "null-threads.h" and
6096 "pthread-threads.h".
6097 (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR):
6098 New.
6099 (scm_threads_init): Removed.
6100 (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END,
6101 SCM_THREAD_SWITCHING_CODE, scm_i_switch_counter,
6102 SCM_I_THREAD_SWITCH_COUNT): Define here.
6103 (scm_single_thread_p): Removed.
6104 (scm_call_with_new_thread): Take two args directly instead of list
6105 of two args.
6106 (scm_i_thread_data, scm_i_set_thread_data, SCM_THREAD_LOCAL_DATA,
6107 SCM_SET_THREAD_LOCAL_DATA): Define here.
6108
6109 * threads.c: Merged with "coop-pthreads.c".
6110
6111 * null-threads.h: Implement pthread-like API as a set of macros.
6112
6113 * pthread-threads.h: New, implement pthread-like API by deferring
6114 to pthread itself.
6115
6116 * init.c (scm_init_guile_1): Do not call scm_init_iselect, which
6117 has been lost in the reorganization.
6118
6119 2002-12-01 Mikael Djurfeldt <mdj@linnaeus>
6120
6121 The following change makes it possible to move procedure
6122 application dispatch outside inner loops. The motivation was
6123 clean implementation of efficient replacements of R5RS primitives
6124 in SRFI-1.
6125
6126 The semantics is clear: scm_trampoline_N returns an optimized
6127 version of scm_call_N (or NULL if the procedure isn't applicable
6128 on N args).
6129
6130 Applying the optimization to map and for-each increases efficiency
6131 noticeably. For example, (map abs ls) is 8 times faster than
6132 before.
6133
6134 * eval.h (scm_t_trampoline_1, scm_t_trampoline_2): New types.
6135
6136 * eval.c, eval.h (scm_trampoline_1, scm_trampoline_2): New functions.
6137
6138 * eval.c (call_subr2_2, call_lsubr_2, call_closure_2): New functions;
6139 (map, for-each): Handle also application on two args as a special
6140 case; Use trampolines.
6141
6142 Other changes:
6143
6144 * sort.c (scm_cmp_function): Choose subr2less for scm_tc7_subr_2o;
6145 (subr2oless): Removed.
6146 (scm_restricted_vector_sort_x): Use scm_return_first to keep the
6147 vector GC protected.
6148
6149 * eval.c (check_map_args): Use scm_out_of_range_pos instead of
6150 scm_out_of_range.
6151
6152 2002-11-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
6153
6154 * evalext.[ch] (scm_m_undefine, undefine): Deprecated.
6155
6156 2002-11-17 Mikael Djurfeldt <mdj@linnaeus>
6157
6158 * debug.c (scm_make_iloc): Added missing "return".
6159
6160 2002-11-17 Marius Vollmer <mvo@zagadka.ping.de>
6161
6162 * strports.c (scm_eval_string_in_module): Validate second arg to
6163 be a module. Thanks to Arno Peters!
6164
6165 2002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
6166
6167 * .cvsignore: remove goops.c
6168
6169 2002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
6170
6171 * modules.c (scm_env_top_level, scm_lookup_closure_module,
6172 module_variable, scm_module_lookup_closure,
6173 scm_module_transformer, scm_sym2var, scm_module_reverse_lookup,
6174 scm_system_module_env_p): Don't compare SCM values with C
6175 operators == or !=. Avoid SCM_IMP predicates. Prefer !SCM_FALSEP
6176 over SCM_NFALSEP.
6177
6178 2002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
6179
6180 * eval.h (SCM_MAKE_ILOC): New macro.
6181
6182 * debug.c (scm_make_iloc): Use SCM_MAKE_ILOC instead of computing
6183 the iloc bitpattern here.
6184
6185 2002-11-14 Mikael Djurfeldt <mdj@linnaeus>
6186
6187 * coop-pthreads.c, coop-pthreads.h: scm_internal_select should be
6188 part of the API, otherwise it's difficult to write Guile
6189 extensions using non-blocking I/O => moved #include
6190 "libguile/iselect.h" from coop-pthreads.c --> coop-pthreads.h.
6191
6192 * coop-pthreads.c (scm_unlock_mutex): Changed s_lock_mutex -->
6193 s_unlock_mutex.
6194
6195 2002-11-10 Marius Vollmer <mvo@zagadka.ping.de>
6196
6197 * __scm.h (USE_THREADS, GUILE_ISELECT): Do not define here. They
6198 are defined in configure.in.
6199
6200 * threads.c: Removed SCM_API from function definitions. SCM_API
6201 is only for declarations.
6202
6203 2002-11-07 Mikael Djurfeldt <mdj@linnaeus>
6204
6205 * coop-pthreads.h: Added support for thread specific data to the
6206 generic C API for the coop-pthreads case.
6207
6208 * threads.c, threads.h (scm_cond_init): Undo unintentional API
6209 change.
6210 (scm_cond_broadcast): Added missing function.
6211
6212 2002-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6213
6214 * coop.c (coop_next_runnable_thread): Removed, wich should have
6215 happened when GUILE_ISELECT was hard-wired.
6216
6217 2002-11-03 Marius Vollmer <mvo@zagadka.ping.de>
6218
6219 * Makefile.am (libguile_la_SOURCES): Added threads.c
6220 (DOT_DOC_FILES): Added threads.doc.
6221 (DOT_X_FILES): Added threads.x.
6222 (EXTRA_libguile_la_SOURCES): Removed threads.c.
6223 (noinst_HEADERS): Added coop-pthreads.c.
6224 (modinclude_HEADERS): Added coop-pthreads.h.
6225
6226 * __scm.h (USE_THREADS, GUILE_ISELECT): Define when
6227 SCM_DEBUG_DEPRECATED. Removed their use thru-out Guile.
6228
6229 * iselect.c: Include "_scm.h" before testing HAVE_UNISTD_H.
6230 Thanks to Bill Schottstaedt!
6231
6232 * numbers.c (scm_integer_expt): Make 0^z == 0 for z != 0.
6233
6234 * _scm.h (HAVE_RESTARTABLE_SYSCALLS): Do define even when
6235 SCM_COPT_THREADS is defined.
6236 (SCM_SYSCALL): Use EINTR-expection version when SCM_COPT_THREADS
6237 is defined.
6238
6239 * coop-pthreads.c: Some harmless renamings of internal stuff.
6240 (create_thread): New, generalized version of
6241 scm_call_with_new_thread.
6242 (scm_call_with_new_thread): Use it.
6243 (scm_spawn_thread): New, use create_thread.
6244
6245 2002-11-02 Marius Vollmer <mvo@zagadka.ping.de>
6246
6247 * coop-pthreads.c, coop-pthreads.h: Redone completely, you might
6248 start testing it now.
6249
6250 * _scm.h: Include <errno.h< so that SCM_SYSCALL is correctly
6251 defined when HAVE_RESTARTABLE_SYSCALLS is not defined.
6252 (HAVE_RESTARTABLE_SYSCALLS): Do not define when USE_COPT_THREADS
6253 is defined.
6254
6255 2002-10-27 Marius Vollmer <mvo@zagadka.ping.de>
6256
6257 * scmsigs.c (signal_cell_handlers, install_handler_data,
6258 scm_delq_spine_x, really_install_handler, install_handler): New
6259 scheme for triggering signal handlers, to simplify take_signal.
6260 (take_signal): Simplified, to avoid race conditions.
6261 (scm_sigaction_for_thread): Use new Scheme. Validate that thread
6262 hasn't exited yet.
6263
6264 * async.c (scm_async_click): Reset pending_asyncs, handle
6265 signal_asyncs. Don't set cdr of a non-signal async to #f.
6266 (scm_i_queue_async_cell): Do not check cdr of cell for #f, queue
6267 always. Set pending_asyncs.
6268 (scm_system_async_mark_for_thread): Check that thread has not
6269 exited.
6270 (scm_unmask_signals, decrease_block): Call scm_async_click after
6271 block_asyncs becomes zero.
6272
6273 * __scm.h (SCM_ASYNC_CLICK): Check pending_asyncs instead of
6274 active_asyncs.
6275
6276 * root.h (scm_root_state): Added pending_asyncs and signal_asyncs
6277 fields.
6278 * root.c (root_mark): Mark them.
6279 (make_root): Initialize them.
6280
6281 * iselect.c, iselect.h: Replaced GUILE_ISELECT with
6282 USE_COOP_THREADS.
6283 (scm_internal_select): Define one version for USE_COOP_THREADS and
6284 one for USE_NULL_THREADS.
6285 (scm_init_iselect): Likewise.
6286
6287 * inline.h (scm_cell, scm_double_cell): Also allow
6288 USE_COPT_THREADS to not protect the slot initializers.
6289
6290 * init.c (scm_init_guile_1): Call scm_init_thread_procs. This is
6291 because threads need to be initialized before the stack, but
6292 gsubrs such as scm_timed_condition_variable_wait can only be
6293 created later.
6294
6295 * threads.h: Include "coop-pthreads.h" when requested.
6296 (scm_threads_make_mutex, scm_threads_lock_mutex,
6297 scm_threads_unlock_mutex, scm_threads_monitor): Removed, they were
6298 not implemented anyway.
6299 (scm_init_thread_procs, scm_try_mutex,
6300 scm_timed_condition_variable_wait,
6301 scm_broadcast_condition_variable, scm_c_thread_exited_p,
6302 scm_thread_exited_p): New prototypes.
6303 (struct timespec): Define if not already defined.
6304 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
6305 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
6306 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
6307 scm_cond_broadcast, scm_cond_destroy): Declarations moved here and
6308 deprecated.
6309
6310 * threads.c: Include <errno.h>. Include "coop-pthreads.c" when
6311 requested.
6312 (scm_thread_exited_p): New.
6313 (scm_try_mutex, scm_broadcast_condition_variable): Newly
6314 registered procedures.
6315 (scm_wait_condition_variable, scm_timed_wait_condition_variable):
6316 Use the latter as the procedure for "wait-condition-variable",
6317 thus offering a optional timeout parameter to Scheme.
6318 (scm_wait_condition_variable): Implement in terms of
6319 scm_timed_wait_condition_variable.
6320 (scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
6321 scm_mutex_unlock, scm_mutex_destroy, scm_cond_init,
6322 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
6323 scm_cond_broadcast, scm_cond_destroy): Implement in terms of
6324 scm_make_mutex, etc, and deprecate.
6325 (scm_init_threads): Do not create smobs, leave this to
6326 scm_threads_init. Do not include "threads.x" file.
6327 (scm_init_thread_procs): New, include "threads.x" here.
6328
6329 * null-threads.h (scm_null_mutex, scm_null_mutex_init,
6330 scm_null_mutex_lock, scm_null_mutex_unlock,
6331 scm_null_mutex_destroy, scm_null_condvar, scm_null_condvar_init,
6332 scm_null_condvar_wait, scm_null_condvar_signal,
6333 scm_null_condvar_destroy): Removed.
6334 (scm_mutex_init, scm_mutex_lock, scm_mutex_unlock, scm_cond_init,
6335 scm_cond_wait, scm_cond_signal, scm_cond_broadcast,
6336 scm_cond_destory): Do not define, they are now deprecated and
6337 handled by threads.{h,c}.
6338
6339 * null-threads.c (scm_null_mutex, scm_null_cond): Define here.
6340 (scm_threads_init): Create smobs here, using the appropriate
6341 sizes.
6342 (block): Removed, now unused.
6343 (scm_c_thread_exited_p): New.
6344 (scm_null_mutex_init, scm_null_mutex_lock, scm_null_mutex_unlock,
6345 scm_null_mutex_destroy, scm_null_condvar_init,
6346 scm_null_condvar_wait, scm_null_condvar_signal,
6347 scm_null_condvar_destroy): Removed and updated users to do their
6348 task directly.
6349 (scm_try_mutex, timeval_subtract,
6350 scm_timed_wait_condition_variable,
6351 scm_broadcast_condition_variable): New.
6352 (scm_wait_condition_variable): Removed.
6353
6354 * coop-defs.h (coop_m): Added 'level' field.
6355 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
6356 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
6357 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
6358 scm_cond_broadcast, scm_cond_destroy, struct timespec): Do not
6359 define.
6360 (coop_condition_variable_broadcast): New.
6361
6362 * coop-threads.c (scm_threads_init): Create smobs here, using the
6363 appropriate sizes.
6364 (scm_c_thread_exited_p, scm_try_mutex,
6365 scm_timed_wait_condition_variable,
6366 scm_broadcast_condition_variable): New.
6367 (scm_wait_condition_variable): Removed.
6368
6369 * coop.c (coop_new_mutex_init): Initialize level.
6370 (coop_mutex_trylock, coop_mutex_lock, coop_mutex_unlock): maintain
6371 level.
6372 (coop_condition_variable_signal): Renamed to
6373 coop_condition_variable_broadcast and reimplemented in terms of
6374 that. Thus...
6375 (coop_condition_variable_broadcast): New.
6376
6377 * goops.c (hell_mutex): Reimplemented using scm_make_mutex, etc.
6378
6379 * coop-pthreads.h, coop-pthreads.c: New, but unfinished.
6380
6381 2002-10-21 Marius Vollmer <mvo@zagadka.ping.de>
6382
6383 * null-threads.c: Include <time.h>. Also, use <...> for inclusion
6384 of system headers.
6385
6386 * async.c, goops.h, modules.h, validate.h (SCM_MAKE_VALIDATE_MSG):
6387 New. Use it instead of SCM_MAKE_VALIDATE in lots of places to
6388 give better error messages. Thanks to Bill Schottstaedt!
6389
6390 2002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
6391
6392 * evalext.h, evalext.c (scm_definedp, scm_defined_p): Renamed
6393 scm_definedp to scm_defined_p and deprecated scm_definedp.
6394
6395 2002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
6396
6397 * async.h, async.c (scm_system_async): Fixed deprecation to work
6398 correctly when deprecated features are excluded.
6399
6400 2002-10-16 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6401
6402 * async.c (scm_system_async_mark_for_thread): Validate thread
6403 argument.
6404
6405 * coop-threads.c (scm_i_thread_root): Do not validate argument.
6406
6407 * feature.c (scm_init_feature): Don't add 'threads' for
6408 USE_NULL_THREADS.
6409
6410 * inline.h (scm_cell, scm_double_cell): Also allow
6411 USE_NULL_THREADS to not protect the slot initializers.
6412
6413 * scmsigs.c (scm_sigaction_for_thread): It's "USE_THREADS" not
6414 "USE_THREAD".
6415
6416 * Makefile.am (noinst_HEADERS): Added null-threads.c.
6417 (modinclude_HEADERS): Added null-threads.h.
6418
6419 * threads.h: Include null-threads.h when !USE_COOP_THREADS.
6420 * threads.c: Include null-threads.c when !USE_COOP_THREADS.
6421 (scm_init_threads): Use generic type names scm_t_mutex and
6422 scm_t_cond instead of coop_m and coop_c.
6423
6424 * null-threads.c, null-threads.h: New files.
6425
6426 2002-10-15 Marius Vollmer <mvo@zagadka.ping.de>
6427
6428 * Makefile.am: Replaced "$<" in non-pattern rules with its value.
6429 This is to support makes that know about "$<" only in pattern
6430 rules, like Sun's make.
6431
6432 2002-10-13 Marius Vollmer <mvo@zagadka.ping.de>
6433
6434 * Makefile.am (libpath.h): Fixed typo in top_srcdir_absolute
6435 substitution. Thanks to David Allouche!
6436
6437 2002-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
6438
6439 * evalext.h: Replaced SCM_DEBUG_DEPRECATED with
6440 !SCM_ENABLE_DEPRECATED.
6441
6442 2002-10-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6443
6444 * async.c (scm_system_async_mark_for_thread): Only call
6445 scm_i_thread_root when USE_THREADS is defined. Use scm_root
6446 otherwise.
6447
6448 * scmsigs.c (take_signal): Only call scm_i_thread_root when
6449 USE_THREADS is defined. Use scm_root otherwise.
6450 (scm_sigaction_for_thread): Ignore THREAD argument when
6451 USE_THREADS is not defined. Also, move THREAD argument defaulting
6452 out of HAVE_SIGACTION section, which was a bug.
6453
6454 2002-10-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6455
6456 * scmsigs.c (scm_sigaction_for_thread): Store original handler in
6457 signal_handlers, not the closure that is used as the async.
6458 The closure is stored in signal_handler_cells, as previously.
6459
6460 2002-10-10 Marius Vollmer <mvo@zagadka.ping.de>
6461
6462 * root.h (scm_root_state): Added 'block_async' slot.
6463 (scm_active_asyncs): Removed abbrev.
6464 * root.c (scm_make_root): Initialize 'block_asyncs' slot.
6465
6466 * __scm.h (SCM_ASYNC_TICK): Do without the scm_active_asyncs
6467 abbrev.
6468
6469 * async.h (scm_call_with_blocked_asyncs,
6470 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
6471 scm_c_call_with_unblocked_asyncs): New prototypes.
6472 (scm_mask_signals, scm_unmask_signals): Deprecated.
6473 (scm_mask_ints): Turned into a macro.
6474 * async.c (scm_mask_ints): Removed.
6475 (scm_run_asyncs): Do not set scm_mask_ints while running an async.
6476 this should not be necessary.
6477 (scm_async_click): Test block_asyncs instead of scm_mask_ints.
6478 (scm_mask_signals, scm_unmask_signals): Deprecated. Emit
6479 deprecation warning and check for errornous use. Set block_asyncs
6480 instead of scm_mask_ints.
6481 (increase_block, decrease_block, scm_call_with_blocked_asyncs,
6482 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
6483 scm_c_call_with_unblocked_asyncs): New.
6484
6485 * script.c (scm_compile_shell_switches): Do not set scm_mask_ints.
6486 Asyncs are enabled by default.
6487
6488 2002-10-09 Neil Jerram <neil@ossau.uklinux.net>
6489
6490 * vports.c (scm_make_soft_port): Allow vector argument to carry a
6491 6th element: an input waiting thunk.
6492 (sf_input_waiting): New.
6493
6494 2002-10-05 Marius Vollmer <mvo@zagadka.ping.de>
6495
6496 * root.c (root_mark): Mark active_asyncs slot.
6497
6498 * async.c (scm_async_click): Set the cdr of a executed handler
6499 cell to SCM_BOOL_F, not SCM_EOL.
6500 (scm_i_queue_async_cell): Queue the cell at the end of the list,
6501 and only if the handler procedure is not already present.
6502 (scm_system_async_mark_for_thread): Initialize cdr of handler cell
6503 with SCM_BOOL_F.
6504 * scmsigs.c (scm_sigaction_for_thread): Likewise.
6505
6506 2002-10-04 Rob Browning <rlb@defaultvalue.org>
6507
6508 * guile.c (main): switch to scm_lt_dlset_preloaded_symbols;
6509
6510 * dynl.c (sysdep_dynl_link): switch to scm_lt_dlhandle,
6511 scm_lt_dlopenext, and scm_lt_dlerror.
6512 (sysdep_dynl_unlink): switch to scm_lt_dlhandle, scm_lt_dlclose,
6513 and scm_lt_dlerror.
6514 (sysdep_dynl_func): switch to scm_lt_dlhandle, scm_lt_dlsym,
6515 and scm_lt_dlerror.
6516 (sysdep_dynl_init): switch to scm_lt_dlinit();
6517
6518 * Makefile.am (libguile_la_LIBADD): switch to use
6519 libguile-ltdl.la.
6520
6521 * numbers.c (scm_integer_expt): (expt 0 1) should be 1.
6522
6523 2002-10-04 Marius Vollmer <mvo@zagadka.ping.de>
6524
6525 * scmsigs.h (scm_sigaction_for_thread): New prototype.
6526 * scmsigs.c (got_signal): Removed.
6527 (signal_handler_cells, signal_handler_threads): New.
6528 (take_signal): Queue the cell of the signal for the specified
6529 thread. Reset the signal handler on systems that don't have
6530 sigaction.
6531 (sys_deliver_signals): Removed.
6532 (close_1): New.
6533 (scm_sigaction_for_thread): Renamed from scm_sigaction and
6534 extended to also set the thread of a signal and allocate a cell
6535 for it. Keep the Scheme name "sigaction". Check that signum is
6536 within range. Also, use SCM_VECTOR_REF instead of SCM_VELTS.
6537 (scm_sigaction): Implement in terms of scm_sigaction_for_thread.
6538 (scm_init_scmsigs): Allocate signal_handler_cells and
6539 signal_handler_threads vectors.
6540
6541 * async.c: Removed GUILE_OLD_ASYNC_CLICK code. Reorganized so
6542 that system asnycs and user asyncs are separated. Reimplemented
6543 system asyncs to work per-thread.
6544
6545 * gc.c (scm_init_gc): Do not use scm_system_async.
6546
6547 * async.h (scm_asyncs_pending, scm_set_tick_rate,
6548 scm_set_switch_rate, scm_system_async_mark_from_signal_handler):
6549 Removed prototypes.
6550 (scm_i_queue_async_cell): New.
6551
6552 * __scm.h (scm_asyncs_pending_p): Removed.
6553 (SCM_ASYNC_CLICK): Check scm_active_asyncs instead of
6554 scm_asyncs_pending_p.
6555
6556 * async.h (scm_system_async_mark_for_thread): New prototype.
6557
6558 * __scm.h: Removed GUILE_OLD_ASYNC_CLICK code.
6559
6560 * root.h (scm_root_state): Added new "active_asyncs" slot.
6561 * root.c (scm_make_root): Initialize it to SCM_EOL.
6562
6563 * coop-defs.h (coop_t): Added new "handle" slot.
6564 * coop-threads.c (all_threads, scm_current_thread,
6565 scm_all_threads, scm_i_thread_root): New.
6566 (scm_threads_init): Add main thread to all_threads.
6567 (scheme_launch_thread): Remove thread from all_threads when it
6568 terminates.
6569 (scm_call_with_new_thread): Initialize handle slot of coop_t
6570 structure and add new thread to all_threads.
6571 (scm_spawn_thread): Likewise.
6572
6573 * threads.h (scm_current_thread, scm_all_threads): New prototypes.
6574 * threads.c (scm_current_thread, scm_all_threads): Register as
6575 primitives.
6576
6577 * dynl.c: Use scm_lt_ prefix for libltdl functions.
6578
6579 2002-09-29 Neil Jerram <neil@ossau.uklinux.net>
6580
6581 * script.c (scm_compile_shell_switches): Fix bad spelling of
6582 `explicitly' in comment.
6583
6584 2002-09-28 Neil Jerram <neil@ossau.uklinux.net>
6585
6586 * posix.c (scm_geteuid, scm_getegid, scm_seteuid, scm_setegid):
6587 Refer to provided? in doc string rather than deprecated feature?.
6588
6589 2002-09-24 Gary Houston <ghouston@arglist.com>
6590
6591 * inline.h (scm_double_cell): prevent reordering of statements
6592 with any following code (for GCC 3 strict-aliasing).
6593 * numbers.c (scm_make_real), num2float.i.c (FLOAT2NUM): removed
6594 the earlier version of the reordering prevention.
6595
6596 2002-09-19 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6597
6598 * inline.h (scm_double_cell): move SET_GCMARK set out of if body.
6599
6600 2002-09-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6601
6602 * gc-malloc.c (scm_gc_register_collectable_memory): more overflow
6603 protection.
6604
6605 2002-09-08 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6606
6607 * inline.h: include stdio.h
6608
6609 * smob.c (free_print): abort if scm_debug_cell_accesses_p is set
6610
6611 2002-09-05 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6612
6613 * gc-segment.c (scm_i_make_initial_segment): check user settings
6614 for sanity.
6615
6616 * gc-malloc.c (scm_gc_init_malloc): check user settings for
6617 sanity.
6618
6619 * gc-freelist.c (scm_init_freelist): check user settings for sanity.
6620
6621 * struct.h: change scm_structs_to_free to scm_i_structs_to_free
6622
6623 * gc-malloc.c (scm_gc_register_collectable_memory): use floats;
6624 these won't ever wrap around with high memory usage. Thanks to
6625 Sven Hartrumpf for finding this.
6626
6627 * gc-freelist.c: include <stdio.h>
6628
6629 * gc-malloc.c: add DEBUGINFO for mtrigger GCs.
6630
6631 2002-09-01 Marius Vollmer <mvo@zagadka.ping.de>
6632
6633 * vectors.h (SCM_VECTOR_REF): New.
6634
6635 * snarf.h (SCM_DEFINE_PUBLIC): New.
6636
6637 2002-08-30 Marius Vollmer <mvo@zagadka.ping.de>
6638
6639 * socket.c (scm_addr_vector): Added size of address to arguments.
6640 Use it to avoid accessing a non-existent path in a sockaddr_un.
6641 Changed all callers.
6642
6643 2002-08-29 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6644
6645 * gc.h: remove DOUBLECELL card flags.
6646
6647 * gc-malloc.c (scm_calloc): try to use calloc() before calling
6648 scm_realloc().
6649
6650 * gc-segment.c (scm_i_initialize_heap_segment_data): remove card
6651 init loop; handle this from scm_init_card_freelist()
6652
6653 * gc-card.c (scm_init_card_freelist): init bit vector here.
6654
6655 * numbers.c (scm_make_real): prevent reordering of statements
6656 num2float.i.c (FLOAT2NUM): idem
6657
6658 2002-08-27 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6659
6660 * eval.h: prepend libguile/ to include path
6661
6662 2002-08-26 Marius Vollmer <mvo@zagadka.ping.de>
6663
6664 * script.c (scm_compile_shell_switches): Added "2002" to Copyright
6665 years. Thanks to Martin Grabmüller!
6666
6667 2002-08-25 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6668
6669 * gc-segment.c (scm_i_get_new_heap_segment): use float in stead of
6670 unsigned numbers for computing minimum heap increment. This
6671 prevents weird results when a a negative minimum increment is
6672 computed.
6673
6674 2002-08-24 Marius Vollmer <mvo@zagadka.ping.de>
6675
6676 * gc_os_dep.c: When we have __libc_stack_end, use that directly
6677 instead of the old tricks.
6678
6679 * guile-snarf.in: Do not expect the input file to be the first
6680 argument after the optional "-o" option, just pass everything to
6681 the pre-processor without extracting the input file name.
6682
6683 2002-08-23 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6684
6685 * gc-segment.c (scm_i_get_new_heap_segment): Oops. We want segment
6686 length *at* least SCM_MIN_HEAP_SEG_SIZE, not at most.
6687
6688 2002-08-22 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6689
6690 * gc.h, gc.c: make scm_cells_allocated unsigned again. Thanks to
6691 Bill Schottstaedt for the bug report
6692
6693 2002-08-20 Marius Vollmer <mvo@zagadka.ping.de>
6694
6695 * print.c (scm_iprin1): Print primitives generics always as
6696 "primitive-generic" even when they have no primitive methods yet.
6697
6698 2002-08-17 Gary Houston <ghouston@arglist.com>
6699
6700 * coop.c (coop_create): removed bogus 2nd argument in scm_malloc
6701 call.
6702
6703 2002-08-17 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6704
6705 * ports.c (scm_add_to_port_table): small bugfix.
6706
6707 * mallocs.c (scm_malloc_obj): use scm_gc_malloc in stead of
6708 malloc.
6709
6710 * gc-segment.c (scm_i_get_new_heap_segment): remove cluster cruft:
6711 only use SCM_MIN_HEAP_SEG_SIZE.
6712
6713 * ports.c (scm_add_to_port_table): add backwards compatibility
6714 function
6715
6716 * ports.h: use scm_i_ prefix for port table and port table size.
6717
6718 2002-08-15 Mikael Djurfeldt <mdj@linnaeus>
6719
6720 * vports.c (scm_make_soft_port): Initialize pt variable.
6721
6722 2002-08-13 Marius Vollmer <mvo@zagadka.ping.de>
6723
6724 * strports.h (scm_c_eval_string_in_module,
6725 scm_eval_string_in_module): New prototypes.
6726 * strports.c (scm_eval_string_in_module): New, but use
6727 "eval-string" as the Scheme name and make second parameter
6728 optional.
6729 (scm_eval_string): Implement using scm_eval_string_in_module.
6730 (scm_c_eval_string_in_module): New.
6731 Thanks to Ralf Mattes for the suggestion!
6732
6733 2002-08-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6734
6735 * gc-card.c ("sweep_card"): remove SCM_MISC_ERROR messages: print
6736 message and abort.
6737
6738 * gc-mark.c ("scm_gc_mark_dependencies"): idem.
6739
6740 * ports.c ("scm_new_port_table_entry"): return a boxed SCM in
6741 stead of scm_t_port*. The function now takes a tag argument.
6742
6743 2002-08-08 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6744
6745 * gc.h: add scm_debug_cells_gc_interval to public interface
6746
6747 * gc-card.c ("sweep_card"): set scm_gc_running while sweeping.
6748
6749 * gc.c (scm_i_expensive_validation_check): separate expensive
6750 validation checks from cheap ones.
6751
6752 2002-08-06 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6753
6754 * read.c (scm_input_error): new function: give meaningful error
6755 messages, and throw read-error
6756
6757 * gc-malloc.c (scm_calloc): add scm_calloc.
6758
6759 2002-08-05 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6760
6761 * tags.h: remove GC bits documentation from the tags table.
6762
6763 * read.c (INPUT_ERROR): Prepare for file:line:column error
6764 messages for errors in scm_lreadr() and friends.
6765
6766 2002-08-04 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6767
6768 * gc-malloc.c (scm_malloc): use scm_realloc() (simplifies
6769 implementation).
6770 (scm_gc_calloc): new function
6771
6772 2002-08-04 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6773
6774 * ports.c (scm_new_port_table_entry): init port entry to 0
6775 completely.
6776
6777 * ports.c (scm_new_port_table_entry): change function from
6778 scm_add_to_port_table. This prevents cells with null-pointers from
6779 being exposed to GC.
6780
6781 * vports.c (scm_make_soft_port) strports.c (scm_mkstrport),
6782 fports.c (scm_fdes_to_port): Use scm_new_port_table_entry().
6783
6784 * gc.c (scm_gc_stats): add cell-yield and malloc-yield statistic
6785 to gc-stats.
6786
6787 * numbers.c (big2str): return "0" for 0 iso. ""
6788
6789 * gc-segment.c, gc-malloc.c gc-mark.c, gc-freelist.c, gc-card.c,
6790 private-gc.h: new file
6791
6792 * gc.c: completely revised and cleaned up the GC. It now uses lazy
6793 sweeping. More documentation in workbook/newgc.text
6794
6795 2002-07-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6796
6797 * random.c (rstate_free): Return zero.
6798
6799 2002-07-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
6800
6801 * environments.c (remove_key_from_alist): Removed.
6802
6803 (obarray_remove): Simplified.
6804
6805 2002-07-24 Stefan Jahn <stefan@lkcc.org>
6806
6807 * continuations.h: ia64: Include <signal.h> before
6808 <sys/ucontext.h>.
6809
6810 2002-07-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6811
6812 * modules.c (scm_sym2var): Don't compare SCM values with ==.
6813
6814 2002-07-21 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6815
6816 * goops.c (scm_compute_applicable_methods): use
6817 scm_remember_upto_here_1 iso scm_remember_upto_here
6818
6819 * macros.c: include deprecation.h
6820
6821 * vectors.c (scm_vector_move_right_x): remove side effect in
6822 macro arg.
6823 (scm_vector_move_left_x): idem.
6824
6825 * net_db.c, posix.c, socket.c: variable naming: change ans to
6826 result.
6827
6828 * sort.c (scm_merge_vector_x): accept vector as argument
6829 iso. SCM*. This is needed for full GC correctness.
6830
6831 * gc.h: undo previous undocumented changes related to #ifdef
6832 GENGC.
6833
6834 2002-07-20 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6835
6836 * *.c: add space after commas everywhere.
6837
6838 * *.c: use SCM_VECTOR_SET everywhere, where a vector is written.
6839 Document cases where SCM_WRITABLE_VELTS() is used.
6840
6841 * vectors.h (SCM_VELTS): prepare for write barrier, and let
6842 SCM_VELTS() return a const pointer
6843 (SCM_VECTOR_SET): add macro.
6844
6845 2002-07-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
6846
6847 * eval.c (SCM_CEVAL), macros.c (macro_print, scm_makmacro,
6848 scm_sym_macro, scm_macro_type), macros.h (scm_makmacro):
6849 Deprecated the special kind of built-in dynamic syntax transformer
6850 that was inaccurately named "macro". Note: The built-in syntax
6851 transformers that are named "mmacro" or "memoizing-macro" still
6852 exist, and it is these which come much closer to what one would
6853 call a macro.
6854
6855 2002-07-13 Neil Jerram <neil@ossau.uklinux.net>
6856
6857 * eval.c (unmemocopy): Fix for
6858 1001-local-eval-error-backtrace-segfaults (unmemoization crash
6859 with internal definitions and local-eval).
6860
6861 2002-07-12 Gary Houston <ghouston@arglist.com>
6862
6863 * dynl.c: Don't define stub procedures if DYNAMIC_LINKING is not
6864 defined. They don't do anything useful, especially since the
6865 only case where DYNAMIC_LINKING is undefined seems to be
6866 when --with-modules=no is given to configure, which is basically
6867 requesting that the "dynamic linking module" be omitted.
6868
6869 * Makefile.am (libguile_la_SOURCES): move dynl.c from
6870 libguile_la_SOURCES to EXTRA_libguile_la_SOURCES.
6871
6872 * extensions.c (load_extension): check DYNAMIC_LINKING for
6873 scm_dynamic_call.
6874 * init.c (scm_init_guile_1): check DYNAMIC_LINKING for
6875 scm_init_dynamic_linking.
6876
6877 2002-07-10 Marius Vollmer <mvo@zagadka.ping.de>
6878
6879 * guile.c, iselect.h, net_db.c, posix.c, socket.c: No need to
6880 check for Cygwin when including <winsock2.h>, this is already
6881 check for by configure. Thus, revert change from 2002-07-07.
6882
6883 2002-07-10 Gary Houston <ghouston@arglist.com>
6884
6885 * eq.c: include <string.h>
6886 * dynl.c: docstring editing.
6887
6888 2002-07-09 Gary Houston <ghouston@arglist.com>
6889
6890 * dynl.c (scm_dynamic_call): docstring editing.
6891
6892 2002-07-08 Rob Browning <rlb@defaultvalue.org>
6893
6894 * gc_os_dep.c: HURD fixes.
6895
6896 2002-07-07 Marius Vollmer <mvo@zagadka.ping.de>
6897
6898 Crosscompiling and Cygwin fixes by Jan Nieuwenhuizen. Thanks!
6899
6900 * Makefile.am: Override default rule for c-tokenize.$(OBJECT);
6901 this should be compiled for BUILD host.
6902 Override default rule for
6903 guile_filter_doc_snarfage$(EEXECT); this should run on BUILD host.
6904 Add missing $(EXEEXT) to guile_filter_doc_snarfage invocation.
6905 (snarf2checkedtexi): Use GUILE_FOR_BUILD instead of preinstguile.
6906
6907 * guile.c, iselect.h, net_db.c, posix.c, socket.c: Do not include
6908 <winsock2.h> on Cygwin even when we have it.
6909
6910 2002-07-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
6911
6912 * __scm.h (SCM_CAUTIOUS), eval.c (scm_eval_args, deval_args,
6913 SCM_CEVAL): Removed compile time option SCM_CAUTIOUS to clean up
6914 the code. Full number of arguments checking of closures is
6915 mandatory now. However, the option to disable the checking has
6916 most probably not been used anyway.
6917
6918 2002-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
6919
6920 * __scm.h (SCM_RECKLESS), backtrace.c (SCM_ASSERT), debug.c
6921 (scm_debug_options), eval.c (scm_lookupcar, scm_lookupcar1,
6922 scm_badargsp, SCM_CEVAL, SCM_APPLY, scm_map, scm_for_each),
6923 feature.c (scm_init_feature), gsubr.c (scm_gsubr_apply), numbers.c
6924 (scm_logand, scm_logior, scm_logxor, scm_i_dbl2big), srcprop.c
6925 (scm_source_properties, scm_set_source_properties_x,
6926 scm_source_property): Removed compile time option SCM_RECKLESS to
6927 clean up the code. Full number of arguments checking of closures
6928 is mandatory now. However, the option to disable the checking has
6929 most probably not been used anyway.
6930
6931 * srcprop.c (scm_source_properties, scm_set_source_properties_x,
6932 scm_source_property): Use !SCM_CONSP instead of SCM_NCONSP.
6933
6934 2002-06-30 Gary Houston <ghouston@arglist.com>
6935
6936 * dynl.c: Removed all SCM_DEFER_INTS/SCM_ALLOW_INTS, which won't
6937 do anything useful. Added a comment about need for a mutex if
6938 pre-emptive threading is supported.
6939
6940 * posix.c (scm_convert_exec_args), dynl.c
6941 (scm_make_argv_from_stringlist): static procs: 1) renamed both to
6942 allocate_string_pointers. 2) simplified: don't reallocate the
6943 strings, just make an array of pointers 3) avoid memory leaks on
6944 error 4) let the procedure report errors in its own name.
6945 Consequences: 1) the procedures now assume that SCM strings are
6946 nul-terminated, which should always be the case. 2) Since strings
6947 are not reallocated, it's now possible for strings passed to
6948 dynamic-args-call to be mutated.
6949
6950 2002-06-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
6951
6952 * __scm.h, eval.c, eval.h: Removed compile time option
6953 MEMOIZE_LOCALS to clean up the code. Now, caching of local
6954 variable positions during memoization is mandatory. However, the
6955 option to disable the caching has most probably not been used
6956 anyway.
6957
6958 2002-06-18 Marius Vollmer <mvo@zagadka.ping.de>
6959
6960 * print.c (scm_simple_format): Print missing part of format before
6961 ~% control. Thanks to Daniel Skarda!
6962
6963 2002-06-01 Marius Vollmer <mvo@zagadka.ping.de>
6964
6965 * mkstemp.c: Added exception notice to license statement.
6966
6967 2002-05-22 Marius Vollmer <mvo@zagadka.ping.de>
6968
6969 * numbers.c (mem2ureal): When returning an inexact zero, make sure
6970 it is represented as a floating point value so that we can change
6971 its sign.
6972
6973 From John W. Eaton <jwe@bevo.che.wisc.edu>
6974
6975 * numbers.c (idbl2str): Don't omit sign when printing negative zero.
6976
6977 2002-05-14 Thien-Thi Nguyen <ttn@giblet.glug.org>
6978
6979 * gc_os_dep.c: For I386/OPENBSD, allow for `__i386__'
6980 in addition to `i386'. Thanks to Dale P. Smith.
6981
6982 2002-05-08 Marius Vollmer <mvo@zagadka.ping.de>
6983
6984 * eq.c (real_eqv): New.
6985 (scm_eqv_p): Use it when comparing reals and complexes.
6986
6987 * numbers.c: Include <string.h>, for strncmp.
6988 (mem2complex): Do not create negative NaNs.
6989 (scm_leq_p, scm_geq_p): Explicitely return #f when comparing a
6990 NaN.
6991 (scm_inexact_to_exact): Signal error when converting a NaN.
6992
6993 2002-05-06 Marius Vollmer <mvo@zagadka.ping.de>
6994
6995 * posix.c (scm_putenv): Handle removing variables explicitely by
6996 calling unsetenv.
6997
6998 From John W. Eaton.
6999
7000 * numbers.h: Conditionally include floatingpoint.h, ieeefp.h, and
7001 nan.h. Provide declarations for scm_inf_p, scm_nan_p, scn_inf,
7002 and scm_nan.
7003 * numbers.c: [SCO && ! HAVE_ISNAN] (isnan): New function.
7004 [SCO && ! HAVE_ISINF] (isinf): New function.
7005 (xisinf, xisnan): New functions.
7006 (IS_INF): Delete.
7007 (isfinite): Define in terms of xisinf.
7008 (scm_inf_p, scm_nan_p): New functions.
7009 (guile_Inf, guile_NaN): New file-scope vars.
7010 (guile_ieee_init): New function.
7011 (scm_inf, scm_nan): New functions.
7012 (idbl2str): Handle Inf and NaN. Remove funny label and
7013 corresponding gotos.
7014 (ALLOW_DIVIDE_BY_ZERO): New macro.
7015 (scm_divide): Allow division by zero to occur if
7016 ALLOW_DIVIDE_BY_ZERO is defined.
7017 Handle bignums and ints as special cases.
7018
7019 Additional stuff by me:
7020
7021 numbers.c (mem2ureal): Recognize "inf.0" and "nan.xxx".
7022 (scm_even_p, scm_odd_p): Treat infinity as even and odd.
7023 (iflo2str): Don't output a '+' for negative numbers or for Inf and
7024 NaN. They will provide their own sign.
7025 (scm_divide): Only allow divides by inexact zeros. Dividing by
7026 exact zeros still signals an errors.
7027
7028 2002-04-22 Thien-Thi Nguyen <ttn@giblet.glug.org>
7029
7030 * goops.h (scm_slot_exists_p): Rename from scm_slots_exists_p.
7031 * goops.c (scm_slot_exists_p): Rename from scm_slots_exists_p.
7032 (scm_slot_exists_p): Rename from scm_slots_exists_p.
7033 Thanks to Andreas Rottmann.
7034
7035 2002-04-20 Gary Houston <ghouston@arglist.com>
7036
7037 * removal of unused fields in root state (thanks to Christopher
7038 Cramer for pointing out the disuse.)
7039 * root.h (scm_root_state): removed def_inp, def_outp, def_errp.
7040 (scm_def_inp, scm_def_outp, scm_def_errp): removed.
7041
7042 * root.c (root_mark): don't mark them.
7043 (scm_make_root): don't set them to #f.
7044 * init.c (scm_init_standard_ports): don't initialise with the
7045 default ports.
7046
7047 2002-04-17 Marius Vollmer <mvo@zagadka.ping.de>
7048
7049 * Makefile.am (EXTRA_DIST): Added cpp_err_symbols.c and
7050 cpp_sig_symbols.c.
7051
7052 2002-04-16 Marius Vollmer <mvo@zagadka.ping.de>
7053
7054 * guile-snarf.in: Do not clean input file. This would write to
7055 the $(srcdir) during a VPATH build, which is not allowed. It also
7056 isn't needed since it only works when an output filename has been
7057 specified and in that case we don't need to clean the input file
7058 because the output file will already exist.
7059
7060 2002-03-31 Marius Vollmer <mvo@zagadka.ping.de>
7061
7062 * guile-snarf: Install the trap for removing $cleanfile only when
7063 the value of $cleanfile is actually known.
7064
7065 2002-04-10 Rob Browning <rlb@defaultvalue.org>
7066
7067 * .cvsignore: add versiondat.h and *.c.clean.c.
7068
7069 2002-03-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
7070
7071 * srcprop.[ch] (scm_c_source_property_breakpoint_p): New
7072 function, replaces macro SRCBRKP.
7073
7074 (SRCBRKP): Deprecated.
7075
7076 * eval.c (SCM_CEVAL): Replaced use of SRCBRKP by call to
7077 scm_c_source_property_breakpoint_p. Removed some use of arg1 as
7078 temporary variable.
7079
7080 2002-03-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
7081
7082 * debug.h, eval.c: Deprecated CHECK_ENTRY, CHECK_APPLY and
7083 CHECK_EXIT and removed all references to them.
7084
7085 2002-03-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
7086
7087 * debug.h (scm_ready_p, debug_print): Removed declarations.
7088
7089 * eval.c (EVALCELLCAR): Removed.
7090
7091 (SCM_CEVAL): Eliminated label loopnoap. Removed side-effecting
7092 operation from condition.
7093
7094 2002-03-24 Marius Vollmer <mvo@zagadka.ping.de>
7095
7096 * guile-snarf.in: When the output filename is "-", write to
7097 stdout. When no "-o" option is given, use "-" as the output
7098 filename (i.e., stdout). Only 'clean' the inputfile or remove the
7099 output file on error when the output file name is not "-". Define
7100 the preprocessor macro SCM_MAGIC_SNARFER while snarfing.
7101
7102 * Makefile.am (.c.x): Pass "-o $@" to guile-snarf.
7103
7104 2002-03-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
7105
7106 * eval.c (SCM_CEVAL, SCM_APPLY): Eliminated labels wrongnumargs
7107 and the corresponding goto statements. Removed redundant code.
7108
7109 2002-03-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
7110
7111 * eval.c (SCM_CEVAL): Minimized scope of variable arg2.
7112 Eliminated redundant SCM_IMP check. Exlined call to EVALCAR.
7113 Re-enabled handing of rpsubrs and asubrs.
7114
7115 2002-03-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
7116
7117 * eval.c (SIDEVAL): Removed.
7118
7119 (SCM_CEVAL): Minimized scope of variable orig_sym. Eliminated
7120 goto-labels cdrxnoap, cdrxbegin and nontoplevel_cdrxnoap. Changed
7121 argument checking order for set! to locals, variables and symbols.
7122 Improvements to control structure. Removed some uses of arg1 and
7123 arg2 as temporary variables.
7124
7125 2002-03-15 Thien-Thi Nguyen <ttn@giblet.glug.org>
7126
7127 * guile-snarf.in: Remove "--compat=1.4" support.
7128 Add "-d" and "-D" support.
7129
7130 (deprecated_list): New var.
7131 (compat_mode_clean_xxx): Delete.
7132 (grep_deprecated): New func.
7133 ("main"): If "-d" or "-D", call `grep_deprecated'.
7134
7135 2002-03-15 Neil Jerram <neil@ossau.uklinux.net>
7136
7137 * hooks.h: Change scm_t_c_hookype_t everywhere to
7138 scm_t_c_hook_type.
7139
7140 Docstring fixes:
7141
7142 * strings.c (scm_string_p): Change unnecessary `iff' to `if'.
7143
7144 * ports.c (scm_sys_make_void_port): Use `@file'.
7145
7146 * numbers.c (scm_number_p, scm_real_p): Use `otherwise' rather
7147 than `else'.
7148
7149 * macros.c (scm_makmacro): Don't say that the form replaces its
7150 source, because it doesn't.
7151 (scm_makmmacro): Clarify difference between this and scm_makmacro.
7152
7153 * backtrace.c (scm_display_error), filesys.c (scm_umask,
7154 scm_select, scm_basename), goops.c (scm_method_generic_function),
7155 numbers.c (scm_integer_length), posix.c (scm_getgroups, scm_execl,
7156 scm_setlocale, scm_flock), socket.c (scm_shutdown): Correct
7157 spelling mistakes.
7158
7159 * debug.c (scm_debug_options), eval.c
7160 (scm_eval_options_interface), read.c (scm_read_options): Change
7161 incorrect @var in docstring to @code.
7162
7163 2002-03-14 Marius Vollmer <mvo@zagadka.ping.de>
7164
7165 * unif.c (singp): Use SCM_REALP instead of SCM_SLOPPY_REALP.
7166
7167 * snarf.h (SCM_SNARF_INIT): Add "^:^" after code so that
7168 guile-snarf can remove trailing non-init code.
7169
7170 * guile-snarf.in (modern_snarf): Remove everything following and
7171 including "^:^" from the output.
7172
7173 2002-03-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
7174
7175 * eval.c (SCM_CEVAL), srcprop.h (SRCBRKP): Eliminated union 't'.
7176
7177 * eval.c (SCM_CEVAL): Exlined call to EVALCAR.
7178
7179 2002-03-13 Thien-Thi Nguyen <ttn@giblet.glug.org>
7180
7181 * guile-snarf.in: Update copyright.
7182 Rewrite to internalize error handling.
7183 Add "--compat=1.4" handling.
7184 Add commentary.
7185
7186 * Makefile.am (libpath.h): Use @top_srcdir_absolute@.
7187 (snarfcppopts): New var.
7188 (.c.x): Use $(snarfcppopts). Rework guile-snarf usage.
7189 (.c.doc): Use $(snarfcppopts).
7190
7191 * alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,
7192 continuations.c, debug-malloc.c, debug.c, deprecation.c, dynl.c,
7193 dynwind.c, environments.c, eq.c, error.c, eval.c, evalext.c,
7194 extensions.c, feature.c, filesys.c, fluids.c, fports.c, gc.c,
7195 goops.c, gsubr.c, guardians.c, hash.c, hashtab.c, hooks.c,
7196 ioext.c, iselect.c, keywords.c, lang.c, list.c, load.c, macros.c,
7197 modules.c, net_db.c, numbers.c, objects.c, objprop.c, options.c,
7198 pairs.c, ports.c, posix.c, print.c, procprop.c, procs.c,
7199 properties.c, ramap.c, random.c, rdelim.c, read.c, regex-posix.c,
7200 root.c, rw.c, scmsigs.c, script.c, simpos.c, socket.c, sort.c,
7201 srcprop.c, stackchk.c, stacks.c, stime.c, strings.c, strop.c,
7202 strorder.c, strports.c, struct.c, symbols.c, threads.c, throw.c,
7203 unif.c, values.c, variable.c, vectors.c, version.c, vports.c,
7204 weaks.c: Retire inclusion guard macro SCM_MAGIC_SNARFER.
7205
7206 2002-03-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
7207
7208 * eval.c (SCM_CEVAL): Got rid of the last reference to t.lloc.
7209 The next step will be to remove the union 't' and simplify the
7210 code of SCM_CEVAL that way.
7211
7212 2002-03-12 Neil Jerram <neil@ossau.uklinux.net>
7213
7214 * iselect.c (collisionp, gnfds, greadfds, gwritefds, gexceptfds,
7215 rreadfds, rwritefds, rexceptfds): Made static.
7216
7217 * gc.c (terminating), fports.c (terminating): Renamed
7218 scm_i_terminating.
7219
7220 2002-03-11 Marius Vollmer <mvo@zagadka.ping.de>
7221
7222 * numbers.c (scm_divide): Adapt code from libstdc++/f2c to void
7223 potential overflow problems. Thanks to John W Eaton!
7224
7225 * strop.c (string_capitalize_x): Treat characters as unsigned so
7226 that 8-bit chars work. Thanks to David Pirotte!
7227
7228 2002-03-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
7229
7230 * eval.c (SCM_CEVAL): Cleaned up the handling of 'slot-ref',
7231 'slot-set!' and 'nil-cond'. Removed some uses of t.arg1, arg2 and
7232 proc as temporary variables. Introduced temporary variables with
7233 hopefully descriptive names for clarification. Replaced SCM_N?IMP
7234 by a more explicit predicate in some places.
7235
7236 2002-03-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
7237
7238 * eval.c (SCM_CEVAL): Cleaned up the handling of #@dispatch.
7239 Added lots of comments regarding the implementation of #@dispatch.
7240 Changed intra-procedure communication to use t.arg1 instead of
7241 arg2. Removed some uses of t.arg1, t.lloc and proc as temporary
7242 variables. Introduced temporary variables with hopefully
7243 descriptive names for clarification. Replaced SCM_N?IMP by a more
7244 explicit predicate in some places. Use SCM_INSTANCE_HASH instead
7245 of computing the expression explicitly. Eliminate now unused
7246 label nontoplevel_cdrxbegin.
7247
7248 * goops.h (SCM_INSTANCE_HASH): New macro.
7249
7250 * objects.h (SCM_CMETHOD_FORMALS, SCM_CMETHOD_BODY): New macros.
7251
7252 2002-03-08 Thien-Thi Nguyen <ttn@giblet.glug.org>
7253
7254 * Makefile.am (bin_SCRIPTS): Revive this decl, w/ initial element
7255 "guile-snarf" moved back from `noinst_SCRIPTS'.
7256
7257 2002-03-08 Neil Jerram <neil@ossau.uklinux.net>
7258
7259 * srcprop.c (scm_set_source_property_x): If SRCPROPS obj already
7260 exists when adding a source property other than those that are
7261 handled explicitly, add the new property to the SRCPROPS obj's
7262 plist.
7263
7264 * debug.h (SCM_MAX_FRAME_SIZE): Remove incorrect comment about use
7265 of SCM_MAX_FRAME_SIZE as a bit mask; it isn't used like this.
7266
7267 * eval.c (SCM_CEVAL): Don't store scm_debug_eframe_size in
7268 debug.status. It isn't needed, and it can overflow the bits
7269 reserved for it (which may lead to a segv or a GC abort).
7270
7271 2002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
7272
7273 * eval.c (SCM_CEVAL): Cleaned up the handling of 'apply'. Removed
7274 side-effecting operations from conditions and macro calls.
7275 Replaced SCM_N?IMP by a more explicit predicate in some places.
7276 Minimized the scope of some variables.
7277
7278 2002-03-02 Stefan Jahn <stefan@lkcc.org>
7279
7280 * convert.i.c: Fixed int <-> long conversions which would have
7281 failed if their sizes were different.
7282
7283 2002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
7284
7285 * eval.c (SCM_CEVAL): Cleaned up the handling of 'if', 'let',
7286 'letrec' and 'set*': Removed some uses of t.arg1, t.lloc and proc
7287 as temporary variables. Removed side-effecting operations from
7288 conditions and macro calls. Introduced temporary variables with
7289 hopefully descriptive names for clarification. Replaced SCM_N?IMP
7290 by a more explicit predicate in some places. Removed code that
7291 was conditionally compiled if SICP was defined - which it never
7292 is.
7293
7294 2002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
7295
7296 * eval.c (SCM_CEVAL): Cleaned up the handling of 'cons' and 'do':
7297 Removed some uses of t.arg1 and proc as temporary variables.
7298 Removed side-effecting operations from conditions and macro calls.
7299 Introduced temporary variables with hopefully descriptive names
7300 for clarification. Replaced SCM_N?IMP by a more explicit
7301 predicate in some places.
7302
7303 2002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
7304
7305 * eval.c (scm_badargsp, SCM_CEVAL): Replaced SCM_N?IMP by a more
7306 explicit predicate in some places.
7307
7308 (CHECK_EQVISH): Removed.
7309
7310 (SCM_CEVAL): Removed some uses of t.arg1 and proc as temporary
7311 variables. Removed side-effecting operations from conditions and
7312 macro calls. Introduced temporary variables for clarification.
7313 Sorted if-else-if check for the type of the last form in a list by
7314 frequency. Avoided some unnecessary tail-recursion calls.
7315
7316 2002-03-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
7317
7318 * gc.c (SCM_HEAP_SEG_SIZE, CELL_UP, CELL_DN, NEXT_DATA_CELL,
7319 init_heap_seg, alloc_some_heap), gc.h (struct scm_cell, struct
7320 scm_t_cell, SCM_CELLPTR, SCM_GC_CARD_SIZE,
7321 SCM_GC_IN_CARD_HEADERP), tags.h (SCM_CELLP): Renamed the struct
7322 scm_cell and all its uses to scm_t_cell in accordance to Guile's
7323 naming scheme for types.
7324
7325 * alist.c (scm_acons), convert.i.c (CTYPES2UVECT,
7326 CTYPES2UVECT_OPTIONAL), coop-threads.c (scm_call_with_new_thread,
7327 scm_spawn_thread), debug.c (scm_make_debugobj), environments.c
7328 (scm_make_environment), eval.c (scm_closure), fports.c
7329 (scm_fdes_to_port), gc.c (scm_deprecated_newcell,
7330 scm_deprecated_newcell2), inline.h (scm_alloc_cell, scm_cell),
7331 list.c (SCM_I_CONS), numbers.c (scm_i_mkbig), pairs.c (scm_cons),
7332 ports.c (scm_void_port), procs.c (scm_c_make_subr, scm_makcclo),
7333 smob.c (scm_make_smob), smob.h (SCM_NEWSMOB), strings.c
7334 (scm_take_str, scm_allocate_string), strports.c (scm_mkstrport),
7335 unif.c (scm_make_uve), variable.c (make_variable), vectors.c
7336 (scm_c_make_vector), vports.c (scm_make_soft_port): Renamed
7337 scm_alloc_cell to scm_cell.
7338
7339 * environments.c (core_environments_observe), gc.c
7340 (scm_deprecated_newcell2), goops.c (wrap_init, scm_wrap_object),
7341 inline.h (scm_alloc_double_cell, scm_double_cell), num2float.i.c
7342 (FLOAT2NUM), numbers.c (scm_make_real), procs.c
7343 (scm_make_procedure_with_setter), smob.h (SCM_NEWSMOB2,
7344 SCM_NEWSMOB3), struct.c (scm_make_struct, scm_make_vtable_vtable),
7345 symbols.c (scm_mem2symbol, scm_mem2uninterned_symbol), weaks.c
7346 (allocate_weak_vector): Renamed scm_alloc_double_cell to
7347 scm_double_cell.
7348
7349 2002-02-27 Stefan Jahn <stefan@lkcc.org>
7350
7351 * convert.i.c, convert.c: Better range checking.
7352
7353 * inet_aton.c, fports.c: Commented the inclusion of <winsock2.h>.
7354
7355 * deprecation.c (vsnprintf): Define to `_vsnprintf' for
7356 Windows (MinGW).
7357
7358 2002-02-26 Thien-Thi Nguyen <ttn@giblet.glug.org>
7359
7360 * Makefile.am: Update path to pre-inst-guile automake frag.
7361
7362 2002-02-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
7363
7364 * gc.c (scm_gc_sweep): Make it compile even when deprecated
7365 features are excluded.
7366
7367 2002-02-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
7368
7369 * num2integral.i.c (NUM2INTEGRAL): Fixed signedness problem.
7370
7371 2002-02-25 Gary Houston <ghouston@arglist.com>
7372
7373 * convert.c: include <string.h> for convert_i.c.
7374
7375 2002-02-24 Rob Browning <rlb@defaultvalue.org>
7376
7377 * .cvsignore: add stamp-h1.
7378
7379 2002-02-21 Neil Jerram <neil@ossau.uklinux.net>
7380
7381 * unif.c (scm_array_to_list): Correct name, which had been
7382 accidentally changed to scm_t_arrayo_list!
7383
7384 2002-02-20 Mikael Djurfeldt <mdj@linnaeus>
7385
7386 * gc.c (scm_gc_sweep): Print an error message when aborting due to
7387 underflowing scm_mallocated.
7388
7389 2002-02-14 Marius Vollmer <marius.vollmer@uni-dortmund.de>
7390
7391 * gc.h, gc.c (scm_must_malloc, scm_must_realloc, scm_must_strdup,
7392 scm_must_strndup, scm_done_malloc, scm_done_free, scm_must_free):
7393 Reimplemented using the new scm_gc_malloc, etc., functions and
7394 deprecated.
7395
7396 2002-02-11 Thien-Thi Nguyen <ttn@giblet.glug.org>
7397
7398 * Makefile.am (bin_PROGRAMS): Move `guile_filter_doc_snarfage'
7399 to `noinst_PROGRAMS'.
7400 (bin_SCRIPTS): Move all values to `noinst_SCRIPTS'; delete.
7401 (noinst_PROGRAMS, noinst_SCRIPTS): New.
7402
7403 2002-02-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
7404
7405 * gc.h, gc.c (scm_gc_sweep): Issue deprecation warning when
7406 non-zero is returned from a port or smob free function.
7407 (scm_malloc, scm_realloc, scm_strndup, scm_strdup,
7408 scm_gc_register_collectable_memory,
7409 scm_gc_unregister_collectable_memory, scm_gc_malloc,
7410 scm_gc_realloc, scm_gc_free, scm_gc_strndup, scm_gc_strdup): New.
7411
7412 * backtrace.c, continuations.c, convert.i.c, coop-threads.c,
7413 debug-malloc.c, dynl.c, environments.c, environments.h,
7414 extensions.c, filesys.c, fports.c, gc.c, gc.h, gh_data.c, goops.c,
7415 guardians.c, hooks.c, init.c, keywords.c, load.c, numbers.c,
7416 ports.c, posix.c, procs.c, rdelim.c, regex-posix.c, root.c,
7417 smob.c, stime.c, strings.c, struct.c, struct.h, symbols.c, unif.c,
7418 vectors.c, weaks.c: Use scm_gc_malloc/scm_malloc and
7419 scm_gc_free/free instead of scm_must_malloc and scm_must_free, as
7420 appropriate. Return zero from smob and port free functions.
7421
7422 * debug-malloc.c (scm_malloc_reregister): Handle "old == NULL".
7423
7424 * deprecation.h, deprecation.c: Reimplemented to allow deprecation
7425 messages while the GC is running.
7426 (scm_c_issue_deprecation_warning_fmt): New.
7427
7428 * fports.c (scm_setvbuf): Reset read buffer to saved values when
7429 it is pointing to the putback buffer.
7430
7431 2002-02-08 Thien-Thi Nguyen <ttn@giblet.glug.org>
7432
7433 * gsubr.c (create_gsubr): On "too many args" error,
7434 also display arg count and name. Thanks to Bill Schottstaedt.
7435
7436 2002-02-05 Thien-Thi Nguyen <ttn@giblet.glug.org>
7437
7438 * Makefile.am: Include $(top_srcdir)/pre-inst-guile.am.
7439
7440 (bin_SCRIPTS): Remove guile-snarf-docs-texi.
7441 (alldotdocfiles, snarf2checkedtexi, dotdoc2texi): New vars.
7442 (guile.texi, guile-procedures.texi): Use $(dotdoc2texi).
7443
7444 * guile-snarf-docs-texi.in: Bye bye.
7445
7446 2002-02-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
7447
7448 * symbols.c (scm_make_symbol): Fix typo in docstring.
7449
7450 * symbols.h (scm_mem2uninterned_symbol, scm_symbol_interned_p,
7451 scm_make_symbol): New prototypes.
7452
7453 2002-02-03 Marius Vollmer <mvo@zagadka.ping.de>
7454
7455 * symbols.h (SCM_SET_SYMBOL_HASH): Removed.
7456 (SCM_SYMBOL_INTERNED_P): New.
7457 * symbols.c (scm_symbol_hash): Use scm_ulong2num instead of
7458 SCM_MAKINUM since hash values can well be bignums.
7459 (scm_mem2symbol): Only use hash values below SCM_T_BITS_MAX/2.
7460 This signals a interned symbol.
7461 (scm_mem2uninterned_symbol, scm_symbol_interned_p,
7462 scm_make_symbol): New.
7463
7464 * print.c (scm_iprin1): Print uninterned symbols unreadably.
7465
7466 2002-02-02 Thien-Thi Nguyen <ttn@giblet.glug.org>
7467
7468 * __scm.h (HAVE_UINTPTR_T): Only define if UINTPTR_T attributes
7469 are defined: UINTPTR_MAX, INTPTR_MAX, INTPTR_MIN.
7470 Thanks to Dave Love.
7471
7472 2002-01-31 Marius Vollmer <mvo@zagadka.ping.de>
7473
7474 * symbols.c (scm_gensym): Use " g" as default prefix, not "g".
7475 This might help to make unintended clashes less likely.
7476 (scm_string_to_symbol): Protect the string until the symbols is
7477 created.
7478
7479 2002-01-31 Stefan Jahn <stefan@lkcc.org>
7480
7481 * convert.c, convert.h, convert.i.c: New files containing C
7482 array to Scheme conversion helpers meant to be replacement
7483 functions for the deprecated gh interface.
7484
7485 * Makefile.am: Setup rules for new `convert.*' files.
7486
7487 2002-01-28 Stefan Jahn <stefan@lkcc.org>
7488
7489 * symbols.c (scm_c_symbol2str): New function, replacement for
7490 `gh_scm2newsymbol()'.
7491
7492 * strings.c (scm_c_substring2str): New function. Proper
7493 replacement for `gh_get_substr()'.
7494
7495 * socket.c: Include `stdint.h' if available for the `uint32_t'
7496 declaration.
7497
7498 * scmsigs.c (scm_sigaction): Initialize `chandler' (inhibits
7499 compiler warning).
7500
7501 * backtrace.c: Include `lang.h' for GUILE_DEBUG conditional.
7502
7503 2002-01-22 Neil Jerram <neil@ossau.uklinux.net>
7504
7505 Other changes unrelated to Elisp...
7506
7507 * eval.c (scm_m_if): Use s_if rather than repeating string literal
7508 "if".
7509 (comments): Fix a few typos.
7510 (scm_for_each): Add parentheses around oddly unparenthesized
7511 if/while conditions.
7512
7513 * read.c (scm_read_opts): Add full stop at end of doc for
7514 `keywords' option.
7515
7516 * script.c (scm_compile_shell_switches): Use scm_str2symbol
7517 instead of gh_symbol2scm.
7518
7519 * srcprop.h (SRCPROPBRK): Return C type rather than SCM.
7520 (SRCBRKP): Use SRCPROPBRK rather than duplicating its logic.
7521
7522 * srcprop.c (scm_srcprops_to_plist, scm_source_property): Change
7523 SRCPROPBRK (x) to SCM_BOOL (SRCPROPBRK (x)).
7524
7525 First batch of changes for Elisp support...
7526
7527 * alist.c, async.c, boolean.c, dynl.c, eval.c, filesys.c,
7528 fluids.c, list.c, load.c, options.c, posix.c, print.c, sort.c,
7529 throw.c, vectors.c, weaks.c: Add #include for lang.h.
7530
7531 * eval.c, eval.h, init.c, lang.c, lang.h: Use SCM_ENABLE_ELISP to
7532 conditionalize compilation and initialization of Elisp support
7533 function.
7534
7535 * alist.c (scm_assq, scm_assv, scm_assoc), async.c
7536 (scm_asyncs_pending, scm_run_asyncs, noop), backtrace.c
7537 (scm_set_print_params_x), dynl.c (scm_make_argv_from_stringlist),
7538 filesys.c (fill_select_type, retrieve_select_type), fluids.c
7539 (scm_swap_fluids, scm_swap_fluids_reverse), list.c (scm_null_p,
7540 scm_ilength, scm_append_x, scm_last_pair, scm_reverse,
7541 scm_reverse_x, scm_list_ref, scm_list_set_x, scm_list_cdr_set_x,
7542 scm_c_memq, scm_memv, scm_member), load.c (scm_search_path),
7543 options.c (change_option_setting, scm_options), posix.c
7544 (environ_list_to_c), print.c (scm_iprlist), throw.c
7545 (scm_exit_status), vectors.c (scm_vector), weaks.c
7546 (scm_weak_vector): Use SCM_NULL_OR_NIL_P instead of SCM_NULLP.
7547
7548 * boolean.c (scm_not): Use `SCM_FALSEP || SCM_NILP' instead of
7549 just SCM_FALSEP.
7550
7551 * boolean.c (scm_boolean_p): Use `SCM_BOOLP || SCM_NILP' instead
7552 of just SCM_BOOLP.
7553
7554 * eval.c (scm_lisp_nil, scm_lisp_t, s_nil_ify, scm_m_nil_ify,
7555 s_t_ify, scm_m_t_ify, s_0_cond, scm_m_0_cond, s_0_ify,
7556 scm_m_0_ify, s_1_ify, scm_m_1_ify): Removed.
7557 (scm_m_atfop): Support function aliasing. Support both function
7558 args, which need transformation, and macro args, which do not.
7559 Add explanatory comments.
7560 (SCM_CEVAL): In switch cases for SCM_IM_AND, SCM_IM_COND,
7561 SCM_IM_DO, SCM_IM_IF and SCM_IM_OR, add `|| SCM_NILP' to existing
7562 checks for SCM_FALSEP. In switch case for SCM_IM_NIL_COND, use
7563 SCM_NULLP || SCM_NILP instead of checks against (removed)
7564 scm_lisp_nil. Removed switch cases for SCM_IM_NIL_IFY,
7565 SCM_IM_T_IFY, SCM_IM_0_COND, SCM_IM_0_IFY, SCM_IM_1_IFY.
7566
7567 * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null,
7568 scm_m_while, scm_nil_eq): Commented out; I don't think we need
7569 these, but I don't want to remove them yet, just in case.
7570 (scm_init_lang): Define `%nil' variable on Scheme level to hold
7571 Elisp nil value.
7572
7573 * lang.h (SCM_NILP): Test against Elisp nil value instead of
7574 against (removed) scm_lisp_nil.
7575 (SCM_NILNULLP, SCM_NIL2EOL, SCM_EOL2NIL): Commented out.
7576 (SCM_NULL_OR_NIL_P): New.
7577
7578 * list.c (scm_append): Use SCM_VALIDATE_NULL_OR_NIL instead of
7579 SCM_VALIDATE_NULL.
7580
7581 * print.c (scm_isymnames): Fix comment. Remove #@nil-ify,
7582 #@t-ify, #@0-cond, #@0-ify, #@1-ify. Add #nil (for SCM_ELISP_NIL
7583 value).
7584
7585 * sort.c (scm_sorted_p, scm_merge, scm_merge_list_x, scm_merge_x,
7586 scm_sort_x, scm_sort, scm_stable_sort_x, scm_stable_sort): Use
7587 SCM_NULL_OR_NIL_P instead of SCM_NULLP. In constructions like `if
7588 (SCM_NULLP (x)) return SCM_EOL;', return x rather than SCM_EOL.
7589
7590 * tags.h (SCM_IM_NIL_IFY, SCM_IM_T_IFY, SCM_IM_0_COND,
7591 SCM_IM_0_IFY, SCM_IM_1_IFY): Removed.
7592 (SCM_IM_BIND, SCM_IM_DELAY, SCM_IM_CALL_WITH_VALUES, SCM_UNBOUND):
7593 Numbering shifted down accordingly.
7594 (SCM_ELISP_NIL): New IFLAG.
7595
7596 * validate.h (SCM_VALIDATE_NULL_OR_NIL): New.
7597
7598 2002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
7599
7600 * eval.c: Removed outdated references to "everr". Improved some
7601 comments.
7602
7603 (scm_deval_args, deval_args): Renamed scm_deval_args to
7604 deval_args, since it is not part of the interface.
7605
7606 (SCM_CEVAL): Added (maybe somewhat verbose) comment. Avoid to
7607 use references to debug.vect[0] before it exists. Add parentheses
7608 to switch statement.
7609
7610 * goops.h: Added local emacs variables.
7611
7612 2002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
7613
7614 * eval.[ch] (scm_deval_args): Made static.
7615
7616 * srcprop.c (scm_source_property): Remove redundant SCM_IMP
7617 test.
7618
7619 * strings.c (scm_c_string2str): Clarified comment. Replaced
7620 THINKME by FIXME for uniformness. Removed question about whether
7621 arguments need to be protected from garbage collection: Arguments
7622 must be protected as any other variable.
7623
7624 2002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
7625
7626 * procs.h (SCM_CLOSURE_BODY): New Macro.
7627
7628 * debug.c (scm_procedure_name, scm_procedure_source), eval.c
7629 (SCM_CEVAL, SCM_APPLY), goops.c (scm_sys_initialize_object,
7630 get_slot_value, set_slot_value), procs.c
7631 (scm_procedure_documentation), sort.c (closureless), stacks.c
7632 (get_applybody): Replace SCM_CDR (SCM_CODE (...)) by
7633 SCM_CLOSURE_BODY.
7634
7635 * sort.c (closureless): Prefer !SCM_FOOP over SCM_NFOOP.
7636
7637 2001-12-26 Marius Vollmer <mvo@zagadka.ping.de>
7638
7639 * Makefile.am (guile-procedures.txt): When we don't have makeinfo,
7640 use "cp" instead.
7641
7642 2001-12-16 Marius Vollmer <mvo@zagadka.ping.de>
7643
7644 * stacks.c, stacks.h (scm_t_stackype): Renamed to scm_stack_type
7645 everywhere.
7646
7647 * continuations.c (scm_make_continuation): Do not retain the
7648 throw_value when the continuation is invoked.
7649
7650 2001-12-08 Stefan Jahn <stefan@lkcc.org>
7651
7652 * strings.c (scm_c_string2str): New function. Converts a
7653 given Scheme string into a C string. Also put in two
7654 THINKME's regarding the malloc policy for the missing converter
7655 routines.
7656
7657 2001-12-01 Neil Jerram <neil@ossau.uklinux.net>
7658
7659 * gh_data.c (gh_module_lookup): Use scm_str2symbol rather than
7660 gh_symbol2scm.
7661
7662 2001-11-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
7663
7664 * gc.h (SCM_GC_CELL_WORD, SCM_GC_CELL_OBJECT,
7665 SCM_GC_SET_CELL_WORD, SCM_GC_SET_CELL_OBJECT): New macros.
7666
7667 (SCM_GC_CELL_TYPE, SCM_CELL_WORD, SCM_CELL_OBJECT,
7668 SCM_SET_CELL_WORD, SCM_SET_CELL_OBJECT, SCM_FREE_CELL_CDR,
7669 SCM_GC_SET_CELL_OBJECT): Express in terms of SCM_GC_CELL_*
7670 macros.
7671
7672 (SCM_FREE_CELL_P): Express in terms of SCM_GC_CELL_TYPE.
7673
7674 * inline.h (scm_alloc_cell, scm_alloc_double_cell): Use
7675 SCM_GC_CELL_* macros when accessing free cells.
7676
7677 2001-11-25 Marius Vollmer <mvo@zagadka.ping.de>
7678
7679 * vectors.h (SCM_MAKE_VECTOR_TAG): New.
7680 * unif.h (SCM_MAKE_BITVECTOR_TAG, SCM_MAKE_UVECTOR_TAG): New.
7681 * symbols.h (SCM_MAKE_SYMBOL_TAG): New.
7682 * strings.h (SCM_MAKE_STRING_TAG): New.
7683 * procs.h (SCM_MAKE_CCLO_TAG): New.
7684 * numbers.h (SCM_MAKE_BIGNUM_TAG): New.
7685
7686 * goops.h: Replaced SCM_DEBUG_DEPRECATED with
7687 !SCM_ENABLE_DEPRECATED.
7688
7689 * async.c, async.h (scm_system_async_mark_from_signal_handler):
7690 New.
7691
7692 * scmsigs.c (scm_take_signal): Removed all code that assumes that
7693 signal handlers are allowed to divert the flow of control. Call
7694 scm_system_async_mark_from_signal_handler instead of
7695 scm_system_async_mark.
7696
7697
7698 Deprecated SCM_NEWCELL and SCM_NEWCELL2. Added scm_alloc_cell and
7699 scm_alloc_double_cell in their place.
7700
7701 * gc.h (SCM_GC_SET_ALLOCATED, scm_debug_newcell,
7702 scm_debug_newcell2, scm_tc16_allocated): Removed from header.
7703 (scm_deprecated_newcell, scm_deprecated_newcell2): New.
7704 (SCM_NEWCELL, SCM_NEWCELL2): Implement in terms of
7705 scm_deprecated_newcell and scm_deprecated_newcell2.
7706
7707 gc.c (scm_tc16_allocated): Only define when including deprecated
7708 features.
7709 (scm_debug_newcell, scm_debug_newcell2): Removed.
7710 (scm_init_storage): Do not initialize scm_tc16_allocated.
7711 (scm_init_gc): Do it here.
7712 (allocated_mark): New, from old code.
7713 (scm_deprecated_newcell, scm_deprecated_newcell2): New.
7714
7715 * inline.c, inline.h: New files.
7716 * Makefile.am: Added them in all the right places.
7717
7718 * _scm.h: Include "libguile/inline.h".
7719
7720 * alist.c, coop-threads.c, debug.c, environments.c, eval.c,
7721 fports.c, gh_data.c, goops.c, guardians.c, lang.c, list.c,
7722 num2float.i.c, numbers.c, pairs.c, ports.c, print.c, procs.c,
7723 smob.c, smob.h, strings.c, strports.c, struct.c, symbols.c,
7724 unif.c, variable.c, vectors.c, vports.c, weaks.c: Replaced
7725 SCM_NEWCELL and SCM_NEWCELL2 with scm_alloc_cell and
7726 scm_alloc_double_cell, respectively.
7727
7728 2001-11-23 Marius Vollmer <mvo@zagadka.ping.de>
7729
7730 * modules.c (scm_c_use_module): Adapt to changes to
7731 `process-use-modules'.
7732
7733 2001-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
7734
7735 * numbers.c (scm_divide): Fix more division by zero errors.
7736
7737 2001-11-21 Gary Houston <ghouston@arglist.com>
7738
7739 * Makefile.am (OMIT_DEPENDENCIES): removed, since it seems to be
7740 obsolete. autogen.sh says:
7741 invalid unused variable name: `OMIT_DEPENDENCIES'
7742
7743 2001-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
7744
7745 * numbers.c (scm_divide): Fix (/ 0). Thanks to Keith Wright for
7746 reporting the bug.
7747
7748 2001-11-21 Marius Vollmer <mvo@zagadka.ping.de>
7749
7750 * Makefile.am (install-exec-hook): Prepend $(DESTDIR) to filename.
7751 Thanks to Eric Gillespie, Jr!
7752
7753 2001-11-21 Stefan Jahn <stefan@lkcc.org>
7754
7755 * win32-socket.c (getservent, setservent, endservent,
7756 getprotoent, setprotoent, endprotoent): New functions.
7757 Appropriate replacements for M$-Windows.
7758
7759 * numbers.c (SIZE_MAX, PTRDIFF_MAX, PTRDIFF_MIN): Reintroduced
7760 these definitions for GUILE_DEBUG.
7761
7762 * net_db.c: Include "win32-socket.h" if compiling with a native
7763 M$-Windows compiler. Include some pieces of code (protoent and
7764 servent interface) protected by HAVE_* macros when using a
7765 native M$-Windows compiler.
7766
7767 2001-11-20 Marius Vollmer <mvo@zagadka.ping.de>
7768
7769 * modules.c (scm_c_export): Do nothing when the first argument is
7770 already the terminating NULL. Thanks to Han-Wen Nienhuys!
7771
7772 2001-11-20 Thien-Thi Nguyen <ttn@glug.org>
7773
7774 * Makefile.am (libpath.h): In SCM_BUILD_INFO,
7775 also include `buildstamp'.
7776
7777 2001-11-18 Rob Browning <rlb@defaultvalue.org>
7778
7779 * version.c
7780 (s_scm_major_version): use SCM_MAJOR_VERSION.
7781 (s_scm_minor_version): use SCM_MINOR_VERSION.
7782 (s_scm_micro_version): use SCM_MICRO_VERSION.
7783 (s_scm_version): use SCM_MAJOR_VERSION, SCM_MINOR_VERSION, and
7784 SCM_MICRO_VERSION.
7785
7786 * version.h.in
7787 (SCM_MAJOR_VERSION): renamed from SCM_GUILE_MAJOR_VERSION.
7788 (SCM_MINOR_VERSION): renamed from SCM_GUILE_MINOR_VERSION.
7789 (SCM_MICRO_VERSION): renamed from SCM_GUILE_MICRO_VERSION.
7790
7791 2001-11-18 Neil Jerram <neil@ossau.uklinux.net>
7792
7793 * vectors.c (scm_vector_move_left_x, scm_vector_move_right_x):
7794 Rewrite docstrings without reference to substring-move-left/right,
7795 since the latter no longer exist.
7796
7797 2001-11-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
7798
7799 * eval.c: Removed bogus comment about acros.
7800
7801 (scm_unmemocar): Use !SCM_CONSP instead of SCM_IMP.
7802 Minimize scope of local variable. Eliminate dependency on
7803 macro DEBUG_EXTENSIONS.
7804
7805 (s_splicing): New error message string.
7806
7807 (scm_m_body): Issue 'bad body' message rather than 'missing
7808 expression' message.
7809
7810 (scm_m_quote): Eliminate unnecessary copying.
7811
7812 (scm_m_lambda, scm_m_letstar, scm_m_letrec, scm_m_let): Leave the
7813 checking of the body to scm_m_body.
7814
7815 (scm_m_do): Move comment to function header. Rename arg1 to
7816 binding. Made the code a bit easier to read.
7817
7818 (evalcar): Removed.
7819
7820 (iqq): Added a comment. Changed the depth parameter to
7821 unsigned. Use size_t for vector lengths. Make sure vector object
7822 is gc protected as long as its contents are read. Add some syntax
7823 checks. Get rid of unnecessary SCM_IMP test. Clean up the
7824 control structure a bit.
7825
7826 (scm_m_delay): Added comment about the implementation of
7827 scm_m_delay.
7828
7829 (scm_m_define): Add comment about guile's currying define
7830 syntax. Renamed 'proc' to 'name'. Eliminate dependency on macro
7831 DEBUG_EXTENSIONS. Simplified code a bit. Eliminate SICP code.
7832
7833 (scm_m_letrec1): Removed. Part of the functionality is taken
7834 over by the new function 'transform_bindings'.
7835
7836 (transform_bindings): New function. Takes over some of the
7837 functionality of removed function 'scm_m_letrec1', namely to split
7838 a list of bindings into a reversed list of variables and a list of
7839 initializers.
7840
7841 (scm_m_letrec): Call 'transform_bindings'.
7842
7843 (scm_m_let): Minimized scope of local variables. Renamed 'proc'
7844 to 'temp' and 'arg1' to 'binding'. Eliminated redundant SCM_NIMP
7845 test. Use 'transform_bindings'. Fixed scoping error with named
7846 let (Thanks to Aubrey Jaffer for reporting the bug and to Neil
7847 Jerram for suggesting the fix). Cleaned up the control structure
7848 a bit.
7849
7850 (scm_m_expand_body): Use 'transform_bindings'. Eliminated
7851 unnecessary consing. Eliminated unnecessary
7852 SCM_DEFER/ALLOW_INTS.
7853
7854 (SCM_CEVAL): Un-obfuscated some loops.
7855
7856 2001-11-16 Neil Jerram <neil@ossau.uklinux.net>
7857
7858 * gc.h (scm_unhash_name): Old declaration removed.
7859
7860 * eval.c (s_scm_eval): Change @var{primitive-eval} to
7861 @code{primitive-eval}.
7862
7863 * feature.c, vectors.c, net_db.c, unif.c, weaks.c, struct.c,
7864 version.c, alist.c, ports.c, ramap.c, unif.c, strings.c, list.c:
7865 Change @deffnx lines in docstrings to say {Scheme Procedure}
7866 rather than primitive or procedure.
7867
7868 * posix.c (scm_execl), filesys.c (scm_close), unif.c
7869 (scm_array_set_x, scm_array_contents, scm_uniform_array_read_x,
7870 scm_bit_set_star_x, scm_bit_invert_x), ramap.c (scm_array_fill_x,
7871 scm_array_for_each, scm_array_index_map_x), vectors.c (scm_vector,
7872 scm_make_vector, scm_vector_to_list, scm_vector_fill_x), strop.c
7873 (scm_string_split, scm_string_ci_to_symbol), strings.c
7874 (scm_string_p), sort.c (scm_merge), print.c (scm_newline),
7875 macros.c (scm_macro_type), alist.c (scm_acons, scm_assq):
7876 Docstring fixes and improvements reflecting edits that have been
7877 made in the reference manual source.
7878
7879 * objprop.c (scm_object_properties, scm_set_object_properties_x,
7880 scm_object_property, scm_set_object_property_x): Remove invalid
7881 @deffnx lines for corresponding procedure property primitives.
7882
7883 These changes add a @deffnx C function declaration and function
7884 index entries for each Guile primitive to the copy of the doc
7885 snarf output that is used for reference manual synchronization.
7886 Online help is unchanged.
7887
7888 * snarf.h (SCM_SNARF_DOCS): Output primitive's C function name.
7889 (SCM_DEFINE, SCM_DEFINE1, SCM_REGISTER_PROC): Supply to C function
7890 name to SCM_SNARF_DOCS.
7891
7892 * guile-snarf-docs-texi.in: Pass the shell script's arguments into
7893 snarf-check-and-output-texi.
7894
7895 * Makefile.am (guile-procedures.texi): New rule.
7896 (BUILT_SOURCES, guile.texi, guile-procedures.txt, CLEANFILES):
7897 Changed so that the last stage of doc snarfing is now performed
7898 twice, once to produce guile-procedures.txt for online help, and
7899 once to produce guile.texi for reference manual synchronization.
7900
7901 2001-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
7902
7903 * eval.c (RETURN): Wrap in do{}while(0) in order to make it
7904 safely usable as a single statement followed by a ';', for example
7905 in an if statement.
7906
7907 (SCM_CEVAL, SCM_APPLY): Clean up code using 'RETURN'.
7908
7909 2001-11-13 Neil Jerram <neil@ossau.uklinux.net>
7910
7911 * random.c (scm_random_solid_sphere_x,
7912 scm_random_hollow_sphere_x): Correct "shere" typos.
7913
7914 * hashtab.c (scm_hash_fold): Add missing apostrophe to docstring.
7915
7916 * version.c (scm_version): Update docstring to include
7917 `micro-version'.
7918
7919 2001-11-13 Marius Vollmer <mvo@zagadka.ping.de>
7920
7921 * modules.c (scm_c_export): Call va_end after collecting the
7922 symbols.
7923
7924 * strop.h, strop.c (scm_substring_move_left_x,
7925 scm_substring_move_right_x): Removed.
7926
7927 * __scm.h (HAVE_UINTPTR_T, HAVE_PTRDIFF_T, HAVE_LONG_LONG,
7928 HAVE_LONG_LONGS): Define to "1" when defining them, to mirror what
7929 configure does.
7930
7931 2001-11-12 Marius Vollmer <mvo@zagadka.ping.de>
7932
7933 * numbers.c: Document macros to define when including
7934 num2integral.i.c. MAX_VALUE and MIN_VALU are no longer used, we
7935 now rely on SIZEOF_ macros that have been figured out at
7936 configure time.
7937
7938 * num2integral.i.c: Adapt to new interface.
7939 (NUM2INTEGRAL): Test whether a fixnum can be represented in the
7940 target type by casting it and checking whether it is still the
7941 same. Do not try to handle bignums for integral types that are
7942 smaller than fixnums. When handling bignums, collect the
7943 magnituse first into a unsigned type, and correctly check for
7944 overflow.
7945 (INTEGRAL2BIG): Do not use MIN_VALUE explicitely by observing that
7946 only -MIN_VALUE can still be negative of all negative numbers (in
7947 twos-complement).
7948
7949 * tags.h (SIZEOF_SCM_T_BITS): Define it appropriately.
7950
7951 * __scm.h: Define HAVE_UINTPTR_T, HAVE_PTRDIFF_T and
7952 HAVE_LONG_LONG depending on whether their size is non-zero.
7953
7954 2001-11-11 Thien-Thi Nguyen <ttn@glug.org>
7955
7956 * strop.c (scm_string_null_p): Docfix; nfc.
7957 Thanks to Scott Lenser.
7958
7959 2001-11-07 Neil Jerram <neil@ossau.uklinux.net>
7960
7961 * extensions.c (scm_load_extension): Canonicalize docstring
7962 whitespace.
7963
7964 * unif.c (scm_uniform_array_write), ports.c
7965 (scm_current_output_port, scm_force_output), dynwind.c
7966 (scm_dynamic_wind), scmsigs.c (scm_setitimer, scm_getitimer),
7967 filesys.c (scm_open, scm_lstat), struct.c
7968 (scm_make_struct_layout), random.c (scm_random,
7969 scm_random_solid_sphere_x, scm_random_hollow_sphere_x, strop.c
7970 (scm_i_index): Remove superfluous whitespace from end of docstring
7971 lines.
7972
7973 * filesys.c (scm_select), guardians.c (scm_guardian_greedy_p),
7974 strings.c (scm_make_string), variable.c (scm_make_variable,
7975 scm_make_undefined_variable, scm_variable_p, scm_variable_set_x,
7976 scm_variable_bound_p), scmsigs.c (scm_setitimer, scm_getitimer),
7977 posix.c (scm_crypt), struct.c (scm_make_vtable_vtable), hashtab.c
7978 (scm_hash_fold), ports.c (scm_port_for_each): Remove superfluous
7979 newline at end of docstrings.
7980
7981 * modules.c (scm_set_current_module): Add missing newline to
7982 docstring.
7983
7984 2001-11-07 Stefan Jahn <stefan@lkcc.org>
7985
7986 * win32-socket.[ch]: New files. Defines Winsock-API error codes
7987 and makes them available through Guile. That is because the
7988 Winsock-API does not store its errors in `errno' and thus cannot
7989 return error messages via `strerror (errno)'.
7990
7991 * socket.c (scm_init_socket): Initialize `win32-socket' part
7992 here under M$-Windows.
7993
7994 * numbers.h: Added missing declaration of
7995 `scm_sys_check_number_conversions()'.
7996
7997 * error.c: Local definition of SCM_I_STRERROR and SCM_I_ERRNO
7998 and use in `(strerror)' and `(system-error)'.
7999
8000 * Makefile.am (EXTRA_libguile_la_SOURCES): Added
8001 `win32-socket.[ch]' to extra source and header files.
8002
8003 2001-11-06 Marius Vollmer <mvo@zagadka.ping.de>
8004
8005 * script.c (scm_shell_usage, scm_compile_shell_switches): Prepend
8006 a call to turn-on-debugging when --debug has been given instead of
8007 turning it on directly. Also, handle new `--no-debug' option,
8008 which might suppress the call to turn-on-debugging.
8009
8010 2001-11-05 Stefan Jahn <stefan@lkcc.org>
8011
8012 * struct.c (s_scm_struct_vtable_p): Corrected docstring.
8013
8014 2001-11-04 Stefan Jahn <stefan@lkcc.org>
8015
8016 * Makefile.am (libguile_la_LIBADD): Added $(THREAD_LIBS_LOCAL)
8017 here (was at guile_LDADD) which describes the dependency
8018 correctly and allows a clean build on Win32.
8019
8020 * __scm.h (SCM_API): Follow-up patch. Renamed __FOO__ macros
8021 into FOO.
8022
8023 * __scm.h: USE_DLL_IMPORT indicates the usage of the DLL
8024 import macros for external libraries (libcrypt, libqthreads,
8025 libreadline and libregex).
8026
8027 * coop-defs.h: Include <winsock2.h> for `struct timeval'.
8028
8029 * posix.c (flock): Added support for flock() in M$-Windows.
8030
8031 * guile.c (SCM_IMPORT): Follow-up patch. Use SCM_IMPORT instead
8032 of __SCM_IMPORT__.
8033
8034 * fports.c (getflags): Differentiate reading and writing pipes
8035 descriptors.
8036
8037 * filesys.c (S_IS*): Redefine all of the S_IS*() macros for
8038 M$-Windows.
8039
8040 * coop.c (coop_condition_variable_timed_wait_mutex): Use
8041 conditionalized error code if `ETIMEDOUT' is not available.
8042 (scm_thread_usleep): Remove bogus declaration of `struct timeval
8043 timeout'.
8044
8045 * numbers.c (PTRDIFF_MIN): Moved this definition where it actually
8046 belongs. That is because NO_PREPRO_MAGIC gets undefined after
8047 each inclusion of `num2integral.i.c'.
8048 (SIZE_MAX): Define NO_PREPRO_MAGIC if SIZE_MAX is undefined.
8049
8050 2001-11-03 Marius Vollmer <mvo@zagadka.ping.de>
8051
8052 * eval.c (scm_m_begin): Allow `(begin)`, with no subforms.
8053 (SCM_CEVAL): Evaluate an empty `begin' to SCM_UNSPECIFIED.
8054
8055 2001-11-02 Mikael Djurfeldt <mdj@linnaeus>
8056
8057 * print.c (scm_iprin1): Mark print state as revealed when
8058 dispatching to generic write or display.
8059
8060 * unif.c (scm_ra2contig): Fixed memory overwrite bug.
8061
8062 2001-11-02 Marius Vollmer <mvo@zagadka.ping.de>
8063
8064 Support for native Win32. Thanks to Stefan Jahn!
8065
8066 * Makefile.am: Add win32-uname.c, win32-uname.h, win32-dirent.c
8067 and win32-dirent.h to extra source and header files. These
8068 include the uname() and the POSIX dirent interface implementation
8069 for M$-Windows. Put `-no-undefined' into LDFLAGS to support
8070 linkers which do not allow unresolved symbols inside shared
8071 libraries. Corrected `guile_filter_doc_snarfage$(EXEEXT)'
8072 dependency.
8073
8074 * __scm.h: Defined SCM_API. This macro gets prepended to all
8075 function and data definitions which should be exported or imported
8076 in the resulting dynamic link library in the Win32 port.
8077
8078 * __scm.h, alist.h, arbiters.h, async.h, backtrace.h, boolean.h,
8079 chars.h, continuations.h, coop-defs.h, coop-threads.h,
8080 debug-malloc.h, debug.h, deprecation.h, dynl.h, dynwind.h,
8081 environments.h, eq.h, error.h, eval.h, evalext.h, extensions.h,
8082 feature.h, filesys.h, fluids.h, fports.h, gc.h, gdb_interface.h,
8083 gdbint.h, gh.h, goops.h, gsubr.h, guardians.h, hash.h, hashtab.h,
8084 hooks.h, init.h, ioext.h, iselect.h, keywords.h, lang.h, list.h,
8085 load.h, macros.h, mallocs.h, modules.h, net_db.h, numbers.h,
8086 objects.h, objprop.h, options.h, pairs.h, ports.h, posix.h, print.h,
8087 procprop.h, procs.h, properties.h, ramap.h, random.h, rdelim.h,
8088 read.h, regex-posix.h, root.h, rw.h, scmsigs.h, script.h, simpos.h,
8089 smob.h, socket.h, sort.h, srcprop.h, stackchk.h, stacks.h, stime.h,
8090 strings.h, strop.h, strorder.h, strports.h, struct.h, symbols.h,
8091 tags.h, threads.h, throw.h, unif.h, values.h, variable.h, vectors.h,
8092 vports.h, weaks.h:
8093 Prefixed each each exported symbol with SCM_API.
8094
8095 * continuations.c: Added comment about the use of the extern
8096 declarations of {get,set}context() functions used in the ia64 port.
8097
8098 * continuations.h, gc.c: `__libc_ia64_register_backing_store_base'
8099 is meant to be a `unsigned long *'.
8100
8101 * filesys.c: Include `direct.h' if possible. Use local
8102 `win32-dirent.h' for the native M$-Windows port. Define S_IS*()
8103 macros for M$-Windows. Implementation of `fstat_Win32()' which is
8104 able to differentiate between sockets and other file descriptors.
8105 Use this function as wrapper in `scm_fstat()'. Fixed typo in
8106 `scm_dirname()'.
8107
8108 * fports.c: Include `io.h' is possible. Put `*fp' into referring
8109 statement block in `scm_fport_buffer_add()'.
8110 Some corrections in `getflags()'.
8111
8112 * gdb_interface.h (GDB_INTERFACE): Also support __CYGWIN__.
8113
8114 * guile.c: Make sure to define __SCM_IMPORT__ for shared library
8115 build on Win32. Disable preloaded symbols on Win2 platforms.
8116
8117 * ioext.c, ports.c: Include `io.h' is possible.
8118
8119 * mkstemp.c: Include `process.h' is possible.
8120
8121 * net_db.c: Disable extern declaration of `h_errno' for __CYGWIN__,
8122 too.
8123 Put `scm_return_entry()' into HAVE_GETSERVENT conditional.
8124
8125 * posix.c: Remove unnecessary dirent includes and defines. Include
8126 local `win32-uname.h' for MinGW. Extern declaration of
8127 `mkstemp()' for systems where it does not exists. Make
8128 `getlogin()' available on M$-Windows.
8129
8130 * scmsigs.c: Made `usleep()' avalable on MinGW.
8131
8132 * stime.c: On M$-Windows `tzname[]' is known to be `_tzname[]'.
8133
8134 * win32-dirent.c: Include "win32-dirent.h", not "dirent.h".
8135
8136 * win32-uname.c: Include "win32-uname.h", not "uname.h".
8137
8138 2001-10-28 Mikael Djurfeldt <mdj@linnaeus>
8139
8140 * unif.c (scm_uniform_array_read_x, scm_uniform_array_write):
8141 Don't apply scm_uniform_vector_length on arrays.
8142
8143 2001-10-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
8144
8145 * eval.c (scm_lookupcar, scm_m_letstar, scm_m_do, iqq,
8146 scm_m_define, scm_m_letrec1, scm_m_let, scm_m_expand_body,
8147 scm_macroexp, unmemocopy, scm_eval_args, scm_deval_args,
8148 SCM_CEVAL, scm_map, scm_init_eval): When building lists, prefer
8149 scm_list_<n> over scm_cons[2]?.
8150
8151 (scm_unmemocar, scm_m_cond, scm_m_letstar, scm_m_letrec1,
8152 scm_m_let, scm_m_atbind, unmemocopy, SCM_CEVAL, SCM_APPLY): Use
8153 SCM_C[AD][AD]R instead of explicit form.
8154
8155 (scm_m_set_x, scm_m_cond, scm_m_letstar, scm_m_do): Reordered
8156 comparison parameters.
8157
8158 (scm_m_case, scm_m_cond, scm_m_letstar, scm_m_do, SCM_CEVAL): Use
8159 !SCM_NULLP instead of SCM_NIMP.
8160
8161 (scm_m_case): Don't copy the form. Renamed proc to clause and
8162 minimized its scope. Renamed x to clauses. Removed side
8163 effecting operation from macro call.
8164
8165 (scm_m_cond): Don't copy the form. Renamed arg1 to clause and
8166 minimized its scope. Renamed x to clauses. Minimized the scope
8167 of variable 'len'. Make sure the else clause is treated specially
8168 even in case of '=>' occurences. Don't change the else to #t in
8169 order to be able to distinguish this case in the evaluator. Leave
8170 type checking of the recipient to the evaluator.
8171
8172 (scm_c_improper_memq): Made the comment somewhat clearer.
8173
8174 (scm_m_lambda): Renamed proc to formals. Removed unnecessary
8175 test for SCM_IM_LET at the place of the formal parameters.
8176 Simplified the formal parameter checking.
8177
8178 (scm_m_letstar): Added Comment. Renamed proc to bindings.
8179 Renamed arg1 to binding and minimized its scope. Eliminated
8180 unnecessary consing.
8181
8182 (scm_m_do): Renamed proc to bindings. Minimized the scope of
8183 variable 'len'.
8184
8185 (build_binding_list): New static function.
8186
8187 (unmemocopy): Don't use SCM_TYP7 on pairs (it's unclean).
8188 Further, split up the 'letrec' unmemoizing code to the
8189 corresponding parts for 'do', 'let' and 'letrec', adding comments
8190 to each form. Cleanup the handling of the do form (This removes
8191 some *real* code :-).
8192
8193 (SCM_CEVAL): Removed side effecting operation from macro call.
8194 Handle the 'else clause of the 'cond form specially - the symbol
8195 'else is not replaced with #t any more.
8196
8197 2001-10-14 Gary Houston <ghouston@arglist.com>
8198
8199 * version.c (scm_version): use sprintf instead of snprintf,
8200 for portability. thanks to Bill Schottstaedt.
8201
8202 2001-10-14 Mikael Djurfeldt <mdj@linnaeus>
8203
8204 * read.c (scm_lreadr): When user-defined hash procedure returns
8205 SCM_UNSPECIFIED: Fall back to standard handling instead of raising
8206 an exception. (This prevents parsing of uniform vectors from
8207 interfering with parsing of numbers.)
8208
8209 2001-10-13 Marius Vollmer <mvo@zagadka.ping.de>
8210
8211 * numbers.c: Set NO_PREPRO_MAGIC when defining our version of
8212 PTRDIFF_MIN. Thanks to Ken Raeburn.
8213
8214 2001-10-07 Marius Vollmer <mvo@zagadka.ping.de>
8215
8216 * Makefile.am (EXTRA_libguile_la_SOURCES): Added "mkstemp.c".
8217
8218 * eval.c (scm_m_atbind): First try to find the variable without
8219 defining it locally; when it has not been found, define it
8220 locally.
8221
8222 * modules.c (module_variable): Pass over variables that exist but
8223 are unbound.
8224
8225 2001-10-06 Marius Vollmer <mvo@zagadka.ping.de>
8226
8227 * backtrace.c (display_backtrace_file_and_line): Only use
8228 scm_basename when POSIX support is compiled in. Thanks to Chris
8229 Cramer.
8230
8231 2001-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
8232
8233 * numbers.c (mem2uinteger): Return number read so far when coming
8234 across a hexdigit after having read a # or if not reading a hex
8235 value. This will enable the calling code to correctly handle
8236 forms like 1e2. (The background is, that the exponent markers d,
8237 e and f are also hexdigits.) Thanks to Mikael Djurfeldt for
8238 providing this patch.
8239
8240 (mem2complex): Fix erroneous double-negation. Now, numbers like
8241 1-i will be read correctly.
8242
8243 2001-10-12 Mikael Djurfeldt <mdj@linnaeus>
8244
8245 * debug.c (scm_mem_to_proc): Fixed typo in previous change.
8246
8247 * validate.h (SCM_VALIDATE_DOUBLE_DEF_COPY): New macro.
8248
8249 2001-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
8250
8251 * print.c (scm_print_state_vtable, print_state_pool):
8252 Initialize. These variables are now registered as gc roots.
8253
8254 (scm_current_pstate): Update documentation.
8255
8256 (scm_current_pstate, scm_make_print_state, scm_free_print_state,
8257 scm_prin1, scm_init_print): print_state_pool is registered as a
8258 gc root and thus does not need to be protected by a surrounding
8259 pair any more.
8260
8261 (make_print_state): The car of print_state_pool no longer holds
8262 the scm_print_state_vtable.
8263
8264 (scm_current_pstate, scm_make_print_state, print_circref,
8265 scm_iprin1, scm_prin1, scm_iprlist): Prefer !SCM_<foo> over
8266 SCM_N<foo>.
8267
8268 (scm_prin1): When building lists, prefer scm_list_<n> over
8269 scm_cons[2]?.
8270
8271 (scm_iprlist): Removed a redundant SCM_IMP test.
8272
8273 (scm_simple_format): Use SCM_EQ_P to compare SCM values.
8274
8275 2001-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
8276
8277 * debug.c (scm_make_iloc): Prefer !SCM_<foo> over SCM_N<foo>.
8278
8279 (scm_memcons, scm_mem_to_proc): When building lists, prefer
8280 scm_list_<n> over scm_cons[2]?.
8281
8282 (scm_mem_to_proc): Prefer SCM_CONSP over SCM_NIMP.
8283
8284 (scm_procedure_name): Use SCM_CADR instead of explicit form.
8285
8286 (debugobj_print): Coerce scm_intprint arg 1 to long, not int.
8287 Thanks to Rob Browning for the patch (see log entry 2001-09-21) -
8288 for some reason his patch didn't make it into the cvs.
8289
8290 2001-10-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
8291
8292 * numbers.c (mem2decimal_from_point): Cleaned up the parsing a
8293 little bit - should even be somewhat more accurate now.
8294
8295 2001-10-08 Rob Browning <rlb@defaultvalue.org>
8296
8297 * gc.c: support ia64 register backing store.
8298 (SCM_MARK_BACKING_STORE): new macro.
8299
8300 * continuations.h: support ia64 register backing store.
8301 (struct scm_t_contregs): add ia64 register backing store.
8302
8303 * continuations.c: support ia64 register backing store.
8304 (continuation_mark): mark ia64 register backing store.
8305 (continuation_free): free ia64 register backing store.
8306 (scm_make_continuation): capture ia64 register backing store.
8307 (copy_stack_and_call): copy ia64 register backing store.
8308
8309 2001-10-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
8310
8311 * hashtab.c (scm_hash_fn_create_handle_x): The result of assoc_fn
8312 is known to be #f if no entry is found. Thus, use !SCM_FALSEP
8313 instead of SCM_NIMP to test for that case.
8314
8315 * strings.h (SCM_SET_STRING_LENGTH): Cast the length to
8316 scm_t_bits instead of long.
8317
8318 2001-10-06 Marius Vollmer <mvo@zagadka.ping.de>
8319
8320 * tags.h (SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
8321 SCM_T_SIGNED_BITS_MIN): New.
8322 * numbers.h (SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM):
8323 Use them to make these macros computable by the preprocessor.
8324
8325 * num2integral.i.c (INTEGRAL2NUM): Let the preprocessor test
8326 whether the integral type fits in a fixnum, not the compiler.
8327 This removes a spurious compiler warning. Also, honor the
8328 NO_PREPRO_MAGIC flag to suppress any preprocessor tests. This is
8329 needed for `long long's.
8330
8331 * numbers.c: Define NO_PREPRO_MAGOC when including
8332 num2integral.c.i for `long long' and `signed long long'.
8333
8334 2001-10-06 Mikael Djurfeldt <mdj@linnaeus>
8335
8336 These changes fixes a race condition in the Guile coop - pthread
8337 compatibility code.
8338
8339 * coop.c (mother_awake_p): New variable.
8340 (coop_create): Set mother_awake_p before creating or signalling
8341 mother; wait until mother is going to sleep before returning.
8342 (mother): Reset mother_awake_p before going to sleep.
8343
8344 2001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
8345
8346 * options.c (protected_objects, scm_init_options): The content of
8347 protected_objects is now protected from garbage collection using
8348 scm_gc_register_root instead of scm_permanent_object.
8349
8350 (get_option_setting): New static function that computes an option
8351 setting as it was formerly done in the function scm_options.
8352
8353 (get_documented_option_setting): New static function that
8354 returns option documentation as it was formerly done in the
8355 function scm_options. Note that documentation C strings are no
8356 longer precomputed into SCM objects. Instead, they are converted
8357 into SCM strings every time get_documented_option_setting is
8358 called.
8359
8360 (change_option_setting): New static functions that modifies the
8361 option setting as it was formerly done in the function
8362 scm_options. The function is now exception safe, i. e. won't
8363 cause a memory leak when interrupted. Further, only non-immediate
8364 option values are added to the protection list.
8365
8366 (scm_options): This function now has only the purpose to dispatch
8367 to to get_option_setting, get_documented_option_setting or
8368 change_option_setting, depending on the arguments given to
8369 scm_options.
8370
8371 (scm_init_opts): Don't convert documentation C strings into SCM
8372 strings. Further, don't protect any object values: They _must_
8373 be immediate values, otherwise there is no guarantee that they
8374 have not been collected before anyway.
8375
8376 * options.[ch] (scm_t_option): Made type unsigned, name into a
8377 constant char* and val into a scm_t_bits type.
8378
8379 (scm_options, scm_init_opts): The number of options is guaranteed
8380 to be larger or equal to zero. Thus, the type is changed to
8381 unsigned.
8382
8383 2001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
8384
8385 * num2integral.i.c (NUM2INTEGRAL): Eliminated some warnings about
8386 testing an unsigned value for being >= 0.
8387
8388 2001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
8389
8390 * numbers.h: Removed old comment about using SCM_CAR to access
8391 non-pair cells.
8392
8393 (SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM): Make sure
8394 the return value is signed. Thanks to Brian Crowder for the bug
8395 report.
8396
8397 (SCM_SRS): Avoid unnecessary casting and don't unpack input
8398 values. With this patch, SCM_SRS can be safely used for other
8399 types than scm_t_signed_bits. However, it should still better be
8400 an internal macro and thus be renamed to SCM_I_SRS.
8401
8402 (SCM_MAKINUM, SCM_INUM): Use proper casting.
8403
8404 2001-10-03 Gary Houston <ghouston@arglist.com>
8405
8406 * continuations.h, unif.h: in the descriptions of the bit patterns
8407 of the heap cells, make bit 0 the least significant.
8408
8409 2001-09-25 Thien-Thi Nguyen <ttn@glug.org>
8410
8411 * chars.h (SCM_MAKE_CHAR): Use `scm_t_bits' instead of `intptr_t'.
8412 Thanks to Golubev I. N.
8413
8414 2001-09-25 Gary Houston <ghouston@arglist.com>
8415
8416 * ports.c (scm_drain_input): extended the docstring. thanks to
8417 Alex Schroeder and Thien-Thi Nguyen.
8418
8419 2001-09-23 Mikael Djurfeldt <mdj@linnaeus>
8420
8421 * validate.h (SCM_NUM2FLOAT, SCM_NUM2DOUBLE,
8422 SCM_VALIDATE_FLOAT_COPY, SCM_VALIDATE_DOUBLE_COPY): New
8423 macros. (The NUM names might soon change.)
8424
8425 * numbers.h: Added missing declarations.
8426
8427 2001-09-22 Mikael Djurfeldt <mdj@linnaeus>
8428
8429 * Makefile.am: Distribute num2float.i.c.
8430
8431 * num2float.i.c: New file, multiply included by numbers.c, used
8432 to "templatize" the float <-> num conversion routines.
8433
8434 * numbers.c: New functions: scm_num2float, scm_float2num,
8435 scm_num2double, scm_double2num.
8436
8437 2001-09-21 Rob Browning <rlb@defaultvalue.org>
8438
8439 * .cvsignore: really add version.h
8440
8441 * strings.h (SCM_SET_STRING_LENGTH): coerce "l" to a long.
8442 Otherwise it fails on the alpha. However, we might rather choose
8443 this size conditionally.
8444
8445 * numbers.c (scm_gcd): change "k" to a long from an int.
8446 Otherwise it fails on the alpha. However, we might rather choose
8447 this size conditionally.
8448
8449 * error.c (scm_wta): coerce char* to intptr_t before int
8450 assignment.
8451
8452 * debug.c (debugobj_print): coerce scm_intprint arg 1 to long, not
8453 int.
8454
8455 * chars.h (SCM_MAKE_CHAR): coerce value to intptr_t.
8456
8457 2001-09-20 Mikael Djurfeldt <mdj@linnaeus>
8458
8459 * numbers.c (scm_integer_expt): Accept inexact integer in second
8460 argument. (Thanks to Bill Schottstaedt.)
8461
8462 2001-09-20 Rob Browning <rlb@defaultvalue.org>
8463
8464 * .cvsignore: add version.h
8465
8466 * versiondat.h.in: removed (obsolete).
8467
8468 * version.h.in: renamed from version.h.
8469 (SCM_GUILE_MAJOR_VERSION): new public macro.
8470 (SCM_GUILE_MINOR_VERSION): new public macro.
8471 (SCM_GUILE_MICRO_VERSION): new public macro.
8472
8473 * version.h: renamed to version.h.in.
8474
8475 * version.c
8476 (scm_major_version): support integer *_VERSION macros.
8477 (scm_minor_version): support integer *_VERSION macros.
8478 (scm_micro_version): support integer *_VERSION macros.
8479 (scm_version): support integer *_VERSION macros.
8480
8481 2001-09-20 Mikael Djurfeldt <mdj@linnaeus>
8482
8483 * error.c, error.h: Made error keys globally accessible.
8484 Applications might want to test for these or use them in a direct
8485 call to scm_error.
8486
8487 * num2integral.i.c (NUM2INTEGRAL): Report an error when these
8488 routines are passed an inexact. This change in behavior is
8489 motivated by concordance with R5RS: It is more common that a
8490 primitive doesn't want to accept an inexact for an exact.
8491
8492 2001-09-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
8493
8494 The following patch partially undoes my patch from 2001-06-30,
8495 where I added the function scm_gc_mark_cell_conservatively. The
8496 function is buggy, since it breaks guile during conservative
8497 marking if a pointer on the stack points directly into the list of
8498 free cells on the heap: With conservative cell marking this will
8499 cause the whole free list to be scanned and marked - boom!
8500
8501 * gc.c (allocated_mark, MARK, heap_segment,
8502 scm_gc_mark_cell_conservatively, scm_init_storage), gc.h
8503 (scm_gc_mark_cell_conservatively): Remove function
8504 scm_gc_mark_cell_conservatively and update the corresponding
8505 comments and uses accordingly. Thanks to Christopher Cramer for
8506 the patch. (Minor corrections by me.)
8507
8508 2001-09-15 Gary Houston <ghouston@arglist.com>
8509
8510 * root.h (scm_root_state): removed the continuation_stack and
8511 continuation_stack_ptr members, which have no apparent purpose.
8512 (scm_continuation_stack, scm_continuation_stack_ptr): #defines
8513 removed.
8514
8515 * root.c (root_mark), init.c (restart_stack, start_stack), gc
8516 (scm_igc): remove all references to contination_stack and
8517 continuation_stack_ptr, avoiding allocation of a vector and
8518 useless processing during gc.
8519
8520 2001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
8521
8522 * guardians.c (tconc_t, t_tconc): Renamed tconc_t to t_tconc.
8523
8524 (TCONC_IN): Make sure that the cell word 0 is initialized last.
8525
8526 (guardians_t, t_guardians): Renamed guardians_t to t_guardians.
8527
8528 (GUARDIAN, GUARDIAN_DATA): Renamed GUARDIAN to GUARDIAN_DATA.
8529
8530 (guardian_apply, scm_get_one_zombie, scm_make_guardian,
8531 mark_and_zombify): Prefer !SCM_<foo> over SCM_N<foo>.
8532
8533 2001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
8534
8535 * guardians.c (mark_dependencies_in_tconc,
8536 whine_about_self_centered_zombies, scm_init_guardians): Register
8537 the static global variable `self_centered_zombies' via
8538 scm_gc_register_root, to make some cdr-ing unnecessary.
8539
8540 2001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
8541
8542 * backtrace.c (display_backtrace_file,
8543 display_backtrace_file_and_line): Use SCM_EQ_P when comparing SCM
8544 values, use SCM_FALSEP when comparing SCM values against #f.
8545 Thanks to Rob Browning for the bug report.
8546
8547 2001-09-12 Martin Baulig <martin@home-of-linux.org>
8548
8549 * strings.[ch] (scm_str2string): New function.
8550
8551 2001-09-06 Marius Vollmer <mvo@zagadka.ping.de>
8552
8553 * gc.c (scm_done_free): Always subtract size from scm_mallocated
8554 when computing nm, even if it's negative.
8555 (scm_must_malloc): Abort on overflow of scm_mtrigger.
8556 (scm_must_realloc): Likewise.
8557
8558 2001-09-01 Michael Livshin <mlivshin@bigfoot.com>
8559
8560 * numbers.c (scm_sys_check_number_conversions): new function,
8561 defined if Guile is compiled in debugging mode. currently checks
8562 `scm_num2ulong', should check much much more.
8563
8564 * num2integral.i.c (NUM2INTEGRAL): when converting a bignum to
8565 unsigned, ensure that it's positive. thanks to Martin Baulig!
8566
8567 2001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
8568
8569 * __scm.h: Added new section about compile time selectable
8570 features.
8571
8572 (long_long, ulong_long, scm_sizet, SCM_WNA, SCM_OUTOFRANGE,
8573 SCM_NALLOC, SCM_HUP_SIGNAL, SCM_INT_SIGNAL, SCM_FPE_SIGNAL,
8574 SCM_BUS_SIGNAL, SCM_SEGV_SIGNAL, SCM_ALRM_SIGNAL, SCM_GC_SIGNAL,
8575 SCM_TICK_SIGNAL, SCM_SIG_ORD, SCM_ORD_SIG, SCM_NUM_SIGS):
8576 Removed.
8577
8578 * deprecation.c (scm_include_deprecated_features): Simplified.
8579
8580 * eval.c (EVALCAR, unmemocopy), eval.h (SCM_XEVALCAR): Use
8581 `SCM_IMP´ instead of `!SCM_CELLP´.
8582
8583 * eval.c (unmemocopy): Eliminate redundant SCM_CELLP tests.
8584 Extract side-effecting operations from macros.
8585
8586 (scm_init_eval): Don't initialize *top-level-lookup-closure*,
8587 scm_top_level_lookup_closure_var and scm_system_transformer.
8588
8589 * gc.c (CELL_P): New local definition to replace SCM_CELLP.
8590
8591 (heap_segment): Use CELL_P instead of SCM_CELLP.
8592
8593 * init.c (start_stack): Don't initialize
8594 scm_top_level_lookup_closure_var and scm_system_transformer.
8595
8596 * modules.c (scm_set_current_module): Don't access
8597 scm_top_level_lookup_closure_var and scm_system_transformer.
8598
8599 (scm_sym2var): Don't call scm_variable_set_name_hint.
8600
8601 (scm_post_boot_init_modules): Removed deprecated initializations.
8602
8603 * print.c (scm_ipruk): Don't access cell contents of non cells.
8604
8605 * strings.c (scm_string_set_x): All strings are writable.
8606
8607 * strings.h (SCM_STRINGP): Use SCM_TYP7 to determine the string
8608 type. There is only one string type now.
8609
8610 (SCM_STRING_COERCE_0TERMINATION_X): Deprecated.
8611
8612 * tags.h: Remove comments about two different string types.
8613
8614 (SCM_CELLP, SCM_NCELLP): Deprecated.
8615
8616 * variable.c (make_variable): Remove code variant for vcells.
8617
8618 * variable.h (SCM_VARIABLE_REF, SCM_VARIABLE_SET,
8619 SCM_VARIABLE_LOC): Remove code variant for vcells.
8620
8621 * __scm.h, deprecation.[ch]: Renamed SCM_DEBUG_DEPRECATED to
8622 SCM_ENABLE_DEPRECATED with the logic reversed.
8623
8624 * dynl.c (moddata, registered_mods), dynl.[ch]
8625 (scm_register_module_xxx, scm_registered_modules,
8626 scm_clear_registered_modules), error.[ch] (scm_wta), eval.c
8627 (*top-level-lookup-closure*), eval.[ch]
8628 (scm_top_level_lookup_closure_var, scm_system_transformer,
8629 scm_eval_3, scm_eval2), gc.h (SCM_SETAND_CAR, SCM_SETOR_CAR,
8630 SCM_SETAND_CDR, SCM_SETOR_CDR, SCM_FREEP, SCM_NFREEP,
8631 SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16,
8632 SCM_GCCDR), gc.[ch] (scm_remember, scm_protect_object,
8633 scm_unprotect_object), modules.c (root_module_lookup_closure,
8634 scm_sym_app, scm_sym_modules, module_prefix, make_modules_in_var,
8635 beautify_user_module_x_var, try_module_autoload_var,
8636 scm_module_full_name), modules.[ch] (scm_the_root_module,
8637 scm_make_module, scm_ensure_user_module, scm_load_scheme_module),
8638 ports.h (scm_port, scm_ptob_descriptor, scm_port_rw_active),
8639 ports.[ch] (scm_close_all_ports_except), random.h (scm_rstate,
8640 scm_rng, scm_i_rstate), strings.h (SCM_SLOPPY_STRINGP,
8641 SCM_RWSTRINGP, SCM_STRING_UCHARS, SCM_STRING_CHARS), strings.[ch]
8642 (scm_read_only_string_p, scm_makstr, scm_makfromstr,
8643 scm_make_shared_substring), tags.h (scm_tc7_substring,
8644 SCM_SLOPPY_CONSP, SCM_SLOPPY_NCONSP, scm_tc7_ssymbol,
8645 scm_tc7_msymbol, scm_tcs_symbols), variable.c (sym_huh),
8646 variable.[ch] (scm_variable_set_name_hint, scm_builtin_variable),
8647 variable.h (SCM_VARVCELL, SCM_UDVARIABLEP, SCM_DEFVARIABLEP):
8648 Removed.
8649
8650 * dynl.c (scm_dynamic_link, scm_dynamic_func), error.c
8651 (scm_error_scm), filesys.c (scm_chown, scm_chmod, scm_open_fdes,
8652 scm_stat, scm_link, scm_rename, scm_delete_file, scm_mkdir,
8653 scm_rmdir, scm_opendir, scm_chdir, scm_symlink, scm_readlink,
8654 scm_lstat, scm_copy_file), fports.c (scm_open_file), ioext.c
8655 (scm_fdopen), net_db.c (scm_gethost, scm_getnet, scm_getproto,
8656 scm_getserv), ports.c (scm_truncate_file, scm_sys_make_void_port),
8657 posix.c (scm_getpwuid, scm_getgrgid, scm_execl, scm_execlp,
8658 scm_execle, scm_mkstemp, scm_utime, scm_access, scm_setlocale,
8659 scm_mknod, scm_crypt, scm_chroot, scm_getpass, scm_sethostname),
8660 regex-posix.c (scm_make_regexp, scm_regexp_exec), simpos.c
8661 (scm_system, scm_getenv), socket.c (scm_inet_aton), stime.c
8662 (setzone, scm_strftime, scm_strptime), vports.c
8663 (scm_make_soft_port): Remove calls to
8664 SCM_STRING_COERCE_0TERMINATION_X. Since the substring type is
8665 gone, all strings are 0-terminated anyway.
8666
8667 * dynl.h (LIBGUILE_DYNL_H, SCM_DYNL_H), random.h (RANDOMH,
8668 SCM_RANDOM_H): Renamed the macros that are defined to inhibit
8669 double inclusion of the same headers to the SCM_<filename>_H
8670 format.
8671
8672 * eval.c (SCM_CEVAL), gc.c (MARK, scm_gc_sweep), gh_data.c
8673 (gh_scm2chars), hash.c (scm_hasher), objects.c (scm_class_of),
8674 print.c (scm_iprin1): The type scm_tc7_substring does not exist
8675 any more.
8676
8677 * ports.h (SCM_PORTP, SCM_OPPORTP, SCM_OPINPORTP, SCM_OPOUTPORTP,
8678 SCM_INPUT_PORT_P, SCM_OUTPUT_PORT_P, SCM_OPENP), tags.h
8679 (SCM_TYP16_PREDICATE), variable.h (SCM_VARIABLEP): Prefer
8680 !SCM_<foo> over SCM_N<foo>.
8681
8682 2001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
8683
8684 * Makefile.am: Remove references to symbols-deprecated.c.
8685
8686 * symbols.c (scm_init_symbols): Don't initialize deprecated
8687 symbol functions.
8688
8689 * symbols-deprecated.c: Removed.
8690
8691 * fluids.[ch] (scm_internal_with_fluids), gsubr.[ch]
8692 (scm_make_gsubr, scm_make_gsubr_with_generic), hooks.[ch]
8693 (scm_create_hook), list.c (list*), list.h (SCM_LIST[0-9],
8694 scm_listify), list.[ch] (scm_sloppy_memq, scm_sloppy_memv,
8695 scm_sloppy_member), load.c (scm_end_of_file_key), load.[ch]
8696 (scm_read_and_eval_x), numbers.[ch] (scm_mkbig, scm_big2inum,
8697 scm_adjbig, scm_normbig, scm_copybig, scm_2ulong2big, scm_dbl2big,
8698 scm_big2dbl), numbers.h (SCM_FIXNUM_BIT), procs.h
8699 (scm_subr_entry, SCM_SUBR_DOC), procs.[ch] (scm_make_subr_opt,
8700 scm_make_subr, scm_make_subr_with_generic), root.c (setjmp_type,
8701 setjmp_type), root.[ch] (scm_call_catching_errors), smob.[ch]
8702 (scm_make_smob_type_mfpe, scm_set_smob_mfpe), strports.[ch]
8703 (scm_strprint_obj, scm_read_0str, scm_eval_0str), symbols.h
8704 (SCM_CHARS, SCM_UCHARS, SCM_SETCHARS, SCM_SLOPPY_SUBSTRP,
8705 SCM_SUBSTR_STR, SCM_SUBSTR_OFFSET, SCM_LENGTH_MAX, SCM_LENGTH,
8706 SCM_SETLENGTH, SCM_ROSTRINGP, SCM_ROLENGTH, SCM_ROCHARS,
8707 SCM_ROUCHARS, SCM_SUBSTRP, SCM_COERCE_SUBSTR, scm_strhash,
8708 scm_sym2vcell, scm_sym2ovcell_soft, scm_sym2ovcell,
8709 scm_intern_obarray_soft, scm_intern_obarray, scm_intern,
8710 scm_intern0, scm_sysintern, scm_sysintern0,
8711 scm_sysintern0_no_module_lookup, scm_symbol_value0,
8712 scm_string_to_obarray_symbol, scm_intern_symbol,
8713 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned_p,
8714 scm_symbol_bound_p, scm_symbol_set_x, scm_gentemp,
8715 scm_init_symbols_deprecated), vectors.c (s_vector_set_length_x),
8716 vectors.[ch] (scm_vector_set_length_x): Removed.
8717
8718 * fluids.h (FLUIDSH, SCM_FLUIDS_H), gsubr.c (GSUBRH, SCM_GSUBR_H),
8719 list.h (LISTH, SCM_LIST_H), load.h (LOADH, SCM_LOAD_H), root.h
8720 (ROOTH, SCM_ROOT_H), strports.h (STRPORTSH, SCM_STRPORTS_H):
8721 Renamed the macros that are defined to inhibit double inclusion of
8722 the same headers to the SCM_<filename>_H format.
8723
8724 * procs.h (SCM_CLOSUREP, SCM_PROCEDURE_WITH_SETTER_P), symbols.h
8725 (SCM_SYMBOLP), vectors.h (SCM_VECTORP): Prefer !SCM_<foo> over
8726 SCM_N<foo>.
8727
8728 2001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
8729
8730 * continuations.h (scm_contregs), debug.h (scm_debug_info,
8731 scm_debug_frame, SCM_DSIDEVAL), filesys.h (SCM_OPDIRP), fports.h
8732 (scm_fport), options.h (scm_option), snarf.h (SCM_CONST_LONG,
8733 SCM_VCELL, SCM_GLOBAL_VCELL, SCM_VCELL_INIT,
8734 SCM_GLOBAL_VCELL_INIT), srcprop.h (scm_srcprops,
8735 scm_srcprops_chunk), stacks.h (scm_info_frame, scm_stack), unif.h
8736 (scm_array, scm_array_dim, SCM_ARRAY_CONTIGUOUS, SCM_HUGE_LENGTH),
8737 validate.h (SCM_FUNC_NAME, SCM_WTA, RETURN_SCM_WTA,
8738 SCM_VALIDATE_NUMBER_COPY, SCM_VALIDATE_NUMBER_DEF_COPY,
8739 SCM_VALIDATE_STRINGORSUBSTR, SCM_VALIDATE_ROSTRING,
8740 SCM_VALIDATE_ROSTRING_COPY, SCM_VALIDATE_NULLORROSTRING_COPY,
8741 SCM_VALIDATE_RWSTRING, SCM_VALIDATE_OPDIR): Removed.
8742
8743 * continuations.h (CONTINUATIONSH, SCM_CONTINUATIONS_H), filesys.h
8744 (FILESYSH, SCM_FILESYS_H), fports.h (FPORTSH, SCM_FPORTS_H),
8745 options.h (OPTIONSH, SCM_OPTIONS_H), regex-posix.h (REGEXPOSIXH,
8746 SCM_REGEX_POSIX_H), snarf.h (LIBGUILE_SNARF_H, SCM_SNARF_H),
8747 srcprop.h (SCM_SOURCE_PROPERTIES_H, SCM_SRCPROP_H), unif.h
8748 (SCM_UNIFORM_VECTORS_H, SCM_UNIF_H), validate.h (SCM_VALIDATE_H__,
8749 SCM_VALIDATE_H): Renamed the macros that are defined to inhibit
8750 double inclusion of the same headers to the SCM_<filename>_H
8751 format.
8752
8753 * debug.h (SCM_RESET_DEBUG_MODE), regex-posix.h (SCM_RGXP),
8754 srcprop.h (SRCBRKP, PROCTRACEP), struct.h (SCM_STRUCTP),
8755 validate.h (SCM_VALIDATE_THUNK, SCM_VALIDATE_ARRAY,
8756 SCM_VALIDATE_VECTOR_OR_DVECTOR, SCM_VALIDATE_VTABLE): Prefer
8757 !SCM_<foo> over SCM_N<foo>.
8758
8759 2001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
8760
8761 * _scm.h (_SCMH, SCM__SCM_H), alist.h (ALISTH, SCM_ALIST_H),
8762 arbiters.h (ARBITERSH, SCM_ARBITERS_H), backtrace.h (BACKTRACEH,
8763 SCM_BACKTRACE_H), boolean.h (BOOLEANH, SCM_BOOLEAN_H), chars.h
8764 (SCM_CHARSH, SCM_CHARS_H), coop-defs.h (COOP_DEFSH,
8765 SCM_COOP_DEFS_H), coop-threads.h (COOP_THREADSH,
8766 SCM_COOP_THREADS_H), debug-malloc.h (DEBUGMALLOCH,
8767 SCM_DEBUG_MALLOC_H), dynwind.h (DYNWINDH, SCM_DYNWIND_H),
8768 environments.h (ENVIRONMENTS_H, SCM_ENVIRONMENTS_H), eq.h (EQH,
8769 SCM_EQ_H), evalext.h (EVALEXTH, SCM_EVALEXT_H), extensions.h
8770 (LIBGUILE_EXTENSIONS_H, SCM_EXTENSIONS_H), feature.h (FEATUREH,
8771 SCM_FEATURE_H), gdbint.h (GDBINTH, SCM_GDBINT_H), guardians.h
8772 (SCM_GUARDIANH, SCM_GUARDIANS_H), hash.h (HASHH, SCM_HASH_H),
8773 hashtab.h (HASHTABH, SCM_HASHTAB_H), init.h (INITH, SCM_INIT_H),
8774 ioext.h (IOEXTH, SCM_IOEXT_H), iselect.h (ISELECTH,
8775 SCM_ISELECT_H), keywords.h (KEYWORDSH, SCM_KEYWORDS_H), lang.h
8776 (LANGH, SCM_LANG_H), mallocs.h (MALLOCSH, SCM_MALLOCS_H), net_db.h
8777 (SCM_NETDBH, SCM_NET_DB_H), objprop.h (OBJPROPH, SCM_OBJPROP_H),
8778 posix.h (POSIXH, SCM_POSIX_H), procprop.h (PROCPROPH,
8779 SCM_PROCPROP_H), properties.h (PROPERTIES_H, SCM_PROPERTIES_H),
8780 ramap.h (RAMAPH, SCM_RAMAP_H), rdelim.h (SCM_RDELIM,
8781 SCM_RDELIM_H), read.h (READH, SCM_READ_H), rw.h (SCM_RW,
8782 SCM_RW_H), scmsigs.h (SCMSIGSH, SCM_SCMSIGS_H), script.h (SCRIPTH,
8783 SCM_SCRIPT_H), simpos.h (SIMPOSH, SCM_SIMPOS_H), socket.h
8784 (SCM_SOCKETH, SCM_SOCKET_H), sort.h (SORTH, SCM_SORT_H),
8785 stackchk.h (STACKCHKH, SCM_STACKCHK_H), stime.h (STIMEH,
8786 SCM_STIME_H), strop.h (STROPH, SCM_STROP_H), strorder.h
8787 (STRORDERH, SCM_STRORDER_H), threads.h (THREADSH, SCM_THREADS_H),
8788 throw.h (THROWH, SCM_THROW_H), version.h (VERSIONH,
8789 SCM_VERSION_H), vports.h (VPORTSH, SCM_VPORTS_H): Renamed
8790 the macros that are defined to inhibit double inclusion of the
8791 same headers to the SCM_<filename>_H format.
8792
8793 2001-08-27 Marius Vollmer <mvo@zagadka.ping.de>
8794
8795 * ports.c, ports.h, fprots.c, gc.c, ioext.c: Replaced
8796 "scm_t_portable" with "scm_port_table" which was an artifact from
8797 the great "scm_*_t -> scm_t_" renaming.
8798
8799 2001-08-25 Thien-Thi Nguyen <ttn@revel.glug.org>
8800
8801 * gc_os_dep.c (GC_noop1): Move before `GC_find_limit' where it is
8802 used; nfc. Thanks to Bill Schottstaedt.
8803
8804 * validate.h (SCM_VALIDATE_USHORT_COPY, SCM_VALIDATE_SHORT_COPY,
8805 SCM_VALIDATE_UINT_COPY, SCM_VALIDATE_INT_COPY): New macros.
8806 Thanks to Chris Cramer.
8807
8808 2001-08-25 Marius Vollmer <mvo@zagadka.ping.de>
8809
8810 * Makefile.am (AUTOMAKE_OPTIONS): Change "foreign" to "gnu".
8811
8812 * eval.c (scm_m_atbind): Redesigned to behvae like `let', but with
8813 dynamic scope.
8814 * dynwind.h (scm_swap_bindings): Declare.
8815 * dynwind.c (scm_swap_bindings): Make non-static.
8816
8817 2001-08-25 Michael Livshin <mlivshin@bigfoot.com>
8818
8819 * gc.c (scm_gc_sweep): now can sweep unreachable variables (by
8820 doing exactly nothing about them). thanks Neil!
8821
8822 2001-08-18 Neil Jerram <neil@ossau.uklinux.net>
8823
8824 * __scm.h (SCM_ENABLE_VCELLS): Fix spelling mistake in comment.
8825
8826 2001-08-17 Thien-Thi Nguyen <ttn@revel.glug.org>
8827
8828 * gc.c: Fix omission bug: Add `heap_segment' forward decl
8829 (proto) in the case when either `GUILE_DEBUG' or
8830 `GUILE_DEBUG_FREELIST' preprocessor symbols are defined.
8831
8832 (map_free_list): Fix typo: Ref `f' correctly.
8833
8834 Thanks to Chris Cramer.
8835
8836 2001-08-15 Rob Browning <rlb@defaultvalue.org>
8837
8838 * Makefile.am (libguile_la_LDFLAGS): use libtool interface version
8839 variables.
8840 (libpath.h): change libguileversion to libguileinterface.
8841
8842 2001-08-07 Marius Vollmer <mvo@zagadka.ping.de>
8843
8844 * Makefile.am (EXTRA_DIST): Distribute ChangeLog-1996-1999 and
8845 ChangeLog-2000. Thanks to Daniel Skarda!
8846
8847 2001-08-07 Michael Livshin <mlivshin@bigfoot.com>
8848
8849 * guile-snarf-docs-texi.in: don't call the tokenizer here, we now
8850 do it from the Makefile.
8851
8852 * Makefile.am: rearrange the snarfing slightly, so that .doc files
8853 are of a reasonable size.
8854
8855 2001-08-02 Neil Jerram <neil@ossau.uklinux.net>
8856
8857 * stacks.c (scm_make_stack): Improve docstring by explaining use
8858 of cutting args.
8859
8860 2001-08-01 Marius Vollmer <mvo@zagadka.ping.de>
8861
8862 * chars.c (scm_char_alphabetic_p, scm_char_numeric_p,
8863 scm_char_whitespace_p, scm_char_upper_case_p,
8864 scm_char_lower_case_p, scm_char_is_both_p): Do not require
8865 characters to fulfill isascii in addition to the primary
8866 predicate.
8867
8868 2001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
8869
8870 * numbers.c (DIGITS, scm_small_istr2int, scm_istr2int,
8871 scm_istr2flo, scm_istring2number): Removed.
8872
8873 (iflo2str, scm_real_p, scm_integer_p): Use SCM_<foo> instead of
8874 SCM_SLOPPY_<foo>.
8875
8876 (t_exactness, t_radix, DIGIT2UINT, XDIGIT2UINT, mem2uinteger,
8877 mem2decimal_from_point, mem2ureal, mem2complex, scm_i_mem2number):
8878 Added.
8879
8880 (scm_string_to_number): Use new number parser.
8881
8882 (scm_exact_to_inexact): Replace dummy by a GPROC, which also
8883 handles complex numbers.
8884
8885 * numbers.h (NUMBERSH, SCM_NUMBERS_H): Rename <foo>H to
8886 SCM_<foo>_H.
8887
8888 (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Prefer !SCM_<pred> over
8889 SCM_N<pred>.
8890
8891 (scm_istr2int, scm_istr2flo, scm_istring2number): Removed.
8892
8893 (scm_i_mem2number): Added.
8894
8895 (scm_exact_to_inexact): Changed signature.
8896
8897 * read.c (scm_lreadr): Perform the shortcut test for '+ and '-
8898 here instead of within scm_i_mem2number. Call scm_i_mem2number
8899 instead of scm_istr2int and scm_istring2number.
8900
8901 2001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
8902
8903 * eval.c (scm_lookupcar, scm_m_body, scm_m_lambda, unmemocopy,
8904 scm_unmemocopy, scm_badargsp, scm_eval_body, CHECK_EQVISH,
8905 SCM_CEVAL, scm_nconc2last, SCM_APPLY, scm_copy_tree): Prefer
8906 !SCM_<pred> over SCM_N<pred>.
8907
8908 (scm_eval_body): Remove side effecting code from macro call.
8909
8910 (SCM_CEVAL, SCM_APPLY): Remove goto statement and redundant
8911 SCM_NIMP test.
8912
8913 2001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
8914
8915 * pairs.h (SCM_VALIDATE_PAIR): Use SCM_CONSP, not SCM_ECONSP.
8916
8917 2001-07-29 Marius Vollmer <mvo@zagadka.ping.de>
8918
8919 Removed vcell slot from structs.
8920
8921 * struct.h (scm_vtable_index_vcell): Removed. Renumbered
8922 subsequent indices.
8923
8924 * struct.c (scm_struct_vtable_p): Do not check vcell slot for
8925 zero. Use scm_vtable_index_layout instead of "0" when accessing
8926 said slot.
8927 (scm_init_struct): Remove vcell slot layout code from
8928 required_vtable_fields.
8929
8930 * objects.h (scm_si_redefined, scm_si_hashsets): Renumbered.
8931
8932 * goops.c (build_class_class_slots): Removed vcell slot
8933 definition.
8934
8935 * goops.h: Renumbered slot indices. (SCM_CLASS_CLASS_LAYOUT):
8936 Removed vcell slot layout code.
8937 (scm_si_vcell): Removed.
8938
8939 2001-07-26 Marius Vollmer <mvo@zagadka.ping.de>
8940
8941 "Glocs" have been removed.
8942
8943 * tags.h: Update tag system docs.
8944 (scm_tc3_cons_gloc): Renamed to scm_tc3_struct. Changed all uses.
8945 (scm_tcs_cons_gloc): Renamed to scm_tcs_struct. Changed all uses.
8946 (SCM_ECONSP, SCM_NECONSP): Removed. Changed all uses to SCM_CONSP
8947 or SCM_NCONSP, respectively.
8948
8949 * struct.c, struct.h, srcprop.c, procs.c, procprop.c, print.c,
8950 objects.c. modules.c, goops.c, eval.c, debug.c: Changed all uses
8951 of scm_tc3_cond_gloc and scm_tcs_cons_gloc. See above.
8952
8953 * print.c (scm_iprin1): Remove printing of glocs. Do not try to
8954 tell glocs from structs.
8955
8956 * gc.c (scm_gc_mark, scm_gc_sweep): Remove handling of glocs.
8957
8958 * eval.c (scm_m_atbind): Make a list of variables, not glocs.
8959 (scm_ceval, scm_deval): For SCM_IM_BIND, fiddle with variables
8960 instead of with glocs.
8961 (EVALCAR): Do not test for glocs.
8962 (scm_lookupcar, scm_lookupcar1): Do not handle glocs in race
8963 condition.
8964 (scm_unmemocar): Do not handle glocs.
8965 (scm_m_atfop): Memoize as a variable, not as a gloc.
8966 (scm_eval_args, scm_deval_args): Do not handle glocs.
8967 (scm_ceval, scm_deval): Likewise.
8968
8969 * eval.h (SCM_XEVALCAR): Do not test for glocs.
8970 (SCM_GLOC_VAR, SCM_GLOC_VAL, SCM_GLOC_SET_VAL, SCM_GLOC_VAL_LOC):
8971 Removed.
8972
8973 * debug.h, debug.c (scm_make_gloc, scm_gloc_p): Removed.
8974
8975 * dynwind.c (scm_swap_bindings): Likewise.
8976 (scm_dowinds): Updated to recognize lists of variables instead of
8977 lists of glocs.
8978
8979 * __scm.h (SCM_CAUTIOS, SCM_RECKLESS): Update comments.
8980
8981
8982 * gc_os_dep.c (GC_noop1): Moved into the same #if/#endif context
8983 where it is needed.
8984
8985 2001-07-25 Gary Houston <ghouston@arglist.com>
8986
8987 * numbers.c (scm_logand, scm_logior, scm_logxor): adjusted the
8988 docstrings to reflect the n-ary implementation.
8989
8990 2001-07-26 Marius Vollmer <mvo@zagadka.ping.de>
8991
8992 * eval.c (scm_ceval, scm_deval): Use "RETURN" macro when returning
8993 value of a variable, not the plain "return" statement.
8994
8995 2001-07-25 Marius Vollmer <mvo@zagadka.ping.de>
8996
8997 * eval.c: Allow variables in memoized code (in addition to glocs).
8998 (scm_lookupcar): Handle variables in lost races. Replace symbol
8999 with variable directly, do not make a gloc.
9000 (scm_unmemocar): Rewrite variables using a reverse lookup, just
9001 like glocs.
9002 (scm_ceval, scm_deval): Deal with variables in SCM_IM_SET and in
9003 the main switch.
9004
9005 2001-07-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
9006
9007 * variable.c (scm_i_variable_print): Use "value" instead of
9008 "binding" since a binding is the mapping between symbols and
9009 variables, not between variables and their values.
9010
9011 * tags.h (scm_tc7_variable): New.
9012 * gc.c (scm_gc_mark): Handle scm_tc7_variable objects.
9013 * print.c (scm_iprin1): Likewise.
9014
9015 * variable.h (scm_tc16_variable): Removed.
9016 (SCM_VARIABLEP): Test for new tc7 code.
9017 (scm_i_variable_print): New.
9018 * variable.c (scm_tc16_variable): Removed.
9019 (variable_print): Renamed to scm_i_variable_print and made
9020 non-static.
9021 (variable_equal_p): Removed.
9022 (make_variable): Construct a tc7 object instead of a smob.
9023 (scm_init_variable): Do not register smob.
9024
9025 2001-07-22 Marius Vollmer <mvo@zagadka.ping.de>
9026
9027 * tags.h: Include inttypes.h when we have it.
9028
9029 2001-07-13 Marius Vollmer <mvo@zagadka.ping.de>
9030
9031 * tags.h (SCM_UNBOUND): Make it the 34th isym/iflag, the 33th slot
9032 is taken by the new SCM_IM_CALL_WITH_VALUES.
9033 * print.c (scm_isymnames): Update table accordingly.
9034
9035 2001-07-22 Gary Houston <ghouston@arglist.com>
9036
9037 * regex-posix.c (s_scm_regexp_exec): use scm_long2num not
9038 SCM_MAKINUM to convert regoff_t value to SCM.
9039
9040 2001-07-21 Gary Houston <ghouston@arglist.com>
9041
9042 * scmsigs.c: include sys/time.h for itimer stuff.
9043
9044 2001-07-19 Rob Browning <rlb@defaultvalue.org>
9045
9046 * gc_os_dep.c (GC_noop1): ifdef out (unused) to quiet warning.
9047
9048 * c-tokenize.lex: add option %nounput to quiet warning.
9049 Add prototype for yylex to quiet warning.
9050
9051 * scmconfig.h.in: add flags for setitimer and getitimer.
9052
9053 * scmsigs.h (scm_init_scmsigs): new prototype.
9054 (scm_init_scmsigs): new prototype.
9055
9056 * scmsigs.c (s_scm_setitimer): new function.
9057 (s_scm_setitimer): new function.
9058
9059 2001-07-18 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9060
9061 * alist.c, arbiters.c, async.h, backtrace.h, boolean.c, chars.c,
9062 chars.h, continuations.h, debug-malloc.h, dynl.c, feature.c,
9063 feature.h, filesys.h, fluids.h, fports.h, gc_os_dep.c,
9064 gdb_interface.h, gh_eval.c, gh_funcs.c, gh_io.c, gh_list.c,
9065 gh_predicates.c, gsubr.c, gsubr.h, guardians.h,
9066 guile-func-name-check.in, guile-snarf-docs-texi.in,
9067 guile-snarf-docs.in, guile-snarf.awk.in, guile-snarf.in,
9068 hashtab.h, iselect.h, keywords.h, lang.c, list.h, load.h,
9069 objprop.c, objprop.h, options.c, options.h, random.h,
9070 regex-posix.h, root.c, root.h, script.c, snarf.h, stackchk.c,
9071 strerror.c, strop.h, strports.h, threads.h, values.c, values.h,
9072 version.c, version.h: Updated copyright notice.
9073
9074 2001-07-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
9075
9076 * goops.c (sym_layout, sym_vcell, sym_vtable, sym_print,
9077 sym_procedure, sym_setter, sym_redefined, sym_h0, sym_h1, sym_h2,
9078 sym_h3, sym_h4, sym_h5, sym_h6, sym_h7, sym_name,
9079 sym_direct_supers, sym_direct_slots, sym_direct_subclasses,
9080 sym_direct_methods, sym_cpl, sym_default_slot_definition_class,
9081 sym_slots, sym_getters_n_setters, sym_keyword_access, sym_nfields,
9082 sym_environment, scm_sym_change_class): New static variables to
9083 hold predefined symbols.
9084
9085 (build_class_class_slots): Build the list using scm_list_n
9086 instead of cons. Also, slots are already created as lists, thus
9087 making a call to maplist unnecessary.
9088
9089 (scm_class_name, scm_class_direct_supers, scm_class_direct_slots,
9090 scm_class_direct_subclasses, scm_class_direct_methods,
9091 scm_class_precedence_list, scm_class_slots, scm_class_environment,
9092 scm_method_procedure, create_standard_classes, purgatory): Use
9093 predefined symbols.
9094
9095 (build_slots_list, compute_getters_n_setters,
9096 scm_sys_initialize_object, scm_sys_inherit_magic_x,
9097 get_slot_value_using_name, set_slot_value_using_name,
9098 scm_sys_invalidate_method_cache_x, scm_generic_capability_p,
9099 scm_compute_applicable_methods, scm_sys_method_more_specific_p,
9100 make_struct_class): Prefer !SCM_<pred> over SCM_N<pred>.
9101
9102 (scm_sys_prep_layout_x): Minimize variable scopes.
9103
9104 (scm_sys_prep_layout_x, scm_sys_fast_slot_ref,
9105 scm_sys_fast_slot_set_x): Fix signedness.
9106
9107 (go_to_hell, go_to_heaven, purgatory, scm_change_object_class,
9108 lock_cache_mutex, unlock_cache_mutex, call_memoize_method,
9109 scm_memoize_method, scm_wrap_object): Use packing and unpacking
9110 when converting to and from SCM values.
9111
9112 (scm_enable_primitive_generic_x): Add rest argument checking.
9113
9114 (map, filter_cpl, maplist, scm_sys_initialize_object,
9115 scm_sys_prep_layout_x, slot_definition_using_name,
9116 scm_enable_primitive_generic_x, scm_compute_applicable_methods,
9117 call_memoize_method, scm_make, scm_make_class): Prefer explicit
9118 predicates over SCM_N?IMP tests.
9119
9120 (scm_sys_prep_layout_x): Fix typo in error message. Fix type
9121 checking.
9122
9123 (burnin, go_to_hell): Use SCM_STRUCT_DATA instead of the SCM_INST
9124 alias.
9125
9126 2001-07-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
9127
9128 * fports.c (fport_print): Don't use SCM_C[AD]R for non pairs.
9129
9130 * num2integral.i.c (INTEGRAL2NUM, INTEGRAL2BIG): Fix signedness.
9131
9132 * symbols-deprecated.c (scm_gentemp): Simplify vector test.
9133
9134 * vectors.c (scm_vector_p): Eliminate redundant IMP test.
9135
9136 2001-07-12 Michael Livshin <mlivshin@bigfoot.com>
9137
9138 * strings.c (s_scm_string): fix arg position in assert.
9139
9140 2001-07-11 Gary Houston <ghouston@arglist.com>
9141
9142 * strports.c (st_write): use memcpy, not strncpy. thanks to
9143 Dale P. Smith.
9144
9145 2001-07-09 Thien-Thi Nguyen <ttn@revel.glug.org>
9146
9147 * alist.c, alloca.c, arbiters.c, async.c, async.h, backtrace.c,
9148 boolean.c, chars.c, continuations.c, coop-defs.h, coop-threads.c,
9149 debug-malloc.h, debug.c, debug.h, dynl.c, dynwind.c, eq.c,
9150 error.c, eval.c, evalext.c, feature.c, feature.h, filesys.c,
9151 filesys.h, fluids.c, fluids.h, fports.c, fports.h, gc.c, gc.h,
9152 gdbint.c, gsubr.c, guardians.c, hash.c, hashtab.c, hooks.c,
9153 hooks.h, inet_aton.c, init.c, ioext.c, keywords.c, keywords.h,
9154 lang.c, list.c, load.c, macros.c, mallocs.c, memmove.c, modules.c,
9155 net_db.c, numbers.c, numbers.h, objects.c, objprop.c, options.c,
9156 pairs.c, pairs.h, ports.c, ports.h, posix.c, print.c, print.h,
9157 procprop.c, procs.c, procs.h, properties.c, putenv.c, ramap.c,
9158 random.c, random.h, read.c, regex-posix.c, regex-posix.h, root.c,
9159 root.h, scmsigs.c, script.c, simpos.c, smob.c, snarf.h, socket.c,
9160 sort.c, srcprop.c, srcprop.h, stackchk.c, stacks.c, stacks.h,
9161 stime.c, strerror.c, strings.c, strings.h, strop.c, strorder.c,
9162 strports.c, struct.c, struct.h, symbols-deprecated.c, symbols.c,
9163 symbols.h, tags.h, threads.c, threads.h, throw.c, unif.c, unif.h,
9164 variable.c, variable.h, vectors.c, vectors.h, version.c, vports.c,
9165 weaks.c, weaks.h: Remove "face-lift" comment.
9166
9167 2001-07-08 Rob Browning <rlb@defaultvalue.org>
9168
9169 * .cvsignore: add stamp-h.in.
9170
9171 2001-07-04 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9172
9173 * hooks.c (scm_make_hook, scm_add_hook_x),
9174 (scm_remove_hook_x, scm_reset_hook_x, scm_run_hook): Added return
9175 value info to the docstrings.
9176
9177 2001-07-03 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9178
9179 Some more compatibility patches for Windows.
9180
9181 * posix.c (getlogin): getlogin() implementation for Windows.
9182
9183 * backtrace.c, ioext.c: Include <stdio.h>.
9184
9185 * unif.c, script.c, rw.c, error.c: Include <io.h>, if it does
9186 exist.
9187
9188 * cpp_sig_symbols.in: Added SIGBREAK.
9189
9190 2001-07-01 Marius Vollmer <mvo@zagadka.ping.de>
9191
9192 * strports.c (scm_read_0str, scm_eval_0str): Call
9193 scm_c_read_string and scm_c_eval_string respectively, not
9194 themselves. Thanks to Dale P. Smith!
9195
9196 2001-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
9197
9198 * unif.c (scm_array_set_x): The variable args does not
9199 necessarily have to be a list. Further, got rid of a redundant
9200 SCM_NIMP test.
9201
9202 2001-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
9203
9204 * list.c (SCM_I_CONS): Make sure the cell type is initialized
9205 last.
9206
9207 * gc.c (s_scm_map_free_list, scm_igc, scm_gc_sweep,
9208 init_heap_seg): Fixed signedness.
9209
9210 (init_heap_seg): Replaced strange for-loop with a while loop.
9211
9212 * weaks.h (WEAKSH, SCM_WEAKS_H): Rename <foo>H to SCM_<foo>_H.
9213
9214 (SCM_WVECTP): Prefer !SCM_<pred> over SCM_N<pred>.
9215
9216 The following patch adds conservative marking for the elements of
9217 free or allocated cells.
9218
9219 * gc.c (allocated_mark, heap_segment): New static functions.
9220
9221 (which_seg): Deleted, since the functionality is now provided by
9222 function heap_segment.
9223
9224 (map_free_list): Use heap_segment instead of which_seg.
9225
9226 (MARK): If cell debugging is disabled, mark free cells
9227 conservatively.
9228
9229 (scm_mark_locations, scm_cellp): Extracted the search for the
9230 heap segment of a SCM value into function heap_segment.
9231
9232 (scm_init_storage): Allocated cells must be marked
9233 conservatively.
9234
9235 * gc.[ch] (scm_gc_mark_cell_conservatively): New function.
9236
9237 The following patch changes the representation of weak vectors to
9238 double cells instead of using an extension of the vector's
9239 allocated memory.
9240
9241 * gc.c (MARK): Use SCM_SET_WVECT_GC_CHAIN instead of assigning to
9242 the result of SCM_WVECT_GC_CHAIN.
9243
9244 (scm_gc_sweep): Weak vectors don't have extra fields any more.
9245
9246 * weaks.c (allocate_weak_vector): New static function. It does
9247 not patch any previously created vector object during the
9248 construction of a weak vector, and thus doesn't need to switch
9249 off interrupts during vector creation.
9250
9251 (scm_make_weak_vector, scm_make_weak_key_hash_table,
9252 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
9253 Use allocate_weak_vector to provide the new weak vector object.
9254
9255 * weaks.h (SCM_WVECT_TYPE, SCM_SET_WVECT_TYPE,
9256 SCM_SET_WVECT_GC_CHAIN): New macros. The weak vector subtype is
9257 now stored in the double cell.
9258
9259 (SCM_IS_WHVEC, SCM_IS_WHVEC_V, SCM_IS_WHVEC_B, SCM_IS_WHVEC_ANY):
9260 Use SCM_WVECT_TYPE.
9261
9262 (SCM_WVECT_GC_CHAIN): The weak objects are now chained together
9263 using an entry of the double cell.
9264
9265 2001-06-30 Thien-Thi Nguyen <ttn@revel.glug.org>
9266
9267 * stamp-h.in: bye bye
9268
9269 2001-06-30 Marius Vollmer <mvo@zagadka.ping.de>
9270
9271 * gh_eval.c (gh_eval_str): Use scm_c_eval_string instead of
9272 scm_eval_0str.
9273
9274 * load.c, load.h (scm_c_primitive_load,
9275 scm_c_primitive_load_path): New.
9276
9277 * strports.c, strports.h (scm_c_read_string): Renamed from
9278 scm_read_0str. Also, added "const" qualifier to argument.
9279 (scm_c_eval_string): Renamed from scm_eval_0str.
9280 (scm_read_0str, scm_eval_0str): Deprecated.
9281
9282 2001-06-28 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9283
9284 * fluids.c (scm_c_with_fluid): Use scm_list_1() instead of
9285 SCM_LIST1.
9286
9287 2001-06-28 Keisuke Nishida <kxn30@po.cwru.edu>
9288
9289 * list.h (scm_list_1, scm_list_2, scm_list_3, scm_list_4, scm_list_5,
9290 scm_list_n): New functions.
9291 (SCM_LIST0, SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5,
9292 SCM_LIST6, SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify): Deprecated.
9293 (lots of files): Use the new functions.
9294
9295 * goops.c (CALL_GF1, CALL_GF2, CALL_GF3, CALL_GF4): Use scm_call_N.
9296
9297 * strings.c: #include "libguile/deprecation.h".
9298
9299 2001-06-27 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9300
9301 * read.c (scm_lreadr): When reading a hash token, check for a
9302 user-defined hash procedure first, so that overriding the builtin
9303 hash characters is possible (this was needed for implementing
9304 SRFI-4's read synax `f32(...)').
9305
9306 * num2integral.i.c: Use scm_t_signed_bits instead of scm_t_bits,
9307 because the latter is unsigned now and breaks comparisons like
9308 (n < (scm_t_signed_bits)MIN_VALUE).
9309
9310 2001-06-26 Neil Jerram <neil@ossau.uklinux.net>
9311
9312 * eval.h, eval.c (scm_call_4): New function.
9313
9314 * eval.c (SCM_APPLY, SCM_CEVAL, ENTER_APPLY): Call trap handlers
9315 directly rather than dispatching to them via scm_ithrow and a lazy
9316 catch.
9317
9318 * eval.c (scm_evaluator_trap_table), eval.h (SCM_ENTER_FRAME_HDLR,
9319 SCM_APPLY_FRAME_HDLR, SCM_EXIT_FRAME_HDLR): Add three new options
9320 for trap handler procedures.
9321
9322 * debug.h (SCM_RESET_DEBUG_MODE): Add checks for trap handler
9323 procedures not being #f.
9324
9325 2001-06-27 Michael Livshin <mlivshin@bigfoot.com>
9326
9327 * Makefile.am (c-tokenize.c): add rule to generate it.
9328 (EXTRA_DIST): add c-tokenize.lex, so it gets distributed.
9329
9330 filter-doc-snarfage.c: remove.
9331
9332 2001-06-26 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9333
9334 * ports.c (scm_output_port_p): Use result of SCM_COERCE_OUTPORT.
9335
9336 The following set of changes makes compiling Guile under various
9337 Windows compilers easier. Compilation under GNU systems should
9338 not be affected at all.
9339
9340 Thanks to Stefan Jahn for all necessary information, patches and
9341 testing.
9342
9343 * posix.c: Conditialize getpwent, getgrent, kill, getppid, getuid,
9344 getpgrp, ttyname, primitive-fork and some header inclusion for
9345 Windows.
9346
9347 * random.c: Define M_PI, if not predefined and use __int64 for
9348 LONG64 under Windows.
9349
9350 * scmsigs.c: Emulate some functions (alarm, sleep, kill) under
9351 Windows and conditionalize some signal names.
9352
9353 * socket.c (scm_getsockopt): Added missing comma.
9354 Include socket library header under Windows.
9355
9356 * stime.c (CLKTCK): Add cast to int, to make it compile under
9357 Windows.
9358
9359 * ports.c (truncate): New function, compiled only under Windows.
9360
9361 * net_db.c: Do not declare errno under Windows.
9362
9363 * iselect.h, inet_aton.c: Include socket library headers under
9364 Windows.
9365
9366 * guile.c (inner_main): Under Windows, initialize socket library
9367 and initialize gdb_interface data structures.
9368
9369 * gdb_interface.h: Under Windows, gdb_interface cannot be
9370 initialized statically. Initialize at runtime instead.
9371
9372 * fports.c (write_all): ssize_t -> size_t.
9373 (fport_print): Conditionalize call to ttyname().
9374 (getflags): New function, compiled only under Windows.
9375
9376 * filesys.c: Conditionalize inclusion of <pwd.h>. Conditionalize
9377 primitives chown, link, fcntl.
9378 (scm_basename, scm_dirname): Under Windows, handle \ as well as /
9379 as path seperator.
9380
9381 * backtrace.c: Include <io.h> under Windows.
9382
9383 * async.h (ASYNCH, SCM_ASYNC_H): Rename <foo>H to SCM_<foo>_H.
9384
9385 * _scm.h: Added preprocessor conditional for __MINGW32__ for errno
9386 declaration.
9387
9388 2001-06-27 Keisuke Nishida <kxn30@po.cwru.edu>
9389
9390 * eval.c (scm_call_0, scm_call_1, scm_call_2, scm_call_3,
9391 scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3): New functions.
9392 * eval.h (scm_call_0, scm_call_1, scm_call_2, scm_call_3,
9393 scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3): Declared.
9394 * async.c (scm_run_asyncs), coop-threads.c (scheme_body_bootstrip,
9395 scheme_handler_bootstrip), debug.c (with_traps_inner), dynwind.c
9396 (scm_dynamic_wind, scm_dowinds), environments.c
9397 (import_environment_conflict), eval.c (scm_macroexp, scm_force,
9398 scm_primitive_eval_x, scm_primitive_eval), fluids.c (apply_thunk),
9399 goops.c (GETVAR, purgatory, make_class_from_template,
9400 scm_ensure_accessor), hashtab.c (scm_ihashx, scm_sloppy_assx,
9401 scm_delx_x, fold_proc), hooks.c (scm_c_run_hook), load.c
9402 (scm_primitive_load), modules.c (scm_resolve_module,
9403 scm_c_define_module, scm_c_use_module, scm_c_export,
9404 module_variable, scm_eval_closure_lookup, scm_sym2var,
9405 scm_make_module, scm_ensure_user_module, scm_load_scheme_module),
9406 ports.c (scm_port_for_each), print.c (scm_printer_apply),
9407 properties.c (scm_primitive_property_ref), ramap.c (ramap,
9408 ramap_cxr, rafe, scm_array_index_map_x, read.c (scm_lreadr),
9409 scmsigs.c (sys_deliver_signals), sort.c (applyless), strports.c
9410 (scm_object_to_string, scm_call_with_output_string,
9411 scm_call_with_input_string), throw.c (scm_body_thunk,
9412 scm_handle_by_proc, hbpca_body), unif.c (scm_make_shared_array,
9413 scm_make_shared_array), vports.c (sf_flush, sf_write,
9414 sf_fill_input, sf_close): Use one of the above functions.
9415 * goops.c, hashtab.c, scmsigs.c, sort.c: #include "libguile/root.h".
9416
9417 2001-06-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
9418
9419 * filesys.c (scm_close), ports.c (scm_close_port,
9420 scm_port_closed_p), strop.c (scm_string_null_p): Use SCM_BOOL
9421 instead of SCM_NEGATE_BOOL.
9422
9423 * filesys.c (scm_stat): Clean up type dispatch.
9424
9425 * filesys.c (scm_stat), ports.c (scm_input_port_p,
9426 scm_output_port_p): Get rid of redundant IM type check.
9427
9428 * filesys.c (scm_readdir, scm_getcwd, scm_readlink), gh_data.c
9429 (gh_str2scm), load.c (scm_primitive_load, scm_internal_parse_path,
9430 scm_search_path), net_db.c (scm_gethost, scm_getnet, scm_getproto,
9431 scm_return_entry), numbers.c (scm_number_to_string), objects.c
9432 (scm_make_subclass_object), ports.c (scm_port_mode), read.c
9433 (scm_lreadr), simpos.c (scm_getenv), socket.c (scm_inet_ntoa,
9434 scm_addr_vector), stime.c (scm_strftime), strings.c
9435 (scm_makfromstrs, scm_makfrom0str, scm_substring), strings.h
9436 (SCM_STRING_COERCE_0TERMINATION_X), strop.c (string_copy,
9437 scm_string_split), strports.c (scm_strport_to_string), symbols.c
9438 (scm_symbol_to_string), vports.c (sf_write): Use scm_mem2string
9439 instead of scm_makfromstr.
9440
9441 * net_db.c (scm_sethost, scm_setnet, scm_setproto, scm_setserv),
9442 ports.c (scm_close_all_ports_except), read.c (scm_lreadr,
9443 scm_read_hash_extend), stime.c (scm_strftime), strings.c
9444 (scm_string_append, scm_string), strings.h (SCM_STRINGP,
9445 SCM_STRING_COERCE_0TERMINATION_X, SCM_RWSTRINGP), strop.c
9446 (string_capitalize_x): Prefer explicit type check over SCM_N?IMP,
9447 !SCM_<pred> over SCM_N<pred>.
9448
9449 * strings.[ch] (scm_makfromstr): Deprecated.
9450
9451 (scm_mem2string): New function, replaces scm_makfromstr.
9452
9453 * strings.c (scm_substring), strop.c (string_copy,
9454 scm_string_split), strports.c (scm_strport_to_string), symbols.c
9455 (scm_symbol_to_string): Fix gc problem.
9456
9457 * strings.h (STRINGSH, SCM_STRINGS_H): Rename <foo>H to
9458 SCM_<foo>_H.
9459
9460 * validate.h (SCM_VALIDATE_SUBSTRING_SPEC_COPY): Eliminate
9461 warning about comparing signed and unsigned values. This fix is
9462 not optimal, since it won't work reliably if sizeof (c_start) >
9463 sizeof (size_t) or sizeof (c_end) > sizeof (size_t). A better
9464 solution is to define this macro as an inline function, thus
9465 allowing to specifiy the types of c_start and c_end.
9466
9467 2001-06-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
9468
9469 * debug.h (SCM_DEBUGOBJ_FRAME): Deliver result as a
9470 scm_t_debug_frame*.
9471
9472 * debug.h (DEBUGH, SCM_DEBUG_H), stacks.h (STACKSH, SCM_STACKSH):
9473 Rename <foo>H to SCM_<foo>_H.
9474
9475 * stacks.c (NEXT_FRAME, narrow_stack): Prefer explicit type check
9476 over SCM_N?IMP, !SCM_<pred> over SCM_N<pred>.
9477
9478 (narrow_stack): Make i unsigned. Don't use side-effecting
9479 operations in conditions.
9480
9481 (narrow_stack, scm_make_stack, scm_stack_id,
9482 scm_last_stack_frame): Get rid of redundant SCM_N?IMP checks.
9483
9484 (scm_make_stack, scm_stack_id, scm_last_stack_frame): Clean up
9485 type dispatch. No need to cast result of SCM_DEBUGOBJ_FRAME any
9486 more.
9487
9488 (scm_stack_ref, scm_frame_previous, scm_frame_next): Fix
9489 signedness.
9490
9491 (scm_last_stack_frame): Remove bogus `;´.
9492
9493 * stacks.h (SCM_FRAMEP): Fix type check.
9494
9495 2001-06-25 Michael Livshin <mlivshin@bigfoot.com>
9496
9497 * Makefile.am (MAINTAINERCLEANFILES): be sure to remove
9498 c-tokenize.c when doing maintainer-clean.
9499
9500 * snarf.h (SCM_SNARF_DOCS): change the "grammar" slightly.
9501
9502 * guile-snarf-docs.in, guile-snarf-docs-texi.in: rewrite &
9503 simplify.
9504
9505 * eval.c: all hash signs are in column 0.
9506
9507 * Makefile.am (guile_filter_doc_snarfage): build using
9508 c-tokenize.c, not filter-doc-snarfage.c.
9509 rearrange snarfing dependencies a bit.
9510
9511 * c-tokenize.lex: new file.
9512
9513 2001-06-25 Marius Vollmer <mvo@zagadka.ping.de>
9514
9515 * srcprop.h, srcprop.c (scm_srcprops_to_plist): Renamed from
9516 scm_t_srcpropso_plist. See the big type renaming.
9517 * coop-defs.h (scm_mutex_trylock, scm_cond_timedwait): Likewise.
9518 Thanks to Seth Alves!
9519
9520 * numbers.c (SIZE_MAX, PTRDIFF_MIN, PTRDIFF_MAX): Only define when
9521 they aren't defined already.
9522
9523 2001-06-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
9524
9525 * backtrace.c (display_backtrace_body): Use SCM_VALIDATE_STACK
9526 and SCM_VALIDATE_OPOUTPORT instead of SCM_ASSERT. Fix signedness
9527 problem.
9528
9529 * backtrace.c (display_expression, scm_set_print_params_x,
9530 display_application, display_frame, scm_backtrace), numbers.c
9531 (scm_istring2number), objects.c (scm_class_of,
9532 scm_mcache_lookup_cmethod, scm_mcache_compute_cmethod): Prefer
9533 explicit type check over SCM_N?IMP, !SCM_<pred> over SCM_N<pred>.
9534
9535 * fluids.c (scm_fluid_ref, scm_fluid_set_x): Fluid numbers are
9536 always positive.
9537
9538 * numbers.c (scm_i_mkbig): Remove unnecessary casts, remove
9539 unnecessary SCM_DEFER_INTS, SCM_ALLOW_INTS.
9540
9541 * objects.c (scm_class_of): Type fix.
9542
9543 (scm_mcache_lookup_cmethod): Improved comment, simplified,
9544 eliminated goto.
9545
9546 * pairs.h (scm_error_pair_access): The function can return if
9547 called recursively.
9548
9549 2001-06-20 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9550
9551 * init.c (scm_init_guile_1): Removed initialization of tag.c.
9552
9553 * gdbint.c, init.c: Removed inclusion of tag.h.
9554
9555 * tag.h, tag.c: Removed files.
9556
9557 * Makefile.am: Removed tag.{h,c,doc,x} in various places.
9558
9559 2001-06-20 Gary Houston <ghouston@arglist.com>
9560
9561 * deprecation.c, extensions.c, rw.c: include string.h.
9562
9563 2001-06-19 Gary Houston <ghouston@arglist.com>
9564
9565 * filter-doc-snarfage.c (process): added ungetc in
9566 MULTILINE_COOKIE case since otherwise it fails when there's no
9567 space between the '(' and the quote of the following string
9568 (gcc 3.0).
9569
9570 2001-06-14 Marius Vollmer <mvo@zagadka.ping.de>
9571
9572 Throughout: replace "scm_*_t" with "scm_t_*", except "scm_lisp_t".
9573
9574 2001-06-14 Marius Vollmer <mvo@zagadka.ping.de>
9575
9576 * unif.h (SCM_ARRAY_NDIM): Shift then cast so that no sign
9577 extension takes place.
9578 * strings.h (SCM_STRING_LENGTH): Likewise.
9579 (SCM_STRING_MAX_LENGTH): Use unsigned numbers.
9580
9581 * __scm.h (ptrdiff_t): Typedef to long when configure didn't find
9582 it.
9583
9584 * tags.h: Include <stdint.h> when we have it.
9585 (scm_bits_t): Changed to be a unsigned type. Use uintptr_t when
9586 available. Else use "unsigned long".
9587 (scm_signed_bits_t): New.
9588
9589 * numbers.h (SCM_SRS): Cast shiftee to scm_signed_bits_t.
9590 (SCM_INUM): Cast result to scm_signed_bits_t.
9591
9592 2001-06-13 Thien-Thi Nguyen <ttn@revel.glug.org>
9593
9594 * mkstemp.c: Update path to #include file scmconfig.h.
9595 Thanks to Golubev I. N.
9596
9597 2001-06-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
9598
9599 * struct.h (SCM_STRUCT_VTABLE_FLAGS): New macro.
9600
9601 * goops.h (SCM_NUMBER_OF_SLOTS): Removed bogus `\´ at the end of
9602 the macro definition.
9603
9604 (SCM_CLASSP, SCM_INSTANCEP, SCM_PUREGENERICP, SCM_ACCESSORP,
9605 SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Use SCM_STRUCT_VTABLE_FLAGS
9606 instead of SCM_INST_TYPE.
9607
9608 (SCM_ACCESSORP, SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Make sure
9609 the object is a struct before accessing its struct flags.
9610
9611 (SCM_INST_TYPE, SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Deprecated.
9612
9613 2001-06-10 Gary Houston <ghouston@arglist.com>
9614
9615 * rdelim.c (scm_init_rdelim_builtins): don't try to activate the
9616 (ice-9 rdelim) module in (guile) and (guile-user). it didn't
9617 work reliably anymore. try it from boot-9.scm instead.
9618
9619 2001-06-09 Marius Vollmer <mvo@zagadka.ping.de>
9620
9621 * ports.c (scm_lfwrite): Maintain columnd and row count in port.
9622 Thanks to Matthias Köppe!
9623
9624 2001-06-08 Michael Livshin <mlivshin@bigfoot.com>
9625
9626 * snarf.h, filter-doc-snarfage.c: more changes to cope with
9627 space-happy C preprocessors.
9628
9629 * filter-doc-snarfage.c, guile-snarf.in: try to cope with spaces
9630 inside cookies. thanks to Matthias Köppe!
9631
9632 2001-06-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
9633
9634 * keywords.c (keyword_print): Don't use SCM_C[AD]R to access
9635 keywords. Fix gc protection.
9636
9637 * objects.c (scm_mcache_lookup_cmethod): Don't use side effecting
9638 operations in macro calls.
9639
9640 * pairs.c (scm_error_pair_access): Avoid recursion.
9641
9642 Thanks to Matthias Koeppe for reporting the bugs that correspond
9643 to the following set of patches.
9644
9645 * unif.c (scm_bit_set_star_x, scm_bit_invert_x), vectors.h
9646 (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR): Obtain the
9647 bitvector base address using SCM_BITVECTOR_BASE.
9648
9649 * unif.h (SCM_BITVECTOR_BASE): Return the base address as an
9650 unsigned long*.
9651
9652 2001-06-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
9653
9654 * goops.c (SCM_CLASS_REDEF): Removed.
9655
9656 * vectors.h (VECTORSH, SCM_VECTORS_H): Renamed <foo>H to
9657 SCM_<foo>_H.
9658
9659 Thanks to Matthias Koeppe for reporting the bugs that correspond
9660 to the following set of patches.
9661
9662 * goops.c (scm_sys_prep_layout_x, scm_basic_basic_make_class,
9663 create_basic_classes, scm_sys_fast_slot_set_x, set_slot_value,
9664 scm_sys_allocate_instance, clear_method_cache,
9665 scm_sys_invalidate_method_cache_x, scm_make,
9666 create_standard_classes, scm_make_port_classes, scm_make_class,
9667 scm_add_slot): Use SCM_SET_SLOT to set slot values.
9668
9669 (prep_hashsets): Use SCM_SET_HASHSET to set class hash values.
9670
9671 * goops.h (SCM_SET_SLOT, SCM_SET_HASHSET): New macros.
9672
9673 * ramap.c (BINARY_ELTS_CODE, BINARY_PAIR_ELTS_CODE,
9674 UNARY_ELTS_CODE): Remove bogus break statement.
9675
9676 * vectors.h (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR):
9677 Don't access bit vectors elements as SCM objects.
9678
9679 * weaks.c (scm_make_weak_vector, scm_make_weak_key_hash_table,
9680 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
9681 Don't assign to an unpacked value.
9682
9683 2001-06-07 Dirk Herrmann <D.Herrmann@tu-bs.de>
9684
9685 * __scm.h (SCM_NORETURN): Moved here from error.h.
9686
9687 (SCM_UNUSED): New macro.
9688
9689 (SCM_DEBUG_PAIR_ACCESSES): New macro.
9690
9691 * backtrace.c (display_error_handler), continuations.c
9692 (continuation_print), debug.c (debugobj_print), dynwind.c
9693 (guards_print), environments.c (observer_print,
9694 core_environments_finalize, leaf_environment_cell,
9695 leaf_environment_print, eval_environment_print,
9696 eval_environment_observer, import_environment_define,
9697 import_environment_undefine, import_environment_print,
9698 import_environment_observer, export_environment_define,
9699 export_environment_undefine, export_environment_print,
9700 export_environment_observer), eval.c (scm_m_quote, scm_m_begin,
9701 scm_m_if, scm_m_set_x, scm_m_and, scm_m_or, scm_m_case,
9702 scm_m_cond, scm_m_lambda, scm_m_letstar, scm_m_do, scm_m_delay,
9703 scm_m_letrec1, scm_m_apply, scm_m_cont, scm_m_nil_cond,
9704 scm_m_nil_ify, scm_m_t_ify, scm_m_0_cond, scm_m_0_ify,
9705 scm_m_1_ify, scm_m_atfop, scm_m_at_call_with_values), evalext.c
9706 (scm_m_generalized_set_x), fluids.c (fluid_print), fports.c
9707 (fport_print), gc.c (gc_start_stats, scm_remember_upto_here_1,
9708 scm_remember_upto_here_2, scm_remember_upto_here, mark_gc_async),
9709 gh_init.c (gh_standard_handler), goops.c (get_slot_value,
9710 set_slot_value, test_slot_existence, scm_change_object_class,
9711 scm_m_atslot_ref, scm_m_atslot_set_x, make_struct_class,
9712 default_setter), guardians.c (guardian_print, guardian_gc_init,
9713 guardian_zombify, whine_about_self_centered_zombies), guile.c
9714 (inner_main), init.c (stream_handler), keywords.c (keyword_print),
9715 mallocs.c (malloc_print), numbers.c (scm_print_real,
9716 scm_print_complex, scm_bigprint), ports.c (flush_port_default,
9717 end_input_default, scm_port_print, fill_input_void_port,
9718 write_void_port), root.c (root_print), smob.c (scm_mark0,
9719 scm_free0, scm_smob_print, scm_smob_apply_1_error,
9720 scm_smob_apply_2_error, scm_smob_apply_3_error, free_print),
9721 stime.c (restorezone), strings.c (scm_makfromstr), struct.c
9722 (scm_struct_free_0, scm_struct_free_standard,
9723 scm_struct_free_entity, scm_struct_gc_init, scm_free_structs),
9724 throw.c (jmpbuffer_print, lazy_catch_print, ss_handler,
9725 scm_handle_by_throw, scm_ithrow), weaks.c
9726 (scm_weak_vector_gc_init, scm_mark_weak_vector_spines,
9727 scm_scan_weak_vectors), ramap.c (scm_array_fill_int), filesys.c
9728 (scm_dir_print): Mark unused parameters with SCM_UNUSED.
9729
9730 * error.h (SCM_NORETURN): Moved to __scm.h.
9731
9732 * error.h (ERRORH, SCM_ERROR_H), pairs.h (PAIRSH, SCM_PAIRS_H):
9733 Renamed <foo>H to SCM_<foo>_H.
9734
9735 * gc.c (debug_cells_gc_interval): New static variable.
9736
9737 (scm_assert_cell_valid): If selected by the user, perform
9738 additional garbage collections.
9739
9740 (scm_set_debug_cell_accesses_x): Extended to let the user specify
9741 if additional garbage collections are desired.
9742
9743 (mark_gc_async): If additional garbage collections are selected
9744 by the user, don't call the after-gc-hook. Instead require the
9745 user to run the hook manually.
9746
9747 * pairs.c (scm_error_pair_access): New function. Only compiled
9748 if SCM_DEBUG_PAIR_ACCESSES is set to 1.
9749
9750 * pairs.h (SCM_VALIDATE_PAIR): New macro.
9751
9752 (SCM_CAR, SCM_CDR, SCM_SETCAR, SCM_SETCDR): If
9753 SCM_DEBUG_PAIR_ACCESSES is set to 1, make sure that the argument
9754 is a real pair object. (Glocs are also accepted, but that may
9755 change.) If not, abort with an error message.
9756
9757 2001-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
9758
9759 * eval.c (SCM_VALIDATE_NON_EMPTY_COMBINATION): New macro.
9760
9761 (SCM_CEVAL, SCM_APPLY): Replace calls to SCM_EVALIM2 with calls
9762 to SCM_VALIDATE_NON_EMPTY_COMBINATION.
9763
9764 2001-06-05 Marius Vollmer <mvo@zagadka.ping.de>
9765
9766 * extensions.c (scm_c_register_extension): Allow NULL as library
9767 name.
9768 (load_extension): Ignore NULL library names when comparing.
9769
9770 * hash.c (scm_hasher): Use SCM_UNPACK in the case labels so that
9771 non-pointers are being compared. Thanks to Alexander Klimov!
9772
9773 2001-06-04 Gary Houston <ghouston@arglist.com>
9774
9775 * rw.c (scm_write_string_partial): new procedure implementing
9776 write-string/partial in (ice-9 rw).
9777 * rw.h: declare scm_write_string_partial.
9778
9779 2001-06-04 Marius Vollmer <mvo@zagadka.ping.de>
9780
9781 * keywords.c (keyword_print): Substract 1 from length of symbol
9782 name, accounting for the silly dash.
9783
9784 * dynl.c (scm_registered_modules, scm_clear_registered_modules):
9785 Do not emit deprecation warning.
9786
9787 Added exception notice to all files.
9788
9789 * dynl.c: Include "deprecation.h".
9790
9791 2001-06-03 Marius Vollmer <mvo@zagadka.ping.de>
9792
9793 * dynl.c (scm_register_module_xxx, scm_registered_modules,
9794 scm_clear_registered_modules): Deprecated.
9795
9796 2001-06-02 Rob Browning <rlb@cs.utexas.edu>
9797
9798 * .cvsignore: add guile_filter_doc_snarfage guile-snarf-docs
9799 guile-snarf-docs-texi.
9800
9801 * fports.c: HAVE_ST_BLKSIZE changed to
9802 HAVE_STRUCT_STAT_ST_BLKSIZE.
9803 (scm_fport_buffer_add): HAVE_ST_BLKSIZE changed to
9804 HAVE_STRUCT_STAT_ST_BLKSIZE.
9805
9806 * filesys.c (scm_stat2scm): HAVE_ST_RDEV changed to
9807 HAVE_STRUCT_STAT_ST_RDEV.
9808 (scm_stat2scm): HAVE_ST_BLKSIZE changed to
9809 HAVE_STRUCT_STAT_ST_BLKSIZE.
9810 (scm_stat2scm): HAVE_ST_BLOCKS changed to
9811 HAVE_STRUCT_STAT_ST_BLOCKS.
9812
9813 2001-06-02 Marius Vollmer <mvo@zagadka.ping.de>
9814
9815 * strports.c (scm_eval_string): Use scm_primitive_eval_x instead
9816 of scm_eval_x to allow module changes between the forms in the
9817 string. Set/restore module using scm_c_call_with_current_module.
9818
9819 * mkstemp.c: New file, slightly modified from libiberties
9820 mkstemps.c.
9821
9822 2001-05-31 Michael Livshin <mlivshin@bigfoot.com>
9823
9824 * guile-snarf-docs.in, guile-snarf-docs-texi.in,
9825 filter-doc-snarfage.c: new files.
9826
9827 * Makefile.am: add stuff to [build,] use and distribute
9828 guile-snarf-docs, guile-snarf-docs-texi, guile_filter_doc_snarfage.
9829
9830 * guile-snarf.in: grok the new snarf output.
9831
9832 * snarf.h: make the output both texttools- and `read'-friendly.
9833
9834 * guile-doc-snarf.in: reimplement in terms of guile-snarf and
9835 guile-snarf-docs. (should also deprecate, I guess. maybe not).
9836
9837 2001-05-31 Marius Vollmer <mvo@zagadka.ping.de>
9838
9839 * print.c (scm_simple_format): Support "~~" and "~%". Signal
9840 error for unsupported format controls and for superflous
9841 arguments. Thanks to Daniel Skarda!
9842
9843 * print.h, print.c (scm_print_symbol_name): Factored out of
9844 scm_iprin1.
9845 (scm_iprin1): Call it.
9846
9847 * keywords.c (keyword_print): Use scm_print_symbol_name so that
9848 weird names are printed correctly.
9849
9850 * print.c (scm_print_symbol_name): Symbols whose name starts with
9851 `#' or `:' or ends with `:' are considered weird.
9852
9853 2001-05-30 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9854
9855 * numbers.c (scm_difference, scm_divide): Clarified comments for -
9856 and /.
9857
9858 2001-05-29 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9859
9860 * debug.h: Removed prototype for scm_eval_string.
9861
9862 2001-05-28 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9863
9864 * symbols.c (scm_gensym): Fix buffer overrun (try `(gensym
9865 (make-string 2000 #\!))' in an older version).
9866
9867 Change strncpy to memcpy to allow embedded NUL characters in
9868 symbol prefix.
9869
9870 2001-05-28 Michael Livshin <mlivshin@bigfoot.com>
9871
9872 * hooks.c (scm_create_hook): deprecated.
9873 (make_hook): deleted.
9874 (scm_make_hook): all the hook creation code is now here.
9875
9876 * gc.c (scm_init_gc): don't call `scm_create_hook'. instead make
9877 a hook, make it permanent, and do a `scm_c_define' on it.
9878
9879 * strop.c (s_scm_string_capitalize_x): fix docstring quoting.
9880
9881 * socket.c (s_scm_inet_pton): fix docstring quoting.
9882 (s_scm_inet_ntop): ditto.
9883
9884 * num2integral.i.c (INTEGRAL2NUM): cast to fix a warning.
9885
9886 * hashtab.c (scm_internal_hash_fold): fix argument position in
9887 SCM_ASSERT.
9888
9889 * environments.c (s_scm_import_environment_set_imports_x): fix
9890 argument position in SCM_ASSERT.
9891
9892 * debug.c (s_scm_make_gloc): fix SCM packing/unpacking.
9893 (s_scm_make_iloc): ditto.
9894
9895 2001-05-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
9896
9897 * __scm.h (SCM_DEBUG_TYPING_STRICTNESS): Make 1 the default.
9898
9899 * eval.c (promise_print): Read the promise's value as an object.
9900
9901 (SCM_CEVAL): Don't perform side-effecting operations in macro
9902 parameters.
9903
9904 * eval.h (SCM_EVALIM2): Fix the typing strictness of the
9905 conditional expression.
9906
9907 * gc.c (scm_master_freelist, scm_master_freelist2): Added missing
9908 initializer.
9909
9910 * gh_data.c (gh_set_substr): Removed redundant unsigned >= 0
9911 text, removed redundant computation of effective_length and fixed
9912 the overflow check.
9913
9914 * goops.c (test_slot_existence): Use SCM_EQ_P to compare SCM
9915 values.
9916
9917 (wrap_init): Don't use SCM_C[AD]R for non pairs.
9918
9919 (hell): Make it a scm_bits_t pointer rather than a SCM pointer.
9920
9921 * goops.c (scm_sys_modify_class), strports.c (st_resize_port),
9922 struct.h (SCM_SET_STRUCT_PRINTER): Store unpacked values.
9923
9924 * goops.h (SCM_ACCESSORS_OF, SCM_SLOT): Return a SCM value.
9925
9926 * goops.h (GOOPSH, SCM_GOOPS_H), modules.h (MODULESH,
9927 SCM_MODULES_H), objects.h (OBJECTSH, SCM_OBJECTS_H), struct.h
9928 (STRUCTH, SCM_STRUCT_H), symbols.h (SYMBOLSH, SCM_SYMBOLS_H),
9929 __scm.h (__SCMH, SCM___SCM_H): Change <foo>H to SCM_<foo>_H.
9930
9931 * modules.[ch] (scm_module_tag): Make it a scm_bits_t value.
9932
9933 * objects.h (SCM_SET_CLASS_INSTANCE_SIZE): Fixed typing.
9934
9935 * ramap.c (ramap_rp): Removed bogus `;´.
9936
9937 * sort.c (scm_restricted_vector_sort_x): Fixed signedness
9938 problem.
9939
9940 * symbols.h (SCM_PROP_SLOTS, SCM_SET_PROP_SLOTS, SCM_SYMBOL_FUNC,
9941 SCM_SET_SYMBOL_FUNC, SCM_SYMBOL_PROPS, SCM_SET_SYMBOL_PROPS):
9942 Read SCM objects rather than scm_bits_t values.
9943
9944 * tags.h (SCM_VOIDP_TEST): Removed.
9945
9946 (SCM_DEBUG_TYPING_STRICTNESS): Now takes values 0, 1, 2. The
9947 value of 2 now corresponds to the former 1, the current 1
9948 corresponds to the former situation that SCM_VOIDP_TEST was
9949 defined.
9950
9951 (SCM): Now defined as typedef struct scm_unused_struct * SCM;
9952 If this appears to be not ANSI compliant, we will change it to
9953 typedef struct scm_unused_struct { } * SCM;
9954 Thanks to Han-Wen Nienhuys for the suggestion.
9955
9956 * unif.c (scm_array_set_x): Fix typing problem, and use
9957 SCM_UVECTOR_BASE instead of SCM_VELTS or SCM_CELL_WORD_1 when
9958 dealing with uniform vectors.
9959
9960 2001-05-27 Michael Livshin <mlivshin@bigfoot.com>
9961
9962 * gc.c (scm_init_storage): init `scm_gc_registered_roots'.
9963 (scm_igc): mark from them, too (precisely, not conservatively!).
9964
9965 * root.h (scm_gc_registered_roots): new object in
9966 scm_sys_protects.
9967
9968 * hooks.c (scm_create_hook): call `scm_gc_protect_object' instead
9969 `scm_protect_object'. shouldn't call it at all, though, it seems.
9970
9971 * gc.c (scm_[un]protect_object): deprecated.
9972 (scm_gc_[un]protect_object): new names for scm_[un]protect_object.
9973 (scm_gc_[un]register_root[s]): new.
9974
9975 * gc.h: add prototypes for scm_gc_[un]protect_object,
9976 scm_gc_[un]register_root[s].
9977
9978 2001-05-26 Michael Livshin <mlivshin@bigfoot.com>
9979
9980 revert the controversial part of the 2001-05-24 changes.
9981
9982 2001-05-25 Marius Vollmer <mvo@zagadka.ping.de>
9983
9984 * modules.c (scm_env_module): Exported to Scheme.
9985
9986 * eval.c (scm_debug_opts): New option `show-file-name'.
9987
9988 * debug.h (SCM_SHOW_FILE_NAME): New.
9989
9990 * backtrace.c: Include "libguile/filesys.h".
9991 (sym_base, display_backtrace_get_file_line,
9992 display_backtrace_file, display_backtrace_file_and_line): New.
9993 (display_frame): Call display_backtrace_file_and_line if that is
9994 requested.
9995 (display_backtrace_body): Call scm_display_backtrace_file if
9996 requested.
9997
9998 * debug.h (scm_lookup_cstr, scm_lookup_soft, scm_evstr):
9999 Prototypes removed since there's no definition for these
10000 functions.
10001
10002 2001-05-24 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10003
10004 * unif.c (scm_make_ra, array_free), unif.h (SCM_ARRAY_DIMS):
10005 Changed use of scm_array->scm_array_t and
10006 scm_array_dim->scm_array_dim_t to enable build with
10007 --disable-deprecated.
10008
10009 2001-05-24 Michael Livshin <mlivshin@bigfoot.com>
10010
10011 The purpose of this set of changes is to regularize Guile's usage
10012 of ANSI C integral types, with the following ideas in mind:
10013
10014 - SCM does not nesessarily have to be long.
10015 - long is not nesessarily enough to store pointers.
10016 - long is not nesessarily the same size as int.
10017
10018 The changes are incomplete and possibly buggy. Please test on
10019 something exotic.
10020
10021 * validate.h
10022 (SCM_NUM2{SIZE,PTRDIFF,SHORT,USHORT,BITS,UBITS,INT,UINT}[_DEF]):
10023 new macros.
10024
10025 * unif.h: type renaming:
10026 scm_array -> scm_array_t
10027 scm_array_dim -> scm_array_dim_t
10028 the old names are deprecated, all in-Guile uses changed.
10029
10030 * tags.h (scm_ubits_t): new typedef, representing unsigned
10031 scm_bits_t.
10032
10033 * stacks.h: type renaming:
10034 scm_info_frame -> scm_info_frame_t
10035 scm_stack -> scm_stack_t
10036 the old names are deprecated, all in-Guile uses changed.
10037
10038 * srcprop.h: type renaming:
10039 scm_srcprops -> scm_srcprops_t
10040 scm_srcprops_chunk -> scm_srcprops_chunk_t
10041 the old names are deprecated, all in-Guile uses changed.
10042
10043 * gsubr.c, procs.c, print.c, ports.c, read.c, rdelim.c, ramap.c,
10044 rw.c, smob.c, sort.c, srcprop.c, stacks.c, strings.c, strop.c,
10045 strorder.c, strports.c, struct.c, symbols.c, unif.c, values.c,
10046 vectors.c, vports.c, weaks.c:
10047 various int/size_t -> size_t/scm_bits_t changes.
10048
10049 * random.h: type renaming:
10050 scm_rstate -> scm_rstate_t
10051 scm_rng -> scm_rng_t
10052 scm_i_rstate -> scm_i_rstate_t
10053 the old names are deprecated, all in-Guile uses changed.
10054
10055 * procs.h: type renaming:
10056 scm_subr_entry -> scm_subr_entry_t
10057 the old name is deprecated, all in-Guile uses changed.
10058
10059 * options.h (scm_option_t.val): unsigned long -> scm_bits_t.
10060 type renaming:
10061 scm_option -> scm_option_t
10062 the old name is deprecated, all in-Guile uses changed.
10063
10064 * objects.c: various long -> scm_bits_t changes.
10065 (scm_i_make_class_object): flags: unsigned long -> scm_ubits_t
10066
10067 * numbers.h (SCM_FIXNUM_BIT): deprecated, renamed to
10068 SCM_I_FIXNUM_BIT.
10069
10070 * num2integral.i.c: new file, multiply included by numbers.c, used
10071 to "templatize" the various integral <-> num conversion routines.
10072
10073 * numbers.c (scm_mkbig, scm_big2num, scm_adjbig, scm_normbig,
10074 scm_copybig, scm_2ulong2big, scm_dbl2big, scm_big2dbl):
10075 deprecated.
10076 (scm_i_mkbig, scm_i_big2inum, scm_i_adjbig, scm_i_normbig,
10077 scm_i_copybig, scm_i_short2big, scm_i_ushort2big, scm_i_int2big,
10078 scm_i_uint2big, scm_i_long2big, scm_i_ulong2big, scm_i_bits2big,
10079 scm_i_ubits2big, scm_i_size2big, scm_i_ptrdiff2big,
10080 scm_i_long_long2big, scm_i_ulong_long2big, scm_i_dbl2big,
10081 scm_i_big2dbl, scm_short2num, scm_ushort2num, scm_int2num,
10082 scm_uint2num, scm_bits2num, scm_ubits2num, scm_size2num,
10083 scm_ptrdiff2num, scm_num2short, scm_num2ushort, scm_num2int,
10084 scm_num2uint, scm_num2bits, scm_num2ubits, scm_num2ptrdiff,
10085 scm_num2size): new functions.
10086
10087 * modules.c (scm_module_reverse_lookup): i, n: int -> scm_bits_t.
10088
10089 * load.c: change int -> size_t in various places (where the
10090 variable is used to store a string length).
10091 (search-path): call scm_done_free, not scm_done_malloc.
10092
10093 * list.c (scm_ilength): return a scm_bits_t, not long.
10094 some other {int,long} -> scm_bits_t changes.
10095
10096 * hashtab.c: various [u]int -> scm_bits_t changes.
10097 scm_ihashx_closure -> scm_ihashx_closure_t (and made a typedef).
10098 (scm_ihashx): n: uint -> scm_bits_t
10099 use scm_bits2num instead of scm_ulong2num.
10100
10101 * gsubr.c: various int -> scm_bits_t changes.
10102
10103 * goops.[hc]: various {int,long} -> scm_bits_t changes.
10104
10105 * gh_data.c (gh_num2int): no loss of precision any more.
10106
10107 * gh.h (gh_str2scm): len: int -> size_t
10108 (gh_{get,set}_substr): start: int -> scm_bits_t,
10109 len: int -> size_t
10110 (gh_<num>2scm): n: int -> scm_bits_t
10111 (gh_*vector_length): return scm_[u]size_t, not unsigned long.
10112 (gh_length): return scm_bits_t, not unsigned long.
10113
10114 * gc.[hc]: various small changes relating to many things stopping
10115 being long and starting being scm_[u]bits_t instead.
10116 scm_mallocated should no longer wrap around.
10117
10118 * fports.h: type renaming:
10119 scm_fport -> scm_fport_t
10120 the old name is deprecated, all in-Guile uses changed.
10121
10122 * fports.c (fport_fill_input): count: int -> scm_bits_t
10123 (fport_flush): init_size, remaining, count: int -> scm_bits_t
10124
10125 * debug.h (scm_lookup_cstr, scm_lookup_soft, scm_evstr): removed
10126 those prototypes, as the functions they prototype don't exist.
10127
10128 * fports.c (default_buffer_size): int -> size_t
10129 (scm_fport_buffer_add): read_size, write_size: int -> scm_bits_t
10130 default_size: int -> size_t
10131 (scm_setvbuf): csize: int -> scm_bits_t
10132
10133 * fluids.c (n_fluids): int -> scm_bits_t
10134 (grow_fluids): old_length, i: int -> scm_bits_t
10135 (next_fluid_num, scm_fluid_ref, scm_fluid_set_x): n: int ->
10136 scm_bits_t
10137 (scm_c_with_fluids): flen, vlen: int -> scm_bits_t
10138
10139 * filesys.c (s_scm_open_fdes): changed calls to SCM_NUM2LONG to
10140 the new and shiny SCM_NUM2INT.
10141
10142 * extensions.c: extension -> extension_t (and made a typedef).
10143
10144 * eval.h (SCM_IFRAME): cast to scm_bits_t, not int. just so
10145 there are no nasty surprises if/when the various deeply magic tag
10146 bits move somewhere else.
10147
10148 * eval.c: changed the locals used to store results of SCM_IFRAME,
10149 scm_ilength and such to be of type scm_bits_t (and not int/long).
10150 (iqq): depth, edepth: int -> scm_bits_t
10151 (scm_eval_stack): int -> scm_bits_t
10152 (SCM_CEVAL): various vars are not scm_bits_t instead of int.
10153 (check_map_args, scm_map, scm_for_each): len: long -> scm_bits_t
10154 i: int -> scm_bits_t
10155
10156 * environments.c: changed the many calls to scm_ulong2num to
10157 scm_ubits2num.
10158 (import_environment_fold): proc_as_ul: ulong -> scm_ubits_t
10159
10160 * dynwind.c (scm_dowinds): delta: long -> scm_bits_t
10161
10162 * debug.h: type renaming:
10163 scm_debug_info -> scm_debug_info_t
10164 scm_debug_frame -> scm_debug_frame_t
10165 the old names are deprecated, all in-Guile uses changed.
10166 (scm_debug_eframe_size): int -> scm_bits_t
10167
10168 * debug.c (scm_init_debug): use scm_c_define instead of the
10169 deprecated scm_define.
10170
10171 * continuations.h: type renaming:
10172 scm_contregs -> scm_contregs_t
10173 the old name is deprecated, all in-Guile uses changed.
10174 (scm_contregs_t.num_stack_items): size_t -> scm_bits_t
10175 (scm_contregs_t.num_stack_items): ulong -> scm_ubits_t
10176
10177 * continuations.c (scm_make_continuation): change the type of
10178 stack_size from long to scm_bits_t.
10179
10180 * ports.h: type renaming:
10181 scm_port_rw_active -> scm_port_rw_active_t (and made a typedef)
10182 scm_port -> scm_port_t
10183 scm_ptob_descriptor -> scm_ptob_descriptor_t
10184 the old names are deprecated, all in-Guile uses changed.
10185 (scm_port_t.entry): int -> scm_bits_t.
10186 (scm_port_t.line_number): int -> long.
10187 (scm_port_t.putback_buf_size): int -> size_t.
10188
10189 * __scm.h (long_long, ulong_long): deprecated (they pollute the
10190 global namespace and have little value beside that).
10191 (SCM_BITS_LENGTH): new, is the bit size of scm_bits_t (i.e. of an
10192 SCM handle).
10193 (ifdef spaghetti): include sys/types.h and sys/stdtypes.h, if they
10194 exist (for size_t & ptrdiff_t).
10195 (scm_sizet): deprecated.
10196
10197 * Makefile.am (noinst_HEADERS): add num2integral.i.c
10198
10199 2001-05-23 Marius Vollmer <mvo@zagadka.ping.de>
10200
10201 * snarf.h (SCM_CONST_LONG): Use SCM_VCELL_INIT instead of
10202 SCM_VARIABLE_INIT since that it what it used to be.
10203
10204 * deprecation.c (scm_include_deprecated_features): Make docstring
10205 ANSIsh. Thanks to Matthias Köppe!
10206
10207 2001-05-21 Marius Vollmer <mvo@zagadka.ping.de>
10208
10209 * symbols.c (scm_mem2symbol): Re-introduce indirect cell. It is
10210 needed for weak-key hashtables.
10211
10212 * procs.c (scm_make_subr_with_generic): Add missing last argument
10213 in call to scm_c_define_gsubr_with_generic. Thanks to Ariel Rios.
10214
10215 * eval.c: Use SCM_EQ_P instead of `==' or `!=' in certain
10216 places. (scm_c_improper_memq): Return 1 instead of SCM_BOOL_T.
10217
10218 * eval.h (SCM_EVALIM2): Use SCM_EQ_P instead of `=='.
10219
10220 2001-05-20 Marius Vollmer <mvo@zagadka.ping.de>
10221
10222 * symbols.c (scm_mem2symbol): Call `scm_must_strndup' instead of
10223 `duplicate_string'. Do not use an indirect cell, store symbol
10224 directly in collision list of hash table.
10225 (duplicate_string): Removed.
10226
10227 * init.c (scm_init_guile_1): Call scm_init_extensions.
10228
10229 * Makefile.am: Add "extensions.c" and related files in all the
10230 right places.
10231
10232 * extensions.h, extension.c: New files.
10233
10234 * gc.h, gc.c (scm_must_strdup, scm_must_strndup): New.
10235
10236 * modules.h (scm_system_module_env_p): Move out of deprecated
10237 section.
10238
10239 * rw.h (scm_init_rw): Added prototype.
10240
10241 * gsubr.h, gsubr.c (scm_c_make_gsubr, scm_c_define_gsubr,
10242 scm_c_make_gsubr_with_generic, scm_c_define_gsubr_with_generic):
10243 New functions. They replace scm_make_gsubr and
10244 scm_make_gsubr_with_generic. The `make' variants only create the
10245 gsubr object, while the `define' variants also put it into the
10246 current module. Changed all callers.
10247 (scm_make_gsubr, scm_make_gsubr_with_generic): Deprecated.
10248
10249 * procs.h, procs.c (scm_c_make_subr, scm_c_define_subr,
10250 scm_c_make_subr_with_generic, scm_c_define_subr_with_generic): New
10251 functions. They replace scm_make_subr, scm_make_subr_opt and
10252 scm_make_subr_with_generic. The `make' variants only create the
10253 subr object, while the `define' variants also put it into the
10254 current module. Changed all callers.
10255 (scm_make_subr, scm_make_subr_opt, scm_make_subr_with_generic):
10256 Deprecated.
10257
10258 * eval.c, gc.c, gh_funcs.c, goops.c, macros.c, pairs.c, ramap.c,
10259 rdelim.c, rw.c, scmsigs.c, snarf.h, values.c: Changed according to
10260 the comments above.
10261
10262 2001-05-19 Neil Jerram <neil@ossau.uklinux.net>
10263
10264 * throw.c (scm_lazy_catch): Slight docstring clarification.
10265
10266 2001-05-19 Marius Vollmer <mvo@zagadka.ping.de>
10267
10268 * throw.c: Lazy-catch handlers are no longer allowed to return.
10269 Fixed comments throughout.
10270 (scm_ithrow): Signal an error when a lazy-catch handler returns.
10271 Moved actual jump to jmpbuf into if-branch where the jmpbuf is
10272 recognized as such.
10273
10274 * version.c (s_scm_micro_version): Fix typo in FUNC_NAME, it
10275 refered to s_scm_minor_version previously.
10276
10277 * modules.h, modules.c: Moved around a lot of code so that
10278 deprecated features appear at the bottom.
10279 (root_module_lookup_closure, scm_sym_app, scm_sym_modules,
10280 module_prefix, make_modules_in_var, beautify_user_module_x_var,
10281 scm_the_root_module, scm_make_module, scm_ensure_user_module,
10282 scm_load_scheme_module): Deprecated.
10283 (scm_system_module_env_p): Return SCM_BOOL_T directly for
10284 environments corresponding to the root module.
10285 (convert_module_name, scm_c_resolve_module,
10286 scm_c_call_with_current_module, scm_c_define_module,
10287 scm_c_use_module, scm_c_export): New.
10288 (the_root_module): New static variant of scm_the_root_module. Use
10289 it everywhere instead of scm_the_root_module.
10290
10291 * fluids.h, fluids.c (scm_internal_with_fluids): Deprecated.
10292 (scm_c_with_fluids): Renamed from scm_internal_with_fluids.
10293 (scm_c_with_fluid): New.
10294 (scm_with_fluids): Use scm_c_with_fluids instead of
10295 scm_internal_with_fluids.
10296
10297 * goops.h, goops.c (scm_init_goops_builtins): Renamed from
10298 `scm_init_goops'. Do not explicitly create/switch modules.
10299 Return SCM_UNSPECIFIED.
10300 (scm_init_goops): Only register `%init-goops-builtins' procedure.
10301 (scm_load_goops): Use scm_c_resolve_module instead of
10302 scm_resolve_module.
10303
10304 * init.c (scm_init_guile_1): Call `scm_init_goops' instead of
10305 `scm_init_oop_goops_goopscore_module'. Call `scm_init_rdelim' and
10306 `scm_init_rw' prior to loading the startup files.
10307
10308 * rdelim.h, rdelim.c: (scm_init_rdelim_builtins): Renamed from
10309 scm_init_rdelim. Do not explicitly create/switch modules.
10310 Return SCM_UNSPECIFIED.
10311 (scm_init_rdelim): Only register `%init-rdelim-builtins'
10312 procedure.
10313
10314 * rw.c (scm_init_rw_builtins): Renamed from scm_init_rw. Do not
10315 explicitly create/switch modules. Return SCM_UNSPECIFIED.
10316 (scm_init_rw): Only register `%init-rw-builtins' procedure.
10317
10318 * script.c (scm_shell): Evaluate the compiled switches in the
10319 current module, not in the root module.
10320
10321 2001-05-18 Marius Vollmer <mvo@zagadka.ping.de>
10322
10323 * fluids.c (scm_c_with_fluids): Rename from
10324 scm_internal_with_fluids.
10325 (scm_internal_with_fluids): Deprecated.
10326 (scm_c_with_fluid): New.
10327
10328 2001-05-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
10329
10330 * print.h (PRINTH, SCM_PRINT_H): Renamed PRINTH to SCM_PRINT_H.
10331
10332 (SCM_PORT_WITH_PS_PORT, SCM_PORT_WITH_PS_PS): Only pairs may be
10333 accessed with SCM_C[AD]R.
10334
10335 (SCM_COERCE_OUTPORT): Removed redundant SCM_NIMP test.
10336
10337 2001-05-16 Rob Browning <rlb@cs.utexas.edu>
10338
10339 * version.c (s_scm_major_version): doc fixes.
10340 (s_scm_minor_version): doc fixes.
10341 (s_scm_minor_version): new function.
10342
10343 * version.h (scm_init_version): new function.
10344
10345 * versiondat.h.in: add GUILE_MICRO_VERSION.
10346
10347 2001-05-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
10348
10349 * deprecation.c (scm_init_deprecation): Renamed
10350 GUILE_WARN_DEPRECATED_DEFAULT to SCM_WARN_DEPRECATED_DEFAULT.
10351
10352 2001-05-16 Marius Vollmer <mvo@zagadka.ping.de>
10353
10354 * Makefile.am (cpp_sig_symbols.c, cpp_err_symbols.c): Make
10355 dependent on cpp_cnvt.awk
10356
10357 2001-05-15 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10358
10359 * script.c (scm_compile_shell_switches): New command line option
10360 `--use-srfi' for loading a list of SRFIs on startup.
10361 (scm_shell_usage): Added `--use-srfi' to help message.
10362
10363 2001-05-10 Marius Vollmer <mvo@zagadka.ping.de>
10364
10365 Merged from mvo-vcell-cleanup-1-branch.
10366
10367 The concept of vcells has been removed from Guile. With it,
10368 explicit obarrays and associated operations are gone. Use
10369 hashtables instead of obarrays.
10370
10371 Throughout: use scm_sym2var instead of scm_sym2vcell and treat
10372 result as variable instead of vcell. Glocs no longer point to a
10373 vcell but to a variable. Use scm_c_define instead of
10374 scm_sysintern and treat the result as a variable (which it is),
10375 not a vcell.
10376
10377 * variable.c, variable.h (SCM_VARVCELL, SCM_UDVARIABLEP,
10378 SCM_DEFVARIABLEP): Deprecated.
10379 (SCM_VARIABLE_REF, SCM_VARIABLE_SET, SCM_VARIABLE_LOC): New.
10380 (variable_print): Do not print name of variable.
10381 (variable_equalp): Compare values, not vcells.
10382 (anonymous_variable_sym): Removed.
10383 (make_vcell_variable): Removed.
10384 (make_variable): New, as replacement.
10385 (scm_make_variable, scm_make_undefined_variable): Do not take name
10386 hint parameter.
10387 (scm_variable_ref): Check for SCM_UNDEFINED and throw "unbound"
10388 error in that case.
10389 (scm_builtin_variable): Deprecated.
10390
10391 * symbols.c, symbols.h (scm_sym2vcell, scm_sym2ovcell_soft,
10392 scm_sym2ovcell, scm_intern_obarray_soft, scm_intern_obarray,
10393 scm_intern, scm_intern0, scm_sysintern0_no_module_lookup,
10394 scm_sysintern, scm_sysintern0, scm_symbol_value0,
10395 scm_string_to_obarray_symbol, scm_intern_symbol,
10396 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned,
10397 scm_symbol_bound_p, scm_symbol_set_x, scm_gentmp, gentmp_counter):
10398 Deprecated and moved to "symbols-deprecated.c".
10399 (copy_and_prune_obarray, scm_builtin_bindings): Removed.
10400 (scm_init_symbols): Call scm_init_symbols_deprecated.
10401 * symbols-deprecated.c: New file.
10402 * Makefile.am: Added symbols-deprecated.c and related files in all
10403 the right places.
10404
10405 * snarf.h (SCM_VCELL, SCM_GLOBAL_VCELL, SCM_VCELL_INIT,
10406 SCM_GLOBAL_VCELL_INIT): Deprecated.
10407 (SCM_VARIABLE, SCM_GLOBAL_VARIABLE, SCM_VARIABLE_INIT,
10408 SCM_GLOBAL_VARIABLE_INIT): New, as replacement. Changed all uses.
10409
10410 * print.c (scm_iprin1): Use scm_module_reverse_lookup instead of
10411 SCM_GLOC_SYM.
10412
10413 * evalext.c, filesys.c, fports.c, gdbint.c, gh_data.c, gsubr.c,
10414 hooks.c, load.c, numbers.c, objects.c, ports.c, posix.c, procs.c,
10415 ramap.c, random.c, read.c, regex-posix.c, scmsigs.c, script.c,
10416 socket.c, srcprop.c, stacks.c, stime.c, struct.c, tag.c, throw.c:
10417 Changed according to the `throughout' comments.
10418
10419 * modules.h, modules.c (scm_module_system_booted_p): Changed type
10420 to `int'.
10421 (scm_module_type): Removed.
10422 (the_root_module): Renamed to the_root_module_var. Now points to
10423 a variable instead of a vcell. Updated all uses.
10424 (scm_the_root_module): Return SCM_BOOL_F when module systems
10425 hasn't been booted yet.
10426 (SCM_VALIDATE_STRUCT_TYPE): Removed.
10427 (scm_post_boot_init_modules): Made static.
10428 (scm_set_current_module): Call scm_post_boot_init_modules on first
10429 call.
10430 (make_modules_in, beautify_user_module_x, resolve_module,
10431 try_module_autoload, module_make_local_var_x): Tacked on "_var"
10432 suffix. Now point to variables instead of vcells. Updated all
10433 uses.
10434 (scm_module_lookup_closure): Deal with the module being SCM_BOOL_F
10435 and return SCM_BOOL_F in that case.
10436 (scm_module_transformer): Likewise.
10437 (sym_module, scm_lookup_closure_module, scm_env_module): New.
10438 (SCM_F_EVAL_CLOSURE_INTERFACE, SCM_EVAL_CLOSURE_INTERFACE_P): New.
10439 (scm_eval_closure_lookup): Do not allow new definitions when
10440 `interface' flag is set.
10441 (scm_standard_interface_eval_closure): New.
10442 (scm_pre_modules_obarray, scm_sym2var, scm_module_lookup,
10443 scm_lookup, scm_module_define, scm_define, scm_c_module_lookup,
10444 scm_c_lookup, scm_c_module_define, scm_c_define,
10445 scm_module_reverse_lookup, scm_get_pre_modules_obarray,
10446 scm_modules_prehistory): New.
10447 (scm_post_boot_init_modules): Use scm_c_define and scm_c_lookup
10448 instead of scm_intern0.
10449
10450 * macros.c (scm_make_synt): Return SCM_UNSPECIFIED instead of the
10451 symbol.
10452
10453 * keywords.c (s_scm_make_keyword_from_dash_symbol): Use a regular
10454 hashtable operations to maintain the keywords, not obarray ones.
10455
10456 * init.c (scm_load_startup_files): Do not call
10457 scm_post_boot_init_modules. This is done by
10458 scm_set_current_module now.
10459 (scm_init_guile_1): Call scm_modules_prehistory. Call
10460 scm_init_variable early on.
10461
10462 * goops.c (s_scm_sys_goops_loaded): Get
10463 var_compute_applicable_methods from scm_sym2var, not from a direct
10464 invocation of scm_goops_lookup_closure.
10465
10466 * gh_funcs.c (gh_define): Return SCM_UNSPECIFIED instead of vcell.
10467
10468 * gc.c: Added simple debugging hack to mark phase of GC: When
10469 activated, do not tail-call scm_gc_mark. This gives nice
10470 backtraces.
10471 (scm_unhash_name): Removed.
10472
10473 * feature.c (features): Renamed to features_var. Now points to a
10474 variable instead of a vcell. Updated all uses.
10475
10476 * eval.h (SCM_TOP_LEVEL_LOOKUP_CLOSURE): Use
10477 `scm_current_module_lookup_closure' which will do the right thing
10478 when the module system hasn't been booted yet.
10479 (SCM_GLOC_SYM): Removed.
10480 (SCM_GLOC_VAR, SCM_GLOC_SET_VAL): New.
10481 (SCM_GLOC_VAL, SCM_GLOC_LOC): Reimplemented in terms of variables.
10482
10483 * eval.c (scm_lookupcar, scm_lookupcar1): Deal with variables
10484 instead of with vcells. Do not overwrite `var' with the result of
10485 the lookup, use the new `real_var' instead. Remove `var2' in
10486 exchange (which was only used with threads).
10487 (sym_three_question_marks): New.
10488 (scm_unmemocar): Use `scm_module_reverse_lookup' instead of
10489 `SCM_GLOC_SYM'.
10490 (scm_lisp_nil, scm_lisp_t): Directly define as symbols.
10491 (scm_m_atfop): Expect the function definition to be a variable
10492 instead of a vcell.
10493 (scm_macroexp): Do not use `unmemocar', explicitely remember the
10494 symbol instead.
10495 (scm_unmemocopy): Removed thoughts about anti-macro interface.
10496 (scm_eval_args): Use more explicit code in the gloc branch of the
10497 atrocious struct ambiguity test. The optimizer will sort this
10498 out.
10499 (scm_deval_args): Likewise.
10500 (SCM_CEVAL): Likewise. Also, do not use unmemocar, explicitely
10501 remember the symbol instead. Added some comments where
10502 scm_tc3_cons_gloc really exclusively refers to structs.
10503 (scm_init_eval): Use scm_define to initialize "nil" and "t" to
10504 scm_lisp_nil and scm_lisp_t, respectively. Use scm_define instead
10505 of scm_sysintern in general.
10506
10507 * dynwind.c (scm_swap_bindings): Use SCM_GLOC_SET_VAL instead of
10508 explicit magic.
10509
10510 * debug.c (s_scm_make_gloc): Only allow proper variables, no
10511 pairs. Put the variable directly in the gloc.
10512 (s_scm_gloc_p): Use `scm_tc3_cons_gloc' instead of the magic `1'.
10513 (scm_init_debug): Use scm_c_define instead scm_sysintern.
10514
10515 * cpp_cnvt.awk: Emit "scm_c_define" instead of "scm_sysintern".
10516
10517 * backtrace.h, backtrace.c (scm_the_last_stack_fluid): Renamed to
10518 scm_the_last_stack_fluid_var. It now points to a variable instead
10519 of a vcell. Updated all uses.
10520 (scm_has_shown_backtrace_hint_p_var): Now points to a variable
10521 instead of a vcell. Updated all uses.
10522
10523 * _scm.h: Include "variables.h" and "modules.h" since almost
10524 everybody needs them now.
10525
10526 * root.h (scm_symhash, scm_symhash_vars): Removed.
10527 * gc.c (scm_init_storage): Do not initialize them.
10528
10529 2001-05-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
10530
10531 * eval.c (scm_init_eval): Initialize scm_undefineds and
10532 scm_listofnull.
10533
10534 * gc.c (scm_debug_newcell, scm_debug_newcell2): Fixed to behave
10535 like the SCM_NEWCELL macro counterparts.
10536
10537 (scm_init_storage, scm_init_gc): Moved initialization of
10538 scm_tc16_allocated from scm_init_gc to scm_init_storage.
10539
10540 (scm_init_storage): Moved initialization of scm_undefineds and
10541 scm_listofnull to eval.c, initializion of scm_nullstr to
10542 strings.c, initializion of scm_nullvect to vectors.c.
10543
10544 * gc.h (SCM_NEWCELL, SCM_NEWCELL2): Prefer SCM_NULLP over
10545 SCM_IMP, as in scm_debug_newcell and scm_debug_newcell2.
10546
10547 * init.c (scm_init_guile_1): Reordered some initializations and
10548 added dependcy information comments.
10549
10550 * load.c (scm_init_load): Use scm_nullstr.
10551
10552 * strings.c (scm_init_strings): Initialize scm_nullstr.
10553
10554 * vectors.c (scm_init_vectors): Initialize scm_nullvect.
10555
10556 2001-05-15 Marius Vollmer <mvo@zagadka.ping.de>
10557
10558 * values.c (print_values): Print as a unreadable object, not as
10559 multiple lines. Thanks to Matthias Köppe!
10560
10561 2001-05-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
10562
10563 * deprecation.c: Fixed copyright date.
10564
10565 * deprecation.h (DEPRECATION_H, SCM_DEPRECATION_H): Renamed
10566 DEPRECATION_H to SCM_DEPRECATION_H.
10567
10568 2001-05-10 Thien-Thi Nguyen <ttn@revel.glug.org>
10569
10570 * guile-doc-snarf.in: Update copyright.
10571 Fix relative path bug. Thanks to Sergey Poznyakoff.
10572
10573 2001-05-10 Marius Vollmer <mvo@zagadka.ping.de>
10574
10575 * ports.c (scm_port_revealed, scm_set_port_revealed_x): Only
10576 accept open ports. Thanks to Quetzalcoatl Bradley!
10577
10578 2001-05-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10579
10580 * procs.c: Increased `scm_subr_table_room' to 800 because Guile now
10581 has 779 primitives on startup.
10582
10583 2001-05-09 Marius Vollmer <mvo@zagadka.ping.de>
10584
10585 * eval.c (scm_i_eval): Copy expression before passing it to
10586 SCM_XEVAL. The copy operation was removed unintendedly during my
10587 change on 2001-03-25.
10588
10589 2001-05-09 Michael Livshin <mlivshin@bigfoot.com>
10590
10591 from Matthias Köppe (thanks!):
10592
10593 * ports.c (scm_c_read): pointer arithmetic on void pointers isn't
10594 portable.
10595
10596 * deprecation.c (s_scm_include_deprecated_features): ANSI'fied the
10597 docstring.
10598
10599 2001-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
10600
10601 * gc.c (scm_init_gc): Added FIXME comment.
10602
10603 * hooks.c: Since hooks don't have a name any more, it is not
10604 necessary to include objprop.h.
10605
10606 (hook_print, scm_add_hook_x): Replace SCM_NFALSEP by !SCM_FALSEP.
10607
10608 (symbol_name, scm_make_hook_with_name): Removed.
10609
10610 (scm_create_hook): Don't set the hook's name property.
10611
10612 * hooks.h (HOOKSH, SCM_HOOKS_H): Renamed HOOKSH to SCM_HOOKS_H.
10613
10614 (SCM_HOOK_NAME, scm_make_hook_with_name): Removed.
10615
10616 * init.c (scm_init_guile_1): Hooks don't use objprops any more.
10617
10618 * numbers.c (SCM_FLOBUFLEN, FLOBUFLEN, scm_number_to_string,
10619 scm_print_real, scm_print_complex): Renamed SCM_FLOBUFLEN to
10620 FLOBUFLEN and define it unconditionally.
10621
10622 2001-05-07 Marius Vollmer <mvo@zagadka.ping.de>
10623
10624 * gh_data.c (gh_lookup): Call gh_module_lookup with
10625 `scm_current_module ()', not `#f'.
10626 (gh_module_lookup): Expect a module instead of an obarray as first
10627 argument and do lookup in that module.
10628
10629 * ramap.c (raeql_1): Do not call scm_uniform_vector_length on
10630 arrays. The length of array is already determined differently and
10631 scm_uniform_vector_length does not work on arrays.
10632
10633 2001-05-06 Marius Vollmer <mvo@zagadka.ping.de>
10634
10635 * snarf.h (SCM_FUNC_CAST_ARBITRARY_ARGS): Use "SCM (*)()" for C++
10636 as well. "SCM (*)(...)" does not work on RedHat 7.1.
10637
10638 * __scm.h (SCM_WTA_DISPATCH_0): Removed ARG and POS parameters,
10639 they are not used. Changed `wrong type' error into `wrong num
10640 args' error. Changed all callers.
10641
10642 * numbers.c (scm_difference): Call SCM_WTA_DISPATCH_0 when zero
10643 arguments are supplied.
10644
10645 2001-05-05 Thien-Thi Nguyen <ttn@revel.glug.org>
10646
10647 * regex-posix.c (scm_regexp_exec): Expand docstring to briefly
10648 describe `regexp/notbol' and `regexp/noteol' execution flags.
10649
10650 * strop.c (scm_substring_move_x): Doc fix; nfc.
10651
10652 2001-05-05 Marius Vollmer <mvo@zagadka.ping.de>
10653
10654 * objects.c, objects.h (scm_valid_object_procedure_p): New.
10655 (scm_set_object_procedure_x): Use it to check argument. Fix
10656 docstring.
10657
10658 * evalext.c (scm_definedp): Fix docstring.
10659
10660 2001-05-05 Gary Houston <ghouston@arglist.com>
10661
10662 * socket.c: use HAVE_IPV6 instead of AF_INET6 to enable IPv6
10663 support.
10664
10665 2001-05-04 Neil Jerram <neil@ossau.uklinux.net>
10666
10667 * eval.c (scm_promise_p), list.c (scm_append_x, scm_reverse_x),
10668 symbols.c (scm_symbol_to_string), vports.c (scm_make_soft_port):
10669 Change R4RS references to R5RS.
10670
10671 * guile-snarf.awk.in: Fixes so that (i) blank lines in the
10672 docstring source are correctly reproduced in the output (ii)
10673 we don't anymore get occasional trailing quotes. Also reorganized
10674 and commented the code a little.
10675
10676 * scmsigs.c (scm_raise), throw.c (scm_throw): Docstring format
10677 fixes.
10678
10679 2001-05-04 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10680
10681 * strop.c (scm_string_split): New procedure.
10682
10683 * strop.h (scm_string_split): Added prototype.
10684
10685 2001-05-04 Gary Houston <ghouston@arglist.com>
10686
10687 * socket.c: define uint32_t if netdb.h doesn't. thanks to
10688 Dale P. Smith.
10689
10690 2001-05-02 Marius Vollmer <mvo@zagadka.ping.de>
10691
10692 * rw.c: Include "modules.h" and "strports.h".
10693
10694 * net_db.h (scm_gethost): Added prototype.
10695
10696 * deprecation.h, deprecation.c: New.
10697 * Makefile.am (libguile_la_SOURCES): Added "deprecation.c".
10698 (DOT_X_FILES): Added "deprecation.x".
10699 (modinclude_HEADERS): Added "deprecation.h".
10700
10701 * init.c: Include "deprecation.h".
10702 (scm_init_guile_1): Call scm_init_deprecation.
10703
10704 2001-05-01 Marius Vollmer <mvo@zagadka.ping.de>
10705
10706 * gh.h (gh_init_guile, gh_make_string, gh_string_length,
10707 gh_string_ref, gh_string_set_x, gh_substring, gh_string_append):
10708 New.
10709
10710 2001-04-29 Gary Houston <ghouston@arglist.com>
10711
10712 * rw.c: new file, implementing C part of module (ice-9 rw).
10713 (scm_read_string_x_partial): moved from ioext.c
10714 (scm_init_rw): new proc.
10715 * rw.h: new file.
10716 init.c: include rw.h and call scm_init_rw.
10717 Makefile.am: include rw.c and rw.h.
10718
10719 2001-04-28 Rob Browning <rlb@cs.utexas.edu>
10720
10721 * numbers.c: enabled local definition of SCM_FLOBUFLEN until we
10722 know what's supposed to happen to it.
10723
10724 * list.h (scm_list_star): deprecation expired - removed.
10725
10726 * numbers.h (scm_dblproc): deprecation expired - removed.
10727 (SCM_UNEGFIXABLE): deprecation expired - removed.
10728 (SCM_FLOBUFLEN): deprecation expired - removed.
10729 (SCM_INEXP): deprecation expired - removed.
10730 (SCM_CPLXP): deprecation expired - removed.
10731 (SCM_REAL): deprecation expired - removed.
10732 (SCM_IMAG): deprecation expired - removed.
10733 (SCM_REALPART): deprecation expired - removed.
10734 (scm_makdbl): deprecation expired - removed.
10735 (SCM_SINGP): deprecation expired - removed.
10736 (SCM_NUM2DBL): deprecation expired - removed.
10737 (SCM_NO_BIGDIG): deprecation expired - removed.
10738
10739 * tags.h (SCM_DOUBLE_CELLP): deprecation expired - removed.
10740 (scm_tc_dblr): deprecation expired - removed.
10741 (scm_tc_dblc): deprecation expired - removed.
10742 (scm_tc16_flo): deprecation expired - removed.
10743 (scm_tc_flo): deprecation expired - removed.
10744
10745 * tag.h (scm_tag): deprecation expired - removed.
10746
10747 * tag.c: (scm_tag): deprecation expired - removed.
10748
10749 * ioext.c: (scm_fseek): deprecation expired - removed.
10750
10751 * ioext.h (scm_fseek): deprecation expired - removed.
10752
10753 * gh_data.c (gh_int2scmb): deprecation expired - removed.
10754
10755 * gh.h (gh_int2scmb): deprecation expired - removed.
10756
10757 2001-04-28 Neil Jerram <neil@ossau.uklinux.net>
10758
10759 * stacks.c (scm_make_stack): Fix typo in docstring.
10760
10761 2001-04-27 Rob Browning <rlb@cs.utexas.edu>
10762
10763 * error.c (scm_sysmissing): deprecation expired - removed.
10764
10765 * error.h (scm_sysmissing): deprecation expired - removed.
10766
10767 * gc.c
10768 (scm_init_gc): gc-thunk deprecation expired - removed.
10769 (scm_gc_vcell): deprecation expired - removed.
10770 (gc_async_thunk): scm_gc_vcell related code removed.
10771
10772 * vectors.h (SCM_NVECTORP): deprecation expired - removed.
10773
10774 * strings.h
10775 (SCM_NSTRINGP): deprecation expired - removed.
10776 (SCM_NRWSTRINGP): deprecation expired - removed.
10777
10778 * continuations.h (SCM_SETJMPBUF): deprecation expired - removed.
10779
10780 * chars.h
10781 (SCM_ICHRP): deprecation expired - removed.
10782 (SCM_ICHR): deprecation expired - removed.
10783 (SCM_MAKICHR): deprecation expired - removed.
10784
10785 * ports.h
10786 (SCM_INPORTP): deprecation expired - removed.
10787 (SCM_OUTPORTP): deprecation expired - removed.
10788
10789 2001-04-25 Marius Vollmer <mvo@zagadka.ping.de>
10790
10791 * modules.c (scm_module_type): New.
10792 (scm_post_boot_init_modules): Initialize from Scheme value.
10793 (the_module, scm_current_module, scm_init_modules): the_module is
10794 now a C only fluid.
10795 (scm_current_module): Export to Scheme.
10796 (scm_set_current_module): Do not call out to Scheme, do all the
10797 work in C. Export procedure to Scheme. Only accept modules, `#f'
10798 is no longer valid as the current module. Only set
10799 scm_top_level_lookup_closure_var and scm_system_transformer when
10800 they are not deprecated.
10801 (scm_module_transformer, scm_current_module_transformer): New.
10802
10803 * modules.h (scm_module_index_transformer, SCM_MODULE_TRANSFORMER,
10804 scm_current_module_transformer, scm_module_transformer): New.
10805
10806 * gh_data.c: Removed FIXME comment about gh_lookup returning
10807 SCM_UNDEFINED. That's the right thing to do.
10808
10809 * eval.h, eval.c (scm_system_transformer): Deprecated by moving it
10810 into the conditionally compiled sections.
10811 * eval.c (scm_primitive_eval_x, scm_primitive_eval): Use
10812 scm_current_module_transformer instead of scm_system_transformer.
10813 * init.c (start_stack): Move initialization of
10814 scm_system_transformer to the deprecated section.
10815
10816 2001-04-22 Neil Jerram <neil@ossau.uklinux.net>
10817
10818 * throw.c (scm_throw): Correct docstring.
10819
10820 2001-04-22 Gary Houston <ghouston@arglist.com>
10821
10822 * socket.c: attempted to improve the docstrings slightly.
10823
10824 * net_db.c: remove bogus "close" declaration.
10825 (inet_aton declaration, scm_inet_aton, scm_inet_ntoa,
10826 scm_inet_netof, scm_lnaof, scm_inet_makeaddr, INADDR_ANY etc.):
10827 moved to socket.c.
10828 * net_db.h: declarations moved too.
10829
10830 * socket.c (scm_htonl, scm_ntohl): use uint32_t instead of unsigned
10831 long.
10832 (ipv6_net_to_num, ipv6_num_to_net): new static procedures.
10833 (VALIDATE_INET6): new macro.
10834 (scm_inet_pton, scm_inet_ntop): new procedures, implementing
10835 inet-pton and inet-ntop.
10836 (scm_fill_sockaddr): use VALIDATE_INET6 and ipv6_num_to_net.
10837 (scm_addr_vector): use ipv6_net_to_num.
10838
10839 2001-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
10840
10841 * eq.c (scm_equal_p), ramap.c (scm_init_ramap): Don't compute the
10842 smob number explicitly. Use SCM_TC2SMOBNUM instead.
10843
10844 * gc.c (MARK, scm_gc_sweep): Only check for illegal heap objects
10845 when compiled in debug mode.
10846
10847 (scm_gc_sweep): Only call smob's free function if it is defined.
10848
10849 * print.c (scm_iprin1): No need to check for validity of smob
10850 type or existence of print function.
10851
10852 * smob.[ch] (scm_smobs): Made into a fixed size global array.
10853 Resizing will not work well with preemptive threading.
10854
10855 * smob.c (scm_smob_print): Don't use SCM_CDR to access smob data.
10856
10857 (scm_make_smob_type): Extracted initialization of smob
10858 descriptors to scm_smob_prehistory. Don't use scm_numsmob outside
10859 of the critical section.
10860
10861 (scm_smob_prehistory): Initialize all smob descriptors. By
10862 default, don't assign a smob free function: Most smob types don't
10863 need one.
10864
10865 * smob.h (SMOBH, SCM_SMOB_H): Renamed SMOBH to SCM_SMOB_H.
10866
10867 2001-04-21 Gary Houston <ghouston@arglist.com>
10868
10869 * socket.c (FLIP_NET_HOST_128): new macro.
10870 (scm_fill_sockaddr): use new macro.
10871 (scm_addr_vector): completed IPv6 address support. added const
10872 to the address parameter.
10873
10874 2001-04-20 Gary Houston <ghouston@arglist.com>
10875
10876 * socket.c (scm_fill_sockaddr): call htons for sin6_port.
10877 Don't assign sin6_scope_id in structure unless HAVE_SIN6_SCOPE_ID
10878 is defined.
10879 (scm_addr_vector): use a switch instead of multiple if statements.
10880 Add support for IPv6 (incomplete) .
10881 MAX_ADDR_SIZE: increase to size of struct sockaddr_in6 if needed.
10882
10883 2001-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
10884
10885 * struct.c (scm_free_structs): Only pairs may be accessed with
10886 SCM_C[AD]R.
10887
10888 2001-04-19 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
10889
10890 * unif.h (SCM_ARRAY_CONTIGUOUS): Reintroduced as deprecated.
10891
10892 * __scm.h (SCM_WTA_DISPATCH_0, SCM_WTA_DISPATCH_1,
10893 SCM_WTA_DISPATCH_2, SCM_WTA_DISPATCH_n): Inserted required
10894 parentheses in order to get the correct associativity.
10895
10896 2001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
10897
10898 * unif.c (scm_array_to_list): Added missing handling of arrays of
10899 bytes. Thanks to Masao Uebayashi for the bug report.
10900
10901 2001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
10902
10903 * debug.c (scm_procedure_source): Use SCM_CLOSURE_FORMALS more
10904 consistently.
10905
10906 2001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
10907
10908 * procs.h (SCM_CLOSURE_FORMALS): New macro.
10909
10910 * debug.c (scm_procedure_source), eval.c (scm_badformalsp,
10911 SCM_CEVAL, SCM_APPLY), goops.c (get_slot_value, set_slot_value),
10912 procprop.c (scm_i_procedure_arity), sort.c (closureless): Use
10913 SCM_CLOSURE_FORMALS.
10914
10915 * eval.c (scm_badformalsp, SCM_CEVAL), procprop.c
10916 (scm_i_procedure_arity): Prefer stronger predicates like
10917 SCM_NULLP or SCM_FALSEP over SCM_IMP.
10918
10919 * macros.c (macro_print): Extracted macro printing code from
10920 print.c and simplified it.
10921
10922 (scm_macro_type): Use SCM_MACRO_TYPE;
10923
10924 (scm_init_macros): Use macro_print for printing macros.
10925
10926 * print.c (scm_print_opts): Improved option documentation.
10927
10928 (scm_iprin1): Extracted printing of macros to macros.c.
10929 Simplified printing of ordinary closures.
10930
10931 * procs.c (scm_thunk_p): Fixed handling of closures. Thanks to
10932 Martin Grabmueller for the bug report.
10933
10934 2001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
10935
10936 This patch eliminates some further applications of SCM_C[AD]R to
10937 non pair cells.
10938
10939 * gc.h (SCM_SETAND_CAR, SCM_SETOR_CAR): Deprecated. These have
10940 never been applied to real pairs.
10941
10942 * srcprop.h (SCM_SOURCE_PROPERTY_FLAG_BREAK): Added.
10943
10944 (SRCPROPBRK): Use SCM_SOURCE_PROPERTY_FLAG_BREAK.
10945
10946 * unif.h (SCM_ARRAY_CONTIGUOUS, SCM_ARRAY_FLAG_CONTIGUOUS,
10947 SCM_ARRAY_CONTP): Renamed SCM_ARRAY_CONTIGUOUS to
10948 SCM_ARRAY_FLAG_CONTIGUOUS and use it.
10949
10950 (SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG):
10951 Added.
10952
10953 * srcprop.h (SRCPROPH), unif.h (UNIFH): Renamed to
10954 SCM_SOURCE_PROPERTIES_H and SCM_UNIFORM_VECTORS_H, respectively.
10955
10956 * srcprop.h (SETSRCPROPBRK, CLEARSRCPROPBRK), unif.c
10957 (scm_dimensions_to_uniform_array, scm_ra_set_contp): Don't use
10958 SCM_SET{AND,OR}_CAR.
10959
10960 2001-04-17 Gary Houston <ghouston@arglist.com>
10961
10962 * some initial support for IPv6:
10963
10964 * socket.c (scm_fill_sockaddr): improve the argument validation.
10965 don't allocate memory until all args are checked. instead of
10966 unconditional memset of soka, try setting sin_len to 0 if
10967 SIN_LEN is defined. add support for AF_INET6. define FUNC_NAME.
10968 (scm_socket, scm_connect): extend docstrings for IPv6.
10969 (scm_init_socket): intern AF_INET6 and PF_INET6.
10970
10971 2001-04-17 Niibe Yutaka <gniibe@m17n.org>
10972
10973 * srcprop.c (scm_make_srcprops): Added SCM_ALLOW_INTS which
10974 matches SCM_DEFER_INTS at the beginning of the function.
10975
10976 * mallocs.c (scm_malloc_obj): Remove un-matched SCM_ALLOW_INTS.
10977
10978 * gc.c (scm_igc): Unconditionally call
10979 SCM_CRITICAL_SECTION_START/END.
10980
10981 * fluids.c (next_fluid_num): Unconditionally call
10982 SCM_CRITICAL_SECTION_START/END.
10983 (s_scm_make_fluid): Remove un-matched SCM_DEFER_INTS.
10984
10985 * coop-defs.h (SCM_THREAD_DEFER, SCM_THREAD_ALLOW,
10986 SCM_THREAD_REDEFER, SCM_THREAD_REALLOW_1, SCM_THREAD_REALLOW_2):
10987 Removed.
10988
10989 * __scm.h (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END):
10990 Defined as nothing for the case of !defined(USE_THREADS).
10991 (SCM_THREAD_DEFER, SCM_THREAD_ALLOW, SCM_THREAD_REDEFER):
10992 Removed.
10993 (<stdio.h>): Include when (SCM_DEBUG_INTERRUPTS == 1).
10994 (SCM_CHECK_NOT_DISABLED, SCM_CHECK_NOT_ENABLED): Print FILE and
10995 LINE.
10996 (SCM_DEFER_INTS, SCM_ALLOW_INTS_ONLY, SCM_ALLOW_INTS,
10997 SCM_REDEFER_INTS, SCM_REALLOW_INTS): Don't use
10998 SCM_THREAD_DEFER/SCM_THREAD_ALLOW. Instead, use
10999 SCM_CRITICAL_SECTION_START/END.
11000 (SCM_REALLOW_INTS: Bug fix. Don't call
11001 SCM_THREAD_SWITCHING_CODE.
11002 (SCM_TICK): Don't use SCM_DEFER_INTS/SCM_ALLOW_INTS. Instead, use
11003 SCM_THREAD_SWITCHING_CODE directly.
11004 (SCM_ENTER_A_SECTION): Unconditionally use
11005 SCM_CRITICAL_SECTION_START/END. (was:
11006 SCM_DEFER_INTS/SCM_ALLOW_INTS when SCM_POSIX_THREADS defined).
11007
11008 2001-04-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
11009
11010 * __scm.h (SCM_CAREFUL_INTS, SCM_DEBUG_INTERRUPTS): Replaced the
11011 macro SCM_CAREFUL_INTS by the macro SCM_DEBUG_INTERRUPTS and
11012 allowed to explicitly set this macro via the CFLAGS variable
11013 during make.
11014
11015 * fluids.c (next_fluid_num), gc.c (scm_igc), coop-defs.h
11016 (SCM_THREAD_CRITICAL_SECTION_START,
11017 SCM_THREAD_CRITICAL_SECTION_END): Renamed
11018 SCM_THREAD_CRITICAL_SECTION_START/END to
11019 SCM_CRITICAL_SECTION_START/END.
11020
11021 2001-04-11 Keisuke Nishida <kxn30@po.cwru.edu>
11022
11023 * debug-malloc.c (grow, scm_debug_malloc_prehistory): Use memset
11024 instead of bzero.
11025
11026 * coop.c, iselect.c (FD_ZERO_N): Unconditionally use memset.
11027 (MISSING_BZERO_DECL): Remove the declaration.
11028
11029 Thanks to NIIBE Yutaka.
11030
11031 2001-04-10 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11032
11033 * init.c, goops.c, goops.h: Reverted change of 2001-03-29. (The
11034 goops module should be registered in order to work for an
11035 application which uses libguile statically linked.)
11036
11037 2001-04-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
11038
11039 * numbers.[ch] (scm_num2long, scm_num2long_long,
11040 scm_num2ulong_long, scm_num2ulong): Argument position is an
11041 unsigned integer.
11042
11043 * environments.c (eval_environment_folder,
11044 import_environment_folder), gh_data.c (gh_scm2longs,
11045 gh_scm2floats, gh_scm2doubles): Distinguish between 0 and NULL
11046 for integers and pointers, respectively.
11047
11048 * gh_data.c (gh_scm2ulong, gh_scm2long, gh_scm2int), socket.c
11049 (scm_fill_sockaddr), unif.c (scm_array_set_x), validate.h
11050 (SCM_NUM2ULONG, SCM_NUM2LONG, SCM_NUM2LONG_DEF,
11051 SCM_NUM2LONG_LONG): Don't pass argument positions as pointers.
11052
11053 * filesys.c (scm_open_fdes, scm_open), net_db (scm_inet_ntoa,
11054 scm_inet_netof, scm_lnaof, scm_gethost, scm_getproto), posix.c
11055 (scm_utime), ramap.c (scm_array_fill_int), scmsigs.c
11056 (scm_sigaction), socket.c (scm_htonl, scm_ntohl, scm_sendto),
11057 stime.c (scm_localtime, scm_gmtime), struct.c (scm_struct_set_x),
11058 validate.h (SCM_VALIDATE_LONG_COPY): Whitespace fixes.
11059
11060 2001-04-09 Neil Jerram <neil@ossau.uklinux.net>
11061
11062 * strings.c (scm_read_only_string_p): Update docstring to reflect
11063 current (non-)usage of "read only" strings.
11064 (scm_make_shared_substring): Clarify docstring by changing
11065 "semantics" to "arguments".
11066
11067 2001-04-06 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11068
11069 * hooks.c (scm_make_hook, scm_make_hook_with_name),
11070 (scm_hook_p, scm_hook_empty_p, scm_run_hook): Docstring
11071 improvements.
11072
11073 2001-04-03 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11074
11075 The following changes make the documentation more consistent.
11076
11077 * rdelim.c (scm_write_line), posix.c (scm_utime), ports.c
11078 (scm_seek), net_db.c (scm_inet_aton, scm_inet_ntoa),
11079 (scm_inet_netof, scm_lnaof, scm_inet_makeaddr), ioext.c
11080 (scm_ftell): Changed @smalllisp ... @end smalllisp to @lisp
11081 ... @end lisp.
11082
11083 * vports.c (scm_make_soft_port), version.c (scm_version), unif.c
11084 (scm_array_dimensions, scm_make_shared_array),
11085 (scm_transpose_array, scm_enclose_array, scm_bit_count_star),
11086 throw.c (scm_catch), struct.c (scm_make_vtable_vtable), strop.c
11087 (scm_string_rindex, scm_string_index, scm_substring_fill_x),
11088 (scm_string_null_p), strings.c (scm_read_only_string_p), root.c
11089 (scm_call_with_dynamic_root), ramap.c (scm_array_index_map_x),
11090 posix.c (scm_mknod), numbers.c (scm_logtest, scm_logbit_p),
11091 macros.c (scm_makmmacro), list.c (scm_append), environments.c
11092 (scm_environment_fold), dynwind.c (s_scm_dynamic_wind): Changed
11093 @example ... @end example to @lisp ... @end lisp.
11094
11095 * weaks.c (scm_weak_vector): Corrected docstring.
11096
11097 * hashtab.c (scm_hashq_ref, scm_hashq_set_x, scm_hashq_remove_x),
11098 (scm_hashv_ref, scm_hashv_set_x, scm_hashv_remove_x),
11099 (scm_hash_ref, scm_hash_set_x, scm_hash_remove_x, scm_hashx_ref),
11100 (scm_hashx_set_x, scm_hashx_get_handle),
11101 (scm_hashx_create_handle_x), regex-posix.c (scm_make_regexp),
11102 (scm_regexp_exec, scm_regexp_p), numbers.c (scm_logtest),
11103 vectors.c (scm_vector_fill_x), strings.c
11104 (scm_make_shared_substring), symbols.c (scm_string_to_symbol),
11105 objprop.c (scm_set_object_properties_x):
11106 (scm_set_object_property_x), throw.c (scm_catch, scm_lazy_catch),
11107 strports.c (scm_call_with_input_string), ports.c
11108 (scm_truncate_file), ioext.c (scm_ftell), ports.c (scm_seek),
11109 list.c (scm_append_x), dynwind.c (scm_dynamic_wind), error.c
11110 (scm_error_scm), vports.c (scm_make_soft_port), weaks.c
11111 (scm_make_weak_vector,scm_weak_vector_p),
11112 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table),
11113 (scm_make_doubly_weak_hash_table, scm_weak_key_hash_table_p),
11114 (scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
11115 macros.c (scm_macro_type), dynl.c (scm_dynamic_link),
11116 (scm_dynamic_unlink, scm_dynamic_call, scm_dynamic_args_call):
11117 Made parameter names match documentation by renaming parameters
11118 and/or fixing docstrings.
11119
11120 * numbers.c (scm_ash): Corrected Texinfo markup.
11121
11122 * strop.c (scm_string_index, scm_string_rindex),
11123 (scm_substring_fill_x, scm_string_null_p): Removed `qdocs'.
11124
11125 * vports.c (scm_make_soft_port), unif.c
11126 (scm_uniform_vector_length, scm_array_p, scm_array_rank),
11127 (scm_dimensions_to_uniform_array, scm_transpose_array),
11128 (scm_array_in_bounds_p, scm_uniform_vector_ref),
11129 (scm_bit_count, scm_bit_position, scm_bit_count_star),
11130 (scm_array_to_list, scm_list_to_uniform_array),
11131 (scm_array_prototype, symbols.c (scm_string_to_symbol), strports.c
11132 (scm_open_input_string, scm_open_output_string),
11133 (scm_get_output_string), strop.c (scm_string_copy),
11134 (scm_string_fill_x), strings.c (scm_string_p, scm_string), stime.c
11135 (scm_get_internal_real_time, scm_times),
11136 (scm_get_internal_run_time, scm_current_time, scm_gettimeofday),
11137 (scm_localtime, scm_gmtime), socket.c (scm_htons, scm_ntohs),
11138 (scm_htonl, scm_ntohl, scm_socket, scm_socketpair),
11139 (scm_getsockopt, scm_getsockname, scm_getpeername, scm_recvfrom),
11140 simpos.c (scm_system), random.c (scm_random_uniform),
11141 (scm_random_normal, scm_random_exp), ramap.c
11142 (scm_array_equal_p), posix.c (scm_pipe, scm_getgroups),
11143 (scm_status_exit_val, scm_status_term_sig, scm_status_stop_sig),
11144 (scm_getppid, scm_getuid, scm_getgid, scm_geteuid, scm_getegid),
11145 (scm_getpgrp, scm_ttyname, scm_ctermid, scm_tcgetpgrp, scm_uname),
11146 (scm_environ, scm_tmpnam, scm_mkstemp, scm_access, scm_getpid),
11147 (scm_setlocale), ports.c (scm_char_ready_p, scm_drain_input),
11148 (scm_pt_size, scm_pt_member, scm_port_revealed, scm_port_mode),
11149 (scm_close_port, scm_input_port_p, scm_output_port_p, scm_port_p),
11150 (scm_port_closed_p, scm_eof_object_p, scm_read_char),
11151 (scm_peek_char), pairs.c (scm_pair_p, scm_cons), numbers.c
11152 (scm_logand, scm_logior, scm_logxor, scm_lognot),
11153 (scm_integer_expt, scm_bit_extract, scm_logcount),
11154 (scm_integer_length, scm_string_to_number, scm_inexact_to_exact),
11155 net_db.c (scm_inet_netof, scm_lnaof), modules.c
11156 (scm_interaction_environment), macros.c (scm_makacro),
11157 (scm_makmacro, scm_makmmacro), keywords.c (scm_keyword_p), ioext.c
11158 (scm_ftell, scm_dup_to_fdes, scm_fileno, scm_isatty_p),
11159 (scm_fdopen, scm_fdes_to_ports), gc.c (scm_gc_stats), fluids.c
11160 (scm_fluid_ref), filesys.c (scm_open_fdes),
11161 (scm_stat, scm_directory_stream_p, scm_getcwd, scm_readlink):
11162 Docstring correction: `Returns' -> `Return'
11163
11164 * gc.c (scm_set_debug_cell_accesses_x):
11165 (s_scm_gc_set_debug_check_freelist_x):
11166 * fluids.c (scm_fluid_p): Added texinfo markup.
11167
11168 * error.c (scm_strerror): Made docstring more precise.
11169
11170 * vectors.c (scm_vector_p, scm_vector, scm_make_vector),
11171 (scm_vector_to_list, _scm_vector_fill_x), symbols.c
11172 (scm_symbol_p, scm_symbol_to_string), strorder.c
11173 (scm_string_equal_p, scm_string_ci_equal_p, scm_string_less_p),
11174 (scm_string_leq_p, scm_string_gr_p, scm_string_geq_p),
11175 (scm_string_ci_less_p, scm_string_ci_leq_p, scm_string_ci_gr_p):
11176 (scm_string_ci_geq_p), strop.c (scm_string_copy),
11177 (scm_string_fill_x): Removed `(r5rs)' from docstrings.
11178
11179 2001-04-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
11180
11181 * gc.c (MARK): Re-introduce a cheap sanity test for non debug
11182 mode, as suggested by Michael Livshin.
11183
11184 2001-03-31 Michael Livshin <mlivshin@bigfoot.com>
11185
11186 * backtrace.c (display_backtrace_body): since the `print_state'
11187 variable is not used (instead its data field is used directly as
11188 `pstate'), protect it from the hungry compiler optimizations.
11189 thanks to Bill Schottstaedt for the report.
11190
11191 2001-03-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
11192
11193 * gc.[ch] (scm_tc16_allocated): New type tag for allocated cells.
11194 It is only defined and used if guile is compiled with
11195 SCM_DEBUG_CELL_ACCESSES set to true. It's purpose is, to never
11196 let cells with a free_cell type tag be visible outside of the
11197 garbage collector when in debug mode.
11198
11199 * gc.c (scm_debug_cell_accesses_p): Set to true as default.
11200
11201 (scm_assert_cell_valid): Use a local static variable to avoid
11202 recursion.
11203
11204 (MARK): Only check for rogue cell pointers in debug mode. Use
11205 scm_cellp for this purpose and place all checks for rogue pointers
11206 into that function. Further, since due to conservative scanning
11207 we may encounter free cells during marking, don't use the standard
11208 cell type accessor macro to determine the cell type.
11209
11210 (scm_cellp): Check if the cell pointer actually points into a
11211 card header.
11212
11213 (scm_init_gc): Initalize scm_tc16_allocated.
11214
11215 * gc.h (GCH): Renamed to SCM_GC_H.
11216
11217 (SCM_VALIDATE_CELL): Enclose the expression in brackets. This
11218 might be unnecessary, but I feel better this way :-)
11219
11220 (SCM_GC_CELL_TYPE): New macro.
11221
11222 (SCM_SETAND_CDR, SCM_SETOR_CDR): Deprecated. These are not used
11223 in guile, and it is unlikely that they will be applied to real
11224 pairs anyway.
11225
11226 (SCM_SET_FREE_CELL_TYPE): Removed. It was not used.
11227
11228 (SCM_GC_SET_ALLOCATED): New macro. Only non-empty if guile is
11229 compiled with SCM_DEBUG_CELL_ACCESSES set to true.
11230
11231 (SCM_NEWCELL, SCM_NEWCELL2): Use of SCM_GC_SET_ALLOCATED will
11232 make sure that in debug mode no free cell will ever be visible
11233 outside of the garbage collector.
11234
11235 2001-03-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
11236
11237 * async.c (scm_asyncs_pending): Don't use != to compare SCM
11238 values.
11239
11240 * async.c (scm_system_async), variable.c (scm_make_variable,
11241 scm_make_undefined_variable): Use scm_cons to create a pair.
11242
11243 * debug.c (scm_reverse_lookup): Perform proper type checking.
11244 Remove suspicious use of SCM_SLOPPY_CONSP.
11245
11246 * eq.c (scm_equal_p), tags.h (SCM_ECONSP): Use SCM_CONSP instead
11247 of SCM_SLOPPY_CONSP. A sane compiler should be able to perform
11248 the corresponding optimization.
11249
11250 * eval.c (iqq): Use proper type check.
11251
11252 (scm_m_expand_body): Remove redundant type checks.
11253
11254 (promise_print): Don't access promise cells as pairs.
11255
11256 * eval.c (EVALCAR, iqq, scm_m_expand_body, scm_eval_args,
11257 scm_deval_args SCM_CEVAL), guardians.c (scm_guard), hashtab.c
11258 (scm_internal_hash_fold), print.c (scm_iprlist): Use !SCM_CELLP
11259 for SCM_NCELLP, !SCM_CONSP for SCM_NCONSP, !SCM_IMP for SCM_NIMP,
11260 !SCM_FALSEP for SCM_NFALSEP, !SCM_NULLP for SCM_NNULLP
11261
11262 * eval.c (scm_m_define, scm_macroexp, SCM_CEVAL), print.c
11263 (scm_iprin1): Use new macro predicate and accessors.
11264
11265 * eval.h (scm_tc16_macro): Removed declaration. It is declared
11266 in macros.h.
11267
11268 * eval.h (EVALH), macros.h (MACROSH), ports.h (PORTSH), procs.h
11269 (PROCSH), tags.h (TAGSH), variable.h (VARIABLEH): Renamed to
11270 SCM_EVAL_H, SCM_MACROS_H, SCM_PORTS_H, SCM_PROCS_H, SCM_TAGS_H and
11271 SCM_VARIABLE_H. Even the macros that are used to inhibit
11272 including a header file twice should be in the SCM_ namespace.
11273
11274 * fluids.c (scm_swap_fluids, scm_swap_fluids_reverse),
11275 properties.c (scm_primitive_property_ref,
11276 scm_primitive_property_del_x): Prefer stronger predicates like
11277 SCM_NULLP or SCM_FALSEP over SCM_IMP.
11278
11279 * gc.c (MARK): Use proper macros to access procedure-with-setter
11280 cell elements and closure cell elements.
11281
11282 (gc_sweep_freelist_finish, scm_gc_sweep, init_heap_seg): Don't
11283 access free cells as pairs.
11284
11285 (scm_unprotect_object): scm_hashq_get_handle returns #f if
11286 no hashtab entry is found.
11287
11288 * gc.c (scm_gc_sweep), ports.c (scm_close_port): Use new macro
11289 SCM_CLR_PORT_OPEN_FLAG.
11290
11291 * guardians.c (TCONC_IN), print.c (scm_free_print_state): Don't
11292 use SCM_SET_C[AD]R for uninitialized cells.
11293
11294 * hashtab.c (scm_hash_fn_get_handle): Use SCM_VALIDATE_VECTOR.
11295 If the hashtable has no slots, return #f instead of '(). This
11296 unifies the return value with most assoc-functions.
11297
11298 (scm_hash_fn_ref): Use proper type check.
11299
11300 (scm_hashq_get_handle, scm_hashv_get_handle, scm_hash_get_handle):
11301 Removed references to non-existing functions from documentation.
11302
11303 * keywords.c (scm_keyword_dash_symbol): Use proper macros to
11304 access keyword cell elements.
11305
11306 * macros.h (SCM_MACROP, SCM_MACRO_TYPE, SCM_MACRO_CODE): New
11307 macros.
11308
11309 * ports.h (SCM_CLR_PORT_OPEN_FLAG): New macro.
11310
11311 * print.c (scm_iprlist): Added comment. Improved loop
11312 conditions.
11313
11314 * procs.h (SCM_ENV, SCM_SETENV): Don't access closure cells as
11315 pairs.
11316
11317 * smob.c (scm_markcdr): Don't access smob cells as pairs.
11318
11319 * tags.h (SCM_SLOPPY_CONSP, SCM_SLOPPY_NCONSP): Deprecated.
11320
11321 * throw.c (ACTIVATEJB, DEACTIVATEJB): Don't access jump buffer
11322 cells as pairs.
11323
11324 * variable.c (variable_print, variable_equalp, scm_variable_ref,
11325 scm_variable_set_x): Use proper macros to access variable cell
11326 elements.
11327
11328 (scm_variable_bound_p): Don't use SCM_NEGATE_BOOL.
11329
11330 * variable.h (SCM_VARVCELL): Don't access variable cells as
11331 pairs.
11332
11333 * vectors.c (scm_vector), weaks.c (scm_weak_vector): Simplified,
11334 added FIXME comment, removed register specifier.
11335
11336 2001-03-29 Keisuke Nishida <kxn30@po.cwru.edu>
11337
11338 * goops.c, goops.h (scm_init_oop_goops_goopscore_module): Deprecated.
11339 * init.c (scm_init_guile_1): Don't init goopscore module.
11340
11341 2001-03-27 Marius Vollmer <mvo@zagadka.ping.de>
11342
11343 * eval.c (SCM_APPLY): Check that arg1 is bound for scm_tc7_cxr.
11344
11345 2001-03-27 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11346
11347 * strop.c (scm_string_to_list): Fixed docstring markup.
11348 (scm_string_upcase_x, scm_string_upcase, scm_string_downcase_x),
11349 (scm_string_downcase, scm_string_capitalize_x),
11350 (scm_string_capitalize): Rewrote and corrected docstrings.
11351 (scm_string_ci_to_symbol): Made docstring more explicit.
11352
11353 2001-03-27 Marius Vollmer <mvo@zagadka.ping.de>
11354
11355 * values.h (scm_values_vtable, SCM_VALUESP): Moved here so that
11356 eval.c can use it.
11357 (scm_call_with_values): Removed.
11358 * values.c (values_vtable, scm_values_vtable): Added "scm_" prefix
11359 so that it can be exported.
11360 (scm_call_with_values): Removed.
11361
11362 * tags.h (SCM_IM_CALL_WITH_VALUES): New isym.
11363 * eval.c: Include "libguile/values.h"
11364 (scm_m_at_call_with_values, scm_sym_at_call_with_values):
11365 New.
11366 (unmemocopy, scm_ceval, scm_deval): Handle new isym.
11367 * eval.h (scm_sym_at_call_with_values, scm_m_at_call_with_values):
11368 New delcarations to support above change.
11369
11370 * eval.c (scm_primitive_eval_x, scm_primitive_eval): Fix syntax
11371 errors with last change.
11372
11373 2001-03-25 Marius Vollmer <mvo@zagadka.ping.de>
11374
11375 * eval.c (scm_primitive_eval_x, scm_primitive_eval, scm_i_eval_x,
11376 scm_i_eval): Moved the application of the system transformer from
11377 scm_i_eval to scm_primitive_eval.
11378
11379 2001-03-23 Neil Jerram <neil@ossau.uklinux.net>
11380
11381 * guile-snarf.awk.in: Substitute "\\" with "\" in .doc output.
11382
11383 * strop.c (scm_string_index): Fix docstring line break
11384 regression.
11385
11386 * list.c (scm_cons_star): Fix docstring typo.
11387
11388 2001-03-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
11389
11390 * gc.c (scm_init_storage), gdbint.c (scm_init_gdbint), numbers.c
11391 (big2str), ports.c (scm_drain_input), read.c (scm_read,
11392 scm_grow_tok_buf), strings.c (scm_string, scm_makfromstr,
11393 scm_make_string, scm_string_append), strports.c (st_resize_port,
11394 scm_object_to_string), unif.c (scm_make_uve): Replace calls to
11395 scm_makstr with calls to scm_allocate_string.
11396
11397 * strings.[ch] (scm_allocate_string): New function.
11398
11399 * strings.[ch] (scm_makstr): Deprecated.
11400
11401 2001-03-18 Gary Houston <ghouston@arglist.com>
11402
11403 * posix.c (scm_tmpnam): check that return value from tmpnam is not
11404 NULL. rewrote the docstring.
11405 (scm_mkstemp): new procedure implementing "mkstemp!".
11406 * posix.h: declare scm_mkstemp.
11407
11408 * net_db.c: declare h_errno if configure didn't define HAVE_H_ERRNO.
11409 normally it would be found in netdb.h.
11410
11411 2001-03-17 Gary Houston <ghouston@arglist.com>
11412
11413 * sort.c (scm_sort): move sortvec variable to avoid a compiler
11414 warning when HAVE_ARRAYS is not defined. move len too.
11415
11416 * Makefile.am (DOT_X_FILES): remove net_db.x, posix.x, socket.x.
11417 (EXTRA_DOT_X_FILES): let configure set the value.
11418 (DOT_DOC_FILES): remove net_db.doc, posix.doc, socket.doc.
11419
11420 * gc.c (scm_must_malloc): changed the comment explaining when
11421 scm_must variants of malloc/free etc., should be used, based on
11422 explanation from Dirk Herrmann.
11423 * fports.c (scm_fport_buffer_add): use FUNC_NAME instead of a local
11424 string with procedure name. use scm_must_malloc instead of malloc.
11425 (scm_setvbuf, scm_fdes_to_port, fport_close): use scm_must variants
11426 of malloc/free.
11427 * ports.c (scm_add_to_port_table, scm_remove_from_port_table,
11428 scm_ungetc): use scm_must variants of malloc/realloc/free.
11429 (scm_add_to_port_table, scm_ungetc): define FUNC_NAME.
11430
11431 2001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
11432
11433 * __scm.h (SCM_ASSERT, SCM_WTA_DISPATCH_0, SCM_WTA_DISPATCH_1,
11434 SCM_WTA_DISPATCH_2, SCM_WTA_DISPATCH_n): Don't call scm_wta, call
11435 scm_wrong_type_arg instead.
11436
11437 (SCM_WNA): Deprecated.
11438
11439 * error.[ch] (scm_wta): Deprecated.
11440
11441 * numbers.c (s_i_log): Minor comment fix.
11442
11443 * read.c (scm_lreadr), unif.c (scm_aind, scm_shap2ra,
11444 scm_make_shared_array, scm_transpose_array, scm_enclose_array,
11445 scm_array_in_bounds_p): Don't use SCM_ASSERT to check for
11446 wrong-num-args or misc errors.
11447
11448 * unif.c (scm_make_shared_array, scm_transpose_array,
11449 scm_enclose_array, scm_array_in_bounds_p, scm_array_set_x):
11450 Validate the rest argument (note: this is only done when guile is
11451 built with SCM_DEBUG_REST_ARGUMENT=1)
11452
11453 (scm_array_in_bounds_p, scm_uniform_vector_ref, scm_array_set_x):
11454 Replace calls to scm_wrong_num_args by SCM_WRONG_NUM_ARGS.
11455
11456 * validate.h (SCM_FUNC_NAME, SCM_VALIDATE_NUMBER_COPY,
11457 SCM_VALIDATE_NUMBER_DEF_COPY): Deprecated.
11458
11459 2001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
11460
11461 * validate.h (SCM_WRONG_NUM_ARGS): Call scm_error_num_args_subr
11462 instead of scm_wrong_num_args.
11463
11464 * coop-threads.c: Don't include libguile/strings.h. (Was only
11465 needed for former implementation of SCM_WRONG_NUM_ARGS.)
11466
11467 * debug.c (scm_m_start_stack): Don't use SCM_ASSERT to check for
11468 wrong-num-args errors.
11469
11470 2001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
11471
11472 * error.[ch] (scm_error_num_args_subr): New function.
11473
11474 2001-03-16 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11475
11476 * list.c (scm_list, scm_cons_star, scm_null_p, scm_list_p),
11477 (scm_length, scm_append, scm_reverse, scm_list_ref),
11478 (scm_memq, scm_memv, scm_member, scm_delv_x, scm_delete_x),
11479 (scm_delq, scm_delv, scm_delete, scm_delq1_x, scm_delv1_x),
11480 (scm_delete1_x), gc.c (scm_map_free_list),
11481 (scm_free_list_length), hash.c (scm_hashq, scm_hashv),
11482 (scm_hash), hashtab.c (scm_hashq_ref, scm_hashq_set_x),
11483 (scm_hashq_remove_x, scm_hashv_ref, scm_hashv_set_x),
11484 (scm_hashv_remove_x, scm_hash_ref, scm_hash_set_x),
11485 (scm_hash_remove_x), ports.c (scm_pt_size, scm_pt_member), print.c
11486 (scm_current_pstate), scmsigs.c (scm_usleep), goops.c
11487 (scm_get_keyword, scm_sys_compute_slots): Added texinfo markup.
11488
11489 * weaks.c (scm_weak_vector_p, scm_weak_key_hash_table_p),
11490 (scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
11491 rdelim.c (scm_read_delimited_x), strop.c (scm_string_index),
11492 symbols.c (scm_symbol_interned_p), numbers.c
11493 (scm_string_to_number), ports.c (scm_port_p): Corrected texinfo
11494 markup.
11495
11496 2001-03-16 Keisuke Nishida <kxn30@po.cwru.edu>
11497
11498 * snarf.h (SCM_CONST_LONG): Deprecated.
11499 * tag.c (CONST_INUM): New macro. Use it to define scm_utag_*.
11500
11501 2001-03-15 Marius Vollmer <marius.vollmer@uni-dortmund.de>
11502
11503 * numbers.c (scm_num2ulong): Check that a bignum is positive
11504 before looking at the magnitude. Correctly check for overflow
11505 during conversion.
11506 (scm_num2long_long): Likewise.
11507 (scm_num2ulong_long): New.
11508 (ULONG_LONG_MAX): Define if not already defined.
11509 * numbers.h: (scm_num2ulong_long): New prototype.
11510
11511 2001-03-15 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11512
11513 * validate.h (SCM_VALIDATE_OPOUTSTRPORT): New macro.
11514
11515 * strports.h (SCM_STRPORTP, SCM_OPSTRPORTP, SCM_OPINSTRPORTP),
11516 (SCM_OPOUTSTRPORTP): New predicate macros.
11517 (scm_open_input_string, scm_open_output_string),
11518 (scm_get_output_string): New prototypes.
11519
11520 * strports.c (scm_open_input_string, scm_open_output_string),
11521 (scm_get_output_string): New procedures (SRFI-6 compliant).
11522 Made scm_tc16_strport non-static.
11523
11524 2001-03-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
11525
11526 * macros.h (SCM_ASSYNT): Removed unused object argument from
11527 signature.
11528
11529 * eval.c (scm_m_body, scm_m_quote, scm_m_begin, scm_m_if,
11530 scm_m_set_x, scm_m_and, scm_m_or, scm_m_case, scm_m_cond,
11531 scm_m_letstar, scm_m_do, scm_m_quasiquote, scm_m_delay,
11532 scm_m_define, scm_m_letrec1, scm_m_letrec, scm_m_let, scm_m_apply,
11533 scm_m_cont, scm_m_nil_cond, scm_m_nil_ify, scm_m_t_ify,
11534 scm_m_0_cond, scm_m_0_ify, scm_m_1_ify, scm_m_atfop, scm_m_atbind,
11535 scm_m_expand_body), evalext.c (scm_m_generalized_set_x,
11536 scm_m_undefine), goops.c (scm_m_atslot_ref, scm_m_atslot_set_x,
11537 scm_m_atdispatch): Removed unused object argument from call to
11538 SCM_ASSYNT.
11539
11540 2001-03-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
11541
11542 * gh.h/gh_data.c (gh_ints2scm): Changed the signature to use a
11543 const int* to reflect that the input array of integers remains
11544 unchanged. Thanks to Brett Viren for the hint.
11545
11546 2001-03-14 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11547
11548 * gh_data.c (gh_scm2chars, gh_scm2shorts, gh_scm2longs),
11549 (gh_scm2floats, gh_scm2doubles): Check for malloc() returning NULL
11550 in various places.
11551 (gh_scm2newstr, gh_symbol2newstr): Change call to
11552 scm_must_malloc() to malloc(), because user-free()able memory is
11553 allocated.
11554
11555 * gc.c: Added declaration of `scm_debug_check_freelist'.
11556
11557 2001-03-13 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11558
11559 * ports.c (scm_port_mode): Changed `mode' array size to 4.
11560
11561 2001-03-12 Keisuke Nishida <kxn30@po.cwru.edu>
11562
11563 * strports.c (scm_object_to_string): New procedure.
11564 (scm_strprint_obj): Deprecated.
11565 * strports.h: Reflect the changes.
11566
11567 2001-03-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
11568
11569 * goops.h (SCM_VALIDATE_PUREGENERIC): New macro.
11570
11571 * goops.c (scm_m_atslot_ref, scm_m_atslot_set_x,
11572 scm_m_atdispatch): Provide definitions for FUNC_NAME. Don't use
11573 SCM_ASSYNT to check for correct argument types. Either use some
11574 SCM_VALIDATE_* macro or an explicit test.
11575
11576 (scm_make_foreign_object): Don't use SCM_ASSERT to check for
11577 misc-errors.
11578
11579 * macros.h (SCM_ASSYNT): On assertion failure, issue a misc-error
11580 instead of calling scm_wta.
11581
11582 2001-03-12 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11583
11584 * load.c (scm_primitive_load, scm_primitive_load_path),
11585 (scm_sys_search_load_path): Corrected docstrings (file ->
11586 filename).
11587
11588 * eval.c (scm_force): Added texinfo markup to docstring.
11589 (scm_promise_p): Renamed parameter to `obj' to match docstring.
11590
11591 * debug-malloc.c: Reinserted #include <stdio.h>.
11592
11593 2001-03-11 Keisuke Nishida <kxn30@po.cwru.edu>
11594
11595 * list.c (s_scm_reverse_x): Use SCM_VALIDATE_LIST.
11596
11597 * environments.c, error.c, eval.c, filesys.c, hashtab.c, load.c,
11598 net_db.c, procprop.c, read.c, scmsigs.c, socket.c, struct.c:
11599 Use SCM_LISTn instead of scm_listify.
11600
11601 2001-03-10 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11602
11603 * _scm.h: Removed #include <errno.h>.
11604
11605 * error.c, net_db.c, putenv.c, stime.c: Removed declaration of
11606 errno variable (can be a macro on some systems, for example when
11607 using linux libc with threads).
11608
11609 * error.c, filesys.c, gc.c, ioext.c, iselect.c, net_db.c, ports.c,
11610 posix.c, print.c, putenv.c, scmsigs.c, script.c, simpos.c, smob.c,
11611 socket.c, srcprop.c, stime.c, strop.c, unif.c, vports.c: Added
11612 #include <errno.h> in these 20 out of 100 files.
11613
11614 2001-03-10 Gary Houston <ghouston@arglist.com>
11615
11616 * socket.c: add a definition of SUN_LEN (from glibc) for when it's
11617 not already defined.
11618
11619 2001-03-09 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11620
11621 * coop.c: Inserted #include <stdio.h>.
11622
11623 * iselect.c: Reinserted #include <stdio.h>.
11624
11625 2001-03-10 Marius Vollmer <mvo@zagadka.ping.de>
11626
11627 * posix.c: Replaced `#define' of __USE_XOPEN right before
11628 including unistd.h with a define of _GNU_SOURCE at the very top of
11629 the file.
11630
11631 2001-03-09 Keisuke Nishida <kxn30@po.cwru.edu>
11632
11633 * alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,
11634 continuations.c, debug-malloc.c, debug.c, dynwind.c, eq.c, eval.c,
11635 feature.c, filesys.h, gc_os_dep.c, gh_data.c, gh_eval.c,
11636 gh_funcs.c, gh_io.c, gh_list.c, gh_predicates.c, hash.c,
11637 hashtab.c, iselect.c, keywords.c, list.c, load.c, mallocs.c,
11638 net_db.c, numbers.c, objprop.c, objprop.h, options.c, pairs.c,
11639 print.c, procprop.c, procs.c, properties.c, ramap.c,
11640 regex-posix.c, root.c, scmsigs.c, simpos.c, socket.c, srcprop.c,
11641 stackchk.c, stacks.c, strings.c, strop.c, strorder.c, struct.c,
11642 symbols.c, tag.c, threads.c, variable.c, vectors.c, weaks.c:
11643 Remove #include <stdio.h>
11644 * gc.c, gdbint.c, root.c, sort.c, unif.c: Add #include <string.h>.
11645
11646 * procs.c (scm_make_subr_opt): Init symcell to avoid warning.
11647
11648 2001-03-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11649
11650 * posix.c (scm_gethostname): Set initial name length to 256 for
11651 Solaris.
11652
11653 2001-03-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11654
11655 * posix.h (scm_crypt, scm_chroot, scm_getlogin, scm_cuserid),
11656 (scm_getpriority, scm_setpriority, scm_getpass, scm_flock),
11657 (scm_sethostname, scm_gethostname): New prototypes.
11658
11659 * posix.c: Added inclusion of <crypt.h>, <sys/resource.h> and
11660 <sys/file.h>, if present.
11661 (scm_init_posix): [PRIO_PROCESS, PRIO_PGRP, PRIO_USER, LOCK_SH,
11662 LOCK_EX, LOCK_UN, LOCK_NB]: New variables.
11663 (scm_crypt, scm_chroot, scm_getlogin, scm_cuserid),
11664 (scm_getpriority, scm_setpriority, scm_getpass, scm_flock),
11665 (scm_sethostname, scm_gethostname): New procedures.
11666
11667 2001-03-08 Neil Jerram <neil@ossau.uklinux.net>
11668
11669 * ports.c (scm_port_column): Docstring fixes: (i) port-line arg is
11670 not optional (ii) "recommend" spelling correction.
11671
11672 2001-03-08 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11673
11674 * ramap.c (racp): Removed optimization which caused array copying
11675 to fail if the two arrays shared storage. Re-inserted the IVDEP
11676 macros removed in the change of 2000-03-09. (Don't really have a
11677 complete grasp of what they are for, but they seem to be necessary
11678 on Crays. This needs testing!) Thanks to Miroslav Silovic.
11679
11680 * hash.c (scm_string_hash): Don't downcase characters.
11681
11682 2001-03-07 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11683
11684 * symbols.c (scm_symbols_prehistory): Changed symbol hash table
11685 size from 277 --> 1009.
11686
11687 * symbols.c, symbols.h (scm_sys_symbols): New function GUILE_DEBUG
11688 function.
11689
11690 * coop-threads.c: Fixed change of 2001-03-06.
11691
11692 * validate.h: Code formatting.
11693
11694 2001-03-07 Keisuke Nishida <kxn30@po.cwru.edu>
11695
11696 * Makefile.am (*.x): Add dependency on snarf.h and guile-doc-snarf.in.
11697 (*.doc): Add dependency on guile-snarf.awk.in.
11698
11699 * guile-snarf.awk.in: Neglect spaces at the end of
11700 SCM_SNARF_DOCSTRING_END. Skip lines "# NN ..." in the
11701 middle of docstrings. (To avoid the problem with gcc-2.96.)
11702
11703 2001-03-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
11704
11705 * coop-threads.c (scm_call_with_new_thread), load.c
11706 (scm_primitive_load, scm_sys_search_load_path), random.c
11707 (scm_c_default_rstate), struct.c (scm_make_struct_layout,
11708 scm_struct_ref, scm_struct_set_x): Don't use SCM_ASSERT to
11709 (potentially) issue a scm-misc-error or wrong-num-args error
11710 message.
11711
11712 * load.c (scm_search_path): Use SCM_ASSERT_TYPE to give details
11713 about the expected type with the wrong-type-arg error message.
11714
11715 * smob.c (scm_make_smob): Abort on misuse of smob - it indicates
11716 a C level bug that can't be fixed from scheme anyway.
11717
11718 2001-03-05 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11719
11720 * eval.c (scm_m_letstar): Removed check for duplicate bindings.
11721 Duplicate bindings are OK in a let* since a let* is semantically
11722 equivalent to a nested set of let:s.
11723
11724 2001-03-05 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11725
11726 * print.c (scm_print_options): Fixed texinfo in docstring.
11727
11728 * net_db.c (scm_getserv, scm_getproto, scm_getnet): Return #f if
11729 the underlying functions getservent, getprotoent or getnetent
11730 return NULL instead of signalling an error.
11731
11732 2001-03-04 Gary Houston <ghouston@arglist.com>
11733
11734 * socket.c (scm_fill_sockaddr): don't allow buffer overflows when
11735 taking an unexpectedly large filename for an AF_UNIX socket from
11736 bind/connect/sendto (thanks to Martin Grabmueller).
11737
11738 * socket.c (scm_sock_fd_to_port, SCM_SOCK_FD_TO_PORT): removed the
11739 former and adjusted the latter.
11740 (scm_socket, scm_socketpair): cosmetic changes.
11741 (scm_getsockopt, scm_setsockopt): declare optlen as int, not
11742 size_t as socklen_t substitute. don't restrict args/return values
11743 to INUM: allow full range of int or size_t.
11744 (scm_fill_sockaddr): check arguments before allocating memory, to
11745 avoid leakage. use malloc, not scm_must_malloc.
11746 (scm_connect, scm_bind, scm_sendto): use int, not size_t as socklen_t
11747 substitute. free the sockaddr structure before throwing an error.
11748 (scm_init_add_buffer): procedure removed, together with its static
11749 buffer scm_addr_buffer, which wouldn't be thread safe. instead,
11750 define a macro MAX_ADDR_SIZE and declare the buffer where needed.
11751 (scm_accept, scm_getpeername, scm_getsockname, scm_recvfrom,
11752 scm_sendto): use a local buffer instead of scm_addr_buffer.
11753 adjust for new SCM_SOCK_FD_TO_PORT. use int for address size,
11754 not size_t.
11755 (scm_recvfrom): set addr->sa_family to AF_UNSPEC before the recvfrom
11756 call to detect whether recvfrom could be bothered to set the address.
11757 (scm_init_socket): don't call scm_init_addr_buffer.
11758
11759 2001-03-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
11760
11761 * debug.c (scm_procedure_source, scm_procedure_environment),
11762 print.c (scm_get_print_state), ramap.c (scm_array_fill_int,
11763 scm_array_index_map_x), sort.c (scm_sort_x, scm_sort,
11764 scm_stable_sort_x, scm_stable_sort), stacks.c (scm_make_stack,
11765 scm_last_stack_frame), symbols.c (scm_sym2vcell, scm_sym2ovcell),
11766 unif.c (scm_list_to_uniform_array, scm_uniform_vector_length,
11767 scm_transpose_array, scm_enclose_array, scm_array_in_bounds_p,
11768 scm_uniform_vector_ref, scm_array_set_x, scm_uniform_array_read_x,
11769 scm_uniform_array_write, scm_bit_set_star_x, scm_bit_count_star,
11770 scm_array_to_list, scm_array_prototype), validate.h
11771 (SCM_VALIDATE_NUMBER_COPY): Don't call function scm_wta, call
11772 scm_misc_error or scm_wrong_type_arg instead.
11773
11774 * validate.h (SCM_WTA, RETURN_SCM_WTA): Deprecated.
11775
11776 2001-03-04 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11777
11778 * goops.c, goops.h (scm_sys_pre_expand_closure_x): Removed.
11779 (scm_sys_tag_body): Added.
11780
11781 2001-03-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
11782
11783 * continuations.c (continuation_apply), eval.c (scm_m_lambda,
11784 scm_m_letstar, scm_m_letrec1, scm_m_let, SCM_APPLY), eval.h
11785 (SCM_EVALIM2), evalext.c (scm_m_generalized_set_x), gc.c
11786 (get_bvec, MARK), goops.c (scm_primitive_generic_generic),
11787 options.c (scm_options), ports.c (scm_remove_from_port_table),
11788 ramap.c (scm_ramapc), read.c (skip_scsh_block_comment, scm_lreadr,
11789 scm_lreadparen, scm_lreadrecparen), script.c (script_get_octal,
11790 script_get_backslash, script_read_arg), unif.c (scm_cvref): Don't
11791 call function scm_wta, call scm_misc_error or scm_wrong_type_arg
11792 instead.
11793
11794 2001-03-04 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11795
11796 * goops.c (scm_sys_pre_expand_closure_x): New procedure.
11797
11798 2001-03-04 Marius Vollmer <mvo@zagadka.ping.de>
11799
11800 * eval.c (scm_s_duplicate_bindings): New error message.
11801 (scm_m_letrec1, scm_m_letstar): Check for duplicate bindings.
11802
11803 2001-03-03 Marius Vollmer <mvo@zagadka.ping.de>
11804
11805 * eval.h (SCM_EVALIM2): New macro. Use it when a
11806 immediate, literal constant should be evaluated.
11807 * eval.c (scm_s_duplicate_formals): New error message string.
11808 (scm_c_improper_memq): New function.
11809 (scm_m_lambda): Check for duplicate arguments.
11810 (scm_ceval, scm_deval): When executing a body: only cons a new
11811 toplevel environment frame when it is different from the
11812 existing one; use EVALCAR instead of SIDEVAL so that we can properly
11813 check for empty combinations; use SCM_EVALIM2 for the same reason
11814 in the non-toplevel loop.
11815 (nontoplevel_cdrxnoap, nontoplevel_cdrxbegin, nontoplevel_begin):
11816 New labels with the meaning of their non-"nontoplevel" partners,
11817 but they are used when it is known that the body is not evaluated at
11818 top-level.
11819 (scm_apply, scm_dapply): use SCM_EVALIM2 to get proper error
11820 reporting for empty combinations.
11821
11822 2001-03-02 Keisuke Nishida <kxn30@po.cwru.edu>
11823
11824 * Remove dump facilities.
11825 * dump.c, dump.h: Removed.
11826 * Makefile.am: Remove dump.c, dump.h, dump.x, dump.doc.
11827 * init.c: Remove #include "libguile/dump.h".
11828 (scm_init_guile_1): Remove scm_init_dump.
11829 * smob.h (scm_smob_descriptor): Remove slots: dump, undump.
11830 (scm_set_smob_dump, scm_set_smob_undump): Remove declaration.
11831 * smob.c (scm_make_smob_type): Remove initialization: dump, undump.
11832 (scm_set_smob_dump, scm_set_smob_undump): Removed.
11833
11834 * keywords.c: Remove #include "libguile/dump.h".
11835 (keyword_dump, keyword_undump): Removed.
11836 (scm_init_keywords): Remove scm_set_smob_dump and scm_set_smob_undump.
11837
11838 2001-03-02 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11839
11840 * vectors.c (s_scm_vector_p, list->vector, scm_vector)
11841 (scm_vector_ref, scm_vector_set_x, scm_vector_to_list)
11842 (scm_vector_fill_x), strorder.c (scm_string_equal_p)
11843 (scm_string_ci_equal_p, scm_string_less_p, scm_string_leq_p)
11844 (scm_string_gr_p, scm_string_geq_p, scm_string_ci_less_p)
11845 (scm_string_ci_geq_p), symbols.c (scm_symbol_p)
11846 (scm_symbol_to_string, scm_string_to_symbol): Changed use of @t{}
11847 to @code{} as the texinfo manual recommends, converted the
11848 examples to use a @lisp{}-environment.
11849
11850 * strports.c (scm_eval_string): Cleaned up the docstring.
11851
11852 * struct.c (scm_struct_p, scm_struct_vtable_p): Added texinfo
11853 markup.
11854
11855 * numbers.c (scm_exact_p, scm_odd_p, scm_even_p)
11856 (scm_number_to_string, scm_string_to_number, scm_number_p)
11857 (scm_real_p, scm_integer_p, scm_inexact_p, scm_make_rectangular)
11858 (scm_make_polar, scm_inexact_to_exact): Added texinfo markup.
11859 (scm_ash): Added texinfo markup and removed obsolete @refill.
11860 (scm_gr_p): Corrected comment.
11861 (scm_gr_p, scm_leq_p, scm_geq_p): Added texinfo markup to (future
11862 docstring) comments.
11863 (scm_positive_p, scm_less_p, scm_num_eq_p, scm_real_p)
11864 (scm_number_p, scm_negative_p, scm_max, scm_min, scm_sum)
11865 (scm_difference, scm_product, scm_divide, scm_asinh, scm_acosh)
11866 (scm_atanh, scm_truncate, scm_round, scm_exact_to_inexact)
11867 (floor, ceiling, $sqrt, $abs, $exp, $log, $sin, $cos, $tan, $asin)
11868 ($acos, $atan, $sinh, $cosh, $tanh, scm_real_part, scm_imag_part)
11869 (scm_magnitude, scm_angle, scm_abs, scm_quotient, scm_remainder)
11870 (scm_modulo, scm_gcd, scm_lcm): Added (future docstring) comments.
11871
11872 2001-02-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
11873
11874 * __scm.h (SCM_ASSERT_TYPE): Add missing macro parameter.
11875 (Obviously nobody compiles with SCM_RECKLESS defined...)
11876
11877 * validate.h (SCM_ASSERT_RANGE): Use the argument number.
11878
11879 2001-02-23 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11880
11881 * ports.c, ports.h (scm_c_read, scm_c_write): New functions.
11882
11883 * ports.h (SCM_READ_BUFFER_EMPTY_P): New macro.
11884
11885 2001-02-24 Neil Jerram <neil@ossau.uklinux.net>
11886
11887 * numbers.c (scm_two_doubles, scm_sys_expt, scm_sys_atan2,
11888 scm_make_polar): Rename arguments `z1' and `z2' to `x' and `y',
11889 since use of `z' suggests that the arguments may be complex.
11890
11891 * goops.c (scm_make), numbers.c (scm_sys_expt): Fix docstring
11892 typos.
11893
11894 2001-02-23 Neil Jerram <neil@ossau.uklinux.net>
11895
11896 * dump.c (scm_binary_write, scm_binary_read), eval.c
11897 (scm_primitive_eval), guardians.c (scm_guardian_destroyed_p,
11898 scm_guardian_greedy_p, scm_make_guardian), fports.c
11899 (scm_file_port_p): Minor docstring fixes.
11900
11901 2001-02-22 Marius Vollmer <mvo@zagadka.ping.de>
11902
11903 * load.c (load): Use scm_primitive_eval_x instead of scm_i_eval_x.
11904
11905 * goops.c (scm_add_method, DEFVAR): Use scm_eval instead of
11906 scm_i_eval.
11907 (make_class_from_template): Do not bother to set the current
11908 module around the call to DEFVAR, scm_eval takes care of that.
11909 (scm_init_goops): Make scm_module_goops and
11910 scm_goops_lookup_closure permanent objects.
11911
11912 * eval.c (scm_ceval, scm_deval): When evaluating expressions on
11913 top level, create a fresh top-level environment for each
11914 expression instead of mutating the exisint frame. This is
11915 important when that frame is closed over.
11916
11917 * numbers.c (s_scm_logior) [SCM_DIGSTOOBIG]: Also use
11918 SCM_DIGSPERLONG instead of DIGSPERLONG.
11919
11920 2001-02-21 Marius Vollmer <mvo@zagadka.ping.de>
11921
11922 * eval.c (scm_ceval, scm_deval): Check for wrong number of args
11923 before applying arrow procedure in `cond' and before applying
11924 receiver procedure in call-with-current-continuation.
11925 (scm_i_eval): Do not invoke scm_copy_tree in argument in SCM_XEVAL
11926 macro. The argument is expanded more than one time.
11927
11928 * numbers.c (scm_logior) [SCM_DIGSTOOBIG]: Correctly use
11929 SCM_BIGDIG instead of BIGDIG. Thanks to Steven G. Johnson!
11930
11931 2001-02-20 Marius Vollmer <mvo@zagadka.ping.de>
11932
11933 * guile-doc-snarf.in, guile-func-name-check.in: Added copyright
11934 notice and license.
11935
11936 2001-02-17 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11937
11938 * variable.c (scm_make_variable, scm_make_undefined_variable)
11939 (scm_variable_ref, scm_variable_set_x, scm_builtin_variable)
11940 (scm_variable_bound_p), values.c (scm_values)
11941 (scm_call_with_values), unif.c (scm_bit_count)
11942 (scm_bit_set_star_x), symbols.c (scm_gentemp)
11943 (scm_gensym), strings.c (scm_string_p, scm_make_string)
11944 (scm_read_only_string_p, scm_string_length, scm_string_ref)
11945 (scm_string_set_x, scm_substring, scm_string_append), stime.c
11946 (scm_strptime, scm_mktime), random.c (scm_seed_to_random_state)
11947 (scm_copy_random_state, scm_random), print.c (scm_newline)
11948 (scm_write_char, scm_simple_format), debug-malloc.c
11949 (scm_malloc_stats), environments.c (scm_environment_p)
11950 (scm_environment_bound_p, scm_environment_ref)
11951 (scm_environment_fold, scm_environment_define)
11952 (scm_environment_undefine, scm_environment_set_x)
11953 (scm_environment_cell, scm_environment_observe)
11954 (scm_environment_observe_weak, scm_environment_unobserve)
11955 (scm_make_eval_environment, scm_eval_environment_p)
11956 (scm_eval_environment_set_local_x, scm_eval_environment_local)
11957 (scm_eval_environment_imported)
11958 (scm_eval_environment_set_imported_x, scm_make_import_environment)
11959 (scm_import_environment_p, scm_import_environment_imports)
11960 (scm_import_environment_set_imports_x, scm_make_export_environment)
11961 (scm_export_environment_p, scm_export_environment_private)
11962 (scm_export_environment_set_private_x)
11963 (scm_export_environment_signature)
11964 (scm_export_environment_set_signature_x, scm_leaf_environment_p):
11965 Added texinfo markup.
11966
11967 * ports.c (scm_drain_input): Lowercased argument to @var.
11968 (scm_current_input_port, scm_current_output_port): Filled in
11969 missing explanation.
11970 (scm_current_load_port, scm_set_current_output_port)
11971 (scm_set_current_error_port, scm_port_line, scm_set_port_line_x):
11972 Added texinfo markup.
11973
11974 * arbiters.c (scm_make_arbiter, scm_try_arbiter)
11975 (scm_release_arbiter): Added texinfo markup to docstrings.
11976 Changed `Returns' to `Return'.
11977 (arbiter_print): Changed SCM_CDR to SCM_SMOB_DATA.
11978
11979 2001-02-16 Neil Jerram <neil@ossau.uklinux.net>
11980
11981 * guile-snarf.awk.in: Quote any `@'s that occur in Scheme names,
11982 by doubling them to `@@'.
11983
11984 2001-02-16 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11985
11986 * numbers.c (scm_lognot), random.c (scm_random,
11987 scm_random_normal, scm_random_solid_sphere_x,
11988 scm_random_hollow_sphere_x, scm_random_normal_vector_x,
11989 scm_random_exp), dynwind.c
11990 (scm_dynamic_wind): Removed unnecessary "" from docstrings.
11991
11992 * goops.c (scm_sys_initialize_object, scm_instance_p,
11993 scm_class_name, scm_class_precedence_list, scm_class_slots,
11994 scm_class_environment, scm_generic_function_name,
11995 scm_generic_function_methods, scm_method_generic_function,
11996 scm_method_specializers, scm_method_procedure, scm_make_unbound,
11997 scm_unbound_p, scm_assert_bound, scm_at_assert_bound_ref,
11998 scm_sys_fast_slot_ref, scm_sys_fast_slot_set_x, scm_slot_ref,
11999 scm_slot_set_x, _scm_slot_bound_p, scm_slots_exists_p,
12000 scm_sys_allocate_instance, scm_make, scm_pure_generic_p,
12001 scm_class_direct_supers, scm_class_direct_slots,
12002 scm_class_direct_subclasses, scm_class_direct_methods,
12003 scm_accessor_method_slot_definition, scm_sys_goops_loaded),
12004 debug.c (scm_with_traps, scm_memoized_p, scm_make_gloc,
12005 scm_gloc_p, scm_make_iloc, scm_iloc_p, scm_memcons,
12006 scm_mem_to_proc, scm_proc_to_mem, scm_unmemoize,
12007 scm_memoized_environment, scm_procedure_name,
12008 scm_procedure_source, scm_procedure_environment, scm_debug_hang),
12009 objects.c
12010 (scm_class_of, scm_entity_p, scm_operator_p,
12011 scm_set_object_procedure_x, scm_object_procedure,
12012 scm_make_class_object), hooks.c (scm_make_hook_with_name,
12013 scm_make_hook, scm_hook_p, scm_hook_empty_p, scm_add_hook_x,
12014 scm_remove_hook_x, scm_reset_hook_x, scm_run_hook,
12015 scm_hook_to_list), lang.c
12016 (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null, scm_nil_eq),
12017 numbers.c (scm_sys_expt, scm_sys_atan2), print.c
12018 (scm_print_options, scm_port_with_print_state,
12019 scm_get_print_state), procs.c (scm_make_cclo, scm_procedure_p,
12020 scm_closure_p, scm_thunk_p, scm_procedure_with_setter_p,
12021 scm_make_procedure_with_setter, scm_procedure), throw.c
12022 (scm_lazy_catch), modules.c (scm_standard_eval_closure), load.c
12023 (scm_parse_path, scm_search_path), stacks.c (scm_make_stack,
12024 scm_stack_ref, scm_stack_length, scm_frame_p,
12025 scm_last_stack_frame, scm_frame_number, scm_frame_source,
12026 scm_frame_procedure, scm_frame_arguments, scm_frame_previous,
12027 scm_frame_next, scm_frame_real_p, scm_frame_procedure_p,
12028 scm_frame_evaluating_args_p, scm_frame_overflow_p), filesys.c
12029 (scm_dirname, scm_basename), dynwind.c
12030 (scm_wind_chain), read.c (scm_read_options, scm_read,
12031 scm_read_hash_extend), gc.c
12032 (scm_unhash_name), eval.c (scm_eval_options_interface,
12033 scm_evaluator_traps, s_scm_nconc2last), backtrace.c
12034 (scm_display_error, scm_set_print_params_x,
12035 scm_display_application, scm_display_backtrace, scm_backtrace),
12036 async.c (scm_async, scm_system_async, scm_async_mark,
12037 scm_system_async_mark, scm_run_asyncs, scm_noop,
12038 scm_set_tick_rate, scm_set_switch_rate, scm_unmask_signals,
12039 scm_mask_signals): Added docstrings.
12040
12041 2001-02-15 Keisuke Nishida <kxn30@po.cwru.edu>
12042
12043 * dump.c (scm_undump): Use SCM_CARLOC/SCM_CDRLOC to obtain the
12044 address of car/cdr. (Thanks to Dirk Herrmann)
12045 Use scm_sizet to obtain the length of strings.
12046 (Thanks to Matthias Koeppe)
12047
12048 2001-02-15 Marius Vollmer <mvo@zagadka.ping.de>
12049
12050 * symbols.c (scm_mem2symbol): Put a empty statement after the
12051 next_symbol label. This is mandated by ANSI, appearantly.
12052
12053 2001-02-13 Marius Vollmer <marius.vollmer@uni-dortmund.de>
12054
12055 * gc_os_dep.c: Do not include <linux/version.h>. It makes no
12056 sense to compile for a specific kernel version. Do not include
12057 <asm/signal.h> while defining __KERNEL__. This hack should no
12058 longer be needed and caused problems.
12059
12060 2001-02-13 Marius Vollmer <mvo@zagadka.ping.de>
12061
12062 * eval.c (scm_ceval, scm_deval): use `SIDEVAL' instead of
12063 SCM_CEVAL when evaluating subforms of `begin' forms. SCM_CEVAL
12064 can not deal with immediates.
12065
12066 2001-02-12 Keisuke Nishida <kxn30@po.cwru.edu>
12067
12068 * list.c (scm_list_copy): Validate the first argument.
12069
12070 2001-02-11 Marius Vollmer <mvo@zagadka.ping.de>
12071
12072 Fix evaluator so that top-level expressions are correctly
12073 evaluated with respect to the module system.
12074
12075 * modules.h. modules.c (scm_current_module_lookup_closure): New
12076 function.
12077
12078 * eval.h (scm_primitive_eval, scm_primitive_eval_x): New
12079 prototypes.
12080 (scm_i_eval, scm_i_eval_x, scm_eval, scm_eval_x): Changed argument
12081 names to better reflect their meaning.
12082
12083 * eval.c (scm_ceval, scm_deval): Recognize when `begin' is being
12084 evaluated at top-level and synronize lookup closure before
12085 executing every subform.
12086 (scm_primitve_eval_x, scm_primitive_eval): New functions.
12087 (scm_eval_x, scm_eval): Reimplement in terms of
12088 scm_primitive_eval_x and scm_primitive_eval, respectively.
12089
12090 2001-02-09 Marius Vollmer <mvo@zagadka.ping.de>
12091
12092 * macros.c (scm_macro_name, scm_macro_transformer): Use
12093 SCM_SMOB_DATA instead of SCM_CDR. Provided by Martin Grabmueller.
12094 Thanks!
12095
12096 2001-02-10 Keisuke Nishida <kxn30@po.cwru.edu>
12097
12098 * dump.c (scm_store_bytes): Store data size before data.
12099 (scm_restore_bytes): Restore data size. Takes a pointer to size.
12100 * dump.h (scm_restore_bytes): Updated.
12101
12102 2001-02-09 Keisuke Nishida <kxn30@po.cwru.edu>
12103
12104 * dump.c: Use double cells for update schedule.
12105
12106 2001-02-08 Keisuke Nishida <kxn30@po.cwru.edu>
12107
12108 * ports.c (scm_unread_char): Take an optional argument.
12109
12110 2001-02-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
12111
12112 * modules.h (scm_selected_module, scm_current_module): Renamed
12113 scm_selected_module to scm_current_module to synchronize Scheme
12114 and C names.
12115 (scm_select_module, scm_set_current_module): Likewise. Changed
12116 all uses.
12117
12118 * ports.c (scm_port_for_each): Make a snapshot of the port table
12119 before iterating over it. The table might change while the user
12120 code is running. With the snapshot, the user can depend on the
12121 fact that each port that existed at the start of the iteration is
12122 encountered exactly once. (ice-9 popen) depends on this.
12123
12124 2001-02-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
12125
12126 * strings.h (SCM_STRING_MAX_LENGTH): New macro.
12127
12128 * strings.c (scm_makstr, scm_take_str, scm_make_string): Added
12129 range checking for the size parameter. Thanks to Martin
12130 Grabmueller for the hint.
12131
12132 (scm_makstr): Reordered string initialization to make interrupt
12133 deferring unnecessary.
12134
12135 * vectors.c (scm_make_vector): Fixed range checking.
12136
12137 2001-02-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
12138
12139 * vectors.h (SCM_VECTOR_MAX_LENGTH): New macro.
12140
12141 * vectors.c (scm_make_vector, scm_c_make_vector): Improved the
12142 checking of the size parameter for type correctness and valid
12143 range. Thanks to Rob Browning for reporting the problem. Instead
12144 of deferring interrupts, scm_remember_upto_here_1 is used.
12145
12146 2001-02-05 Keisuke Nishida <kxn30@po.cwru.edu>
12147
12148 * dump.c (scm_store_cell_object, scm_restore_cell_object): Removed.
12149 (scm_dump_cell_update): Removed.
12150 (scm_dump_update): Renamed from scm_dump_object_update.
12151 (scm_restore_string, scm_restore_bytes, scm_restore_word): Takes
12152 a pointer instead of returning a value.
12153 * keywords.c (keyword_undump): Updated.
12154
12155 2001-02-05 Keisuke Nishida <kxn30@po.cwru.edu>
12156
12157 * dump.c, dump.h: Modified a lot.
12158 (SCM_DUMP_COOKIE): Version 0.1
12159 (scm_dump_mark): Removed.
12160 (scm_restore_cell_object, scm_store_cell_object): New functions.
12161
12162 * smob.h (scm_smob_descriptor): Removed slots: dump_mark,
12163 dump_dealloc, dump_store, undump_alloc, undump_restore, undump_init.
12164 New slots: dump, undump.
12165 * smob.c (scm_make_smob_type, scm_set_smob_dump, scm_set_smob_undump):
12166 Updated.
12167
12168 * keywords.c (keyword_dump): Renamed from keyword_dealloc.
12169 (keyword_undump): Renamed from keyword_alloc.
12170 (scm_init_keywords): Set keyword_dump and keyword_undump.
12171
12172 2001-02-03 Michael Livshin <mlivshin@bigfoot.com>
12173
12174 * gc.c (DOUBLECELL_ALIGNED_P): new macro, a better-named analog of
12175 the deprecated SCM_DOUBLE_CELLP.
12176
12177 * tags.h (SCM_DOUBLE_CELLP): deprecated.
12178
12179 2001-02-02 Keisuke Nishida <kxn30@po.cwru.edu>
12180
12181 * dump.c, dump.h: New files.
12182 * Makefile.am: Added dump.c, dump.h, dump.x, dump.doc.
12183 * init.c: #include "libguile/dump.h".
12184 (scm_init_guile_1): Call scm_init_dump.
12185 * smob.h (scm_smob_descriptor): New slots: dump_mark,
12186 dump_dealloc, dump_store, undump_alloc, undump_restore,
12187 undump_init.
12188 * smob.c (scm_make_smob_type): Init the new slots.
12189 (scm_set_smob_dump, scm_set_smob_undump): New functions.
12190 * smob.h (scm_set_smob_dump, scm_set_smob_undump): Declared.
12191
12192 * keywords.c: #include "libguile/dump.h".
12193 (keyword_dealloc, keyword_alloc): New functions.
12194 (scm_init_keywords): Set smob_dump and smob_undump.
12195
12196 2001-02-01 Keisuke Nishida <kxn30@po.cwru.edu>
12197
12198 * vectors.c (scm_c_make_vector): New function.
12199 * vectors.h (scm_c_make_vector): Declared.
12200 * eval.c (scm_copy_tree), filesys.c (scm_stat2scm), fluids.c
12201 (scm_make_initial_fluids, grow_fluids), gc.c (scm_init_storage),
12202 gh_data.c (gh_ints2scm, gh_doubles2scm): goops.c
12203 (scm_make_method_cache, scm_i_vector2list,
12204 scm_compute_applicable_methods, scm_sys_method_more_specific_p),
12205 init.c (start_stack), net_db.c (scm_gethost, scm_getnet,
12206 scm_getproto, scm_return_entry), posix.c (scm_getgroups,
12207 scm_getpwuid, scm_getgrgid, scm_uname), print.c (make_print_state,
12208 grow_ref_stack), regex-posix.c (scm_regexp_exec), scmsigs.c
12209 (scm_init_scmsigs), socket.c (scm_addr_vector, scm_addr_vector),
12210 stime.c (scm_times, filltime), unif.c (scm_make_uve), vectors.c
12211 (scm_vector, scm_make_vector): Use scm_c_make_vector.
12212
12213 * hashtab.c (scm_c_make_hash_table): New function.
12214 * hashtab.h (scm_c_make_hash_table): Declared.
12215 * environments.c (scm_make_leaf_environment,
12216 scm_make_eval_environment), gc.c (scm_init_storage),
12217 keywords.c (scm_init_keywords), symbols.c (scm_builtin_bindings):
12218 Use scm_c_make_hash_table.
12219
12220 2001-01-31 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12221
12222 * unif.c (rapr1): Don't apply scm_uniform_vector_length on arrays.
12223
12224 2001-01-29 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12225
12226 * struct.c (scm_make_vtable_vtable): Removed unnecessary "" from
12227 end of docstring.
12228
12229 * struct.c (scm_struct_set_x, scm_struct_vtable_tag,
12230 scm_struct_vtable_name, scm_set_struct_vtable_name_x), weaks.c
12231 (scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table,
12232 scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
12233 srcprop.c (scm_source_properties, scm_set_source_properties_x,
12234 scm_source_property, scm_set_source_property_x), sort.c
12235 (scm_sort_list_x, scm_restricted_vector_sort_x, scm_sorted_p,
12236 scm_merge, scm_merge_x, scm_sort_x, scm_sort, scm_stable_sort_x,
12237 scm_stable_sort, scm_sort_list_x, scm_sort_list): Added
12238 docstrings.
12239
12240 2001-01-29 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12241
12242 * eval.c (SCM_APPLY): Check that primitives which take 1 arg
12243 really get that arg.
12244
12245 2001-01-26 Keisuke Nishida <kxn30@po.cwru.edu>
12246
12247 * goops.c (s_scm_get_keyword): Bug fix.
12248
12249 2001-01-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
12250
12251 The following patch was sent by Martin Grabmueller. It makes sure
12252 that in case of parameter errors the correct function name is
12253 shown, and that parameter types are only checked once.
12254
12255 * strop.c (string_copy, string_upcase_x, string_downcase_x,
12256 string_capitalize_x): New functions. Each one performs the core
12257 functionality of the corresponding scm_* function.
12258
12259 (scm_string_copy, scm_string_upcase_x, scm_string_upcase,
12260 scm_string_downcase_x, scm_string_downcase,
12261 scm_string_capitalize_x, scm_string_capitalize): Reduced to
12262 parameter checking wrappers of the above functions.
12263
12264 2001-01-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
12265
12266 * continuations.c, dynl.c, keywords.c, load.c: Include
12267 strings.h. Thanks to Bill Schottstaedt for the bug report.
12268
12269 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
12270
12271 * backtrace.c (display_header): Make sure that line and column
12272 information is shown independent of whether the port the code was
12273 read from had an associated filename. Thanks to Martin
12274 Grabmueller for providing this patch.
12275
12276 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
12277
12278 * fports.[ch] (scm_file_port_p): New primitive.
12279
12280 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
12281
12282 * tags.h (scm_tc16_fport, scm_tc16_strport, scm_tc16_sfport):
12283 These are now defined in fports.c, strports.c and vports.c.
12284
12285 * fports.[ch] (scm_tc16_fport), strports.c (scm_tc16_strport),
12286 vports.c (scm_tc16_sfport): Made variables (were macros defined in
12287 tags.h).
12288
12289 fports.c (scm_make_fptob), strports.c (scm_make_stptob), vports.c
12290 (scm_make_sfptob): Made static. These return a type code now.
12291
12292 fports.c (scm_init_fports), strports.c (scm_init_strports),
12293 vports.c (scm_init_vports): Create the corresponding port types.
12294
12295 * fports.h (SCM_FPORTP, SCM_OPFPORTP, SCM_OPINFPORTP,
12296 SCM_OPOUTFPORTP): Redefined in terms of scm_tc16_fport.
12297
12298 * init.c (scm_init_guile_1): Make sure strports are initialized
12299 before gdbint.
12300
12301 * ports.[ch] (scm_make_port_type): Changed the return type to
12302 scm_bits_t.
12303
12304 * ports.c (scm_ports_prehistory): Don't create any port types
12305 here.
12306
12307 * posix.c (scm_ttyname): Use SCM_FPORTP instead of comparing
12308 against scm_tc16_fport directly.
12309
12310 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
12311
12312 * srcprop.c (scm_set_source_property_x): Fix to handle
12313 (set-source-property! <obj> 'copy <datum>) correctly.
12314
12315 2001-01-24 Gary Houston <ghouston@arglist.com>
12316
12317 * filesys.c (scm_link): docstring fix.
12318 * fports.h (scm_setfileno): obsolete declaration removed.
12319 * posix.c: bogus popen declaration removed.
12320
12321 * rdelim.c: new file, split from ioext.c.
12322 * rdelim.h: new file, split from ioext.h
12323 * Makefile.am: add rdelim.c and related files.
12324 * init.c: call scm_init_rdelim. include rdelim.h.
12325
12326 2001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
12327
12328 This patch was sent by Martin Grabmueller and makes sure that
12329 parameter errors are reported correctly by the lexicographic
12330 ordering predicates.
12331
12332 * strorder.c (string_less_p, string_ci_less_p): New functions.
12333
12334 (scm_string_less_p, scm_string_ci_less_p): Extracted the core
12335 functionality into string_less_p, string_ci_less_p respectively.
12336 The remaining code is just a wrapper to do the parameter
12337 checking.
12338
12339 (scm_string_leq_p, scm_string_gr_p, scm_string_geq_p): Check the
12340 parameters and call string_less_p instead of scm_string_less_p.
12341
12342 (scm_string_ci_leq_p, scm_string_ci_gr_p, scm_string_ci_geq_p):
12343 Check the parameters and call string_less_ci_p instead of
12344 scm_string_ci_less_p.
12345
12346 2001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
12347
12348 This patch modifies scm_display_error to perform parameter
12349 checking. Thanks to Neil Jerram for the bug report.
12350
12351 * backtrace.[ch] (scm_i_display_error): New function.
12352
12353 * backtrace.c (scm_display_error): Added parameter check and
12354 extracted the core functionality into function
12355 scm_i_display_error.
12356
12357 * throw.c (handler_message): Call scm_i_display_error to display
12358 the error message.
12359
12360 2001-01-23 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12361
12362 * eval.c (SCM_APPLY): Added # args check for application of
12363 procedures with arity 3. (Thanks to Anders Holst.)
12364
12365 2001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
12366
12367 * filesys.h (SCM_DIR_FLAG_OPEN, SCM_DIR_OPEN_P): Added.
12368
12369 (SCM_OPDIRP): Deprecated.
12370
12371 * filesys.c (scm_opendir): Use SCM_DIR_FLAG_OPEN instead of
12372 SCM_OPN.
12373
12374 (scm_readdir, scm_rewinddir): Don't use SCM_VALIDATE_OPDIR.
12375 Instead, give an explicit error message in case the directory is
12376 closed.
12377
12378 (scm_closedir, scm_dir_print): Rewritten to use SCM_DIR_OPEN_P
12379 instead of SCM_OPENP and SCM_CLOSEDP.
12380
12381 * validate.h (SCM_VALIDATE_OPDIR): Deprecated.
12382
12383 2001-01-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
12384
12385 * eval.c (inner_eval, scm_eval): Move all real functionality into
12386 inner_eval. Avoid to copy the expression twice by inlining some
12387 code from scm_i_eval.
12388
12389 2001-01-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
12390
12391 * eval.c (scm_m_case): The 'else' clause of a 'case' statement
12392 now has to be the last clause, as required by R5RS. Thanks to
12393 Martin Grabmueller for the patch.
12394
12395 2001-01-18 Gary Houston <ghouston@arglist.com>
12396
12397 * ioext.c: further simplify scm_read_string_x_partial by defining
12398 a macro SCM_EBLOCK.
12399
12400 2001-01-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
12401
12402 * gh_data.c (gh_ints2scm): Simplified using SCM_FIXABLE.
12403
12404 2001-01-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
12405
12406 * __scm.h: Added comment about architecture and compiler
12407 properties that are required by guile.
12408
12409 (SCM_FIXNUM_BIT, SCM_MOST_POSITIVE_FIXNUM,
12410 SCM_MOST_NEGATIVE_FIXNUM): Moved to numbers.h.
12411
12412 (SCM_CHAR_BIT, SCM_LONG_BIT): Moved here from numbers.h.
12413
12414 * numbers.h (SCM_CHAR_BIT, SCM_LONG_BIT): Moved to __scm.h.
12415
12416 (SCM_FIXNUM_BIT, SCM_MOST_POSITIVE_FIXNUM,
12417 SCM_MOST_NEGATIVE_FIXNUM): Moved here from __scm.h.
12418
12419 2001-01-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
12420
12421 * __scm.h (SCM_FIXNUM_BIT): Added. The name is chosen in analogy
12422 to the names in limits.h.
12423
12424 * numbers.c (abs_most_negative_fixnum): Added.
12425
12426 (scm_quotient, scm_remainder): Fixed the fixnum-min / (abs
12427 fixnum-min) special case.
12428
12429 (scm_big_and): Fix for negative first parameter.
12430
12431 (scm_bit_extract): Fix for fixnum paramters.
12432 Thanks to Rob Browning for the bug report.
12433
12434 (scm_init_numbers): Initialize abs_most_negative_fixnum.
12435
12436 2001-01-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
12437
12438 * symbols.c (scm_symbol_bound_p): Fixed comment.
12439 Thanks to Chris Cramer.
12440
12441 2001-01-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
12442
12443 * smob.[ch] (scm_make_smob_type): Return type is scm_bits_t now.
12444 Thanks to Bill Schottstaedt.
12445
12446 2001-01-11 Michael Livshin <mlivshin@bigfoot.com>
12447
12448 from Matthias Köppe:
12449
12450 * objects.h (SCM_SET_ENTITY_SETTER): new macro. SCM_ENTITY_SETTER
12451 casts its result, so doesn't yield an lvalue per ANSI C.
12452
12453 * goops.c (s_scm_sys_set_object_setter_x): use
12454 SCM_SET_ENTITY_SETTER.
12455 (clear_method_cache): use SCM_SET_ENTITY_PROCEDURE.
12456
12457 * gc.h (SCM_GC_SET_CARD_BVEC): new macro. SCM_GC_CARD_BVEC casts
12458 its result, so doesn't yield an lvalue per ANSI C.
12459 (SCM_GC_SET_CARD_FLAGS): ditto for SCM_GC_GET_CARD_FLAGS.
12460 (SCM_GC_CLR_CARD_FLAGS): redefined in terms of
12461 SCM_GC_SET_CARD_FLAGS.
12462 (SCM_GC_SET_CARD_FLAG, SCM_GC_CLR_CARD_FLAGS): ditto.
12463
12464 * gc.c (INIT_CARD): use the explicit setter macro to set the bvec.
12465
12466 2001-01-08 Gary Houston <ghouston@arglist.com>
12467
12468 * validate.h (SCM_VALIDATE_SUBSTRING_SPEC_COPY): new macro.
12469 * ioext.c (scm_read_string_x_partial, scm_read_delimited_x),
12470 socket.c (scm_recvfrom): use the new macro, plus minor docstring
12471 changes.
12472 * ioext.c (scm_read_string_x_partial): don't crash if -1 is supplied
12473 for fdes. if current input port is used, check that it's a file
12474 port.
12475
12476 2001-01-06 Gary Houston <ghouston@arglist.com>
12477
12478 * ioext.c (scm_read_string_x_partial): new procedure, implements
12479 read-string!/partial.
12480 * ports.c (scm_take_from_input_buffers): new procedure used by
12481 scm_read_string_x_partial.
12482 (scm_drain_input): use scm_take_from_input_buffers.
12483
12484 2001-01-06 Marius Vollmer <mvo@zagadka.ping.de>
12485
12486 * validate.h (SCM_VALIDATE_NUMBER): New.
12487
12488 2001-01-03 Michael Livshin <mlivshin@bigfoot.com>
12489
12490 * guardians.c (F_GREEDY, F_LISTED, F_DESTROYED, GREEDY_P,
12491 SET_GREEDY, LISTED_P, SET_LISTED, CLR_LISTED, DESTROYED_P,
12492 SET_DESTROYED): new defines/macros.
12493 (GUARDIAN_LIVE, GUARDIAN_ZOMBIES, GUARDIAN_NEXT): deleted.
12494 (add_to_live_list): takes a `guardian_t *' now, not SCM.
12495 (guardian_print): print more info.
12496 (guardian_apply): check if the guardian is destroyed, and throw an
12497 error if so. take one more optional argument `throw_p'.
12498 (scm_guard): depending on the value of `throw_p', return a boolean
12499 result.
12500 (scm_get_one_zombie): remove redundant property test.
12501 (guardian_t): represent the various (currently 3, I hope nothing
12502 more gets added) boolean fields as bit flags.
12503 (scm_guardian_destroyed_p, scm_guardian_greedy_p): new predicates.
12504 (scm_destroy_guardian_x): new procedure.
12505
12506 * guardians.h: added prototypes for `scm_guardian_greedy_p' and
12507 `scm_guardian_destroyed_p'. changed prototype for `scm_guard'.
12508
12509 2001-01-01 Gary Houston <ghouston@arglist.com>
12510
12511 * fports.c (fport_write): bugfix: handle short writes for
12512 unbuffered ports too. optimize the buffered case by minimizing
12513 the number of write/flush calls.
12514 (write_all): new helper procedure.
12515
12516 The ChangeLog continues in the file: "ChangeLog-2000"