* unif.c (scm_i_read_array): Declare rank as ssize_t, to guarantee
[bpt/guile.git] / libguile / ChangeLog
1 2005-05-12 Neil Jerram <neil@ossau.uklinux.net>
2
3 Mac OS X compile warning fixes, reported by Richard Todd.
4
5 * unif.c (scm_i_read_array): Declare rank as ssize_t, to guarantee
6 that it is signed.
7
8 * strports.c (st_resize_port): Add unsigned char cast.
9 (scm_mkstrport): Make read/write_buf cast unsigned.
10
11 * srfi-13.c (string_titlecase_x): Add unsigned char cast.
12
13 * rdelim.c (scm_read_line): Initialize slen.
14
15 * load.c (scm_search_path): Remove weird >=1, and add
16 parentheses to clarify conditions.
17
18 * hash.c (scm_hasher): Add const unsigned char cast.
19
20 * gh_data.c (gh_chars2byvect): Add scm_t_int8 cast.
21
22 2005-05-11 Neil Jerram <neil@ossau.uklinux.net>
23
24 Fix C99isms reported by Ludovic Courtès:
25
26 * threads.c (s_scm_lock_mutex): Don't declare msg in middle of
27 code.
28
29 * gc.c (s_scm_gc_live_object_stats): Don't declare alist in middle
30 of code.
31
32 * gc-card.c (scm_i_card_statistics): Don't declare tag in middle
33 of code.
34 (scm_i_card_statistics): Add block for declarations of tag_as_scm
35 and current.
36
37 2005-05-10 Neil Jerram <neil@ossau.uklinux.net>
38
39 * scmsigs.c (signal_delivery_thread): Return a value, to avoid
40 compile warning reported by Werner Scheinast.
41
42 2005-04-30 Han-Wen Nienhuys <hanwen@xs4all.nl>
43
44 * list.h: remove scm_list()
45
46 * fluids.c (DYNAMIC_STATE_NEXT_LOC): new macro for use with
47 SCM_DEBUG_CELL_ACCESSES
48 (FLUID_NEXT_LOC): idem.
49
50 2005-04-30 Kevin Ryde <user42@zip.com.au>
51
52 * numbers.c (scm_divide): Correction to 1/complex and <any>/complex,
53 need to test abs(re)<abs(im) for choice of cases, otherwise divide by
54 zero when re==0 and im<0. Reported by Jean Crepeau.
55
56 2005-04-25 Kevin Ryde <user42@zip.com.au>
57
58 * ramap.c (scm_array_map_x): Allow no source args, add num args checks
59 to subr_1, subr_2, subr_2o and dsubr cases.
60
61 2005-04-23 Kevin Ryde <user42@zip.com.au>
62
63 * hashtab.c (scm_hashx_remove_x): Need to pass "closure" to
64 scm_hash_fn_remove_x.
65
66 * list.c (scm_cons_star): Don't modify the rest list, it belongs to
67 the caller when cons* is reached through apply.
68
69 * list.c (list): Use scm_list_copy, so as to produce a fresh list when
70 list is called using apply, under the debugging evaluator.
71 (scm_list): Remove.
72
73 * list.c, list.h (scm_make_list): New code, moving make-list from
74 boot-9.scm.
75
76 2005-04-14 Kevin Ryde <user42@zip.com.au>
77
78 * numbers.c, numbers.h (scm_oneplus, scm_oneminus): New functions,
79 converted from scheme code in boot-9.scm.
80
81 2005-04-11 Kevin Ryde <user42@zip.com.au>
82
83 * srfi-13.c (scm_string_concatenate, scm_string_concatenate_shared):
84 Validate list argument, scm_string_append and scm_string_append_shared
85 don't do that to their rest argument (in a normal build).
86
87 2005-04-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
88
89 * hashtab.h, hashtab.c (scm_t_hashtable): Removed 'closure' field. The
90 closure can not be stored since it is no longer valid at GC time.
91 (make_hash_table): Initialize 'hash_fn' field.
92 (scm_i_rehash): Only store hash_fn in hash table when closre is
93 NULL.
94 (rehash_after_gc): Only call scm_i_rehash when 'hash_fn' is
95 non-NULL. Always use a NULL closure.
96 (scm_hash_fn_create_handle_x): Also rehash when table contains too
97 few entries.
98
99 2005-03-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
100
101 * hashtab.h, hashtab.c (scm_hash_fx_remove_x): Removed delete_fn
102 argument; always use scm_delq_x. The delete_fn function works on
103 the handle, not the key, and it therefore makes no sense to make
104 it configurable. Changed all callers.
105 (scm_hashx_remove_x): Likewise. Also, exported to Scheme.
106 (scm_hash_clear): Accept plain vectors as hashtables.
107 (scm_delx_x): Removed.
108
109 2005-03-28 Han-Wen Nienhuys <hanwen@xs4all.nl>
110
111 * inline.h (scm_double_cell): use __asm__ iso. asm, to maintain
112 compatibility with gcc -std=c99.
113
114 2005-03-24 Mikael Djurfeldt <djurfeldt@nada.kth.se>
115
116 * async.h (scm_mask_ints): Removed left over reference to
117 scm_root.
118
119 * threads.c: Removed fprintf debug statements.
120
121 2005-03-24 Neil Jerram <neil@ossau.uklinux.net>
122
123 * debug.c (scm_make_memoized): Restore use of SCM_UNPACK.
124
125 2005-03-23 Neil Jerram <neil@ossau.uklinux.net>
126
127 * debug.c (scm_make_memoized): Remove unnecessary critical
128 section, and simplify by using SCM_RETURN_NEWSMOB.
129
130 2005-03-20 Mikael Djurfeldt <djurfeldt@nada.kth.se>
131
132 * strings.h (SCM_STRING_UCHARS): Added missing argument.
133
134 2005-03-18 Kevin Ryde <user42@zip.com.au>
135
136 * arbiters.c (FETCH_STORE) [generic C]: Should be
137 scm_i_scm_pthread_mutex_lock/unlock now. Reported by Ludovic Courtès.
138
139 2005-03-13 Kevin Ryde <user42@zip.com.au>
140
141 * numbers.c, numbers.h (scm_i_clonebig): Remove static, so can use in
142 srfi-60.
143
144 * numbers.c (scm_logior): Must scm_i_normbig results as per scm_logand,
145 because OR-ing bits into a negative can reduce the value to an inum.
146
147 * numbers.c (scm_num_eq_p): On 64-bit systems, be careful about
148 casting inum to double since that can lose precision.
149
150 2005-03-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
151
152 * threads.h, threads.c (scm_i_thread): Added gc_running_p field.
153 (guilify_self_1): Initialize it.
154
155 * gc.h, gc.c (SCM_FREECELL_P): Removed for good.
156 (scm_block_gc, scm_gc_heap_lock): Removed. Removed all uses.
157 (scm_gc_running_p): Now a macro that refers to the scm_i_thread
158 field.
159 (scm_i_sweep_mutex): Now a non-recursive mutex. GC can not happen
160 recursively.
161 (scm_igc, scm_i_gc): Renamed former to latter. Changed all uses.
162 Do not lock scm_i_sweep_mutex, which is now non-recursive, or set
163 scm_gc_running_p. Do not run the scm_after_gc_c_hook.
164 (scm_gc): Lock scm_i_sweep_mutex, set scm_gc_running_p and run the
165 scm_after_gc_c_hook here.
166 (scm_gc_for_new_cell): Set scm_gc_running_p here and run the
167 scm_after_gc_c_hook when a full GC has in fact been performed.
168 (scm_i_expensive_validation_check): Call scm_gc, not scm_i_gc.
169
170 * gc-segment.c (scm_i_get_new_heap_segment): Do not check
171 scm_gc_heap_lock.
172
173 * gc-malloc.c (scm_realloc, increase_mtrigger): Set
174 scm_gc_running_p while the scm_i_sweep_mutex is locked.
175
176 * inline.h (scm_cell, scm_double_cell): Do not check
177 scm_gc_running_p, allocation during sweeping is OK.
178
179 * gdbint.c (SCM_BEGIN_FOREIGN_BLOCK, SCM_END_FOREIGN_BLOCK): Do
180 not set scm_block_gc.
181
182 * init.c (scm_i_init_guile): Do not set scm_block_gc.
183
184 * deprecation.c (scm_c_issue_deprecation_warning): Use malloc
185 instead of scm_malloc. The latter can not be used during GC.
186
187 2005-03-09 Marius Vollmer <mvo@zagadka.de>
188
189 * script.c (scm_compile_shell_switches): Added 2005 to Copyright
190 years.
191
192 2005-03-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
193
194 * gc-card.c (scm_i_sweep_card): Do not increase/decrease
195 scm_gc_running_p. Sweeping can happen in parallel with
196 allocation.
197
198 * inline.h: Updated comments for current threading implementation.
199
200 * threads.h, threads.c (scm_i_frame_single_threaded): Removed.
201 (scm_i_thread): Removed unused signal_asyncs field.
202 (threads_mark): Do not mark it.
203 (guilify_self_1): Do not initialize it. Do initialize
204 continuation_root field.
205 (do_thread_exit): Do not remove thread from all_threads list.
206 (on_thread_exit): Do it here, after leaving guile mode.
207 (sleep_level): Removed.
208 (scm_i_thread_put_to_sleep): Leave thread_admin_mutex locked when
209 returning. Do not support recursive sleeps.
210 (scm_i_thread_wake_up): Expect thread_admin_mutex to be locked on
211 entry. Do not support recursive sleeps.
212
213 * fluids.c (ensure_state_size, ensure_all_state_sizes,
214 resize_all_states): Collapsed ensure_state_size and
215 ensure_all_state_sizes into one function named resize_all_states.
216 Allocate new vectors outside of single threaded region. Do only
217 simple things inside that region.
218 (scm_make_fluid, scm_make_dynamic_state): Lock fluid_admin_mutex
219 while adding to the global lists.
220
221
222 2005-03-08 Marius Vollmer <mvo@zagadka.de>
223
224 libltdl is no longer distributed. We expect it to be installed
225 already.
226
227 * Makefile.am (INCLUDES): Removed @LTDLINCL@.
228 (libguile_la_LIBADD): Removed @LIBLTDL@.
229
230 2005-03-07 Marius Vollmer <mvo@zagadka.de>
231
232 * threads.h, async.h, threads.c (SCM_CRITICAL_SECTION_START,
233 SCM_CRITICAL_SECTION_END): Moved here from threads.h since now
234 they also block/unblock execution of asyncs and call
235 scm_async_click which is declared in async.h but threads.h can not
236 include async.h since async.h already includes threads.h.
237 (scm_i_critical_section_level): New, for checking mistakes in the
238 use of the SCM_CRITICAL_SECTION_* macros.
239 (scm_i_critical_section_mutex): Make it a recursive mutex so that
240 critical sections can be nested.
241
242 * throw.c (scm_ithrow): Abort when scm_i_critical_section_level is
243 not zero.
244
245 * threads.h, threads.c (scm_frame_lock_mutex): New.
246 (scm_frame_critical_section): Take mutex as argument.
247 (framed_critical_section_mutex): New, used as default for above.
248 (scm_init_threads): Initialize it.
249 (scm_threads_prehistory): Do not initialize thread_admin_mutex and
250 scm_i_critical_section_mutex; both are initialized statically.
251
252 * continuation.c, deprecated.c, goops.c, guardians.c keywords.c,
253 libguile_la-arrays.loT, objprop.c, ports.c, smob.c, sort.s,
254 srcprop.c, stime.c, struct.c, throw.c, regex-posix.c: Include
255 "libguile/async.h" for SCM_CRITICAL_SECTION_START/END.
256
257 * debug.c (scm_debug_options): Replace
258 SCM_CRITICAL_SECTION_START/END with a frame and
259 scm_frame_critical_section.
260
261 * continuations.c (scm_make_continuation): No longer a critical
262 section.
263 (scm_dynthrow): Abort when scm_i_critical_section_level is
264 not zero.
265
266 2005-03-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
267
268 * threads.c (scm_try_mutex): Renamed argument for consistency.
269
270 * root.c (scm_call_with_dynamic_root): New docstring.
271
272 * eval.c: Define _GNU_SOURCE.
273
274 2005-03-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
275
276 Big merge from the mvo-thread-cleanup branch. The main changes
277 are:
278
279 - The dynamic roots functionality has been split into dynamic
280 states and continuations barriers. Fluids have been
281 reimplemented and can now be garbage collected.
282
283 - Initialization of Guile now works in a multi-thread friendly
284 manner. Threads can freely enter and leave guile mode.
285
286 - Blocking on mutexes or condition variables or while selecting
287 can now be reliably interrupted via system asyncs.
288
289 - The low-level threading interface has been removed.
290
291 - Signals are delivered via a pipe to a dedicated 'signal delivery
292 thread'.
293
294 - SCM_DEFER_INTS, SCM_ALLOW_INTS etc have been deprecated.
295
296 * throw.c (scm_handle_by_message): Exit only the current thread,
297 not the whole process.
298 (scm_handle_by_message_noexit): Exit when catching 'quit.
299
300 * scmsigs.c (take_signal, signal_delivery_thread,
301 start_signal_delivery_thread, ensure_signal_delivery_thread,
302 install_handler): Reimplemented signal delivery as explained in
303 the comments.
304
305 * pthreads-threads.h (scm_i_pthread_t, scm_i_pthread_self,
306 scm_i_pthread_create, scm_i_pthread_detach, scm_i_pthread_exit,
307 scm_i_sched_yield, scm_i_pthread_sigmask,
308 SCM_I_PTHREAD_MUTEX_INITIALIZER,
309 SCM_I_PTHREAD_RECURSIVE_MUTEX_INITIALIZER, scm_i_pthread_mutex_t ,
310 scm_i_pthread_mutex_init, scm_i_pthread_mutex_destroy,
311 scm_i_pthread_mutex_trylock, scm_i_pthread_mutex_lock,
312 scm_i_pthread_mutex_unlock, SCM_I_PTHREAD_COND_INITIALIZER,
313 scm_i_pthread_cond_t, scm_i_pthread_cond_init,
314 scm_i_pthread_cond_destroy, scm_i_pthread_cond_signal,
315 scm_i_pthread_cond_broadcast, scm_i_pthread_cond_wait,
316 scm_i_pthread_cond_timedwait, scm_i_pthread_once_t,
317 SCM_I_PTHREAD_ONCE_INIT, scm_i_pthread_once, scm_i_pthread_key_t ,
318 scm_i_pthread_key_create, scm_i_pthread_setspecific,
319 scm_i_pthread_getspecific, scm_i_scm_pthread_mutex_lock,
320 scm_i_frame_pthread_mutex_lock, scm_i_scm_pthread_cond_wait,
321 scm_i_scm_pthread_cond_timedwait): Provide the obvious mapping
322 when using pthreads.
323 * null-threads.c, null-threads.h: Provide dummy definitions for
324 the above symbols when not using pthreads.
325
326 * modules.h, modules.c (scm_frame_current_module): New.
327
328 * load.c (scm_primitive_load): Use scm_i_frame_current_load_port
329 instead of scm_internal_dynamic_wind.
330
331 * init.h, init.c (restart_stack, start_stack): Removed.
332 (scm_boot_guile, invoke_main_func): Simply use scm_with_guile.
333 (scm_boot_guile_1): Removed.
334 (scm_i_init_mutex): New.
335 (really_cleanup_for_exit, cleanup_for_exit): New.
336 (scm_init_guile_1, scm_i_init_guile): Renamed former to latter.
337 Moved around some init funcs. Call
338 scm_init_threads_default_dynamic_state. Register cleanup_for_exit
339 with atexit.
340
341 * hashtab.c (scm_hash_fn_create_handle_x, scm_hash_fn_remove_x):
342 Use "!scm_is_eq" instead of "!=".
343
344 * ge-scmconfig.c, gen-scmconfig.h.in (SCM_I_GSC_USE_COOP_THREADS,
345 SCM_USE_COOP_THREADS): Removed.
346
347 * gc.c (scm_igc): Take care that scm_gc_running_p is properly
348 maintained. Unlock scm_i_sweep_mutex before running
349 scm_after_gc_c_hook.
350 (scm_permanent_object): Allocate outside of critical section.
351 (cleanup): Removed.
352
353 * fluids.h, fluids.c: Reimplemented completely.
354 (SCM_FLUID_NUM, SCM_FAST_FLUID_REF,
355 SCM_FAST_FLUID_SET): Reimplemented as functions.
356 (scm_is_fluid): New.
357 (scm_i_make_initial_fluids, scm_i_copy_fluids): Removed.
358 (scm_make_dynamic_state, scm_dynamic_state_p,
359 scm_is_dynamic_state, scm_current_dynamic_state,
360 scm_set_current_dynamic_state, scm_frame_current_dynamic_state,
361 scm_c_with_dynamic_state, scm_with_dynamic_state,
362 scm_i_make_initial_dynamic_state, scm_fluids_prehistory): New.
363
364 * feature.c (progargs_fluid): New.
365 (scm_program_arguments, scm_set_program_arguments): Use it instead
366 of scm_progargs.
367 (scm_init_feature): Allocate it. Also, only add "threads" feature
368 when SCM_USE_PTHREAD_THREADS is true.
369
370 * eval.c (scm_makprom): Use scm_make_recursive_mutex instead of
371 scm_make_rec_mutex, with all the consequences.
372 (scm_eval_x, scm_eval): Use scm_frame_begin etc instead of
373 scm_internal_dynamic_wind. Handle dynamic states as second
374 argument.
375
376 * threads.h, threads.c (scm_internal_select): Renamed to
377 scm_std_select and discouraged old name.
378 (scm_thread_sleep, scm_thread_usleep): Likewise, as scm_std_sleep
379 and scm_std_usleep.
380 (scm_tc16_fair_mutex, scm_tc16_fair_condvar, SCM_MUTEXP,
381 SCM_FAIR_MUTEX_P, SCM_MUTEX_DATA, SCM_CONDVARP,
382 SCM_FAIR_CONDVAR_P, SCM_CONDVAR_DATA, SCM_THREADP,
383 SCM_THREAD_DATA): Removed.
384 (SCM_I_IS_THREAD, SCM_I_THREAD_DATA): New.
385 (scm_i_thread): New.
386 (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR):
387 Use scm_assert_smob_type.
388 (scm_c_scm2thread, scm_thread_join, scm_thread_detach,
389 scm_thread_self, scm_thread_yield, scm_mutex_init,
390 scm_mutex_destroy, scm_mutex_trylock, scm_mutex_unlock,
391 scm_rec_mutex_init, scm_rec_mutex_destroy, scm_make_rec_mutex,
392 scm_rec_mutex_free, scm_rec_mutex_lock, scm_rec_mutex_trylock,
393 scm_cond_init, scm_cond_destroy, scm_cond_wait,
394 scm_cond_timedwait, scm_cond_signal, scm_cond_broadcast,
395 scm_key_create, scm_key_delete, scm_setspecific, scm_getspecific,
396 scm_thread_select): Removed. Replaced with scm_i_pthread
397 functions as appropriate.
398 (scm_in_guile, scm_outside_guile): Removed.
399 (scm_t_guile_ticket, scm_leave_guile, scm_enter_guile): Return and
400 take a ticket.
401 (scm_with_guile, scm_without_guile, scm_i_with_guile_and_parent):
402 New.
403 (scm_i_frame_single_threaded): New.
404 (scm_init_threads_default_dynamic_state): New.
405 (scm_i_create_thread): Removed.
406 (scm_make_fair_mutex, scm_make_fair_condition_variable): Removed.
407 (scm_make_recursive_mutex): New.
408 (scm_frame_critical_section): New.
409 (SCM_CURRENT_THREAD, SCM_I_CURRENT_THREAD): Renamed former to
410 latter, changed all uses.
411 (scm_i_dynwinds, scm_i_setdynwinds, scm_i_last_debug_frame,
412 scm_i_set_last_debug_frame): New, use them instead of scm_root
413 stuff.
414 (SCM_THREAD_LOCAL_DATA, SCM_SET_THREAD_LOCAL_DATA,
415 scm_i_root_state_key,m scm_i_set_thread_data): Removed.
416 (scm_pthread_mutex_lock, scm_frame_pthread_mutex_lock,
417 scm_pthread_cond_wait, scm_pthread_cond_timedwait).
418 (remqueue): Allow the removal of already removed cells. Indicate
419 whether a real removal has happened.
420 (scm_thread): Removed, replaced with scm_i_thread.
421 (make_thread, init_thread_creatant): Removed.
422 (cur_thread): Removed.
423 (block_self, unblock_from_queue): New.
424 (block, timed_block, unblock): Removed.
425 (guilify_self_1, guilify_self_2, do_thread_exit,
426 init_thread_key_once, init_thread_key,
427 scm_i_init_thread_for_guile, get_thread_stack_base,
428 scm_init_guile): New initialisation method.
429 (scm_call_with_new_thread, scm_spawn_thread): Use it to simplify
430 thread creation.
431 (fair_mutex, fat_mutex, etc, fair_condvar, fat_condvar): Renamed
432 "fair" to fat and implemented new semantics, including reliable
433 interruption.
434 (all_threads): Now a pointer to a scm_i_thread, not a SCM.
435 (scm_threads_mark_stacks): Explicitly mark handle.
436 (scm_std_select): Allow interruption by also selecting on the
437 sleep_pipe.
438 (scm_i_thread_put_to_sleep): Handle recursive requests for
439 single-threadedness.
440 (scm_threads_prehistory, scm_init_threads): Put current thread
441 into guile mode via guileify_self_1 and guileify_self_2,
442 respectively.
443
444 * fluid.h (SCM_FLUIDP): Deprecated.
445
446 * coop-threads.c: Removed.
447
448 * continuations.h, continuations.c (scm_with_continuation_barrier,
449 scm_c_with_continuation_barrier, scm_i_with_continuation_barrier):
450 New.
451
452 * async.h, async.c (scm_i_setup_sleep, scm_i_reset_sleep): New.
453 (async_mutex): New.
454 (scm_async_click): Protected with async_mutex. Do not deal with
455 signal_asyncs, which are gone. Set cdr of handled async cell to
456 #f.
457 (scm_i_queue_async_cell): Protected with async_mutex. Interrupt
458 current sleep.
459 (scm_system_async_mark_for_thread): Do not use scm_current_thread
460 since that might not work during early initialization.
461
462 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS, SCM_REDEFER_INTS,
463 SCM_REALLOW_INTS): Deprecated by moving into deprecated.h and
464 deprecated.c. Replaced all uses with SCM_CRITICAL_SECTION_START
465 and SCM_CRITICAL_SECTION_END.
466 (SCM_ENTER_A_SECTION, SCM_EXIT_A_SECTION): Removed. Replaced with
467 SCM_CRITICAL_SECTION_START/END.
468
469 * Makefile.am (modinclude_HEADER): Removed threads-plugin.h.
470 (libguile_la_SOURCES): Added null-threads.c
471 (EXTRA_libguile_la_SOURCES): Removed pthread-threads.c and
472 threads-plugin.c.
473 * pthread-threads.c, threads-plugin.c, threads-plugin.h: Removed.
474
475 * root.h, root.c (scm_tc16_root, SCM_ROOTP, SCM_ROOT_STATE,
476 scm_root_state, scm_stack_base, scm_save_regs_gc_mark,
477 scm_errjmp_bad, scm_rootcont, scm_dynwinds, scm_progargs,
478 scm_last_debug_frame, scm_exitval, scm_cur_inp, scm_outp,
479 scm_cur_err, scm_cur_loadp, scm_root, scm_set_root,
480 scm_make_root): Removed or deprecated. Replaced with references
481 to the current thread, dynamic state, continuation barrier, or
482 some fluid, as appropriate.
483 (root_mark, root_print): Removed.
484 (scm_internal_cwdr): Reimplemented guts with
485 scm_frame_current_dynamic_state and
486 scm_i_with_continuation_barrier.
487 (scm_dynamic_root): Return current continuation barrier.
488
489
490 2005-02-28 Marius Vollmer <mvo@zagadka.de>
491
492 * socket.c (scm_setsockopt): Handle IP_ADD_MEMBERSHIP and
493 IP_DROP_MEMBERSHIP options. Also, reorganized the code a bit for
494 cleanliness.
495 (scm_init_socket): Define IP_ADD_MEMBERSHIP and
496 IP_DROP_MEMBERSHIP.
497 Thanks to Greg Troxel!
498
499 2005-02-27 Mikael Djurfeldt <djurfeldt@nada.kth.se>
500
501 * gh.h: Bugfix: Include <libguile.h> outside of the extern "C"
502 block.
503
504 2005-02-25 Marius Vollmer <mvo@zagadka.de>
505
506 * hashtab.c (scm_i_rehash): Remove elements from old bucket vector
507 so that no two weak alist vectors share a spine.
508 (scm_hash_fn_create_handle_x): Deal with a possible rehashing
509 during GC before inserting the new alist cell.
510
511 2005-02-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
512
513 * hashtab.c (scm_i_rehash): Cope with the case that a GC modifies
514 the hashtable.
515 (scm_hash_fn_create_handle_x): Likewise.
516 * vectors.h (SCM_I_SET_WVECT_TYPE): New, for use in scm_i_rehash.
517
518 2005-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
519
520 * unif.c (prototype_to_type): Bugfix: Don't compare prototype to
521 the prototypical examples mentioned in the old reference manual.
522 Instead keep the old semantics of dispatching on type. (Yes, this
523 is extremely ugly, but the whole point of keeping the deprecated
524 interface is not to break old code.)
525
526 2005-02-08 Mikael Djurfeldt <djurfeldt@nada.kth.se>
527
528 * deprecated.h (SCM_ARRAY_DIMS): Rename scm_i_attay_dims -->
529 scm_i_array_dims.
530
531 2005-01-28 Kevin Ryde <user42@zip.com.au>
532
533 * numbers.c (scm_ash): Rewrite using shifts, much faster than
534 integer-expt and multiply/divide. Inexacts and fractions no longer
535 supported (they happened to work before for left shifts, but not
536 right). Don't really need inexacts and fractions, since ash is
537 documented as a "bitwise operation", and all the rest of those only
538 take exact integers.
539
540 2005-01-27 Han-Wen Nienhuys <hanwen@xs4all.nl>
541
542 * gc-card.c (scm_i_card_statistics): map structs, closures and
543 subrs to one tag.
544
545 * gc.c (s_scm_gc_live_object_stats): return alist, not hashtable.
546 (tag_table_to_type_alist): ignore unknown types.
547
548 * gc-segment.c (scm_i_all_segments_statistics): new function.
549 (scm_i_heap_segment_statistics): new function
550
551 * gc.c (s_scm_gc_live_object_stats): new GUILE callable: return
552 statistics on the number of live objects of each type.
553
554 * gc-card.c (scm_i_tag_name): new function.
555 (scm_i_card_statistics): new function.
556
557 2005-01-24 Kevin Ryde <user42@zip.com.au>
558
559 * posix.c (scm_setlocale): Force errno=EINVAL for an error, since
560 POSIX and C99 don't document errno being set. Reported by Bruno
561 Haible.
562 (scm_flock): Update docstring from manual.
563
564 * random.c (scm_i_init_rstate): Compare w to -1 not 0xffffffffUL, now
565 that it's an scm_t_int32. Otherwise gcc 3.4 says it's always false on
566 a 64-bit system.
567
568 * scmsigs.c (scm_sigaction_for_thread): Use scm_to_long for
569 sa_handler, needs to be a long on 64-bit systems where int is only 32
570 bits.
571
572 2005-01-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
573
574 * environments.c (obarray_enter, obarray_replace): Call
575 SCM_HASHTABLE_INCREMENT when adding a new entry.
576
577 * objects.c: Include goops.h for the scm_class_of prototype.
578
579 * hashtab.c (hashtable_size, HASHTABLE_SIZE_N): Restrict hashtable
580 sizes to be smaller than the maximum lengths of vectors.
581
582 2005-01-18 Marius Vollmer <marius.vollmer@uni-dortmund.de>
583
584 * ports.c, smob.c: Include "libguile/goops.h".
585
586 * objects.h, objects.c, goops.c, goops.h (scm_class_boolean,
587 scm_class_char, scm_class_pair, scm_class_procedure,
588 scm_class_string, scm_class_symbol,
589 scm_class_procedure_with_setter, scm_class_primitive_generic,
590 scm_class_vector, scm_class_null, scm_class_real,
591 scm_class_complex, scm_class_integer, scm_class_fraction,
592 scm_class_unknown, scm_port_class, scm_smob_class,
593 scm_no_applicable_method, scm_class_of): Moved from objects to
594 goops since they are only useable once goops has been loaded.
595 (scm_classes_initialized): Removed.
596 (scm_class_of): Do not check it.
597 (create_standard_classes): Do not set it.
598
599 2005-01-17 Marius Vollmer <marius.vollmer@uni-dortmund.de>
600
601 * objects.h, objects.c (scm_classes_initialized): New.
602 (scm_class_of): Signal error when scm_classes_initialized is zero.
603 * goops.c (create_standard_classes): Set scm_classes_initialized
604 to one.
605
606 * random.c (scm_random_solid_sphere_x): Use
607 scm_c_generalized_vector_length instead of
608 scm_uniform_vector_length.
609
610 2005-01-16 Marius Vollmer <mvo@zagadka.de>
611
612 * script.c (scm_compile_shell_switches): Removed debugging output.
613
614 2005-01-15 Kevin Ryde <user42@zip.com.au>
615
616 * numbers.c (scm_logtest, scm_logbit_p, scm_integer_expt): Update
617 docstrings from manual.
618 * random.c (scm_random_solid_sphere_x): Update docstring from manual.
619
620 2005-01-14 Marius Vollmer <marius.vollmer@uni-dortmund.de>
621
622 * random.c: Don't check for definedness of SCM_HAVE_T_INT64, check
623 its value.
624
625 Implement u64 and s64 uniform numeric vectors with bignums when
626 scm_t_uint64 and scm_t_int64 are not available.
627
628 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_take_u64vector,
629 scm_array_handle_u64_elements,
630 scm_array_handle_u64_writable_elements, scm_u64vector_elements,
631 scm_u64vector_writable_elements): Do not define when scm_t_uint64
632 is not available.
633 (scm_take_s64vector, scm_array_handle_s64_elements,
634 scm_array_handle_s64_writable_elements, scm_s64vector_elements,
635 scm_s64vector_writable_elements): Likewise for scm_t_int64.
636 (uvec_sizes, uvec_print, uvec_equalp): Use SCM bignums when
637 scm_t_int64/scm_t_uint64 are not available.
638 (uvec_mark): New, to mark the bignums.
639 (alloc_uvec): Initialize bignums.
640 (uvec_fast_ref): Return bignums directly.
641 (scm_uint64_min, scm_uint64_max, scm_int64_min, scm_int64_max,
642 assert_exact_integer): New.
643 (uvec_fast_set): Use them to validate the bignums.
644 (scm_init_srfi_4): Set mark function of smob when needed.
645 Initialize scm_uint64_min, scm_uint64_max, scm_int64_min,
646 scm_int64_max.
647
648 Recognize 1.4 -e syntax.
649
650 * script.c (sym_at, sym_atat, sym_main, all_symbols): New.
651 (scm_compile_shell_switches): Use them to recognize and convert
652 1.4 "-e" syntax.
653
654 2005-01-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
655
656 * deprecated.h, deprecated.c, strings.h, strings.c: Turn all
657 deprecated features that once were macros but are now functions
658 back into macros.
659
660 2005-01-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
661
662 * eval.c, debug.h (SCM_WARN_DEPRECATED): New debug option.
663 * deprecation.c (scm_issue_deprecation_warning,
664 scm_c_issue_deprecation_warning_fmt): Use it.
665 (mode): Removed.
666 (print_summary): New.
667 (scm_init_deprecation): Initialize SCM_WARN_DEPRECATED instead of
668 mode.
669
670 Deprecated SCM_ARRAY* macros.
671
672 * unif.h, unif.c, ramap.c, vectors.c, srfi-4.c, srfi-4.i.c
673 (SCM_ARRAYP, SCM_I_ARRAYP): Renamed former to latter internal
674 version. Changed all uses.
675 (scm_tc16_array, scm_i_tc16_array,
676 scm_tc16_enclosed_array, scm_i_tc16_enclosed_array,
677 SCM_ARRAY_FLAG_CONTIGUOUS, SCM_I_ARRAY_FLAG_CONTIGUOUS,
678 SCM_ENCLOSE_ARRAYP, SCM_I_ENCLOSE_ARRAYP,
679 SCM_ARRAY_NDIM, SCM_I_ARRAY_NDIM,
680 SCM_ARRAY_CONTP, SCM_I_ARRAY_CONTP,
681 SCM_ARRAY_MEM, SCM_I_ARRAY_MEM,
682 SCM_ARRAY_V, SCM_I_ARRAY_V,
683 SCM_ARRAY_BASE, SCM_I_ARRAY_BASE,
684 SCM_ARRAY_DIMS, SCM_I_ARRAY_DIMS,
685 scm_t_array, scm_i_t_array): Likewise.
686 (SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG):
687 Moved from unif.h to unif.c.
688 (scm_c_array_rank): New.
689 (scm_array_rank): Reimplement using it.
690
691 * deprecated.h, deprecated.c (SCM_ARRAYP, SCM_ARRAY_NDIM,
692 SCM_ARRAY_CONTP, SCM_ARRAY_MEM, SCM_ARRAY_V, SCM_ARRAY_BASE,
693 SCM_ARRAY_DIMS, scm_t_array): New deprecated versions.
694
695 2005-01-11 Marius Vollmer <mvo@zagadka.de>
696
697 * ramap.c: Replace uses of scm_make_ra with scm_i_make_ra.
698 (GVREF, GVSET): New abbreviations. Use them everywhere instead of
699 scm_c_generalized_vector_ref and scm_cvref, and
700 scm_c_generalized_vector_set_x, respectively.
701 (RVREF, IVDEP, BINARY_ELTS_CODE, BINARY_PAIR_ELTS_CODE,
702 UNARY_ELTS_CODE, UNARY_PAIR_ELTS_CODE): Removed since unused.
703
704 * unif.h, unif.c (indices_to_pos, scm_array_handle_pos): Renamed
705 former to latter and made public. Changed all uses.
706 (scm_i_make_ra): Made public, changed tag param to enclosed flag.
707 (scm_make_ra): Deprecated, changed all uses to scm_i_make_ra.
708 (scm_i_shap2ra): New internal version of scm_shap2ra.
709 (scm_shap2ra): Deprecated, changed all uses to scm_i_shap2ra.
710 (scm_i_ra_set_contp): New internal version of scm_ra_set_contp.
711 (scm_ra_set_contp): Deprecated, changed all uses to
712 scm_i_ra_set_contp.
713 (scm_cvref, scm_aind, scm_raprin1): Deprecated.
714
715 2005-01-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
716
717 * eval.c (scm_eval): Added example to docstring. Thanks to Issac
718 Trotts!
719
720 * unif.c (scm_list_to_typed_array): Allow the specification of the
721 upper bound as well. This is needed for empty arrays.
722 (l2ra): Give needed number of elements in error message.
723 (scm_i_print_array): Print length information for arrays that need
724 it.
725 (scm_i_read_array): Parse it.
726
727 * deprecated.h, deprecated.c (SCM_CHARS, SCM_UCHARS, SCM_LENGTH,
728 scm_i_object_chars, scm_i_object_length): Brought back from the
729 dead.
730
731 2005-01-10 Marius Vollmer <mvo@zagadka.de>
732
733 * ramap.c: Replaced single-index uses of scm_array_set_x with
734 scm_c_generalized_vector_set_x.
735
736 * unif.c (scm_array_rank, scm_array_dimensions,
737 scm_shared_array_offset, scm_shared_array_increments,
738 scm_array_ref, scm_array_set_x): Use scm_t_array_handle operations
739 to simplify code and make it more general.
740 (scm_shared_array_root): Work with all kinds of arrays, including
741 naked vectors.
742 (indices_to_pos): New.
743 (scm_make_shared_array): Use it instead of scm_aind; use handle
744 for oldra.
745
746 2005-01-10 Kevin Ryde <user42@zip.com.au>
747
748 * posix.c (scm_mkstemp): Update docstring from manual.
749
750 * stime.c (scm_mktime): Missing default errno=EINVAL from prev change.
751
752 2005-01-09 Marius Vollmer <mvo@zagadka.de>
753
754 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_i_uniform_vector_ref_proc,
755 scm_i_uniform_vector_set_proc): New.
756 (u8ref, u8set, s8ref, s8set, etc): New.
757 (uvec_reffers, uvec_setters): New.
758 (uvec_to_list): Use generic scm_array_handle_ref instead of
759 uvec_fast_ref since scm_array_handle_ref should be faster now.
760 (coerce_to_uvec, scm_c_uniform_vector_ref,
761 scm_c_uniform_vector_set_x): Likewise.
762
763 * unif.h, unif.c, inline.h (scm_i_t_array_ref, scm_i_t_array_set):
764 New.
765 (scm_t_array_handle): Added ref, set, elements and
766 writable_elements for fast inline operation of
767 scm_array_handle_ref and scm_array_handle_set.
768 (scm_array_handle_ref, scm_array_handle_set): Moved to inline.h
769 and replaced with inline code that simply calls the ref/set
770 members of the handle.
771 (enclosed_ref, vector_ref, string_ref, bitvector_ref, memoize_ref,
772 enclosed_set, vector_set, string_set, bitvector_set, memoize_set):
773 New.
774 (scm_array_handle_get): Initialize ref/set fields to memoize_ref
775 and memoize_set.
776 (scm_bitvector_fill_x, scm_bitvector_to_list, scm_bit_count,
777 scm_bit_position, scm_bit_set_star_x, scm_bit_count_star,
778 scm_bit_invert_x): Correctly multiply index with increment in the
779 general case.
780
781 * unif.c (scm_array_handle_set): Correctly execute only one
782 alternative. D'Oh!
783 (scm_list_to_typed_array, l2ra): Use scm_t_array_handle to fill
784 the array; this covers all cases with much simpler code.
785
786 * srfi-4.c (scm_uniform_element_size): Deprecated implementation
787 as well.
788
789 2005-01-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
790
791 * srfi-4.c (uvec_type): New.
792 (uvec_to_list, uvec_ref, uvec_set_x, scm_c_uniform_vector_ref,
793 scm_c_uniform_vector_x): Use it to get concrete type.
794
795 * unif.h (scm_t_array_dim): Changed type of members to ssize_t, to
796 fit the docs.
797
798 * unif.c (ra2l): Handle zero rank arrays.
799 (scm_i_print_array): Print zero rank arrays specially.
800 (tag_to_type): Return #t for an empty tag, not the empty symbol.
801 (scm_i_read_array): Allow zero rank arrays.
802
803 2005-01-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
804
805 * hashtab.h, hashtab.c (SCM_HASHTAB_BUCKET_LOC): Removed.
806 (scan_weak_hashtables): Rewrote its use with SCM_HASHTAB_BUCKET
807 and SCM_SET_HASHTAB_BUCKET.
808
809 * print.h, print.c (scm_print_state, SCM_PRINT_STATE_LAYOUT):
810 Removed ref_stack field.
811 (PSTATE_STACK_REF, PSTATE_STACK_SET): New, for accessing the stack
812 of a print state. Use them everywhere instead of ref_stack.
813
814 * srfi-4.h (scm_uniform_element_size): Deprecated for real.
815
816 * srfi-4.c: Include deprecation.h.
817
818 * vectors.h, vectors.c, unif.h, unif.c, deprecated.h,
819 deprecated.c, eq.c
820 (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR): Removed.
821 (scm_vector_elements, scm_vector_writable_elements,
822 scm_generalized_vector_get_handle): Moved to vectors.[hc] from
823 unif.[hc].
824 (SCM_SIMPLE_VECTOR_LOC): Removed.
825 (SCM_VECTOR_MAX_LENGTH, SCM_VECTOR_LENGTH, SCM_VELTS,
826 SCM_WRITABLE_VELTS, SCM_VECTOR_REF, SCM_VECTOR_SET,
827 scm_vector_equal_p): Moved from vectors.[hc] to deprecated.[hc].
828 (scm_vector_equal_p, scm_i_vector_equal_p): Renamed former to
829 latter. Changed use in eq.c.
830
831 2005-01-07 Marius Vollmer <mvo@zagadka.de>
832
833 Make the uniform vector routines also deal with one dimensional
834 arrays.
835
836 * srfi-4.c (SCM_IS_UVEC): New, use it instead of
837 SCM_SMOB_PREDICATE in this file.
838 (is_uvec): Also recognize one-dimensional uniform numeric arrays
839 of the right type.
840 (scm_is_uniform_vector): Likewise.
841 (uvec_fast_ref): Made BASE param const.
842 (uvec_writable_elements, uvec_elements): New.
843 (uvec_to_list, uvec_ref, uvec_set_x, uvec_length,
844 scm_c_uniform_vector_length, scm_c_uniform_vector_ref,
845 scm_c_uniform_set_x): Use them to also deal with one-dimensional
846 arrays.
847 (scm_uniform_vector_ref, scm_uniform_vector_set_x): Deprecate old
848 argument convention.
849 (scm_uniform_vector_to_list): Let uvec_to_list do all the
850 checking.
851 (scm_uniform_vector_length): Use uvec_length.
852
853 2005-01-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
854
855 * srfi-4.h, srfi-4.c (scm_c_uniform_vector_element_size,
856 scm_c_uniform_vector_size): Removed.
857 (scm_array_handle_uniform_element_size): New.
858
859
860 * unif.h (scm_array_handle_ref, scm_array_handle_set): Changed
861 type of POS parameter to be signed, positions can be negative.
862 (scm_array_handle_release): New, changed all uses of
863 scm_t_array_handle to properly call it.
864 (scm_vector_get_handle, scm_generalized_vector_get_handle):
865 Renamed former to latter, changed all uses.
866
867 2005-01-05 Marius Vollmer <mvo@zagadka.de>
868
869 Updated bitvector routines to also use scm_t_array_handles.
870
871 * unif.h (scm_bitvector_elements,
872 scm_bitvector_writable_elements): Use a scm_t_array_handle and
873 deliver offset, length and increment to caller. Changed all uses.
874 (scm_bitvector_release_elements,
875 scm_frame_bitvector_release_elements,
876 scm_bitvector_release_writable_elements,
877 scm_frame_bitvector_release_writable_elements): Removed.
878 (scm_array_handle_bit_elements,
879 scm_array_handle_bit_writable_elements,
880 scm_array_handle_bit_elements_offset): New.
881 (scm_make_typed_array): The special value for non-initialized
882 arrays is now SCM_UNSPECIFIED. The old special value SCM_BOOL_F
883 was a valid value to fill bitvectors with, so it can't really be
884 specialed out.
885
886 2005-01-04 Kevin Ryde <user42@zip.com.au>
887
888 * stime.c (scm_strftime): Free t.tm_zone produced by bdtime2c.
889 Reported by Bill Schottstaedt.
890
891 2005-01-02 Marius Vollmer <mvo@zagadka.de>
892
893 * sort.c (quicksort): Added INC parameter for non-contigous
894 vectors.
895 (quicksort1): New, for contigous vectors. Both functions are
896 generated from the same code by including "quicksort.i.c".
897 (scm_restricted_vector_sort_x): Call one of quicksort and
898 quicksort1, depending on increment of vector.
899 (scm_sort): Simply call scm_sort_x on a copy of the list or
900 vector.
901 (scm_merge_vector_x, scm_merge_vector_step): Changed indices to
902 size_t, added inc parameter.
903 (scm_stable_sort_x): Allocate temporary storage as Scheme vector
904 so that it doesn't leak.
905 (scm_stable_sort): Simply call scm_stable_sort_x on a copy of the
906 list or vector.
907
908 * ramap.c (scm_array_map_x): Do not try to convert fill value
909 before filling, any necessary conversion is done while storing.
910
911 * gc-card.c (scm_i_sweep_card): Call scm_i_vector_free instead of
912 doing it inline.
913
914 * hashtab.c, hashtab.h (SCM_HASHTABLE_BUCKETS): Removed.
915 (SCM_HASHTABLE_BUCKET, SCM_HASHTABLE_BUCKET_LOC): New. Replaced
916 all uses of SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET.
917
918 * tags.h, weaks.c, vports.c, hashtab.c, convert.c, sort.c,
919 convert.c, convert.h, convert.i.c, deprecated.c, environments.c,
920 eval.c, filesys.c, fluids.c, gc-mark.c, gh.h, gh_data.c, goops.c,
921 hash.c, init.c, libguile_la-arrays.loT, modules.c, net_db.c,
922 objects.c, ports.c, posix.c, print.c, random.c, read.c,
923 regex-posix.c, scmsigs.c, socket.c, stime.c, symbols.c: Use new
924 vector elements API or simple vector API, as appropriate. Removed
925 SCM_HAVE_ARRAYS ifdefery. Replaced all uses of
926 SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET.
927
928 * srfi-4.h, srfi-4.c,
929 srfi-4.i.c (scm_array_handle_uniform_elements,
930 scm_array_handle_uniform_writable_elements,
931 scm_uniform_vector_elements,
932 scm_uniform_vector_writable_elements):
933 (scm_<foo>vector_elements, scm_<foo>vector_writable_elements): Use
934 scm_t_array_handle, deliver length and increment.
935 (scm_array_handle_<foo>_elements,
936 scm_array_handle_<foo>_writable_elements): New.
937
938 * gen-scmconfig.h.in (SCM_I_GSC_HAVE_ARRAYS): Removed.
939 * gen-scmconfig.c: Hard code SCM_HAVE_ARRAYS to "1".
940
941 * unif.h, unif.c (scm_t_array_handle, scm_array_get_handle,
942 scm_array_handle_rank, scm_array_handle_dims, scm_array_handle_ref
943 scm_array_handle_set, scm_array_handle_elements
944 scm_array_handle_writable_elements, scm_vector_get_handle): New.
945 (scm_make_uve, scm_array_prototype, scm_list_to_uniform_array,
946 scm_dimensions_to_uniform_array): Deprecated for real.
947 (scm_array_p, scm_i_array_p): Use latter for SCM_DEFINE since
948 snarfing wont allow a mismatch between C and Scheme arglists.
949 (scm_make_shared_array, scm_enclose_array): Correctly use
950 scm_c_generalized_vector_length instead of
951 scm_uniform_vector_length.
952
953 * validate.h (SCM_VALIDATE_VECTOR,
954 SCM_VALIDATE_VECTOR_OR_DVECTOR): use scm_is_simple_vector instead
955 of SCM_VECTORP.
956
957 * weaks.h, weaks.c: Use new internal weak vector API from
958 vectors.h.
959
960 * Makefile.am (libguile_la_SOURCES, DOT_X_FILES, DOT_DOC_FILES,
961 EXTRA_libguile_la_SOURCES): Changed ramap.c and unif.c from being
962 'extra' to being regular sources.
963 (noinst_HEADERS): Added quicksort.i.c.
964 * quicksort.i.c: New file.
965
966 * vectors.h, vector.c (SCM_VECTORP, SCM_VECTOR_LENGTH, SCM_VELTS,
967 SCM_WRITABLE_VELTS, SCM_VECTOR_REF, SCM_VECTOR_SET): Deprecated
968 and reimplemented. Replaced all uses with scm_vector_elements,
969 scm_vector_writable_elements, or SCM_SIMPLE_VECTOR_*, as
970 appropriate.
971 (scm_is_simple_vector, SCM_SIMPLE_VECTOR_LENGTH,
972 SCM_SIMPLE_VECTOR_REF, SCM_SIMPLE_VECTOR_SET,
973 SCM_SIMPLE_VECTOR_LOC): New.
974 (SCM_VECTOR_BASE, SCM_SET_VECTOR_BASE, SCM_VECTOR_MAX_LENGTH,
975 SCM_MAKE_VECTOR_TAG, SCM_SET_VECTOR_LENGTH,
976 SCM_VELTS_AS_STACKITEMS, SCM_SETVELTS, SCM_GC_WRITABLE_VELTS):
977 Removed.
978 (scm_vector_copy): New.
979 (scm_vector_elements, scm_vector_writable_elements): Use
980 scm_t_array_handle, deliver length and increment. Moved to
981 unif.h. Changed all uses.
982 (scm_vector_release_elements,
983 scm_vector_release_writable_elements,
984 (scm_frame_vector_release_elements,
985 scm_frame_vector_release_writable_elements): Removed.
986 (SCM_I_IS_VECTOR, SCM_I_VECTOR_ELTS, SCM_I_VECTOR_WELTS,
987 SCM_I_VECTOR_LENGTH, scm_i_vector_free): New internal API.
988 (SCM_I_WVECTP SCM_I_WVECT_LENGTH SCM_I_WVECT_VELTS
989 SCM_I_WVECT_GC_WVELTS SCM_I_WVECT_TYPE SCM_I_WVECT_GC_CHAIN
990 SCM_I_SET_WVECT_GC_CHAIN, scm_i_allocate_weak_vector): New, for
991 weak vectors.
992
993 2004-12-29 Marius Vollmer <mvo@zagadka.de>
994
995 No longer use creators to specify the type of an array. Creators
996 expose the fact that arrays are wrapped around vectors, but that
997 might change.
998
999 * srfi-4.h (scm_i_proc_make_u8vector, scm_i_proc_make_s8vector,
1000 scm_i_proc_make_u16vector, scm_i_proc_make_s16vector,
1001 scm_i_proc_make_u32vector, scm_i_proc_make_s32vector,
1002 scm_i_proc_make_u64vector, scm_i_proc_make_s64vector,
1003 scm_i_proc_make_f32vector, scm_i_proc_make_f64vector,
1004 scm_i_proc_make_c32vector, scm_i_proc_make_c64vector,
1005 uvec_proc_vars): Removed.
1006 (scm_i_generalized_vector_creator): Removed.
1007 (scm_i_generalized_vector_type): New.
1008
1009 * unif.h, unif.c (scm_typed_array_p, scm_make_array,
1010 scm_make_typed_array, scm_array_type, scm_list_to_array,
1011 scm_list_to_typed_array, scm_is_array, scm_is_typed_array): New.
1012 (scm_array_creator): Removed.
1013 (scm_array_p): Deprecated second PROT argument.
1014 (scm_dimensions_to_uniform_array, scm_list_to_uniform_array):
1015 Deprecated, reimplemented in terms of scm_make_typed_array and
1016 scm_list_to_typed_array.
1017 (scm_i_proc_make_vector, scm_i_proc_make_string,
1018 scm_i_proc_make_bitvector): Removed.
1019 (type_creator_table, init_type_creator_table, type_to_creator,
1020 make_typed_vector): New.
1021 (scm_i_convert_old_prototype): Removed.
1022 (prototype_to_type): New.
1023 (scm_make_uve): Deprecated, reimplemented using make_typed_vector.
1024 (scm_array_dimensions): Use scm_list_1 instead of scm_cons for
1025 minor added clarity.
1026 (scm_make_shared_array, scm_ra2contig): Use make_typed_vector
1027 instead of scm_make_uve.
1028 (tag_creator_table, scm_i_tag_to_creator): Removed.
1029 (tag_to_type): New.
1030 (scm_i_read_array): Use scm_list_to_typed_array instead of
1031 scm_list_to_uniform_array.
1032
1033 2004-12-27 Marius Vollmer <mvo@zagadka.de>
1034
1035 * unif.h, unif.c (scm_bitvector_elements): Made return value "const".
1036 (scm_bitvector_writable_elements): New.
1037 (scm_bitvector_release, scm_bitvector_release_elements):
1038 Renamed former to latter. Added explicit call to
1039 scm_remember_upto_here_1.
1040 (scm_frame_bitvector_release,
1041 scm_frame_bitvector_release_elements): Renamed former to latter.
1042 (scm_bitvector_release_writable_elements,
1043 scm_bitvector_release_writable_elements): New.
1044 Changed all uses as required by the changes above.
1045
1046 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_uniform_vector_elements,
1047 scm_u8vector_elements, etc): Made return value "const".
1048 (scm_uniform_vector_writable_elements,
1049 scm_u8vector_writable_elements, etc): New.
1050 (scm_uniform_vector_release, scm_uniform_vector_release_elements):
1051 Renamed former to latter. Added explicit call to
1052 scm_remember_upto_here_1.
1053 (scm_frame_uniform_vector_release,
1054 scm_frame_uniform_vector_release_elements): Renamed former to latter.
1055 (scm_uniform_vector_release_writable_elements,
1056 scm_frame_uniform_vector_release_writable_elements): New. Takes
1057 crown of longest identifier yet.
1058 Changed all uses as required by the changes above.
1059
1060 * vectors.h, vectors.c (scm_c_vector_set_x): Make return type
1061 void.
1062 (scm_is_vector, scm_vector_p, scm_vector_length,
1063 scm_c_vector_length, scm_vector_ref, scm_c_vector_ref,
1064 scm_vector_set_x, scm_c_vector_set_x, scm_vector_to_list,
1065 scm_vector_move_left_x, scm_vector_move_right_x,
1066 scm_vector_fill_x): handle one-dimensional arrays.
1067 (scm_vector_elements, scm_vector_release_elements,
1068 scm_vector_frame_release_elements, scm_vector_writable_elements,
1069 scm_vector_release_writable_elements,
1070 scm_vector_frame_release_writable_elements): New.
1071 (scm_list_to_vector, scm_vector_to_list, scm_vector_fill,
1072 scm_vector_move_left_x, scm_vector_move_right_x): Use them.
1073
1074 * ramap.c (scm_ramapc, scm_raeql): Use
1075 scm_c_generalized_vector_length instead of
1076 scm_uniform_vector_length.
1077 (scm_ramap, rafe): Use scm_c_vector_ref instead of SCM_VELTS. use
1078 scm_c_generalized_vector_ref instead of scm_uniform_vector_ref.
1079
1080 2004-12-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1081
1082 * continuations.h, continuations.c (scm_t_contregs): New 'offset'
1083 member for relocating debug frames.
1084 (scm_make_continuation): Set it.
1085
1086 * stacks.c (read_frame, read_frames, scm_make_stack,
1087 scm_last_stack_frame, scm_stack_id): Use the new 'offset' member
1088 of continuations instead of calculating the offset ourselves.
1089 Relocate 'vect' member of scm_t_debug_frame.
1090
1091 2004-12-16 Kevin Ryde <user42@zip.com.au>
1092
1093 * ramap.c (scm_array_map_x): Check for at least one source argument.
1094
1095 2004-12-14 Kevin Ryde <user42@zip.com.au>
1096
1097 * srfi-13.c (string-any, string-every): Use a scheme wrapper around
1098 the C code so for the final call to the predicate procedure is a tail
1099 call, per SRFI-13 spec.
1100
1101 2004-12-10 Kevin Ryde <user42@zip.com.au>
1102
1103 * eq.c (scm_eq_p, scm_eqv_p, scm_equal_p): Update docstrings from
1104 recent revision to the reference manual.
1105
1106 * numbers.c (scm_modulo): Amend fixme comment about negative divisor
1107 with "%", C99 says it's well-defined.
1108
1109 * socket.c (scm_from_ipv6): Just use mpz_import. Don't bother trying
1110 to fit scm_from_ulong_long, since that uses mpz_import anyway. Don't
1111 bother trying to fit scm_from_ulong, not really worth the trouble if
1112 addresses are more than 4 bytes usually.
1113
1114 2004-11-30 Kevin Ryde <user42@zip.com.au>
1115
1116 * gc_os_dep.c (NetBSD): Test __m68k__ and __arm__ as well as m68k and
1117 arm32. Reported by Greg Troxel.
1118
1119 2004-11-14 mvo <mvo@zagadka.de>
1120
1121 * unif.c, unif.h (scm_i_cvref): Made non-static for ramap.c.
1122
1123 * Makefile.am (INCLUDES): It is "@LTDLINCL@", not "@LTDLINC@".
1124
1125 2004-11-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1126
1127 Enclosed arrays are now their own smob. This has been done to
1128 make the code more explicit about them and to prepare for the time
1129 when generalized vectors include arbitrary one-dimensional
1130 arrays. (Uptonow, enclosed arrays have been recognized by their
1131 use of an array as their storage 'vector'. When all generalized
1132 vectors are allowed as storage, including one-dimensional arrays,
1133 this will no longer work.)
1134
1135 * unif.h, unif.c: (scm_tc16_enclosed_array, SCM_ENCLOSED_ARRAYP):
1136 New.
1137 (exactly_one_third, singp): Removed.
1138 (scm_array_p, scm_array_dimensions, scm_shared_array_root,
1139 scm_shared_array_offset, scm_shared_array_increments): Handle
1140 enclosed arrays explicitely.
1141 (scm_array_rank): Likewise. Also, do not return zero for
1142 non-arrays, signal an error instead since arrays with rank zero do
1143 exist.
1144 (scm_i_make_ra): New, for specifying the tag of the new array.
1145 (scm_make_enclosed_array): Use it.
1146 (scm_make_ra): Reimplemented in terms of scm_i_make_ra.
1147 (scm_make_shared_array): Use scm_c_generalized_vector_length
1148 instead of scm_uniform_vector_length.
1149 (scm_array_in_bounds_p): Rewritten to be much cleaner.
1150 (scm_i_cvref): New, doing the job of scm_cvref.
1151 (scm_cvref): Use scm_i_cvref.
1152 (scm_array_ref): Do not accept non-arrays when no indices are
1153 given. Use scm_i_cvref to do the actual access.
1154 ("uniform-array-set1"): Do not register.
1155 (scm_array_set_x, scm_uniform_array_read_x,
1156 scm_uniform_array_write): Handle enclosed arrays explicitly.
1157 (ra2l): Use scm_i_cvref instead of scm_uniform_vector_ref to also
1158 handle enclosed arrays.
1159 (scm_array_to_list): Handle enclosed arrays explicitly.
1160 (rapr1): Removed.
1161 (scm_i_print_array_dimension): Use scm_i_cvref to also handle
1162 enclosed arrays.
1163 (scm_i_print_enclosed_array): New.
1164 (tag_proto_table, tag_creator_table): Renamed former to latter.
1165 Added "a" and "b" for strings and bitvectors, resp.
1166 (scm_i_tag_to_prototype, scm_i_tag_to_creator): Renamed former to
1167 latter. Tag "a" is in the table now, no need to handle it as a
1168 legacy tag.
1169 (scm_raprin1): Just call scm_iprin1.
1170 (scm_array_creator, scm_array_prototype): Handle enclosed arrays
1171 explicitly.
1172 (scm_init_unif): Initialize scm_tc16_enclosed_array smob.
1173 Use scm_i_print_array as printer for scm_tc16_array.
1174
1175 2004-11-10 Marius Vollmer <mvo@zagadka.de>
1176
1177 * ramap.c (cind): Changed second arg to be pointer to long instead
1178 of uniform vector.
1179 (scm_ramapc): Allocate index vector with scm_malloc and not as
1180 uniform vector. Wrap it in a frame so that it gets properly freed.
1181 (scm_array_index_map_x): Likewise.
1182
1183 * unif.c: Changed all uses of scm_array_prototype to
1184 scm_array_creator. (scm_i_get_old_prototype): Signal error when no
1185 prototype is known.
1186 (scm_uniform_array_read_x, scm_uniform_array_write): Reimplemented
1187 in terms of scm_uniform_vector_read_x and
1188 scm_uniform_vector_write, respectively. Strings and
1189 bitvector support has been dropped.
1190
1191 * srfi-4.h, srfi-4.c: Do not include <libguile.h>, include the
1192 needed files directly. Include config.h, <unistd.h> and <io.h>
1193 when available.
1194 (scm_uniform_vector_read_x, scm_uniform_vector_write): New.
1195
1196 2004-11-09 Marius Vollmer <mvo@zagadka.de>
1197
1198 * gh_data.c (gh_uniform_vector_length): Properly use
1199 scm_c_uniform_vector_length instead of scm_uniform_vector_length.
1200
1201 2004-11-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1202
1203 * srfi-4.h (scm_c_uniform_vector_ref, scm_c_uniform_vector_set_x):
1204 New.
1205 (scm_i_uniform_vector_creator): Removed.
1206 (scm_i_generalized_vector_creator): New.
1207 (scm_uniform_vector_length, scm_uniform_element_size): Do not
1208 handle generalized vectors, only uniform numeric vectors.
1209 (alloc_uvec): Do length check here...
1210 (make_uvec): ...but not here.
1211 (coerce_to_uvec): Use new generalized vector functions to handle
1212 all kinds of vectors in one go.
1213
1214 * tags.h (scm_tc7_bvect): Renamed to scm_tc7_unused7, renaming the
1215 remaining scm_tc7_unused tags to get a neatly ordered list.
1216
1217 * eq.c, evalext.c, gc-card.c, gc-mark.c, objects.c, print.c: Do no
1218 longer handle scm_tc7_bvect bitvectors.
1219
1220 * ramap.c: Use the new generalized vector functions to handle all
1221 vector like things.
1222
1223 * vectors.h, vectors.c (scm_is_vector, scm_c_vector_length,
1224 scm_c_vector_ref, scm_c_vector_set_x, scm_generalized_vector_p,
1225 scm_generalized_vector_length, scm_generalized_vector_ref,
1226 scm_generalized_vector_set_x, scm_generalized_vector_to_list,
1227 scm_is_generalized_vector, scm_c_generalized_vector_length,
1228 scm_c_generalized_vector_ref, scm_c_generalized_vector_set_x):
1229 New.
1230
1231 * unif.h, unif.c (scm_bitvector_p, scm_bitvector,
1232 scm_make_bitvector, scm_bitvector_length, scm_bitvector_ref,
1233 scm_bitvector_set_x, scm_list_to_bitvector, scm_bitvector_to_list,
1234 scm_bitvector_fill_x, scm_is_bitvector, scm_c_make_bitvector,
1235 scm_c_bitvector_length, scm_c_bitvector_ref,
1236 scm_c_bitvector_set_x, scm_bitvector_elements,
1237 scm_bitvector_release, scm_frame_bitvector_release,
1238 scm_tc16_bitvector, bitvector_free, bitvector_print,
1239 bitvector_equalp, count_ones, find_first_one): New.
1240 (scm_bit_count, scm_bit_position, scm_bit_set_star_x,
1241 scm_bit_count_star, scm_bit_invert_x, scm_istr2bve): Rewritten
1242 using the new C API for bitvectors and maybe count_ones or
1243 find_first_one, as appropriate.
1244 (SCM_I_MAX_LENGTH, SCM_BITVECTOR_P, SCM_BITVECTOR_BASE,
1245 SCM_SET_BITVECTOR_BASE, SCM_BITVECTOR_MAX_LENGTH,
1246 SCM_BITVECTOR_LENGTH, SCM_MAKE_BITVECTOR_TAG,
1247 SCM_SET_BITVECTOR_LENGTH): Removed. Replaced all uses with the
1248 new functions from above.
1249 (scm_i_proc_make_vector, scm_i_proc_make_string,
1250 scm_i_proc_make_bitvector): Made non-static for use in
1251 scm_i_generalized_vector_creator.
1252 (scm_make_u1vector): Removed, replaced by scm_make_bitvector.
1253 (scm_make_uve): Validate that the created object is a generalized
1254 vector.
1255 (scm_i_legacy_tag): Removed.
1256 (scm_i_print_array): Do it here.
1257 (scm_raprin1): Only print enclosed arrays.
1258
1259 * Makefile.am (DOT_DOC_FILES): Added srfi-4.doc.
1260
1261 2004-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1262
1263 * srfi-4.c (make_uvec): Use SCM_I_SIZE_MAX instead of SIZE_MAX for
1264 added portability.
1265
1266 * chars.c (scm_charnames, scm_charnums): Added "sp" as an alias
1267 for "space". Thanks to Bruce Korb!
1268
1269 * rw.c (scm_read_string_x_partial): Bugfix, apply offset to dest
1270 only after dest has been set. Thanks to Hyper Division!
1271
1272 * gh_data.c (gh_uniform_vector_length): Use
1273 scm_uniform_vector_length instead of SCM_UVECTOR_LENGTH.
1274
1275 2004-11-03 Marius Vollmer <mvo@zagadka.de>
1276
1277 * unif.h (SCM_UVECTOR_BASE, SCM_SET_UVECTOR_BASE,
1278 SCM_UVECTOR_MAXLENGTH, SCM_UVECTOR_LENGTH, SCM_MAKE_UVECTOR_TAG,
1279 SCM_SET_UVECTOR_LENGTH): Removed.
1280
1281 2004-11-02 Marius Vollmer <mvo@zagadka.de>
1282
1283 Mac OS X and OpenBSD compatibility patches from Andreas Vögele.
1284 Thanks!
1285
1286 * backtrace.c (scm_display_backtrace_with_highlights): Join the
1287 first and the second line of the SCM_DEFINE macro call, since old
1288 preprocessors cannot handle definitions that are split into two
1289 lines.
1290
1291 * inline.h (scm_cell, scm_double_cell): Don't use C99 variable
1292 declarations.
1293
1294 * pairs.c (scm_i_chase_pairs): Replace scm_t_bits with
1295 scm_t_uint32 to fix the mismatch between the function declaration
1296 and definition.
1297
1298 * sort.c (quicksort): Don't use C99 variable declarations.
1299
1300 * srfi-4.c (uvec_fast_ref): Avoid a compiler warning by returning
1301 SCM_BOOL_F if no type matches.
1302
1303 * threads.c (thread_print): Cast a pointer to size_t when printing
1304 with scm_uintprint.
1305
1306 * unif.c (scm_i_tag_to_prototype): Make sure that "instead" gets
1307 defined.
1308 (scm_array_prototype): Deprecated.
1309
1310 2004-11-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1311
1312 * srfi-4.h, srfi-4.c (scm_frame_uniform_vector_release): New.
1313 * unif.c (scm_bit_set_star_x, scm_bit_count_star_x): Use it to get
1314 more efficient access to the u32vector.
1315
1316 * tags.h (scm_tc7_llvect, scm_tc7_uvect, scm_tc7_fvect,
1317 scm_tc7_dvect, scm_tc7_cvect, scm_tc7_svect, scm_tc7_byvect,
1318 scm_tc7_ivect): Renamed to scm_tc7_unused_1 to scm_tc7_unused_8.
1319
1320 * validate.h (SCM_VALIDATE_VECTOR_OR_DVECTOR): Accept f64vectors
1321 instead of the old-style dvectors.
1322
1323 * gh_data.c: Use new-style uniform arrays in place of old-style
1324 ones.
1325
1326 * eq.c, evalext.c, gc-card.c, gc-mark.c, objects.c, print.c,
1327 ramap.c, unif.c: Do no longer handle old-style uniform vectors.
1328
1329 * unif.c (scm_bit_set_star_x, scm_bit_count_star_x): Use u32vectors
1330 instead of old-sytle uvectors.
1331
1332 * convert.c, convert.i.c: Rewritten completely, using
1333 scm_any_to_u8vector, etc and other new-style uniform vector
1334 functions.
1335
1336 * random.c (scm_random_solid_sphere_x,
1337 scm_random_hollow_sphere_x): Do not validate vector argument, this
1338 is already done elsewhere.
1339
1340 * srfi-4.h, srfi-4.i.c, srfi-4.c (coerce_to_uvec,
1341 scm_any_to_u8vector, etc): New.
1342 (scm_uniform_element_size, scm_uniform_vector_length): Do no
1343 longer handle old-style uniform vectors.
1344
1345 * read.c (scm_lreadr): Bugfix: include the last bit in the
1346 bit vector.
1347
1348 2004-10-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1349
1350 * unif.h, unif.c (scm_array_creator): New.
1351 (scm_i_get_old_prototype): New.
1352 (scm_array_prototype): use it to return old-style prototype, never
1353 return creators.
1354 (scm_make_uve): Use scm_call_1 instead of scm_call_2 with a second
1355 arg of SCM_UNDEFINED. The latter is wrong.
1356
1357 * unif.h, unif.c (scm_make_u1vector): New, but only temporary.
1358 (make_uve): Removed.
1359 (scm_i_proc_make_vector, scm_i_proc_make_string,
1360 scm_i_proc_make_u1vector): New.
1361 (scm_init_unif): Initialize them.
1362 (scm_i_convert_old_prototype): New.
1363 (scm_make_uve): Use it to get the creator procedure. Removed all
1364 old code that created old-style uniform vectors.
1365 (scm_array_p): Handle generic vectors.
1366 (scm_dimensions_to_uniform_array): Do not fill new array with
1367 prototype when that is a procedure.
1368 (scm_list_to_uniform_array): Also accept a list of lower bounds as
1369 the NDIM argument.
1370 (scm_i_print_array): Print rank for shared or non-zero-origin
1371 vectors.
1372 (tag_proto_table, scm_i_tag_to_prototype, scm_i_read_array): New.
1373 (scm_raprin1): Do not call scm_i_array_print for enclosed arrays,
1374 which I do not understand yet.
1375 (scm_array_prototype): Explicitely handle generic vectors.
1376
1377 * numbers.c, number.h (scm_i_print_complex, icmplx2str): New.
1378 (iflo2str): Use icmplx2str for complex numbers.
1379
1380 * srfi-4.c, srfi-4.h (scm_i_read_homogenous_vector,
1381 scm_i_uniform_vector_prototype): Removed.
1382 (scm_i_uniform_vector_creator): New.
1383 (SCM_UVEC_C32, scm_c32vector, scm_make_c32vector, etc,
1384 SCM_UVEC_C64, scm_c64vector, scm_make_c64vector, etc): New.
1385 Updated all tables and generic functions to support them.
1386 (scm_i_proc_make_u8vector, scm_i_proc_make_s8vector, etc): New.
1387 (scm_init_srfi_4): Initialize them.
1388
1389 * srfi-4.i.c (scm_take_u8vector, etc): use uvec_sizes instead of
1390 sizeof(CTYPE) as explained in the comment.
1391
1392 * read.c (scm_lreadr): Call scm_i_read_array for all characters
1393 following '#' that can start an array. Explicitely disambiguate
1394 'i' and 'e' between introducing numbers and uniform vectors. Do
1395 not call scm_i_read_homogenous_vector, since that is also handled
1396 by scm_i_read_array now.
1397
1398 2004-10-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1399
1400 First cut at integrating uniform vectors from srfi-4 with the rest
1401 of Guile. This change replaces scm_tc7_byvect with a s8 uniform
1402 vector. The plan is to gradually replace one type after the other
1403 until none is left and then to consider general cleanups and
1404 optimizations.
1405
1406 * srfi-4.h, srfi-4.i.c (scm_u8vector_elements, etc): New.
1407
1408 * srfi-4.h, srfi-4.c (scm_uniform_vector_p,
1409 scm_uniform_vector_ref, scm_uniform_vector_set_x,
1410 scm_uniform_vector_to_list, scm_is_uniform_vector,
1411 scm_c_uniform_vector_lengths, scm_c_uniform_vector_size,
1412 scm_uniform_vector_elements, scm_uniform_vector_element_size,
1413 scm_uniform_vector_release): New.
1414 (scm_i_uniform_vector_prototype, scm_i_uniform_vector_tag): New.
1415 (scm_uniform_element_size, scm_uniform_vector_length): Moved here
1416 from unif.h, unif.c and extended to handle both the old and new
1417 uniform vectors.
1418
1419 * tags.h (scm_tc7_byvect): Commented out.
1420
1421 * unif.h, unif.c (scm_uniform_vector_ref, scm_array_ref): Renamed
1422 the former to the latter.
1423 (scm_uniform_vector_length, scm_uniform_element_size): Moved to
1424 srfi-4.h, srfi-4.c.
1425 (scm_make_uve): Call scm_make_s8vector for #\nul prototype.
1426 (scm_array_p, scm_array_rank, scm_array_dimensions,
1427 scm_transpose_array, scm_enclose_array, scm_array_ref, scm_cvref,
1428 scm_array_set_x, scm_array_contents, scm_uniform_array_read_x,
1429 scm_array_to_list, scm_array_prototype): Handle srfi-4 uniform
1430 vectors. Removed code for scm_tc7_byvect.
1431 (scm_dimensions_to_uniform_array): Fill array with 0 when
1432 prototype is #\nul.
1433 (scm_i_print_array_dimension, scm_i_legacy_tag,
1434 scm_i_print_array): New.
1435 (scm_raprin1): Call scm_i_print_array for arrays. Removed code
1436 for scm_tc7_byvect.
1437
1438 * ramap.c (scm_ra_matchp, scm_array_fill_int, racp,
1439 scm_array_index_map_x, raeql_1, scm_array_equal_p): Handle srfi-4
1440 uniform vectors. Removed code for scm_tc7_byvect
1441
1442 * print.c (iprin1): Removed code for scm_tc7_byvect.
1443 * objects.c (scm_class_of): Likewise.
1444 * gc-mark.c (scm_gc_mark_dependencies): Likewise.
1445 * gc-card.c (scm_i_sweep_card): Likewise.
1446 * evalext.c (scm_self_evaluating_p): Likewise.
1447 * eq.c (scm_equal_p): Likewise.
1448
1449 * gh_data.c (gh_chars2byvect): Reimplemented with
1450 scm_make_s8vector.
1451 (gh_scm2chars): Handle s8vectors, removed code for scm_tc7_byvect.
1452
1453 * srfi-4.c (take_uvec): New.
1454 (alloc_uvec): Use it.
1455 * srfi-4.h, srfi-4.i.c (scm_take_u8vector, etc): New.
1456
1457 * random.c (vector_scale, vector_scale_x): Renamed former to the
1458 latter, since it modifies its argument.
1459 (vector_scale_x, vector_sum_squares, scm_random_normal_vector_x):
1460 Do not use scm_universal_vector_length for non-uniform vectors.
1461 Use scm_f64vector_elements to access innards of uniform vectors.
1462
1463 * convert.i.c: Convert srfi-4 style uniform vectors when
1464 requested.
1465 * convert.c (scm_c_scm2chars, scm_c_chars2scm,
1466 scm_c_chars2byvect): Use a s8vector instead of a scm_tc7_byvect.
1467
1468 2004-10-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1469
1470 * numbers.h, numbers.c (scm_i_print_double): New.
1471
1472 * srfi-4.c, srfi-4.h, srfi-4.i.c: New files, initially from
1473 ../srfi/ but heavily modified.
1474 * Makefile.am: Add them in all the right places.
1475 * init.c (scm_init_guile_1): Call scm_init_srfi_4.
1476 * read.c (scm_lreadr): Call scm_i_read_homogenous_vector for '#f',
1477 '#u', and '#s'.
1478
1479 * read.h, read.c (scm_i_input_error): Renamed from scm_input_error
1480 and made non-static. Changed all uses.
1481
1482 2004-10-22 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1483
1484 * variable.c, threads.c, struct.c, stackchk.c, smob.c, root.c,
1485 print.c, ports.c, mallocs.c, hooks.c, hashtab.c, fports.c,
1486 guardians.c, filesys.c, coop-pthreads.c, continuations.c: Use
1487 scm_uintprint to print unsigned integers, raw heap words, and
1488 adresses, using a cast to scm_t_bits to turn pointers into
1489 integers.
1490
1491 * unif.c: Include "libguile/print.h".
1492
1493 * numbers.h, numbers.c (SCM_T_INTBUFLEN): Increased to cover
1494 scm_t_intmax values.
1495 (scm_uint2str): New, for scm_t_uintmax.
1496 (scm_iint2str): Argument type changed to scm_t_intmax,
1497 reimplemented in terms of scm_uint2str.
1498
1499 * print.c, print.h (scm_uintprint): New, for printing
1500 scm_t_uintmax values.
1501 (scm_intprint): Argument type changed to scm_t_intmax.
1502
1503 * sort.c (quicksort, scm_merge, scm_merge_list_x,
1504 scm_merge_list_step, scm_merge_vector_step): Inserted SCM_TICKs at
1505 strategic places so that the loops can be interrupted.
1506
1507 * Makefile.am (INCLUDES): Use @LTDLINC@ instead of
1508 "-I$(top_srcdir)/libguile-ltdl".
1509 (libguile_la_LIBADD): Use @LIBLTDL@ instead of
1510 "../libguile-ltdl/libguile-ltdl.a".
1511
1512 * guile.c, dynl.c: Switched to using libltdl directly. Replaced
1513 all references to scm_lt_* with just lt_*. Include <ltdl.h>
1514 instead of <libguile-ltdl.h>.
1515
1516 2004-10-20 Marius Vollmer <mvo@zagadka.de>
1517
1518 * sort.c (quicksort): Copy pivot out of the array while
1519 constructing the partitions; it could get overwritten otherwise.
1520 Because of the ultimate insertion sort, this bug did not cause
1521 quicksort to fail, it just put all the burdon on the insertion
1522 sort and was thus very slow. Thanks to Rolan Orre for reporting
1523 the slowness!
1524
1525 2004-10-19 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1526
1527 * numbers.c (scm_i_range_error): New.
1528 * conv-integer.i.c, conv-uinteger.i.c: Use it instead of
1529 scm_out_of_range.
1530
1531 * sort.c (scm_restricted_vector_sort_x): Validate startpos <=
1532 endpos. State inclusiveness/exclusiveness of bounds in docstring.
1533
1534 * unif.c (scm_array_p): When no prototype is given, explicitely
1535 test for allowable types, do not simply return true. Thanks to
1536 Roland Orre for reporting this!
1537
1538 * private-gc.h (SCM_DEFAULT_MAX_SEGMENT_SIZE): Increase to 20 Mib.
1539
1540 * gc-segment.c (scm_i_get_new_heap_segment): Limit size of new
1541 segment to scm_max_segment_size.
1542
1543 2004-10-08 Han-Wen Nienhuys <hanwen@xs4all.nl>
1544
1545 * gc.c (scm_igc): put scm_gc_running-- before running hooks.
1546
1547 * inline.h (scm_double_cell): abort if GC running.
1548 (scm_cell): idem.
1549
1550 2004-10-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1551
1552 * error.c (scm_wrong_type_arg): Do not talk about "argument" for
1553 pos == 0.
1554
1555 Keywords no longer store a 'dash symbol'. Instead, they store a
1556 symbol with their real name.
1557
1558 * keywords.h, keywords.c, deprecated.h, deprecated.c
1559 (SCM_KEYWORDP, SCM_KEYWORDSYM): Deprecated and implemented in
1560 terms of scm_is_keyword and scm_keyword_dash_symbol.
1561
1562 * keywords.h, keywords.c, discouraged.h, discouraged.c
1563 (scm_make_keyword_from_dash_symbol, scm_keyword_dash_symbol,
1564 scm_c_make_keyword): Discouraged.
1565
1566 * keywords.h, keywords.c (scm_symbol_to_keyword,
1567 scm_keyword_to_symbol): Implemented in C.
1568 (scm_is_keyword, scm_from_locale_keyword,
1569 scm_from_locale_keywordn): New.
1570
1571 * goops.c: Replaced SCM_KEYWORDP with scm_is_keyword.
1572
1573 * snarf.h (SCM_KEYWORD, SCM_GLOBAL_KEYWORD): Use
1574 scm_from_locale_keyword instead of scm_c_make_keyword.
1575
1576 * keywords.c (scm_symbol_to_keyword): Use SCM_ASSERT_TYPE for a
1577 better error message.
1578
1579 * deprecated.c: Include discouraged.h and keywords.h.
1580
1581 * read.c (scm_lreadr): Simply do (symbol->keyword (read)) after
1582 reading '#:' or ':'. See NEWS for consequences.
1583
1584 2004-09-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1585
1586 * read.c (scm_lreadr): Revert change from 2004-09-22: string
1587 literals are now read-write again (until SCM_STRING_CHARS is
1588 removed).
1589
1590 * strings.c (SCM_STRING_CHARS): Explicitely reject read-only
1591 strings with an error message that blames SCM_STRING_CHARS.
1592
1593 * options.c (change_option_setting): Use scm_car instead of
1594 explicit type check plus SCM_CAR.
1595
1596 * print.h, print.c (SCM_PRINT_HIGHLIGHT_PREFIX,
1597 SCM_PRINT_HIGHLIGHT_SUFFIX): New printer options.
1598 (scm_iprin1): Use them instead of the previoulsy hardcoded
1599 strings.
1600 (scm_init_print): Initialize them.
1601
1602 * backtrace.c (display_frame_expr): Do not remove control
1603 characters from the final string. Print it directly using
1604 scm_display.
1605
1606 * ramap.c (scm_array_equal_p): Include scm_tc7_svect in switch.
1607 Thanks to Roland Orre!
1608
1609 2004-09-29 Kevin Ryde <user42@zip.com.au>
1610
1611 * regex-posix.c (scm_regexp_exec): Correction to last change, should
1612 be whole original string in match struct, not offsetted substring.
1613
1614 2004-09-24 Han-Wen Nienhuys <hanwen@xs4all.nl>
1615
1616 * gc.c (scm_gc_unprotect_object): abort if called during GC.
1617
1618 2004-09-24 Marius Vollmer <mvo@zagadka.de>
1619
1620 * Makefile.am (EXTRA_DIST): Added gettext.h.
1621
1622 * smob.c, smob.h (scm_assert_smob_type): New.
1623
1624 * Makefile.am (guile_CFLAGS, guile_LDFLAGS, libguile_la_CFLAGS):
1625 Include GUILE_CFLAGS.
1626 (libguile_la_LIBADD): Removed THREAD_LIBS_LOCAL, which is unused
1627 now.
1628 (libpath.h): Put GUILE_CFLAGS in the build-info.
1629
1630 2004-09-23 Marius Vollmer <mvo@zagadka.de>
1631
1632 * print.h (scm_print_state): Added highlight_objects.
1633 * print.c (make_print_state, scm_free_print_state): Initialize it
1634 to SCM_EOL.
1635 (scm_iprin1): Wrap output in '{...}' when object is contained in
1636 highlight_objects.
1637
1638 * backtrace.h, backtrace.c (scm_display_backtrace_with_highlights,
1639 scm_backtrace_with_highlights): New. Set highlight_objects of
1640 printstate.
1641
1642 * error.c (scm_error_scm): Document new meaning of data/rest
1643 argument for out-of-range and wrong-type-arg errors.
1644 (scm_out_of_range, scm_out_of_range_pos, scm_wrong_type_arg,
1645 scm_wrong_type_arg_msg): Pass bad_value in rest argument of
1646 exception so that it gets highlighted in the backtrace.
1647 Don't talk about "argument" when not giving a position.
1648
1649 * throw.c (handler_message): The rest argument is the fourth
1650 argument, not everything after the third. Call
1651 scm_display_backtrace_with_highlights, passing the rest argument
1652 when appropriate.
1653
1654 2004-09-22 Marius Vollmer <mvo@zagadka.de>
1655
1656 From Jan Nieuwenhuizen <janneke@gnu.org> and Bruno Haible
1657 <bruno@clisp.org>:
1658
1659 * i18n.c: Handle --disable-nls (thanks Bruno).
1660
1661 * posix.c (scm_init_posix): Add LC_PAPER, LC_NAME, LC_ADDRESS,
1662 LC_TELEPHONE, LC_MEASUREMENT, LC_IDENTIFICATION.
1663
1664 * i18n.c (scm_i_to_lc_category): New name and export. Support all
1665 LC categories.
1666 * posix.c (scm_setlocale): Use it.
1667
1668 * i18n.h, i18n.c (scm_textdomain, scm_bindtextdomain,
1669 scm_bind_textdomain_codeset): Make wrappers similar to C function
1670 they wrap.
1671
1672 * i18n.h: New file.
1673 * i18n.c: New file.
1674 * gettext.h: New file, taken from GNU gettext.
1675 * init.c: Include libguile/i18n.h.
1676 (scm_init_guile_1): Add call to scm_init_i18n().
1677 * Makefile.am (libguile_la_SOURCES): Add i18n.c.
1678 (DOT_X_FILES): Add i18n.x.
1679 (DOT_DOC_FILES): Add i18n.doc.
1680 (libguile_la_LDFLAGS): Add @LTLIBINTL@.
1681 (modinclude_HEADERS): Add i18n.h.
1682
1683 2004-09-22 Marius Vollmer <mvo@zagadka.de>
1684
1685 * gh_list.c: Replaced SCM_CAR, etc with scm_car, etc.
1686
1687 * discouraged.h, tags.h (SCM_CONSP, SCM_NCONSP): Moved to
1688 discouraged.h. Replaced all uses with scm_is_pair.
1689 (SCM_I_CONSP): New name for SCM_CONSP.
1690
1691 * pairs.h, pairs.c (scm_is_pair, scm_is_null, scm_car, scm_cdr,
1692 scm_i_chase_pairs, SCM_I_A_PAT, SCM_I_D_PAT, etc, scm_caar,
1693 scm_cadr, etc): New.
1694 (SCM_NULLP, SCM_NNULLP): Moved to discouraged.h. Replaced all
1695 uses with scm_is_null.
1696
1697 * eval.c (scm_eval, scm_apply, call_cxr_1): Use scm_i_chase_pairs
1698 instead of explicit code.
1699
1700 2004-09-22 Marius Vollmer <mvo@zagadka.de>
1701
1702 * srfi-13.c (scm_string_contains, scm_string_contains_ci):
1703 Reworded logic a bit so that #f is returned immediately when s1 is
1704 too short to contain s2.
1705
1706 * regex-posix.c (scm_regexp_exec): Convert string to
1707 zero-terminated locale string before matching against it.
1708
1709 * strings.h, strings.c (scm_substring_read_only,
1710 scm_c_substring_read_only, scm_i_substring_read_only): New.
1711 (RO_STRING_TAG, IS_RO_STRING): New.
1712 (scm_i_string_writable_chars): Bail on read-only strings.
1713
1714 * read.c (scm_lreadr): use scm_c_substring_read_only for string
1715 literals, thus making them read-only as specified by R5RS.
1716
1717 2004-09-22 Marius Vollmer <mvo@zagadka.de>
1718
1719 * eq.c (scm_equal_p): Allow smobs with different flags to be equal
1720 by testing for smobs before insisting on equal SCM_CELL_TYPES.
1721
1722 2004-09-21 Marius Vollmer <mvo@zagadka.de>
1723
1724 * numbers.h, numbers.c: Include <gmp.h> in numbers.h, not in
1725 numbers.c.
1726 (scm_to_mpz, scm_from_mpz): New.
1727 Thanks to Andreas Vögele!
1728
1729 * read.c (skip_scsh_block_comment): Recognize "!#" everywhere, not
1730 just on a line of its own.
1731
1732 * srfi-13.c (scm_string_any, scm_string_every,
1733 scm_string_tabulate, string_upcase_x, string_down_case_x,
1734 string_titlecase_x, string_reverse_x, scm_string_tokenize): Use
1735 size_t instead of int for indices into strings. Make sure that no
1736 over- or underflow occurs. Thanks to Andreas Vögele!
1737 (scm_xsubstring, scm_string_xcopy_x): Use ints for 'extended'
1738 indices, which can also be negative.
1739
1740 2004-09-20 Marius Vollmer <mvo@zagadka.de>
1741
1742 * gc-mark.c (SCM_MARK_BACKING_STORE): Removed, it was unused.
1743
1744 * threads.c (scm_threads_mark_stacks): Call
1745 SCM_MARK_BACKING_STORE. Also, do not use stack_len local, it was
1746 only used once.
1747
1748 2004-09-13 Jan Nieuwenhuizen <janneke@gnu.org>
1749
1750 * srfi-13.c (scm_string_contains, scm_string_contains_ci):
1751 Bugfix: when subtracting unsigned values, make sure that result
1752 does not wrap.
1753
1754 2004-09-09 Kevin Ryde <user42@zip.com.au>
1755
1756 * filesys.c, stime.c (_POSIX_C_SOURCE): Use this only on hpux, it
1757 causes too many problems elsewhere (glibc, freebsd, mingw). Reported
1758 by Andreas Vögele.
1759
1760 2004-09-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1761
1762 * Makefile.am (EXTRA_libguile_la_SOURCES): Removed "alloca.c".
1763
1764 * eq.c (real_eqv): Pretend that all NaNs are equal.
1765
1766 * numbers.c (scm_integer_expt): Do not accept inexact integers.
1767
1768 2004-09-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1769
1770 * srfi-13.c (scm_string_trim_right, scm_string_xcopy_x): Correctly
1771 use size_t for some locals instead of int.
1772
1773 * read.c (scm_flush_ws): Detect "#!"-style comments here.
1774 (scm_lreadr): Abort on seeing "#!", which should no longer happen.
1775 (skip_scsh_block_comment): Use scm_input_error instead of
1776 scm_misc_error in case of EOF.
1777
1778 2004-09-07 Kevin Ryde <user42@zip.com.au>
1779
1780 * numbers.c (scm_integer_expt): Reject exponent +/-inf.
1781 Bug report by Bill Schottstaedt.
1782
1783 * ports.c (scm_getc, scm_lfwrite): Recognise \a \b and \r for port
1784 column.
1785 * ports.h (SCM_ZEROCOL, SCM_DECCOL): New macros.
1786
1787 * posix.c (scm_access): Update docstring per manual.
1788
1789 * posix.c (scm_nice): Correction to error detection. Reported by
1790 Matthias Koeppe.
1791
1792 * stime.c (scm_current_time, scm_gettimeofday, scm_strptime): Don't
1793 throw error before unlocking mutex with SCM_ALLOW_INTS.
1794
1795 2004-09-06 Kevin Ryde <user42@zip.com.au>
1796
1797 * stime.h (SCM_TIME_UNITS_PER_SECOND): Use sysconf(_SC_CLK_TCK) when
1798 available. This also gets around CLK_TCK being absent when
1799 _GNU_SOURCE and _POSIX_C_SOURCE are defined in stime.c.
1800
1801 2004-09-03 Stefan Jahn <stefan@lkcc.org>
1802
1803 * threads.c (scm_threads_mark_stacks): Fixed local variable
1804 definitions.
1805
1806 * strings.c (scm_i_substring_copy, scm_string_append): Fixed
1807 local variable definitions.
1808
1809 * stime.c (_POSIX_C_SOURCE): Do not define this item on
1810 MinGW32 because it conflicts with its pthread headers.
1811 (scm_mktime): Consider the HAVE_STRUCT_TM_TM_ZONE define.
1812 (scm_strftime): Using scm_from_locale_string() instead of
1813 scm_makfrom0str().
1814
1815 * posix.c (scm_putenv): Fixed typo in the !HAVE_UNSETENV
1816 part.
1817
1818 * numbers.c (scm_init_numbers): Removed check_sanity() call
1819 inside GUILE_DEBUG. The function has been removed somewhen...
1820
1821 * filesys.c (_POSIX_C_SOURCE): Do not define this item on
1822 MinGW32 because it conflicts with its pthread headers.
1823
1824 2004-08-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1825
1826 * strings.c (SCM_STRINGP): Accept all strings.
1827 (SCM_STRING_CHARS): Reject shared substrings here.
1828
1829 * script.c (scm_compile_shell_switches): Added 2003 and 2004 to
1830 the Copyright years.
1831
1832 2004-08-27 Kevin Ryde <user42@zip.com.au>
1833
1834 * socket.c (scm_fill_sockaddr): Use HAVE_STRUCT_SOCKADDR_SIN_LEN and
1835 HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN for sockaddr fields, SIN_LEN and
1836 SIN_LEN6 are not defined on all systems. Reported by Michael Tuexen.
1837
1838 2004-08-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1839
1840 * strings.h, strings.c (scm_i_make_symbol): Added FLAGS parameter.
1841 * symbols.h, symbols.c (SCM_I_F_SYMBOL_UNINTERNED,
1842 scm_i_symbol_is_interned, scm_i_mem2symbol,
1843 scm_i_mem2uninternedsymbol): Use it to store uninternedness flag.
1844
1845 2004-08-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1846
1847 * srfi-13.c: First cut at thread-safeness and proper use of
1848 scm_i_string_chars et al. Copious scm_remember_upto_heres have
1849 been inserted. Made sure that no internal string pointer is used
1850 across a SCM_TICK or a possible GC.
1851
1852 * script.c (scm_compile_shell_switches): Use
1853 scm_from_locale_string instead of scm_makfrom0str.
1854
1855 * srfi-13.c (scm_string_rindex): Export to Scheme, as it has
1856 always been.
1857
1858 2004-08-25 Marius Vollmer <mvo@zagadka.de>
1859
1860 Moved SRFI-13 and SRFI-14 into the core, taking over the role of
1861 strop.c.
1862
1863 * srfi-13.c, srfi-13.h, srfi-14.c, srfi-14.h: New files.
1864 * strop.h, strop.c: Removed, they are now empty.
1865 * Makefile.am: Updated for new and removed files.
1866
1867 * symbols.h, symbols.c (scm_string_ci_to_symbol): Moved here, next
1868 to scm_string_to_symbol.
1869
1870 * chars.c (scm_char_alphabetic_p, scm_char_numeric_p,
1871 scm_char_whitespace_p, scm_upper_case_p, scm_lower_case_p,
1872 scm_char_is_both_p): Use scm_char_set_contains_p with the proper
1873 charset instead of libc functions.
1874
1875 * strorder.c (scm_string_equal_p, scm_string_ci_equal_p,
1876 scm_string_less_p, scm_string_leq_p, scm_string_gr_p,
1877 scm_string_geq_p, scm_string_ci_less_p, scm_string_ci_leq_p,
1878 scm_string_ci_gr_p, scm_string_ci_geq_p): Use scm_string_eq, etc
1879 instead of explicit code.
1880
1881 * deprecated.c, load.c, posix.c, unif.c, symbols.c: Include
1882 "srfi-13.h" instead of "strop.h".
1883
1884 * init.c (scm_init_guile_1): Call scm_init_srfi_13 and
1885 scm_init_srfi_14. Do not call scm_init_strop.
1886
1887 2004-08-24 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1888
1889 * numbers.c (scm_inf_p): Synced docstring back from manual.
1890
1891 2004-08-22 Marius Vollmer <mvo@zagadka.de>
1892
1893 * strings.c (get_str_buf_start): New helper function.
1894 (scm_i_substring, scm_i_substring_copy, scm_i_substring_shared,
1895 scm_i_string_char, scm_i_string_writable_chars): Use it.
1896 (scm_i_substring_copy): Make START argument optional for C
1897 callers, for upcoming SRFI-13 integration.
1898
1899 2004-08-21 Marius Vollmer <mvo@zagadka.de>
1900
1901 From Richard Todd, Thanks!
1902
1903 * script.c (scm_compile_shell_switches): added '-L' switch to add
1904 to the %load-path.
1905
1906 2004-08-21 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
1907
1908 * eval.c (unmemoize_exprs): When dropping internal body markers
1909 from the output during unmemoization, also drop those that are not
1910 immediately at the beginning of a body.
1911
1912 2004-08-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1913
1914 * eval.c (scm_lookupcar1): Report "Variable used before given a
1915 value" insetad of an "Unbound" one for variables that are found
1916 but still contain SCM_UNDEFINED.
1917
1918 * posix.c (scm_mkstemp): Correction to the correction, mkstemp
1919 expects a null-terminated string in the locale encoding, but
1920 scm_i_string_writable_chars doesn't give that. Fixed by letting
1921 mkstemp modify a locale version of the tmpl argument and copying
1922 the result back into tmpl.
1923
1924 * strop.c (scm_substring_move_x): Store into str2, not str1.
1925
1926 2004-08-20 Kevin Ryde <user42@zip.com.au>
1927
1928 * posix.c (scm_mkstemp): Correction to new locale_string stuff, need
1929 to modify the input string.
1930
1931 2004-08-19 Marius Vollmer <mvo@zagadka.de>
1932
1933 * deprecated.c (SCM_SYMBOL_CHARS): Cast away const in return.
1934 (SCM_SYMBOL_LENGTH): It's scm_i_symbol_length, not
1935 scm_c_symbol_length.
1936
1937 2004-08-19 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1938
1939 New string implementation, with copy-on-write strings and
1940 mutation-sharing substrings, and a new internal string API.
1941 Symbols can now share memory with strings.
1942
1943 * tags.h (scm_tc7_stringbuf): New tag.
1944
1945 * strings.h, strings.c: (scm_i_string_chars, scm_i_string_length,
1946 scm_i_string_writable_chars, scm_i_string_stop_writing): New, to
1947 replace SCM_I_STRING_CHARS and SCM_I_STRING_LENGTH. Updated all
1948 uses.
1949 (scm_i_make_string, scm_c_make_string): New, to replace
1950 scm_allocate_string. Updated all uses.
1951 (SCM_STRINGP, SCM_STRING_CHARS, SCM_STRING_UCHARS,
1952 SCM_STRING_LENGTH): Deprecated.
1953 (scm_allocate_string, scm_take_str, scm_take0str, scm_mem2string,
1954 scm_str2string, scm_makfrom0str, scm_makfrom0str_opt):
1955 Discouraged. Replaced all uses with scm_from_locale_string or
1956 similar, as appropriate.
1957 (scm_c_string_length, scm_c_string_ref, scm_c_string_set_x,
1958 scm_c_substring, scm_c_substring_shared, scm_c_substring_copy,
1959 scm_substring_shared, scm_substring_copy): New.
1960
1961 * symbols.c, symbols.h (SCM_SYMBOLP, SCM_SYMBOL_FUNC,
1962 SCM_SET_SYMBOL_FUNC, SCM_SYMBOL_PROPS, SCM_SET_SYMBOL_PROPS,
1963 SCM_SYMBOL_HASH, SCM_SYMBOL_INTERNED_P, scm_mem2symbol,
1964 scm_str2symbol, scm_mem2uninterned_symbol): Discouraged.
1965 (SCM_SYMBOL_LENGTH, SCM_SYMBOL_CHARS, scm_c_symbol2str):
1966 Deprecated.
1967 (SCM_MAKE_SYMBOL_TAG, SCM_SET_SYMBOL_LENGTH, SCM_SET_SYMBOL_CHARS,
1968 SCM_PROP_SLOTS, SCM_SET_PROP_SLOTS): Removed.
1969 (scm_is_symbol, scm_from_locale_symbol, scm_from_locale_symboln):
1970 New, to replace scm_str2symbol and scm_mem2symbol, respectively.
1971 Updated all uses.
1972 (scm_gensym): Generate only the number suffix in the buffer, just
1973 string-append the prefix.
1974
1975 * error.c (scm_memory_error): Do not try to throw, just abort.
1976 Throwing will not work anyway.
1977
1978 * gh.h, gh-data.c (gh_set_substr): Made src const.
1979
1980 * ports.c (scm_i_mode_bits_n): New, for counted strings.
1981 (scm_mode_bits): Use it.
1982 (scm_c_port_for_each): Blocking GC does not seem to work, allocate
1983 a vector normally and fill that instead of consing a list with a
1984 blocked GC.
1985
1986 * read.c (scm_i_casei_streq): New, for counted strings.
1987
1988 * threads.c (gc_section_count): Removed, thread-sleeping can not
1989 be nested.
1990 (scm_i_thread_put_to_sleep): Call scm_i_leave_guile before locking
1991 admin mutex so that we can be put to sleep by other threads while
1992 blocking on that mutex. Lock all the heap mutex of all threads,
1993 including ourselves.
1994 (scm_i_thread_wake_up): Unlock all threads, including ourselves,
1995 call scm_i_enter_guile.
1996 (scm_thread_mark_stacks): Expect all threads to be suspended.
1997
1998 * gc.h, gc.c (scm_i_gc_admin_mutex): New, to protect
1999 scm_gc_mallocated, for now.
2000 (scm_init_storage): Initialize it.
2001 * gc-malloc.c (descrease_mtrigger, increase_mtrigger): Use it.
2002
2003 * gc-mark.c (scm_gc_mark_dependencies): Call scm_i_string_mark,
2004 scm_i_stringbuf_mark and scm_i_symbol_mark, as appropriate.
2005 * gc-card.c (scm_i_sweep_card): Call scm_i_string_free,
2006 scm_i_stringbuf_free and scm_i_symbol_free, as appropriate.
2007
2008 * strop.c (scm_string_copy): Use scm_c_substring to get a
2009 copy-on-write string.
2010
2011 2004-08-18 Kevin Ryde <user42@zip.com.au>
2012
2013 * arbiters.c (FETCH_STORE): New macro.
2014 (SCM_LOCK_VAL, SCM_UNLOCK_VAL): New constants.
2015 (SCM_LOCK_ARB, SCM_UNLOCK_ARB): Remove, effectively absorbed into
2016 scm_try_arbiter and scm_release_arbiter.
2017 (scm_try_arbiter, scm_release_arbiter): Use FETCH_STORE to get xchg
2018 for speed on i386, otherwise using mutex.
2019
2020 * eq.c (scm_equal_p): Remove real==fraction and fraction==real, they
2021 must be #f according to R5RS. (equal? follows eqv?, and for eqv? an
2022 exact and inexact is #f.)
2023
2024 * fports.c (fport_print): Use scm_ttyname instead of ttyname directly,
2025 to get thread safety of scm_ttyname.
2026
2027 * ports.c (ttyname): Remove prototype, unused.
2028
2029 * socket.c (scm_init_socket): Add SOCK_SEQPACKET and SOCK_RDM.
2030 Reported by Michael Tuexen.
2031
2032 2004-08-13 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2033
2034 * load.c (scm_init_load_path): Do not pass NULL to
2035 scm_to_locale_string, which would happen when GUILE_LOAD_PATH is
2036 not set. Thanks to Bill Schottstaedt.
2037
2038 2004-08-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2039
2040 * socket.c (scm_inet_aton, scm_inet_pton): Convert SCM strings to
2041 locale strings instead of accessing their internals.
2042 (scm_recv, scm_send, scm_recvfrom, scm_sendto): Use
2043 SCM_I_STRING_CHARS and SCM_I_STRING_LENGTH instead of
2044 SCM_STRING_CHARS and SCM_STRING_LENGTH.
2045
2046 * simpos.c (scm_system): Convert SCM strings to locale strings
2047 instead of accessing their internals.
2048
2049 * script.c (scm_compile_shell_switches): Convert version to locale
2050 string before printing it.
2051
2052 * rdelim.c (scm_read_delimited_x): Avoid
2053 SCM_VALIDATE_SUBSTRING_SPEC_COPY and use scm_from_size_t instead
2054 of scm_from_long for the returned number of read characters.
2055
2056 * ioext.c (scm_fdopen): Use scm_i_fdes_to_port together with
2057 scm_i_mode_bits to avoid accessing internals of SCM string from C.
2058
2059 * filesys.c (STRING_SYSCALL, STRING2_SYSCALL): New helper macros.
2060 Use them instead of SCM_SYSCALL when one or two strings need to be
2061 converted into locale strings.
2062 (my_rename): New, gathers platform dependent code for renaming.
2063 (scm_rename): Use it.
2064 (scm_readlink, scm_copy_file): Convert SCM strings to locale
2065 strings instead of accessing their internals.
2066 (scm_basename, scm_dirname): Use SCM_I_STRING_CHARS and
2067 SCM_I_STRING_LENGTH instead of SCM_STRING_CHARS and
2068 SCM_STRING_LENGTH.
2069
2070 * extensions.c (load_extension): Convert lib and init to locale
2071 strings instead of accessing the internals directly.
2072 (scm_c_load_extension): Use scm_from_locale_string instead of
2073 scm_makfrom0str.
2074
2075 * fports.h, fports.c (scm_i_fdes_to_port): New, like
2076 scm_fdes_to_port, but take mode bits directly instead of as a C
2077 string.
2078 (scm_i_fdes_to_port): Implement using above.
2079 (scm_open_file): Use scm_i_fdes_to_port together with
2080 scm_i_mode_bits to avoid accessing internals of SCM string from C.
2081 * vports.c (scm_make_soft_port): Use scm_i_fdes_to_port together
2082 with scm_i_mode_bits to avoid accessing internals of SCM string
2083 from C.
2084
2085 * ports.h (scm_i_mode_bits): New, same as scm_mode_bits but with a
2086 SCM string as argument.
2087
2088 * ports.c (scm_i_void_port): New, like scm_void_port but take mode
2089 bits directly instead of C string.
2090 (scm_void_port): Implement using above.
2091 (scm_sys_make_void_port): Use scm_i_void_port together with
2092 scm_i_mode_bits to avoid accessing internals of SCM string.
2093
2094 * strings.h, strings.c (scm_i_get_substring_spec): New.
2095
2096 * socket.c, rw.c, deprecated.h, validate.h
2097 (SCM_VALIDATE_STRING_COPY): Deprecated. Replaced all uses with
2098 SCM_VALIDATE_STRING plus SCM_I_STRING_CHARS or
2099 scm_to_locale_string, etc.
2100 (SCM_VALIDATE_SUBSTRING_SPEC_COPY): Deprecated. Replaced as
2101 above, plus scm_i_get_substring_spec.
2102
2103 * regex-posix.c, read.c, random.c, ramap.c, print.c, numbers.c,
2104 hash.c, gc.c, gc-card.c, convert.i.c, backtrace.c, strop.c,
2105 strorder.c, strports.c, struct.c, symbols.c, unif.c, ports.c: Use
2106 SCM_I_STRING_CHARS, SCM_I_STRING_UCHARS, and SCM_I_STRING_LENGTH
2107 instead of SCM_STRING_CHARS, SCM_STRING_UCHARS, and
2108 SCM_STRING_LENGTH, respectively. Also, replaced scm_return_first
2109 with more explicit scm_remember_upto_here_1, etc, or introduced
2110 them in the first place.
2111
2112 * posix.c (WITH_STRING): New helper macro. Use it where one
2113 locale string is needed for a short piece of code.
2114 (STRING_SYSCALL): New helper macro. Use it instead of SCM_SYSCALL
2115 when one locale string is needed.
2116 (scm_mkstemp): Convert tmpl to a locale string.
2117 (scm_putenv): Rewritten to use only C strings.
2118 (scm_setlocale, scm_crpt): Convert argument strings to locale
2119 strings.
2120
2121 2004-08-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2122
2123 * load.c (scm_primitive_load_path): Do not check for absolute
2124 filenames when scm_sys_search_load_path returns false, which will
2125 return absolute filenames unchanged.
2126
2127 2004-08-11 Marius Vollmer <mvo@zagadka.de>
2128
2129 * gc.c, procprop.c (scm_init_storage, scm_stand_in_procs,
2130 scm_stand_in_proc): Use a hastable for scm_stand_in_procs instead
2131 of an alist. Thanks to Matthias Koeppe!
2132
2133 2004-08-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2134
2135 * strings.h, deprecated.h (SCM_STRING_COERCE_0TERMINATION_X):
2136 Moved from string.h to deprecated.h.
2137
2138 * deprecated.c, deprecated.h (SCM_CHARS, SCM_LENGTH): Removed.
2139
2140 * strings.h, strings.c (SCM_MAKE_STRING_TAG): Renamed to
2141 SCM_I_MAKE_STRING_TAG, changed all uses.
2142 (SCM_STRING_CHARS, SCM_STRING_UCHARS, SCM_STRING_LENGTH): Renamed
2143 to SCM_I_STRING_CHARS, SCM_I_STRING_UCHARS, and SCM_I_LENGTH
2144 respectively. For a short time, the old names are still there as
2145 aliases. Not all uses have been changed yet, but the ones in
2146 strings.c have.
2147 (SCM_STRING_MAX_LEN): Do not hardcode to 24 bits, compute from
2148 SCM_T_BITS_MAX.
2149 (scm_is_string, scm_from_locale_string, scm_from_locale_stringn,
2150 scm_take_locale_string, scm_take_locale_stringn,
2151 scm_to_locale_string, scm_to_locale_stringn,
2152 scm_to_locale_stringbuf): New.
2153 (scm_c_string2str, scm_c_substring2str): Deprecated by moving to
2154 deprecated.[hc]. Implemented in terms of the new functions above.
2155 (scm_take_str, scm_take0str, scm_mem2string, scm_str2string,
2156 scm_makfrom0str): Reimplemented in terms of the new functions from
2157 above. They will be discouraged shortly.
2158 (scm_substring): Do not use scm_mem2string.
2159 (scm_i_allocate_string_pointers, scm_i_free_string_pointers): New,
2160 to replace similar code from posix.c, simpos.c, and dynl.c.
2161 (scm_string_append): Use memcpy instead of explicit loop. Do not
2162 use register keyword. Use plain 'char' instead of 'unsigned
2163 char'.
2164
2165 * strports.c (scm_mkstrport): Use SCM_I_STRING_UCHARS instead of
2166 SCM_STRING_UCHARS. Use SCM_I_STRINGP instead of SCM_STRINGP.
2167
2168 * strop.c (scm_i_index): Replaced SCM_STRINGP, SCM_STRING_CHARS,
2169 and SCM_STRING_LENGTH with SCM_I_STRINGP, SCM_I_STRING_CHARS, and
2170 SCM_I_STRING_LENGTH, respectively. Pass string object directly,
2171 not as a pointer. Use scm_remember_upto_here_1 to protect it.
2172
2173 * read.c (scm_input_error): Use a SCM value for 'fn', not a C
2174 string. This avoids a conversion round-trip.
2175
2176 * gh_data.c: Replaced SCM_STRINGP, SCM_STRING_CHARS, and
2177 SCM_STRING_LENGTH with SCM_I_STRINGP, SCM_I_STRING_CHARS, and
2178 SCM_I_STRING_LENGTH, respectively.
2179 (gh_scm2newstr): Implement in terms of scm_to_locale_string.
2180
2181 * environments.c: Instead calling scm_puts on the SCM_STRING_CHARS
2182 of a string, call scm_display on the string itself.
2183
2184 * dynwind.c, dynwind.h (scm_frame_free): New.
2185
2186 * stime.c, socket.c, simpos.c, procs.c, posix.c, ports.c,
2187 net_db.c, fports.c, filesys.c, eval.c, deprecation.c, dynl.c:
2188 Replaced uses of SCM_STRING_CHARS with proper uses of
2189 scm_to_locale_string. Replaced SCM_STRINGP with scm_is_string.
2190 Replaced scm_mem2string with scm_from_locale_string.
2191
2192 * simpos.c, posix.c (allocate_string_pointers, environ_list_to_c):
2193 Removed, replaced all uses with scm_i_allocate_string_pointers.
2194
2195 * load.h, load.c (scm_internal_parse_path): Removed.
2196 (scm_parse_path): Use scm_string_split to do the work.
2197 (scm_init_load_path): Use scm_parse_path instead of
2198 scm_internal_parse_path.
2199 (scm_search_path): Rewritten string handling part of the code in
2200 terms of scm_to_locale_stringbuf and so that it is thread safe.
2201
2202 * error.c (scm_error_scm): Throw directly instead of calling
2203 scm_error, this avoids the back and forth conversion of SUBR and
2204 MESSAGE and also plugs a memory leak.
2205 (scm_error): Call scm_error_scm.
2206
2207 * backtrace.c: Replaced SCM_STRINGP with scm_is_string.
2208 (display_header): Print FNAME when it is true, not
2209 merely when it is a string.
2210
2211 * strings.h (SCM_SET_STRING_LENGTH, SCM_SET_STRING_CHARS): Removed
2212 unceremoniously. They were unused by Guile itself, and external
2213 use should stop immediately.
2214
2215
2216 2004-08-10 Marius Vollmer <mvo@zagadka.de>
2217
2218 * numbers.h, number.c, deprecated.h, deprecated.c (scm_round,
2219 scm_truncate): Renamed to scm_c_round and scm_c_truncate;
2220 deprecated versions installed in deprecated.h and deprecated.c.
2221 Changed all uses.
2222
2223 2004-08-06 Rob Browning <rlb@defaultvalue.org>
2224
2225 * net_db.c (scm_resolv_error): don't cause an exception while
2226 trying to throw an exception -- call scm_misc_error with correct
2227 arguments. The previous arguments needed a format escape that
2228 wasn't in any of the format strings.
2229
2230 2004-08-06 Kevin Ryde <user42@zip.com.au>
2231
2232 * ramap.c (scm_array_fill_x): For byvect char fill, force signed char
2233 so as not to depend on signedness of plain char. For byvect range
2234 check, throw out-of-range rather than wrong-type-arg.
2235
2236 * unif.c (scm_uniform_vector_ref, scm_array_set_x): For byvect, force
2237 signed byte range checks by using scm_to_schar and scm_from_schar,
2238 don't want to depend on signedness of C char.
2239
2240 2004-08-05 Kevin Ryde <user42@zip.com.au>
2241
2242 * arbiters.c (scm_try_arbiter): Use scm_i_misc_mutex instead of
2243 SCM_DEFER_INTS.
2244 (scm_release_arbiter): Use scm_i_misc_mutex so return value can be
2245 guaranteed if multiple threads compete to unlock.
2246 Update docstrings per doc/ref/api-scheduling.texi.
2247
2248 * filesys.c (scm_copy_file): Use fstat on the input fd rather than
2249 stat on the filename, to be certain a file rename can't mean we get
2250 info on one filesystem object but open another. This fstat usage is
2251 similar to Emacs copy-file.
2252
2253 * posix.c (scm_setgroups): Enhance docstring, per doc/ref/posix.texi.
2254
2255 * simpos.c (scm_system_star): Change scm_from_long to scm_from_int on
2256 SIGINT and SIGQUIT, since those values are ints.
2257
2258 2004-08-03 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2259
2260 * num2integral.i.c, num2float.i.c: Removed.
2261 * Makefile.am (noinst_HEADERS): Updated.
2262
2263 * numbers.h. numbers.c (scm_make_ratio): Renamed to
2264 scm_i_make_ratio and made static, replaced uses with scm_divide.
2265 (scm_complex_p): New, export as "complex?" to Scheme.
2266 (scm_number_p): Export as "number?" to Scheme.
2267 (scm_is_complex, scm_is_number): New.
2268 (scm_c_make_rectangular, scm_c_make_polar): New.
2269 (scm_make_rectangular, scm_make_polar): Use above.
2270 (scm_c_real_part, scm_c_imag_part, scm_c_magnitude, scm_c_angle):
2271 New.
2272 (scm_make_complex): Discouraged by moving to discouraged.h and
2273 discouraged.c. Replaced all uses with scm_c_make_rectangular.
2274
2275 * discouraged.h, discouraged.c, numbers.c, numbers.h
2276 (scm_is_rational): New.
2277 (scm_i_short2big, scm_i_int2big, scm_i_uint2big, scm_i_size2big,
2278 scm_i_ptrdiff2big, scm_i_long_long2big, scm_i_ulong_long2big):
2279 Removed prototypes.
2280 (scm_make_real, scm_num2dbl, scm_float2num, scm_double2num):
2281 Discouraged by moving to discouraged.h and discouraged.c.
2282 Replaced all uses with scm_from_double.
2283 (scm_num2float, scm_num2double): Discouraged by moving prototype
2284 to discouraged.h and rewriting in terms of scm_to_double.
2285 Replaced all uses with scm_to_double.
2286 (scm_to_double): Do not implement in terms of scm_num2dbl, use
2287 explicit code.
2288 (scm_from_double): Do not implement in terms of scm_make_real, use
2289 explicit code.
2290
2291 2004-08-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2292
2293 * init.c (scm_init_guile_1): Call scm_i_init_discouraged.
2294
2295 * gen-scmconfig.h.in (SCM_I_GSC_ENABLE_DISCOURAGED): New.
2296 * gen-scmconfig.c (SCM_ENABLE_DISCOURAGED): Emit based on above.
2297
2298 * eval.c (SCM_EVALIM, SCM_EVALIM2, SCM_XEVAL, SCM_XEVALCAR):
2299 Renamed to SCM_I_* in order to avoid collisions with the versions
2300 defined in deprecated.h.
2301
2302 * discouraged.h, discouraged.c: New files.
2303
2304 * deprecated.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_EQ_P,
2305 SCM_NEGATE_BOOL, SCM_BOOL, SCM_BOOT_NOT): Promoted from being
2306 deprecated to being discouraged by moving to discouraged.h.
2307
2308 * numbers.h, numbers.c, discouraged.h, discouraged.c
2309 (scm_short2num, scm_ushort2num, scm_int2num, scm_uint2num,
2310 scm_long2num, scm_ulong2num, scm_size2num, scm_ptrdiff2num,
2311 scm_num2short, scm_num2ushort, scm_num2int, scm_num2uint,
2312 scm_num2long, scm_num2ulong, scm_num2size, scm_num2ptrdiff,
2313 scm_long_long2num, scm_ulong_long2num, scm_num2long_long,
2314 scm_num2ulong_long): Discouraged by moving to discouraged.h and
2315 discouraged.c and reimplementing in terms of scm_from_* and
2316 scm_to_*. Changed all uses to the new scm_from_* and scm_to_*
2317 functions.
2318
2319 * numbers.h, numbers.c: Removed GUILE_DEBUG code.
2320 (scm_i_short2big, scm_i_ushort2big, scm_i_int2big, scm_i_uint2big,
2321 scm_i_size2big, scm_i_ptrdiff2big): Removed.
2322 (scm_i_long2big, scm_i_ulong2big): New, explicit definitions.
2323 * conv-integer.i.c, conv-uinteger.i.c: Use them instead of
2324 explicit code.
2325
2326 2004-08-02 Kevin Ryde <user42@zip.com.au>
2327
2328 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Add comments about past
2329 and current usage and migration.
2330
2331 2004-07-31 Kevin Ryde <user42@zip.com.au>
2332
2333 * error.c (scm_strerror): Use scm_i_misc_mutex around strerror since
2334 it's not thread safe.
2335 (scm_syserror): Use scm_strerror rather than SCM_I_STRERROR, to take
2336 advantage of this.
2337 * fports.c (scm_open_file): Use scm_strerror likewise.
2338 * filesys.c (scm_stat, scm_lstat): Ditto.
2339
2340 * filesys.c (scm_copy_file): Avoid fd leak when destination file
2341 cannot be opened.
2342
2343 * symbols.c (scm_gensym): Use scm_i_misc_mutex around gensym_counter
2344 update, for thread safety.
2345 (gensym_counter): Move into scm_gensym which is its only user.
2346 (scm_init_symbols): No need to explicitly initialize gensym_counter.
2347
2348 2004-07-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2349
2350 * numbers.h (scm_to_schar, scm_to_uchar, scm_to_char,
2351 scm_to_short, scm_to_ushort, scm_to_int, scm_to_uint, scm_to_long,
2352 scm_to_ulong, scm_to_long_long, scm_to_ulong_long, scm_to_intmax,
2353 scm_to_uintmax, scm_to_size_t, scm_to_ssize_t scm_from_schar,
2354 scm_from_uchar, scm_from_char, scm_from_short, scm_from_ushort,
2355 scm_from_int, scm_from_uint, scm_from_long, scm_from_ulong,
2356 scm_from_long_long, scm_from_ulong_long, scm_from_intmax,
2357 scm_from_uintmax, scm_from_size_t, scm_from_ssize_t): No longer
2358 defined in terms of scm_to_signed_integer, etc, but in terms of
2359 scm_to_int8, etc.
2360
2361 * gen-scmconfig.c (SCM_SIZEOF_INTMAX, SCM_SIZEOF_SIZE_T): New.
2362
2363 * gen-scmconfig.h.in: Removed SCM_I_GSC_*_LIMITS macros, they are
2364 no longer used.
2365
2366 * __scm.h (SCM_I_UTYPE_MAX, SCM_I_TYPE_MAX, SCM_I_TYPE_MIN,
2367 SCM_I_SIZE_MAX, SCM_I_SSIZE_MIN, SCM_I_SSIZE_MAX): New.
2368
2369 * __scm.h, gen-scmconfig.c (SCM_I_LLONG_MAX, SCM_I_LLONG_MIN,
2370 SCM_I_ULLONG_MAX, SCM_T_INT8_MIN, SCM_T_INT8_MAX, SCM_T_UINT8_MAX,
2371 SCM_T_INT16_MIN, SCM_T_INT16_MAX, SCM_T_UINT16_MAX,
2372 SCM_T_INT32_MIN, SCM_T_INT32_MAX, SCM_T_UINT32_MAX,
2373 SCM_T_INT64_MIN, SCM_T_INT64_MAX, SCM_T_UINT64_MAX,
2374 SCM_T_INTMAX_MIN, SCM_T_INTMAX_MAX, SCM_T_UINTMAX_MAX): Moved
2375 definition into __scm.h, using new SCM_I_TYPE_MIN, etc.
2376
2377 * conv-integer.i.c, conv-uinteger.i.c: New files, used to generate
2378 the functions below.
2379
2380 * Makefile.am (noinst_HEADERS): Added conv-integer.i.c and
2381 conv-uinteger.i.c.
2382
2383 * numbers.c, numbers.h (scm_to_int8, scm_to_uint8, scm_to_int16,
2384 scm_to_uint16, scm_to_int32, scm_to_uint32, scm_to_int64,
2385 scm_to_uint64, scm_from_int8, scm_from_uint8, scm_from_int16,
2386 scm_from_uint16, scm_from_int32, scm_from_uint32, scm_from_int64,
2387 scm_from_uint64): Turned from macros into proper functions.
2388 (scm_to_signed_integer, scm_to_unsigned_integer,
2389 scm_from_signed_integer, scm_from_unsigned_integer): Generate via
2390 conv-integer.i.c and conv-uinteger.i.c, as well.
2391
2392 * number.h (scm_to_ssize_t, scm_to_size_t): Use the new
2393 SCM_I_SSIZE_MIN, SCM_I_SSIZE_MAX, and SCM_I_SIZE_MAX macros for
2394 the limits. Those are always defined.
2395
2396 2004-07-29 Kevin Ryde <user42@zip.com.au>
2397
2398 * posix.c (scm_ttyname): Use scm_i_misc_mutex for thread safety.
2399
2400 2004-07-28 Kevin Ryde <user42@zip.com.au>
2401
2402 * posix.c (scm_ctermid): Use an L_ctermid buf on the stack, for thread
2403 safety.
2404
2405 * unif.c (scm_array_set_x): For svect, use scm_num2short for
2406 consistency with other vector types and to get arg and func name into
2407 error message.
2408
2409 2004-07-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2410
2411 * deprecated.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_BOOL):
2412 Reimplement using scm_is_false, scm_is_true, scm_is_bool, and
2413 scm_from_bool, respectively.
2414 (SCM_NINUMP): Added.
2415
2416 * tags.h, deprecated.h (SCM_EQ_P): Deprecated by moving it into
2417 deprecated.h. Replaced all uses with scm_is_eq.
2418
2419 2004-07-24 Kevin Ryde <user42@zip.com.au>
2420
2421 * threads.c, threads.h (scm_i_misc_mutex): New SCM_GLOBAL_MUTEX.
2422 * posix.c (scm_crypt): Use it to protect static data in crypt().
2423
2424 2004-07-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2425
2426 * deprecated.h, deprecated.c, numbers.h (SCM_INUMP, SCM_NINUMP,
2427 SCM_INUM): Deprecated by renaming them to SCM_I_INUMP,
2428 SCM_I_NINUMP and SCM_I_INUM, respectively and adding deprecated
2429 versions to deprecated.h and deprecated.c. Changed all uses to
2430 either use the SCM_I_ variants or scm_is_*, scm_to_*, or
2431 scm_from_*, as appropriate.
2432
2433 * dynwind.c (scm_i_dowinds): Removed unused code that would call
2434 the unexisting scm_cross_dynwind_binding_scope for inums on the
2435 windlist.
2436
2437 2004-07-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2438
2439 * socket.c (ipv6_net_to_num, scm_from_ipv6): Renamed
2440 ipv6_net_to_num to scm_from_ipv6, for converting from an IPv6
2441 byte-wise address to a SCM integer. Changed all uses.
2442 (ipv6_num_to_net, scm_to_ipv6): Renamed ipv6_num_to_net to
2443 scm_to_ipv6 and added type and range checking, for converting from
2444 an IPv& byte-wise address to a SCM integer. Changed all uses.
2445 (bignum_in_ipv6_range_p, VALIDATE_INET6): Removed, their function
2446 is now done by scm_to_ipv6.
2447
2448 * numbers.c (scm_to_signed_integer, scm_to_unsigned_integer): dot
2449 not accept inexact integers.
2450
2451 * validate.h, deprecated.h (SCM_VALIDATE_INUM,
2452 SCM_VALIDATE_INUM_COPY, SCM_VALIDATE_BIGINT,
2453 SCM_VALIDATE_INUM_MIN, SCM_VALIDATE_INUM_MIN_COPY,
2454 SCM_VALIDATE_INUM_MIN_DEF_COPY,SCM_VALIDATE_INUM_DEF,
2455 SCM_VALIDATE_INUM_DEF_COPY, SCM_VALIDATE_INUM_RANGE,
2456 SCM_VALIDATE_INUM_RANGE_COPY): Deprecated because they make the
2457 fixnum/bignum distinction visible. Changed all uses to
2458 scm_to_size_t or similar.
2459
2460 2004-07-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2461
2462 * cpp_cnvt.awk: Use scm_from_int instead of SCM_MAKINUM.
2463
2464 2004-07-10 Kevin Ryde <user42@zip.com.au>
2465
2466 * hash.c (scm_hashq, scm_hashv, scm_hash): Restrict to size>=1 rather
2467 than size>=0, since 0<=hash<size cannot be satisfied for size==0, and
2468 such a size causes divide-by-zeros in scm_hasher.
2469
2470 * regex-posix.c (scm_make_regexp): Free rx on error, to avoid memory
2471 leak.
2472
2473 2004-07-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2474
2475 * numbers.c (scm_is_signed_integer, scm_is_unsigned_integer):
2476 Rewritten using the same logic as scm_to_signed_integer and
2477 scm_to_unsigned_integer, respectively, which is better(tm). Also,
2478 use CHAR_BIT instead of hardcoding 8.
2479 (LLONG_MIN, LLONG_MAX, ULLONG_MAX): Removed and used
2480 SCM_I_LLONG_MIN etc. instead.
2481
2482 * numbers.h (SCM_MAKINUM, SCM_I_MAKINUM): Renamed SCM_MAKINUM to
2483 SCM_I_MAKINUM and changed all uses.
2484 * deprecated.h, deprecated.c (SCM_MAKINUM): Newly deprecated.
2485
2486 * gen-scmconfig.c (SCM_I_LLONG_MIN, SCM_I_LLONG_MAX,
2487 SCM_I_ULLONG_MAX): Instead of hard-coding the numbers, compute
2488 them by assuming twos-complement.
2489
2490 2004-07-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2491
2492 * gen-scmconfig.h.in: Added all the new SCM_I_GSC_*_LIMITS that
2493 configure now produces.
2494 * gen-scmconfig.c: Use them to output SCM_T_INT8_MIN, etc
2495 definitions, giving the limits of the integer types defined by
2496 Guile. Also, output a hard coded SCM_I_LLONG_MIN, etc since
2497 LLONG_MIN or LONG_LONG_MIN is hard to get at.
2498
2499 * numbers.h (scm_to_short, scm_to_ushort): It's SHRT_MIN, etc, not
2500 SHORT_MIN.
2501 (scm_to_size_t): Use SIZE_MAX instead of cooking our own.
2502 (scm_to_long_long, scm_to_ulong_long, scm_to_int8, scm_to_uint8,
2503 scm_to_int16, scm_to_uint16, scm_to_int32, scm_to_uint32,
2504 scm_to_int64, scm_to_uint64, scm_to_intmax, scm_to_uintmax,
2505 scm_from_long_long, scm_from_ulong_long, scm_from_int8,
2506 scm_from_uint8, scm_from_int16, scm_from_uint16, scm_from_int32,
2507 scm_from_uint32, scm_from_int64, scm_from_uint64, scm_from_intmax,
2508 scm_from_uintmax): New.
2509
2510 2004-07-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2511
2512 * tags.h (scm_is_eq): New.
2513
2514 * deprecated.h, boolean.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOL,
2515 SCM_NEGATE_BOOL, SCM_BOOLP): Deprecated by moving into
2516 "deprecated.h". Replaced all uses with scm_is_false, scm_is_true,
2517 scm_from_bool, and scm_is_bool, respectively.
2518
2519 * boolean.h (scm_is_bool): Fix bug in prototype.
2520 (scm_from_bool): The argument is "x" not "f", stupid.
2521
2522 * boolean.c (scm_is_bool): Fix typo.
2523
2524 * numbers.h, numbers.c (scm_is_integer, scm_is_signed_integer,
2525 scm_is_unsigned_integer, scm_to_signed_integer,
2526 scm_to_unsigned_integer, scm_to_schar, scm_to_uchar, scm_to_char,
2527 scm_to_short, scm_to_ushort, scm_to_long, scm_to_ulong,
2528 scm_to_size_t, scm_to_ssize_t, scm_from_schar, scm_from_uchar,
2529 scm_from_char, scm_from_short, scm_from_ushort, scm_from_int,
2530 scm_from_uint, scm_from_long, scm_from_ulong, scm_from_size_t,
2531 scm_from_ssize_t, scm_is_real, scm_to_double, scm_from_double):
2532 New.
2533
2534 2004-07-05 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2535
2536 * boolean.h, boolean.c (scm_is_true, scm_is_false, scm_from_bool,
2537 scm_to_bool): New.
2538
2539 2004-06-27 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2540
2541 * backtrace.c (display_expression, display_frame): Call
2542 scm_i_unmemoize_expr for unmemoizing a memoized object holding a
2543 single memoized expression.
2544
2545 * debug.c (memoized_print): Don't try to unmemoize the memoized
2546 object, since we can't know whether it holds a single expression
2547 or a body.
2548
2549 (scm_mem_to_proc): Removed check for lambda expression, since it
2550 was moot anyway. Whoever uses these functions for debugging
2551 purposes should know what they do: Creating invalid memoized code
2552 will cause crashes, independent of whether this check is present
2553 or not.
2554
2555 (scm_proc_to_mem): Take the closure's code as it is and don't
2556 append a SCM_IM_LAMBDA isym. To allow easier debugging, the
2557 memoized code should not be modified.
2558
2559 * debug.[ch] (scm_unmemoize, scm_i_unmemoize_expr): Removed
2560 scm_unmemoize from public use, but made scm_i_unmemoize_expr
2561 available as a guile internal function instead. However,
2562 scm_i_unmemoize_expr will only work on memoized objects that hold
2563 a single memoized expression. It won't work with bodies.
2564
2565 * debug.c (scm_procedure_source), macros.c (macro_print), print.c
2566 (scm_iprin1): Call scm_i_unmemocopy_body for unmemoizing a body,
2567 i. e. a list of expressions.
2568
2569 * eval.c (unmemoize_exprs): Drop internal body markers from the
2570 output during unmemoization.
2571
2572 * eval.[ch] (scm_unmemocopy, scm_i_unmemocopy_expr,
2573 scm_i_unmemocopy_body): Removed scm_unmemocopy from public use,
2574 but made scm_i_unmemocopy_expr and scm_i_unmemocopy_body available
2575 as guile internal functions instead. scm_i_unmemoize_expr will
2576 only work on a single memoized expression, while
2577 scm_i_unmemocopy_body will only work on bodies.
2578
2579 2004-06-21 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2580
2581 * eval.c (unmemoize_exprs): Handle semi-memoized code.
2582
2583 (scm_cons_source, scm_primitive_eval): Prefer higher level
2584 predicate SCM_FALSEP over SCM_IMP.
2585
2586 2004-06-15 Rob Browning <rlb@defaultvalue.org>
2587
2588 * script.c (scm_shell_usage): minor phrasing change.
2589
2590 * gc_os_dep.c: update ifdefery for macosx.
2591 (scm_get_stack_base): separate result initialization from
2592 declaration to slience warnings with macosx and hp-ux using gcc
2593 3.3. Thanks to Andreas Vögele.
2594
2595 2004-06-13 Han-Wen Nienhuys <hanwen@xs4all.nl>
2596
2597 * eval.c (unmemoize_exprs): use SCM_CONSP for the loop condition.
2598
2599 2004-06-06 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2600
2601 * list.[ch] (scm_i_finite_list_copy): New internal function to
2602 copy lists that are known to be finite (though not necessarily
2603 proper).
2604
2605 * debug.c (scm_procedure_source): Don't have scm_unmemocopy treat
2606 a closure's argument list like an expression of a body.
2607
2608 * eval.c (unmemoize_expression, unmemoize_exprs, unmemoize_and,
2609 unmemoize_begin, unmemoize_case, unmemoize_cond, unmemoize_delay,
2610 unmemoize_do, unmemoize_if, unmemoize_lambda, unmemoize_let,
2611 unmemoize_letrec, unmemoize_letstar, unmemoize_or,
2612 unmemoize_set_x, unmemoize_apply, unmemoize_atcall_cc,
2613 unmemoize_at_call_with_values, unmemoize_future, sym_atslot_ref,
2614 unmemoize_atslot_ref, sym_atslot_set_x, unmemoize_atslot_set_x,
2615 unmemoize_builtin_macro): New static functions and symbols.
2616
2617 (scm_unmemocopy): Rewritten in terms of the above. scm_unmemocopy
2618 now has a slightly different meaning: The memoized form that is
2619 receives as its argument is now interpreted as a sequence of
2620 expressions from a body.
2621
2622 (unmemocar, scm_unmemocar): Since the whole functionality of
2623 unmemocar and scm_unmemocar is not needed any more, scm_unmemocar
2624 has its old content back and is deprecated, while unmemocar has
2625 been removed.
2626
2627 (SCM_BIT7): Removed.
2628
2629 (CEVAL): For unmemoizing a single expression, call
2630 unmemoize_expression instead of scm_unmemocopy, which now expects
2631 a sequence of body expressions. Eliminated unnecessary empty
2632 environment frame when executing let* forms. Eliminated
2633 unmemoization step from evaluator.
2634
2635 2004-06-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2636
2637 * eval.c (scm_macroexp, macroexp): Renamed scm_macroexp to
2638 macroexp and made static. Added new version of scm_macroexp that
2639 emits a deprecation warning and then calls macroexp.
2640 (scm_m_undefine): Issue deprecation warning.
2641
2642 2004-05-30 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2643
2644 * eval.c (lookup_global_symbol, literal_p, try_macro_lookup):
2645 Modified to make set! work on symbols that represent syntactic
2646 keywords.
2647
2648 2004-05-26 Han-Wen Nienhuys <hanwen@xs4all.nl>
2649
2650 * gc.h (SCM_CELL_OBJECT_LOC): use SCM_GC_CELL_OBJECT to prevent
2651 compound expression as lvalue errors.
2652
2653 2004-05-24 Marius Vollmer <mvo@zagadka.de>
2654
2655 * dynwind.c (winder_mark): Use SCM_PACK to correctly convert the
2656 WINDER_DATA to a SCM.
2657
2658 2004-05-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2659
2660 * goops.c (compute_getters_n_setters, create_standard_classes,
2661 scm_add_slot): Compute closures by calling scm_i_eval_x on a
2662 lambda expression rather than creating them with scm_closure.
2663
2664 2004-05-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2665
2666 * eval.c (s_macro_keyword, scm_m_set_x): Remove checking for
2667 misplaced syntactic keywords. This will not work unless guile's
2668 defmacro feature is deprecated.
2669
2670 (scm_m_case): Fixed a bug that caused the list of labels to grow
2671 with every case form.
2672
2673 2004-05-19 Kevin Ryde <user42@zip.com.au>
2674
2675 * numbers.c (scm_round_number): For inum and big, just return x. For
2676 real, use scm_round for 2^54-1 etc problems covered there.
2677
2678 * numbers.c (trunc): Remove #define to scm_truncate when the C library
2679 doesn't provide trunc. This was for when `truncate' was done as a
2680 scm_tc7_dsubr, no longer required.
2681
2682 * threads.c (scm_threads_mark_stacks) [SCM_STACK_GROWS_UP]: Correction
2683 to stack marking call, two parameters and no cast on t->base.
2684
2685 2004-05-18 Marius Vollmer <mvo@zagadka.de>
2686
2687 * hashtab.c (rehash_after_gc): Bug fix: properly link the
2688 processed hashtables back into the weak_hashtables list. Thanks
2689 to Bill Schottstaedt!
2690
2691 2004-05-16 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2692
2693 * eval.c (unmemoize_quote): New static function.
2694
2695 (scm_m_quote, scm_m_atslot_ref, SCM_CEVAL): Changed the byte code
2696 representation of 'quote' and '@slot-ref' to an improper list.
2697 This reduces execution time, the number of cells used to hold the
2698 memoized code, and thus also reduces garbage collection time.
2699
2700 (scm_unmemocopy): Use unmemoize_quote for quote expressions.
2701
2702 (SCM_CEVAL): Changed macro handling to also work with macros that
2703 return improper lists. Added an assertion, that the code returned
2704 by a macro transformer will not lead to cycles in the memoized
2705 code.
2706
2707 2004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2708
2709 No functional change, just rearrangements of functions within the
2710 file.
2711
2712 * eval.c (scm_ilookup, scm_unbound_variable_key,
2713 error_unbound_variable, scm_lookupcar1, scm_lookupcar): Moved to
2714 the definitions used for execution, since that's where they will
2715 belong to later.
2716
2717 2004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2718
2719 * numbers.h (SCM_SLOPPY_FRACTIONP): Removed. It was not used
2720 throughout guile, has not been part of an official release yet,
2721 and the concept of sloppy predicates has never been a good idea.
2722
2723 (SCM_FRACTION_NUMERATOR, SCM_FRACTION_DENOMINATOR,
2724 SCM_FRACTION_SET_NUMERATOR, SCM_FRACTION_SET_DENOMINATOR):
2725 Simplified.
2726
2727 2004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2728
2729 * throw.c (SETJBJMPBUF, SCM_SETJBDFRAME): Add cast to scm_t_bits
2730 to make explicit what happens.
2731
2732 2004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2733
2734 * dynl.c (SET_DYNL_HANDLE): Add cast to scm_t_bits to make
2735 explicit what happens.
2736
2737 * guardians.c (TCONC_IN): Use SCM_SET_CELL_OBJECT_x rather than
2738 SCM_SET_CELL_WORD_x when writing scheme objets to cell elements.
2739
2740 2004-05-11 Marius Vollmer <mvo@zagadka.de>
2741
2742 * scmsigs.c (scm_sigaction_for_thread): Validate that the handler
2743 is indeed a procedure when it isn't a number.
2744
2745 2004-05-10 Marius Vollmer <mvo@zagadka.de>
2746
2747 Convert floating point numbers into strings with an arbitrary
2748 radix. Thanks to Richard Todd!
2749
2750 * numbers.c (FLOBUFLEN): Increase so that radix 2 strings will
2751 fit.
2752 (fx): Removed.
2753 (scm_dblprec, fx_per_radix, init_dblprec, init_fx_radix,
2754 number_chars): New, to support variable radices.
2755 (idbl2str): Use above instead of the old base-10 only tables.
2756 (iflo2str): Pass on new RADIX argument to idbl2str.
2757 (scm_number_to_string): Pass radix to iflo2str.
2758 (scm_print_real, scm_print_complex): Explicitly pass radix 10 to
2759 iflo2str.
2760 (scm_init_numbers): Call init_dblprec and init_fx_radix for all
2761 possible radices.
2762
2763 2004-05-10 Kevin Ryde <user42@zip.com.au>
2764
2765 * numbers.c (scm_logbit_p): Correction to test above the end of an
2766 inum. Reported by Jan Konecny.
2767
2768 2004-05-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2769
2770 * gc.h (scm_t_cell): Fields are now of type SCM instead of
2771 scm_t_bits. Updated all users.
2772 (SCM_GC_CARD_SIZE_MASK): Use SCM_GC_SIZEOF_CARD instead of
2773 duplicating the code.
2774 (SCM_CELL_OBJECT_LOC): New.
2775 (SCM_CARLOC, SCM_CDRLOC): Use it instead of SCM_CELL_WORD_LOC.
2776 (SCM_CELL_WORD_LOC): Moved to "deprecated.h".
2777
2778 * smob.h (SCM_SMOB_DATA_2, SCM_SMOB_DATA_3, SCM_SMOB_FLAGS,
2779 SCM_SET_SMOB_DATA_2, SCM_SET_SMOB_DATA_3, SCM_SET_SMOB_FLAGS,
2780 SCM_SMOB_OBJECT, SCM_SMOB_OBJECT_2, SCM_SMOB_OBJECT_3,
2781 SCM_SET_SMOB_OBJECT, SCM_SET_SMOB_OBJECT_2, SCM_SET_SMOB_OBJECT_3,
2782 SCM_SMOB_OBJECT_LOC, SCM_SMOB_OBJECT_2_LOC,
2783 SCM_SMOB_OBJECT_3_LOC): New.
2784 * smob.c (scm_i_set_smob_flags): New function.
2785
2786 * dynl.c, dynwind.c, eval.h, fluids.h, futures.h, hashtab.h,
2787 hooks.h, keywords.h, macros.h, macros.c, mallocs.c, mallocs.h,
2788 random.h, regex-posix.h, root.h, srcprop.h, srcprop.c, threads.h:
2789 Use SCM_SMOB_* instead of SCM_CELL_* as appropriate. Use
2790 SCM_SMOB_FLAGS and SCM_SET_SMOB_FLAGS instead of accessing the
2791 zeroth word directly. Use SCM_SMOB_PREDICATE as appropriate.
2792
2793 * numbers.h (SCM_I_BIG_MPZ): Use SCM_CELL_OBJECT_LOC instead of
2794 taking the address of SCM_CELL_WORD_1, the latter being no longer
2795 an lvalue.
2796
2797 * variable.h (SCM_VARIABLE_LOC): Use SCM_CELL_OBJECT_LOC instead
2798 of casting SCM_CELL_WORD_LOC.
2799
2800 2004-05-02 Kevin Ryde <user42@zip.com.au>
2801
2802 * eval.c (scm_macroexp): Add prototype, since it's not in eval.h under
2803 --disable-deprecated. Reported by Andreas Vögele.
2804
2805 * filesys.c (_POSIX_C_SOURCE): Define to 199506L to get readdir_r (in
2806 particular on HP-UX). Reported by Andreas Vögele.
2807
2808 * list.c (varargs.h): Remove, leave just stdarg.h which is all the
2809 code has support for. Fixes building with AIX cc, which is ansi but
2810 doesn't define __STDC__. Reported by Keith Crane.
2811 (var_start): Remove macro, this variation no longer required.
2812 (scm_list_n): Use va_start directly.
2813
2814 2004-05-01 Kevin Ryde <user42@zip.com.au>
2815
2816 * continuations.c (scm_dynthrow): Use >= instead of SCM_PTR_GE which
2817 is now gone. Reported by Andreas Vögele.
2818
2819 2004-04-28 Kevin Ryde <user42@zip.com.au>
2820
2821 * backtrace.c (display_frame_expr), numbers.c (XDIGIT2UINT,
2822 mem2uinteger, mem2decimal_from_point, mem2ureal): Cast char to int for
2823 ctype.h tests, to avoid warnings from gcc on HP-UX about char as array
2824 subscript. Reported by Andreas Vögele.
2825 Also cast through unsigned char to avoid passing negatives to those
2826 macros if input contains 8-bit values.
2827
2828 * num2integral.i.c (NUM2INTEGRAL): Under non-BIGMPZ_FITSP case,
2829 corrections to range check for signed numbers. Remove
2830 scm_remember_upto_here_1(num) from these checks, since num is used
2831 subsequently anyway.
2832
2833 * num2integral.i.c (NUM2INTEGRAL): Test BIGMPZ_FITSP with "!= 0" to
2834 avoid warning from gcc 3.4. Reported by Hyperdivision.
2835
2836 * numbers.c (scm_bit_extract): Use min instead of MIN.
2837 (MIN): Remove, this conflicts with similar macro defined by limits.h
2838 on HP-UX. Reported by Andreas Vögele.
2839
2840 * stime.c (_POSIX_C_SOURCE): Define to 199506L to get gmtime_r (in
2841 particular on HP-UX). Reported by Andreas Vögele.
2842
2843 * threads.c (scm_threads_mark_stacks): Correction sizet -> size_t.
2844 Reported by Andreas Vögele.
2845
2846 * threads-plugin.h (SCM_MUTEX_MAXSIZE): Increase to 25*sizeof(long),
2847 for the benefit of hpux11 where pthread_mutex_t is 88 bytes. Reported
2848 by Andreas Vögele.
2849
2850 2004-04-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2851
2852 * eval.c (s_macro_keyword): New static identifier.
2853
2854 (scm_m_define): Change order to first create binding and
2855 evaluating the expression afterwards.
2856
2857 (scm_m_set_x): Memoize complete set! expression. Only leave
2858 symbols if no binding exists at memoization time. Throw error if
2859 assigning to a syntactic keyword.
2860
2861 (lazy_memoize_variable): New function.
2862
2863 (CEVAL): When execution set!, perform lazy memoization if
2864 unmemoized symbol is detected.
2865
2866 * modules.c (module_variable): Return variables with unbound
2867 value.
2868
2869 * tags.h: Fix comment.
2870
2871 2004-04-25 Kevin Ryde <user42@zip.com.au>
2872
2873 * chars.c (scm_char_upcase, scm_char_downcase, scm_c_upcase,
2874 scm_c_downcase): Use ctype.h toupper and tolower. This will be useful
2875 in 8-bit locales, and ensures consistency with char-upper-case? and
2876 char-lower-case? which already use ctype.h.
2877 (scm_c_upcase_table, scm_c_downcase_table, scm_lowers, scm_uppers):
2878 Remove.
2879 * chars.c, chars.h, init.c (scm_tables_prehistory): Remove.
2880
2881 * socket.c (VALIDATE_INET6): Correction to bignum_in_ipv6_range_p
2882 call. Reported by Hyperdivision.
2883
2884 * threads.c (scm_yield): Correction, actually call scm_thread_yield.
2885 Reported by Hyperdivision.
2886
2887 * unif.c (s_scm_make_uve): Remove unused local variable. Reported by
2888 Hyperdivision.
2889
2890 2004-04-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2891
2892 Hide the implementation of ilocs and isyms in eval.c.
2893
2894 * deprecated.h (SCM_IFRINC, SCM_ICDR, SCM_IFRAME, SCM_IDIST,
2895 SCM_ICDRP), eval.c (SCM_IFRINC, SCM_ICDR, SCM_IFRAME, SCM_IDIST,
2896 SCM_ICDRP), eval.h (SCM_ICDR, SCM_IFRINC, SCM_IFRAME, SCM_IDIST,
2897 SCM_ICDRP): Deprecated and added to deprecated.h. Moved from
2898 eval.h to eval.c.
2899
2900 * deprecated.c (scm_isymnames), deprecated.h (scm_isymnames,
2901 SCM_ISYMNUM, SCM_ISYMCHARS), eval.c (SCM_ISYMNUM, isymnames,
2902 scm_unmemocopy, CEVAL), print.c (scm_isymnames), tags.h
2903 (SCM_ISYMNUM, scm_isymnames, SCM_ISYMCHARS): Deprecated
2904 scm_isymnames, SCM_ISYMNUM and SCM_ISYMCHARS and added to
2905 deprecated.[hc]. Moved scm_isymnames from print.c to eval.c and
2906 renamed to isymnames. Moved SCM_ISYMNUM from tags.h to eval.c and
2907 renamed to ISYMNUM.
2908
2909 * eval.c (scm_i_print_iloc, scm_i_print_isym), eval.h
2910 (scm_i_print_iloc, scm_i_print_isym), print.c (scm_iprin1):
2911 Extracted printing of ilocs and isyms to guile internal functions
2912 scm_i_print_iloc, scm_i_print_isym of eval.c.
2913
2914 2004-04-22 Kevin Ryde <user42@zip.com.au>
2915
2916 * numbers.c (scm_bit_extract): Use SCM_SRS for signed right shift.
2917
2918 * numbers.c (scm_round): Test for x already an integer, to avoid bad
2919 rounding in x+0.5 when x is a big value already an integer. In
2920 certain hardware rounding cases x+0.5 can give an adjacent integer,
2921 leading to that as the result, when we really just wanted x itself.
2922
2923 2004-04-19 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2924
2925 * eval.c (scm_unmemocopy): Fixed unmemoization of let*.
2926
2927 (deval_args, CEVAL): Minor improvements: Reduced variable scopes,
2928 added const qualifiers, cast intentionally unused expressions to
2929 void for emphasis, improved comment.
2930
2931 2004-04-18 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2932
2933 * tags.h (scm_tags, scm_tc8_tags, scm_tc9_flag, scm_tc8_flag,
2934 scm_tc8_isym): Renamed scm_tags to scm_tc8_tags. Renamed
2935 scm_tc9_flag to scm_tc8_flag. Introduced new identifier
2936 scm_tc8_isym. Defined tc8-tags relative to scm_tc3_imm24.
2937 Defined the tc8-tag for flags to be 0x04, which will mean that
2938 SCM_BOOL_F will also have the value 0x04 instead of 0x013c. Due
2939 to the reduced number of bits and the simpler bit pattern for
2940 SCM_BOOL_F, certain machines may be able to use more efficient
2941 processor instructions to deal with SCM_BOOL_F.
2942
2943 (SCM_ITAG9, SCM_MAKE_ITAG9, SCM_ITAG9_DATA): Removed. These have
2944 never been defined in a released version, thus no need to
2945 deprecate them.
2946
2947 (SCM_IFLAGP, SCM_MAKIFLAG, SCM_IFLAGNUM): Flags now use tc8
2948 instead of tc9 tags.
2949
2950 (SCM_ISYMP, SCM_MAKISYM, SCM_ISYMNUM): Isyms now use tc8 instead
2951 of tc9 tags.
2952
2953 (SCM_MAKSPCSYM): Removed. It is almost impossible that user code
2954 could have used this definition.
2955
2956 (SCM_IM_AND, SCM_IM_BEGIN, SCM_IM_CASE, SCM_IM_COND, SCM_IM_DO,
2957 SCM_IM_IF, SCM_IM_LAMBDA, SCM_IM_LET, SCM_IM_LETSTAR,
2958 SCM_IM_LETREC, SCM_IM_OR, SCM_IM_QUOTE, SCM_IM_SET_X): Now encoded
2959 as isyms, as special isyms don't exist any more.
2960
2961 2004-04-18 Kevin Ryde <user42@zip.com.au>
2962
2963 * filesys.c (scm_readdir): Use readdir_r when available, for thread
2964 safety.
2965
2966 * numbers.c (scm_max, scm_min): For big/real, use SCM_SWAP rather than
2967 explicit swapping code.
2968
2969 2004-04-15 Kevin Ryde <user42@zip.com.au>
2970
2971 * cpp_sig_symbols.in: Add SIGSYS.
2972
2973 * list.c (scm_append_x): Use iterative style, to avoid non-tail
2974 recursion.
2975
2976 * numbers.c (scm_max, scm_min): For inum/frac, frac/inum, big/frac,
2977 frac/big and frac/frac, use scm_less_p for exact comparison.
2978
2979 * numbers.c (scm_gcd): For inum/big, use mpz_gcd_ui by sharing code
2980 with big/inum.
2981
2982 * numbers.c (xisinf): Add a comment about solaris 7 lacking isinf.
2983
2984 2004-04-06 Han-Wen Nienhuys <hanwen@xs4all.nl>
2985
2986 * inline.h (scm_cell): use SCM_GC_CELL_WORD for checking tag.
2987
2988 * chars.h (scm_init_chars): change scm_{upcase,downcase} to
2989 scm_c_{up,down}case.
2990 (SCM_MAKE_CHAR): add (unsigned char) cast. This prevents havoc
2991 when hi-bit ASCII is subjected to SCM_MAKE_CHAR().
2992
2993 2004-04-06 Kevin Ryde <user42@zip.com.au>
2994
2995 * numbers.c (scm_ash): Remove stray "}" in docstring.
2996
2997 * numbers.c (scm_make_ratio): For inum/bignum integer detection, use
2998 x==SCM_MOST_NEGATIVE_FIXNUM explicitly, for clarity and to avoid
2999 calling mpz_cmp_ui in most cases.
3000
3001 * numbers.c (scm_quotient, scm_remainder): In inum/big, use mpz_cmp_ui
3002 for big == abs(most-negative-fixnum) special case.
3003 (abs_most_negative_fixnum): Remove, no longer used.
3004
3005 * scmsigs.c (scm_sigaction_for_thread): Correction to signum range
3006 test, avoids SCM_VECTOR_REF outside bounds of signal_handlers on
3007 calling (sigaction NSIG).
3008
3009 * simpos.c (scm_system_star): Fix execargv memory leak, merge parent
3010 and fork error cases to do this.
3011
3012 2004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3013
3014 * eval.c (CEVAL): Don't distinguish between short and long
3015 instructions when dispatching - just always dispatch on the
3016 instruction code, which is common for short and long instructions.
3017 Further, removed unnecessary goto statements and added comment.
3018
3019 2004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3020
3021 * eval.c (scm_unmemocopy): Don't distinguish between short and
3022 long instructions when dispatching - just always dispatch on the
3023 instruction code, which is common for short and long instructions.
3024 Further, removed unnecessary goto statements, fixed indentation
3025 and replaced SCM_IMP predicates by SCM_NULLP.
3026
3027 2004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3028
3029 * eval.c (scm_lookupcar1, CEVAL): Use SCM_ILOCP instead of
3030 comparison with SCM_ILOC00. In CEVAL, eliminate goto-label
3031 'checkmacro'.
3032
3033 2004-03-31 Kevin Ryde <user42@zip.com.au>
3034
3035 * simpos.c: Include <signal.h> for SIG_IGN and friends.
3036
3037 2004-03-29 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3038
3039 Introduce scm_debug_mode_p as a replacement for scm_debug_mode and
3040 SCM_DEBUGGINGP:
3041
3042 * debug.h (scm_debug_mode_p, scm_debug_mode, SCM_DEBUGGINGP),
3043 eval.c (scm_debug_mode_p): Deprecated scm_debug_mode and
3044 SCM_DEBUGGINGP. Provided scm_debug_mode_p instead, to have one
3045 single interface that also matches the naming conventions.
3046 Probably scm_debug_mode_p should be part of the private interface
3047 anyway.
3048
3049 * debug.h (scm_debug_mode_p), backtrace.c (display_error_body),
3050 eval.c (SCM_APPLY, scm_trampoline_0, scm_trampoline_1,
3051 scm_trampoline_2): Change uses of scm_debug_mode or SCM_DEBUGGINGP
3052 to scm_debug_mode_p.
3053
3054
3055 Deprecate direct access to scm_ceval, scm_deval and scm_ceval_ptr:
3056
3057 * eval.h (scm_ceval, scm_deval, scm_ceval_ptr), debug.h
3058 (scm_ceval_ptr): Deprecated. Moved declaration of scm_ceval_ptr
3059 from debug.h to eval.h.
3060
3061 * debug.h (SCM_RESET_DEBUG_MODE): Don't access scm_ceval_ptr any
3062 more, just leave it with setting scm_debug_mode_p, which is
3063 equivalent for practical purposes.
3064
3065 * deprecated.h (SCM_XEVAL, SCM_XEVALCAR): Call scm_i_eval_x
3066 instead of *scm_ceval_ptr. Leave all evaluating to scm_i_eval_x.
3067
3068 * gdbint.c (gdb_eval): Call scm_i_eval_x instead of scm_ceval.
3069
3070 * eval.c (ceval, deval, scm_ceval, scm_deval): Made scm_ceval
3071 static and renamed it to ceval throughout. Provide a new exported
3072 but deprecated function scm_ceval as a wrapper for backwards
3073 compatibility. The same is done for the deval/scm_deval pair of
3074 functions.
3075
3076 * eval.c (CEVAL, SCM_CEVAL): Renamed SCM_CEVAL to CEVAL
3077 throughout. Defined CEVAL to ceval or deval, based on compilation
3078 phase.
3079
3080 * eval.c (SCM_XEVAL, SCM_XEVALCAR): Dispatch on scm_debug_mode_p
3081 to ceval and deval instead of calling *scm_ceval_ptr.
3082
3083 * eval.c (dispatching_eval): New deprecated static function.
3084
3085 * eval.c (scm_ceval_ptr): Initialized to dispatching_eval in order
3086 to emulate its old behaviour as closely as possible.
3087
3088
3089 Change the evaluator such that only expressions for which pair? is
3090 true are passed to CEVAL, and such that all other expressions are
3091 evaluated outside of CEVAL:
3092
3093 * eval.c (EVAL): New, provided in analogy to EVALCAR. Evaluate an
3094 expression that is assumed to be memoized already. All but
3095 expressions of the form '(<form> <form> ...)' are evaluated inline
3096 without calling an evaluator.
3097
3098 * eval.c (SCM_XEVAL, SCM_XEVALCAR, EVALCAR): Evaluate all but
3099 expressions of the form '(<form> <form> ...)' inline without
3100 calling an evaluator.
3101
3102 * eval.c (scm_i_eval_x, scm_i_eval, scm_ceval, scm_deval): Handle
3103 the special case of unmemoized symbols passed on the top level.
3104
3105 * eval.c (CEVAL): Change calls to CEVAL to EVAL, except where it
3106 is known that the expression passed to CEVAL is of the form
3107 '(<form> <form> ...)'. Remove handling of the tc7-objects, since
3108 now it is known that the input expression of CEVAL is a pair.
3109
3110 2004-03-29 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3111
3112 * eval.c (is_self_quoting_p): New static function.
3113
3114 (scm_m_quote): Use is_self_quoting_p.
3115
3116 (copy_tree): Corrected typo in comment.
3117
3118 2004-03-28 Han-Wen Nienhuys <hanwen@xs4all.nl>
3119
3120 * eval.c (s_scm_copy_tree): idem.
3121
3122 * list.c (s_scm_filter): remove "pointer" from doc string.
3123
3124 * gc.h (SCM_GC_CELL_TYPE): SCM_GC_CELL_TYPE uses SCM_GC_CELL_OBJECT.
3125
3126 * goops.h (SCM_NUMBER_OF_SLOTS): don't SCM_UNPACK the result.
3127
3128 * backtrace.c ("display_backtrace_body"): SCM_PACK before SCM_EQ_P
3129 (display_frame): idem.
3130 (display_backtrace_file_and_line): idem.
3131
3132 * tags.h (SCM_UNPACK): stricter typechecking on SCM_UNPACK
3133 arguments.
3134
3135 2004-03-26 Kevin Ryde <user42@zip.com.au>
3136
3137 * filesys.c (scm_getcwd, scm_readlink): Avoid memory leak on errors.
3138
3139 * numbers.c (scm_modulo): For inum/big and big/big, remove test of
3140 big==0 since that never occurs.
3141
3142 * numbers.c, numbers.h (scm_modulo_expt): Renamed from
3143 scm_modular_expt, matching scheme level name `modulo-expt'.
3144
3145 * numbers.c (scm_modular_expt): Return a negative remainder for a
3146 negative divisor, the same as `modulo' does.
3147
3148 2004-03-26 Eric Hanchrow <offby1@blarg.net>
3149
3150 * numbers.c, numbers.h (scm_modular_expt): New function.
3151
3152 2004-03-25 Kevin Ryde <user42@zip.com.au>
3153
3154 * numbers.c (scm_min, scm_max): Correction to big/real and real/big,
3155 return inexact as required by r5rs.
3156
3157 2004-03-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3158
3159 * eval.c: Separated some definitions relevant for execution from
3160 the memoization part of the file.
3161
3162 (copy_tree): New static function
3163
3164 (scm_copy_tree): Rewritten to fix two kinds or bugs: First, cyclic
3165 structures are detected now and will lead to an exception instead
3166 of forcing guile to run in an endless loop, using up all the
3167 system's memory. Second, arrays in the cdr of an improper list
3168 are now copied. See the new test cases in eval.test.
3169
3170 2004-03-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3171
3172 * posix.c (scm_gethostname): Make sure len is initialised before
3173 it is used. Restructured to (hopefully) represent possible
3174 configurations more clearly in the code. Added unwind handler.
3175
3176 2004-03-23 Kevin Ryde <user42@zip.com.au>
3177
3178 * posix.c (scm_gethostname): Use sysconf(_SC_HOST_NAME_MAX) and/or
3179 MAXHOSTNAMELEN when available.
3180
3181 2004-03-21 Marius Vollmer <mvo@zagadka.de>
3182
3183 * read.c (skip_scsh_block_comment): Also recognize '\r' as a line
3184 terminator. Rewritten the logic as a state machine, I must have
3185 been doing too much VHDL lately...
3186
3187 * eval.c (scm_ceval, scm_deval): Explicitely evaluate ports to
3188 themselves. Thanks to Han-Wen Nienhuys!
3189
3190 * list.c: Changed docstrings so that they no longer talk about
3191 returning 'pointers' to something.
3192
3193 2004-03-20 Han-Wen Nienhuys <hanwen@xs4all.nl>
3194
3195 * gc.c: remove set_debug_cell_accesses! when
3196 SCM_DEBUG_CELL_ACCESSES is not defined. Scheme source code should
3197 use (if (defined? 'set-debug-cell-accesses!) .. ) to switch on
3198 debugging conditionally.
3199
3200 2004-03-21 Kevin Ryde <user42@zip.com.au>
3201
3202 * stime.c (scm_gmtime): Use gmtime_r when available, for thread safety.
3203
3204 2004-03-20 Kevin Ryde <user42@zip.com.au>
3205
3206 * posix.c (scm_gethostname): Preserve errno across free() call.
3207
3208 2004-03-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
3209
3210 * gc-card.c (sweep_card): use SCM_GC_SET_CELL_WORD for setting
3211 free cells.
3212
3213 2004-03-14 Kevin Ryde <user42@zip.com.au>
3214
3215 * stime.c: Define _GNU_SOURCE for strptime prototype from glibc.
3216 (strptime): Use HAVE_DECL_STRPTIME for when to give own prototype.
3217
3218 2004-03-07 Kevin Ryde <user42@zip.com.au>
3219
3220 * stime.c (scm_gmtime): Return bd_time->tm_zone when available, rather
3221 than "GMT" always.
3222 (filltime): Make zname parameter "const".
3223
3224 2004-03-03 Mikael Djurfeldt <mdj@chunk.mit.edu>
3225
3226 * threads.c, threads.h (scm_c_scm2thread): New function.
3227
3228 2004-02-29 Kevin Ryde <user42@zip.com.au>
3229
3230 * numbers.c (guile_ieee_init): Use C99 INFINITY and NAN when
3231 available. Test HAVE_DINFINITY and HAVE_DQNAN for those globals, in
3232 particular don't assume "defined (__alpha__) && ! defined (linux)"
3233 means OSF. Remove "SCO" code, which was not really SCO specific and
3234 which John W. Eaton advises should be long past being needed.
3235
3236 * posix.c (scm_execl, scm_execlp, scm_execle): Avoid memory leak under
3237 error throw.
3238
3239 2004-02-24 Kevin Ryde <user42@zip.com.au>
3240
3241 * posix.c (scm_cuserid): Use a private result buffer, for thread safe.
3242
3243 2004-02-22 Kevin Ryde <user42@zip.com.au>
3244
3245 * numbers.c (scm_max, scm_min): For one arg, dispatch to generic for
3246 complex, same as for two args. (Handle only inum, big, real, frac).
3247
3248 2004-02-21 Kevin Ryde <user42@zip.com.au>
3249
3250 * posix.c (scm_crypt): Use new HAVE_CRYPT.
3251 (<crypt.h>): Remove HAVE_LIBCRYPT condition.
3252 Reported by Andreas Voegele.
3253
3254 2004-02-20 Neil Jerram <neil@ossau.uklinux.net>
3255
3256 * list.c (scm_list_n): Add #if SCM_DEBUG_CELL_ACCESSES_P around
3257 validation.
3258
3259 * read.c (scm_lreadparen): Removed.
3260 (scm_lreadparen1): Renamed scm_i_lreadparen.
3261
3262 2004-02-20 Han-Wen Nienhuys <hanwen@xs4all.nl>
3263
3264 * list.c (scm_list_n): validate non-immediate arguments;
3265 this will catch forgotten a SCM_UNDEFINED.
3266
3267 2004-02-18 Marius Vollmer <mvo@zagadka.de>
3268
3269 * gc.h (scm_gc_cells_collected): Removed duplicated declaration.
3270 Thanks to Bill Schottstaedt!
3271
3272 * socket.h (scm_gethost): Removed prototype it is already in
3273 "net_db.h". Thanks to Bill Schottstaedt!
3274
3275 2004-02-18 Kevin Ryde <user42@zip.com.au>
3276
3277 * num2integral.i.c (INTEGRAL2BIG): WORDS_BIGENDIAN not right for word
3278 order parameter to mpz_import, in fact with just one word there's no
3279 order to worry about at all.
3280
3281 * numbers.c (scm_num_eq_p): For real==frac, complex==frac, frac==real
3282 and frac==complex, make an exact comparison rather than converting
3283 with fraction2double.
3284
3285 * posix.c, putenv.c, stime.c (environ): Use _NSGetEnviron in Darwin
3286 shared library, since environ is not directly available there.
3287
3288 * script.c (scm_shell_usage): Print to stdout for --help, per GNU
3289 standard.
3290
3291 * stime.c (scm_localtime, scm_gmtime, scm_mktime): Provide a default
3292 errno EINVAL in case localtime and gmtime don't set it.
3293 (scm_mktime, scm_strptime): Forcibly use errno EINVAL for our
3294 SCM_SYSERROR, since mktime and strptime generally don't set errno.
3295
3296 2004-02-16 Kevin Ryde <kevin@swox.se>
3297
3298 * gc-malloc.c (scm_done_malloc, scm_done_free): Allow negative sizes,
3299 which were permitted in the past for these.
3300
3301 * num2float.i.c (NUM2FLOAT): Expand isfinite to !xisinf, as per
3302 previous change to numbers.c.
3303
3304 * script.c (scm_shell_usage): Print bug-guile email address, as per
3305 GNU standard. Reported by Han-Wen Nienhuys.
3306
3307 2004-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
3308
3309 * unif.c (scm_make_uve): Removed local variable and simplified
3310 code in order to avoid compiler used uninitialized warnings.
3311
3312 * hashtab.c, hashtab.h (scm_hash_map_to_list): Renamed from
3313 scm_hash_map.
3314 (scm_hash_fold): Use scm_call_3 directly in the call to
3315 scm_internal_hash_fold instead of going via fold_proc (which is
3316 now removed).
3317 (scm_hash_for_each): Use a trampoline +
3318 scm_internal_hash_for_each_handle.
3319 (scm_internal_hash_for_each_handle, scm_hash_for_each_handle): New
3320 functions.
3321
3322 2004-02-12 Kevin Ryde <user42@zip.com.au>
3323
3324 * ports.c (scm_port_line): In docstring, note first line is 0.
3325 (scm_set_port_line_x): In docstring, note first line is 0.
3326 (scm_port_column): In docstring, there's no default to current input
3327 port, and remove shared port-line @defun.
3328 (scm_set_port_column_x): In docstring, there's no default to current
3329 input port, note first column is 0, remove shared set-port-line!
3330 @defun.
3331
3332 * ramap.c (scm_array_fill_x): For fvect and dvect, use scm_num2dbl to
3333 convert args the same way that array-set! does.
3334
3335 * unif.c (scm_make_uve, scm_array_p): Allow fraction 1/3 as prototype
3336 for dvect.
3337 (scm_array_p): Add missing "break"s in switch, fix llvect test look
3338 for "l" not "s", fix dvect to be false for singp(prot) since such a
3339 value is for fvect.
3340 (scm_array_prototype): Return 1/3 for dvect, rather than 0.33..33.
3341 (exactly_one_third): New variable.
3342 (scm_init_unif): Initialize it.
3343
3344 2004-02-10 Neil Jerram <neil@ossau.uklinux.net>
3345
3346 * read.c (scm_read_opts): Change `escaped-parens' to
3347 `elisp-strings'.
3348
3349 2004-02-08 Neil Jerram <neil@ossau.uklinux.net>
3350
3351 * read.c (scm_read_opts): New opts `elisp-vectors' and
3352 `escaped-parens'.
3353 (s_vector): New.
3354 (scm_lreadr): Use scm_lreadparen1 instead of scm_lreadparen. Make
3355 handling of elisp vector syntax dependent on SCM_ENABLE_ELISP and
3356 `elisp-vectors' option instead of SCM_ELISP_READ_EXTENSIONS.
3357 Allow "\(" and "\)" in strings when SCM_ENABLE_ELISP defined and
3358 `escaped-parens' option set.
3359 (scm_read_token): If elisp vector syntax active, disallow [ and ]
3360 in tokens.
3361 (scm_lreadparen): Rewrite as interface to scm_lreadparen1.
3362 (scm_lreadparen1): New.
3363
3364 * read.h: Remove conditionally compiled last arg to
3365 scm_lreadparen.
3366 (SCM_ELISP_VECTORS_P, SCM_ESCAPED_PARENS_P): New.
3367
3368 2004-01-23 Han-Wen Nienhuys <hanwen@xs4all.nl>
3369
3370 * eval.c (m_expand_body): remove stray variable new_body.
3371
3372 2004-01-22 Marius Vollmer <mvo@zagadka.de>
3373
3374 * eval.c (m_expand_body): Rewrite the expression in place (by
3375 overwriting FORMS) also when a letrec is constructed, not only
3376 when no definitions are found. Do not return rewritten expression
3377 to emphasize the in-place rewriting. Changed all users.
3378
3379 2004-01-19 Han-Wen Nienhuys <hanwen@xs4all.nl>
3380
3381 * gc.c: add protected_object_count, a number that is dumped from
3382 gc_stats()
3383
3384 2004-01-11 Marius Vollmer <mvo@zagadka.de>
3385
3386 * dynwind.h, dynwind.c (scm_frame_unwind,
3387 scm_frame_unwind_handler): Renamed and changed all uses.
3388 (scm_frame_rewind, scm_frame_rewind_handler): Likewise.
3389
3390 2004-01-11 Kevin Ryde <user42@zip.com.au>
3391
3392 * unif.c (scm_bit_count, scm_bit_position, s_scm_bit_set_star_x,
3393 s_scm_bit_count_star, s_scm_bit_invert_x): Clarify docstrings, as per
3394 changes made to scheme-compound.texi.
3395
3396 2004-01-10 Marius Vollmer <mvo@zagadka.de>
3397
3398 * print.c (scm_print_symbol_name): Handle #{`foo}#, #{,foo}#,
3399 #{.}#, and all numeric strings specially. Thanks to Paul Jarc!
3400
3401 * guile-snarf.in: Use mkdir to create a unique temporary directory
3402 that we can safely use. Thanks to Stefan Nordhausen!
3403
3404 2004-01-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3405
3406 * dynwind.h, dynwind.c (scm_i_dowinds): Removed 'explicit'
3407 argument since it is always zero now. Changed all callers.
3408 Removed code for handling fluids.
3409
3410 * fluids.c (scm_c_with_fluids): Use frames instead of adding to
3411 the wind chain explicitely. Use scm_c_with_fluid for the common
3412 case of only one fluid.
3413 (scm_with_fluid): New.
3414 (scm_c_with_fluid): Use frames instead of scm_c_with_fluids.
3415
3416 * fluids.h, fluids.c (scm_frame_fluid): New.
3417 (scm_with_fluid): New.
3418 (scm_i_swap_fluids, scm_i_swap_fluids_reverse): Removed.
3419
3420 * dynwind.c (scm_frame_end): Do not use scm_i_dowinds. Instead,
3421 do the unwinding directly. It is simple enough.
3422
3423 * dynwind.h, dynwind.c: Did the following renamings:
3424 scm_begin_frame -> scm_frame_begin,
3425 scm_end_frame -> scm_frame_end,
3426 scm_on_unwind -> scm_frame_unwind,
3427 scm_on_rewind -> scm_frame_rewind,
3428 scm_on_unwind_with_scm -> scm_frame_unwind_with_scm,
3429 scm_on_rewind_with_scm -> scm_frame_rewind_with_scm.
3430 Changed all uses.
3431
3432 * aync.h, async.c: Did the follwing renamings:
3433 scm_with_blocked_asyncs -> scm_frame_block_asyncs,
3434 scm_with_unblocked_asyncs -> scm_frame_unblock_asyncs.
3435 Changed all uses.
3436
3437 * ports.h, ports.c: Did the follwing renamings:
3438 scm_with_current_input_port -> scm_frame_current_input_port,
3439 scm_with_current_output_port -> scm_frame_current_output_port,
3440 scm_with_current_error_port -> scm_frame_current_error_port.
3441 Changed all uses.
3442
3443 2004-01-07 Kevin Ryde <user42@zip.com.au>
3444
3445 * numbers.c (s_bignum): Remove, not used since gmp bignums.
3446 Reported by Richard Todd.
3447
3448 * threads-plugin.h (SCM_MUTEX_MAXSIZE): Increase to 12*sizeof(long),
3449 for the benefit of powerpc-apple-darwin5.5. Reported by Richard Todd.
3450
3451 * unif.c (scm_aind): Test SCM_CONSP rather than !SCM_NULLP while
3452 traversing the args list, fixes segv if an improper list is given.
3453 Reported by Rouben Rostamian.
3454
3455 2004-01-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3456
3457 * ports.c (swap_ports, scm_with_current_foo_port): Do not allocate
3458 swap_data on stack, use a 'malloc obj'.
3459
3460 * fluids.h, fluids.c (scm_make_initial_fluids, scm_copy_fluids,
3461 scm_swap_fluids, scm_swap_fluids_reverse): Renamed to
3462 scm_i_... since they are internal. Changed all uses.
3463
3464 * dynwind.c (frame_print): Removed, use the default printer.
3465 (WINDER_F_MARK, WINDER_MARK_P, winder_mark): New.
3466 (scm_on_unwind_with_scm, scm_on_rewind_with_scm): New. Use above
3467 to protect SCM values.
3468
3469 * dynwind.h (SCM_F_WIND_EXPLICITELY,
3470 SCM_F_WIND_EXPLICITLY): It's "explicitly" not "explicitely", damn.
3471 Changed all uses.
3472 (scm_on_unwind_with_scm, scm_on_rewind_with_scm): New.
3473
3474 2004-01-05 Marius Vollmer <mvo@zagadka.de>
3475
3476 * ports.h, ports.c (scm_with_current_input_port,
3477 scm_with_current_output_port, scm_with_current_error_port): New.
3478
3479 * async.h, async.c (scm_with_blocked_asyncs,
3480 scm_with_unblocked_asyncs): New.
3481
3482 2004-01-03 Marius Vollmer <mvo@zagadka.de>
3483
3484 * dynwind.h, scm_dynwind.c (scm_t_frame_flags, scm_t_wind_flags,
3485 scm_begin_frame, scm_end_frame, scm_on_unwind, scm_on_rewind):
3486 New.
3487 (scm_dowinds, scm_i_dowinds): scm_dowinds has been renamed to
3488 scm_i_dowinds and extended to handle frames and to invoke a 'turn'
3489 function when the outermost wind point has been reached. The
3490 latter is used to copy a continuation stack at the right time.
3491 scm_dowinds remains available.
3492 (SCM_GUARDSP, SCM_BEFORE_GUARD, SCM_AFTER_GUARD, SCM_GUARD_DATA,
3493 tc16_guard, guards_print): Removed.
3494 (scm_internal_dynamic_wind): Reimplemented using frames.
3495
3496 * continuations.c (copy_stack): New, do only the stack copying
3497 part of copy_stack_and_call.
3498 (copy_stack_and_call): Copy the stack after unwinding and before
3499 rewinding.
3500 (scm_dynthrow): Do not call scm_dowinds, this is now done by
3501 copy_stack_and_call.
3502
3503 2004-01-04 Kevin Ryde <user42@zip.com.au>
3504
3505 * numbers.c (scm_less_p): Don't convert frac to float for compares,
3506 can give bad results due to rounding.
3507
3508 * stime.c (scm_current_time, scm_gettimeofday): Add a comment about
3509 setzone/restorezone protection for DOS.
3510
3511 2003-12-26 Marius Vollmer <mvo@zagadka.de>
3512
3513 * gen-scmconfig.h.in, gen-scmconfig.c: Arrange for scm_t_intmax
3514 and scm_t_uintmax to be defined in scmconfig.h
3515
3516 2003-12-03 Kevin Ryde <user42@zip.com.au>
3517
3518 * numbers.c (scm_less_p): Remove spurious xisnan from frac+big case.
3519
3520 * numbers.c (scm_make_ratio): Check for numerator equal to
3521 SCM_MOST_NEGATIVE_FIXNUM and bignum denominator the negative of that,
3522 giving integer -1.
3523
3524 * numbers.c (scm_real_part): Return fraction unchanged rather than
3525 converting to flonum.
3526
3527 2003-11-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
3528
3529 * modules.c (module_variable): Fixed (and thus simplified) the
3530 definition of SCM_BOUND_THING_P to reflect the fact that since
3531 after the 1.4 series of guile, obarrays only hold variable
3532 objects.
3533
3534 2003-11-30 Marius Vollmer <mvo@zagadka.de>
3535
3536 * numbers.c (scm_logand): It's "#b...", not "#\b...".
3537
3538 From Paul Jarc:
3539
3540 * read.c (scm_lreadr): Signal an error for invalid escape
3541 sequences in strings. Code cleanups too.
3542
3543 * print.c (scm_iprin1): use \xNN hexadecimal sequences when
3544 writing control characters in strings.
3545
3546 2003-11-21 Marius Vollmer <mvo@zagadka.de>
3547
3548 * ports.c (scm_drain_input): Bug fix: only access the port after
3549 checking that it indeed is one.
3550
3551 2003-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
3552
3553 * eval.c (s_bad_define): New static identifier.
3554
3555 (m_body): Fixed comment.
3556
3557 (scm_m_define): Don't generate memoized code for definitions that
3558 are not on the top level. As a consequence, no memoized code at
3559 all is generated for definitions any more: Top level definitions
3560 are executed immediately during memoization and internal
3561 definitions are handled separately in m_expand_body.
3562
3563 (scm_unmemocopy, unmemocopy): Removed code for unmemoizing
3564 definitions. Consequently, there is no unmemoizing code any more
3565 that might modify the environment. Thus, the old scm_unmemocopy
3566 is removed and the old unmemocopy is renamed to scm_unmemocopy.
3567
3568 (SCM_CEVAL): The SCM_IM_DEFINE keyword can no longer occur in
3569 memoized code. Call EVALCAR for continuations. Prefer !SCM_NULLP
3570 over SCM_NIMP in places, where the argument is known to be part of
3571 a proper list.
3572
3573 2003-11-21 Kevin Ryde <user42@zip.com.au>
3574
3575 * numbers.c (scm_abs): Allocate a new real only for negatives, as done
3576 for bignums.
3577
3578 * numbers.c (scm_bit_extract): Use mpz functions, rearrange inum case
3579 to share some shifting.
3580
3581 * numbers.c (scm_integer_expt): Don't mpz_init after scm_i_clonebig or
3582 scm_i_mkbig, since they do so already. Don't mpz_clear a bignum SCM,
3583 since gc does this.
3584
3585 2003-11-19 Marius Vollmer <mvo@zagadka.de>
3586
3587 * numbers.c (scm_make_ratio): Rewritten to have a simpler
3588 structure. Previously, not all cases with a negative denominator
3589 were covered.
3590
3591 * numbers.c (mem2decimal_from_point): use scm_divide instead of
3592 scm_divide2real when forming the fractional part. This allows
3593 "#e1.2" to yield 6/5.
3594
3595 * numbers.c (scm_i_fraction_equalp): Do not treat the return value
3596 of scm_equal_p as a C boolean, use SCM_FALSEP. Previously, all
3597 fractions were equal to each other regardless of value. Ooops.
3598
3599 * numbers.c (scm_rationalize): Return an inexact result when given
3600 inexact arguments.
3601
3602 * numbers.c (scm_exact_p, scm_inexact_p): Throw error for
3603 non-numbers.
3604
3605 2003-11-18 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3606
3607 Support for exact fractions from Bill Schottstaedt! Thanks!
3608
3609 * print.c (scm_iprin1): Handle fractions.
3610
3611 * objects.h (scm_class_fraction): New.
3612 * objects.c (scm_class_fraction): New.
3613 (scm_class_of): Handle fractions.
3614
3615 * hash.c (scm_hasher): Handle fractions.
3616
3617 * numbers.c: New code for handling fraction all over the place.
3618 (scm_odd_p, scm_even_p): Handle inexact integers.
3619 (scm_rational_p): New function, same as scm_real_p.
3620 (scm_round_number, scm_truncate_number, scm_ceiling, scm_floor):
3621 New exact functions that replace the inexact 'dsubr'
3622 implementations.
3623 (scm_numerator, scm_denominator): New.
3624
3625 * numbers.h (SCM_NUMP): Recognize fractions.
3626 (SCM_FRACTIONP, SCM_SLOPPY_FRACTIONP, SCM_FRACTION_NUMERATOR,
3627 SCM_FRACTION_DENOMINATOR, SCM_FRACTION_SET_NUMERATOR,
3628 SCM_FRACTION_SET_DENOMINATOR, SCM_FRACTION_REDUCED_BIT,
3629 SCM_FRACTION_REDUCED_SET, SCM_FRACTION_REDUCED_CLEAR,
3630 SCM_FRACTION_REDUCED): New.
3631 (scm_floor, scm_ceiling, scm_truncate_number, scm_round_number):
3632 New prototypes.
3633 (scm_make_ratio, scm_rationalize, scm_numerator, scm_denominator,
3634 scm_rational_p): New prototypes.
3635 (scm_i_dbl2num, scm_i_fraction2double, scm_i_fraction_equalp,
3636 scm_i_print_fraction): New prototypes.
3637
3638 * goops.c (create_standard_classes): Create "<fraction>" class.
3639
3640 * gc-mark.c (scm_gc_mark_dependencies): Handle fractions.
3641
3642 * gc-card.c (scm_i_sweep_card): Include scm_tc16_fraction as a
3643 case in the switch, but do nothing for now.
3644
3645 * eval.c (SCM_CEVAL, SCM_APPLY, call_dsubr_1): Convert fractions
3646 to doubles when calling 'dsubr' functions.
3647
3648 * eq.c (scm_eqv_p, scm_equal_p): Handle fractions.
3649
3650 2003-11-18 Rob Browning <rlb@defaultvalue.org>
3651
3652 * gen-scmconfig.c (main): remove public definition of
3653 SCM_SIZEOF___INT64 and SCM_SIZEOF_UNSIGNED___INT64 and add
3654 direct typedef of long_long and ulong_long inside deprecated block
3655 when appropriate.
3656
3657 * deprecated.h: move long_long and ulong_long definitions to
3658 gen-scmconfig.c so that we don't need to add SCM_SIZEOF___INT64
3659 and SCM_SIZEOF_UNSIGNED___INT64 to the public namespace.
3660
3661 2003-11-17 Marius Vollmer <mvo@zagadka.de>
3662
3663 * hash.c (scm_string_hash): New hashing algorithm that takes the
3664 complete string into account.
3665
3666 * eval.c (scm_m_generalized_set_x): Macroexpand the target when it
3667 is a list. This allows (@ ...) to work with set!.
3668 (scm_m_generalized_set_x): Use ASSERT_SYNTAX_2 instead of
3669 SCM_ASSYNT.
3670
3671 * script.c (scm_compile_shell_switches): Use scm_c_read_string for
3672 the "-e" option instead of scm_str2symbol. This allows things
3673 like (@ ...) to be specified for the entry point.
3674
3675 2003-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
3676
3677 * eval.c (scm_m_letstar): Create memoized code in place to
3678 minimize consing.
3679
3680 2003-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
3681
3682 * eval.c (s_splicing): Commented and reformulated.
3683
3684 (lookup_global_symbol, lookup_symbol): New static functions.
3685
3686 (s_test, s_bindings, s_duplicate_bindings, s_variable): Removed.
3687
3688 (try_macro_lookup, literal_p): Use lookup_symbol instead of
3689 creating a temporary pair for scm_lookupcar.
3690
3691 (scm_unmemocar, unmemocar): Renamed scm_unmemocar to unmemocar,
3692 created deprecated wrapper function scm_unmemocar.
3693
3694 (SCM_VALIDATE_NON_EMPTY_COMBINATION, scm_sym_else,
3695 scm_sym_unquote, scm_sym_uq_splicing, scm_sym_enter_frame,
3696 scm_sym_apply_frame, scm_sym_exit_frame, scm_sym_trace, f_apply,
3697 undefineds, sym_three_question_marks): Moved around without
3698 modifications.
3699
3700 * eval.c, eval.h (scm_macroexp, scm_unmemocar): Deprecated.
3701
3702 2003-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
3703
3704 * eval.c (try_macro_lookup, expand_user_macros, is_system_macro_p,
3705 m_expand_body, scm_m_expand_body): Grouped together with m_body.
3706 No further modifications.
3707
3708 2003-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
3709
3710 * eval.c (s_mixed_body_forms): New static identifier.
3711
3712 (canonicalize_define, scm_m_define): The check for a bad
3713 expression is performed in canonicalize_define now.
3714
3715 (try_macro_lookup, expand_user_macros, is_system_macro_p): New
3716 static helper functions for m_expand_body.
3717
3718 (m_expand_body): Use ASSERT_SYNTAX to signal syntax errors. Only
3719 expand user defined macros. Fixed handling of the definition/
3720 expression boundary. Fixed handling of definitions grouped with
3721 'begin. Use canonicalize_define to expand definitions.
3722
3723 2003-11-13 Marius Vollmer <mvo@zagadka.de>
3724
3725 * read.c (scm_lreadr): detect EOF after backslash, and interpret
3726 \xNN hexadecimal sequences. From Paul Jarc, thanks!
3727
3728 * snarf.h (SCM_SMOB, SCM_GLOBAL_SMOB, SCM_SMOB_MARK,
3729 SCM_GLOBAL_SMOB_MARK, SCM_SMOB_FREE, SCM_GLOBAL_SMOB_FREE,
3730 SCM_SMOB_PRINT, SCM_GLOBAL_SMOB_PRINT, SCM_SMOB_EQUALP,
3731 SCM_GLOBAL_SMOB_EQUALP, SCM_SMOB_APPLY, SCM_GLOBAL_SMOB_APPLY):
3732 New macros from Paul Jarc. Thanks!
3733
3734 * gc_os_dep.c (scm_get_stack_base): Provide a definition that
3735 return NULL when the machine type is unknown. Previously,
3736 gc_os_dep.c would refuse to compile.
3737
3738 2003-11-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
3739
3740 * eval.c (scm_m_body, m_body, scm_m_lambda, memoize_named_let,
3741 scm_m_let, scm_m_letrec, m_expand_body): Renamed static function
3742 scm_m_body to m_body.
3743
3744 2003-11-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
3745
3746 * eval.c, eval.h (scm_m_expand_body, m_expand_body): Deprecated
3747 public use of scm_m_expand_body in eval.h. In eval.c, renamed
3748 scm_m_expand_body to m_expand_body and made it static. Added
3749 deprecated wrapper scm_m_expand_body.
3750
3751 (scm_eval_body, SCM_CEVAL, SCM_APPLY): Use m_expand_body instead
3752 of scm_m_expand_body.
3753
3754 2003-11-09 Kevin Ryde <user42@zip.com.au>
3755
3756 * dynl.c (scm_dynamic_unlink): Need scm_list_1 on error message
3757 argument. Reported by Mike Gran.
3758
3759 2003-11-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
3760
3761 * eval.c (s_missing_body_expression): New static identifier.
3762
3763 (s_body): Removed.
3764
3765 (scm_m_expand_body): Fixed core dump when passing a body with
3766 defines, but without expressions (see additions to syntax.test).
3767 Use ASSERT_SYNTAX to signal syntax errors.
3768
3769 2003-11-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
3770
3771 * eval.c (canonicalize_define): New static helper function.
3772
3773 (memoize_define, canonicalize_define): Extract handling of
3774 function currying to canonicalize_define.
3775
3776 2003-11-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
3777
3778 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
3779 Make sure that error checking in debug mode is not worse than in
3780 standard mode.
3781
3782 2003-11-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
3783
3784 * eval.c (scm_m_body, scm_m_lambda): Documentation strings are not
3785 handled in scm_m_body any more, but rather in scm_m_lambda.
3786
3787 (scm_m_body, memoize_named_let, scm_m_let, scm_m_letstar,
3788 scm_m_letrec, scm_m_expand_body): Check for validity is done by
3789 calling functions of scm_m_body.
3790
3791 (scm_m_lambda): Avoid unnecessary consing when creating the
3792 memoized code.
3793
3794 2003-11-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
3795
3796 * eval.c (s_expression): Added comment.
3797
3798 (s_empty_combination, error_unbound_variable): New static
3799 identifiers.
3800
3801 (SCM_VALIDATE_NON_EMPTY_COMBINATION, SCM_EVALIM2, scm_lookupcar1):
3802 Use ASSERT_SYNTAX, syntax_error or error_unbound_variable to
3803 signal syntax errors.
3804
3805 (SCM_CEVAL): Separated handling of evaluator bytecodes and other
3806 scheme objects.
3807
3808 2003-10-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
3809
3810 * eval.c (unmemocar, sym_three_question_marks, scm_unmemocar):
3811 Grouped together with unmemocopy, without modifications.
3812
3813 (build_binding_list, unmemocopy): Renamed names of list arguments
3814 and variables to reflect the actual order of the list elements.
3815
3816 2003-10-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
3817
3818 * eval.c (s_defun): New static identifier.
3819
3820 (scm_m_nil_cond, scm_m_atfop, scm_m_undefine): Add comments. Use
3821 ASSERT_SYNTAX to signal syntax errors. Avoid unnecessary consing
3822 when creating the memoized code.
3823
3824 2003-10-19 Kevin Ryde <user42@zip.com.au>
3825
3826 * numbers.c (scm_ash): Revise docstring as per recent update to manual.
3827
3828 * numbers.c (scm_i_big2dbl): Rewrite, carefully rounding to "closest"
3829 in accordance with R5RS, which just mpz_get_d doesn't really give.
3830
3831 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
3832
3833 * eval.c (s_bad_slot_number): New static identifier.
3834
3835 (scm_m_atslot_ref, scm_m_atslot_set_x): Use ASSERT_SYNTAX to
3836 signal syntax errors. Avoid unnecessary consing when creating the
3837 memoized code.
3838
3839 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
3840
3841 * eval.c (scm_m_cont, scm_m_at_call_with_values,
3842 scm_m_generalized_set_x): Use ASSERT_SYNTAX to signal syntax
3843 errors. Avoid unnecessary consing when creating the memoized
3844 code.
3845
3846 (scm_m_generalized_set_x): Let scm_m_set_x handle the R5RS
3847 standard case. Make sure line and file information are copied to
3848 every created expression.
3849
3850 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
3851
3852 * eval.c (scm_m_set_x, scm_m_apply, scm_m_atbind): Use
3853 ASSERT_SYNTAX to signal syntax errors. Avoid unnecessary consing
3854 when creating the memoized code.
3855
3856 (scm_m_atbind): Reversed the order, in which the init expressions
3857 are stored and executed. The order of execution is now equal to
3858 the order in which the initializers of the let-forms are executed.
3859 Use check_bindings and transform_bindings.
3860
3861 (SCM_CEVAL): Eliminated SCM_NIMP in favor of more appropriate
3862 !SCM_NULLP. Added some comments.
3863
3864 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
3865
3866 * eval.c: Sorted include files alphabetically.
3867
3868 (scm_m_begin): Added comment.
3869
3870 (scm_m_or): Use ASSERT_SYNTAX to signal syntax errors. Avoid
3871 unnecessary consing when creating the memoized code.
3872
3873 (iqq, scm_m_quasiquote, scm_m_quote): Use ASSERT_SYNTAX to signal
3874 syntax errors. Be more specific about the kind of error that was
3875 detected.
3876
3877 (scm_m_quote, unmemocopy): As an optimization, vector constants
3878 are now inserted unquoted into the memoized code. During
3879 unmemoization the quotes are added again to provide syntactically
3880 correct code.
3881
3882 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
3883
3884 * eval.c (scm_m_let, scm_m_letstar, scm_m_letrec,
3885 scm_m_expand_body, check_bindings): Extracted syntax checking of
3886 bindings to new static function check_bindings.
3887
3888 (scm_m_let, memoize_named_let): Extracted handling of named let to
3889 new static function memoize_named_let.
3890
3891 (transform_bindings, scm_m_let, scm_m_letstar, scm_m_letrec): Use
3892 ASSERT_SYNTAX to signal syntax errors. Be more specific about the
3893 kind of error that was detected. Avoid use of SCM_CDRLOC. Avoid
3894 unnecessary consing when creating the memoized code.
3895
3896 2003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
3897
3898 * eval.c (s_bad_formals, s_bad_formal, s_duplicate_formal): New
3899 static identifiers.
3900
3901 (s_clauses, s_formals, s_duplicate_formals): Removed.
3902
3903 (scm_m_lambda): Use ASSERT_SYNTAX to signal syntax errors. Be more
3904 specific about the kind of error that was detected. Prepare for
3905 easier integration of changes for separated memoization.
3906
3907 2003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
3908
3909 * eval.c (s_duplicate_binding): New static identifier.
3910
3911 (scm_m_case): Call scm_c_memq instead of implementing it inline.
3912
3913 (scm_m_define): Added comment about how we check for duplicate
3914 formals.
3915
3916 (scm_m_do): Added check for duplicate bindings.
3917
3918 (scm_m_if): Use ASSERT_SYNTAX to signal syntax errors. Avoid
3919 unnecessary consing when creating the memoized code.
3920
3921 (scm_c_improper_memq, c_improper_memq, scm_m_lambda): Renamed
3922 scm_c_improper_memq to c_improper_memq, since it is not exported.
3923
3924 (transform_bindings): Call scm_c_memq rather than
3925 scm_c_improper_memq.
3926
3927 (SCM_CEVAL): Simplified handling of SCM_IM_IF forms.
3928
3929 2003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
3930
3931 * eval.c (s_bad_bindings, s_bad_binding, s_bad_exit_clause): New
3932 static identifiers.
3933
3934 (scm_m_do): Use ASSERT_SYNTAX to signal syntax errors. Be more
3935 specific about the kind of error that was detected. Avoid use of
3936 SCM_CDRLOC. Avoid unnecessary consing when creating the memoized
3937 code, this way also making sure that file name, line number
3938 information etc. remain available.
3939
3940 2003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
3941
3942 * eval.c (memoize_as_thunk_prototype): New static function.
3943
3944 (scm_m_delay, scm_m_future): Use memoize_as_thunk_prototype.
3945 Avoid unnecessary consing when creating the memoized code.
3946
3947 2003-10-12 Kevin Ryde <user42@zip.com.au>
3948
3949 * list.c (scm_append): Track argument number and use in error.
3950
3951 2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
3952
3953 * eval.c (s_missing_expression, s_bad_variable): New static
3954 identifiers.
3955
3956 (scm_m_define): Use ASSERT_SYNTAX to signal syntax errors. Prefer
3957 R5RS terminology for the naming of variables. Be more specific
3958 about the kind of error that was detected. Make sure file name,
3959 line number etc. are added to all freshly created expressions.
3960 Avoid unnecessary consing when creating the memoized code.
3961
3962 2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
3963
3964 * eval.c (s_extra_expression, s_misplaced_else_clause,
3965 s_bad_cond_clause, s_missing_recipient): New static identifiers.
3966
3967 (s_extra_case_clause): Removed.
3968
3969 (scm_m_case, scm_m_cond): If a clause appears after an else
3970 clause, report a misplaced else clause.
3971
3972 (scm_m_cond): Use ASSERT_SYNTAX to signal syntax errors. Be more
3973 specific about the kind of error that was detected. Handle bound
3974 'else and '=>. Avoid unnecessary consing when creating the
3975 memoized code.
3976
3977 (scm_m_cond, unmemocopy, SCM_CEVAL): Use SCM_IM_ELSE to memoize
3978 the syntactic keyword 'else and SCM_IM_ARROW to memoize the
3979 syntactic keyword '=>.
3980
3981 2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
3982
3983 * eval.c (scm_m_case): Allow empty lists of case labels.
3984
3985 2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
3986
3987 * tags.h (SCM_IM_ELSE, SCM_IM_ARROW): New memoizer codes.
3988
3989 * print.c (scm_isymnames): Add names for the new memoizer codes.
3990
3991 * eval.c (s_missing_clauses, s_bad_case_clause,
3992 s_extra_case_clause, s_bad_case_labels, s_duplicate_case_label,
3993 literal_p): New static identifiers.
3994
3995 (scm_m_case): Use ASSERT_SYNTAX to signal syntax errors. Be more
3996 specific about the kind of error that was detected. Check for
3997 duplicate case labels. Handle bound 'else. Avoid unnecessary
3998 consing when creating the memoized code.
3999
4000 (scm_m_case, unmemocopy, SCM_CEVAL): Use SCM_IM_ELSE to memoize
4001 the syntactic keyword 'else.
4002
4003 2003-10-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
4004
4005 * eval.c (s_bad_expression, syntax_error_key, syntax_error,
4006 ASSERT_SYNTAX, ASSERT_SYNTAX_2): New static identifiers.
4007
4008 (scm_m_and): Use ASSERT_SYNTAX to signal syntax errors. Avoid
4009 unnecessary consing when creating the memoized code.
4010
4011 2003-10-09 Kevin Ryde <user42@zip.com.au>
4012
4013 * numbers.c (scm_inexact_to_exact): Don't depend on what double->long
4014 cast gives for values bigger than a long, or for nan or inf.
4015
4016 2003-10-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
4017
4018 * smob.h (scm_make_smob_type): Made the declaration match the
4019 definition.
4020
4021 2003-10-07 Marius Vollmer <mvo@zagadka.de>
4022
4023 * goops.c, objects.h, smob.c, smob.h: Make type names char
4024 const * instead of char *. Thanks to Paul Jarc!
4025
4026 2003-10-02 Kevin Ryde <user42@zip.com.au>
4027
4028 * strports.c (scm_call_with_output_string): scm_get_output_string
4029 rather than scm_strport_to_string, so as to guard against the port
4030 having been closed by the called procedure. Reported by Nic Ferrier.
4031
4032 2003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
4033
4034 * numbers.h (SCM_INEXACTP): Removed uses of SCM_TYP16S.
4035
4036 * tags.h, deprecated.h (SCM_TYP16S): Deprecated and moved from
4037 tags.h to deprecated.h.
4038
4039 2003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
4040
4041 This set of patches introduces a new tc7 code scm_tc7_number for
4042 numbers. Bignums, reals and complex numbers are turned from smobs
4043 into subtypes of scm_tc7_number.
4044
4045 * tags.h (scm_tc7_number): New.
4046
4047 * eq.c (scm_equal_p), eval.c (SCM_CEVAL), evalext.c
4048 (scm_self_evaluating_p), gc-card.c (scm_i_sweep_card), gc-mark.c
4049 (scm_gc_mark_dependencies), goops.c (create_smob_classes), hash.c
4050 (scm_hasher), numbers.c, numbers.h (SCM_NUMP), objects.c
4051 (scm_class_of), print.c (scm_iprin1), smob.c
4052 (scm_smob_prehistory): Don't handle bignums, reals and complex
4053 numbers as subtypes of scm_tc7_smob any more.
4054
4055 * numbers.h, tags.h (scm_tc16_big, scm_tc16_real,
4056 scm_tc16_complex): Moved definitions from tags.h to numbers.h.
4057
4058 2003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
4059
4060 * numbers.c (scm_make_complex), gc-card.c (scm_i_sweep_card): Use
4061 sizeof (scm_t_complex) to determine the memory size of the
4062 malloc'd area for complex numbers.
4063
4064 2003-09-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
4065
4066 * numbers.c (scm_bigequal): Fixed.
4067
4068 2003-09-16 Marius Vollmer <mvo@zagadka.de>
4069
4070 * stime.c (scm_current_time): 'time' does not set errno so don't
4071 use SCM_SYSERROR for reporting errors.
4072
4073 2003-09-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
4074
4075 This set of patches eliminates the dependency between the
4076 implementation of evaluator specific memoization codes and special
4077 constants like #f, '() etc. ('flags'), which are not evaluator
4078 specific. The goal is to remove definitions of evaluator
4079 memoization codes completely from the public interface. This will
4080 make it possible to experiment more freely with optimizations of
4081 guile's internal representation of memoized code.
4082
4083 * objects.c (scm_class_of): Eliminate dependency on SCM_ISYMNUM.
4084
4085 * print.c (iflagnames): New array, holding the printed names of
4086 guile's special constants ('flags').
4087
4088 (scm_isymnames): Now holds only the printed names of the
4089 memoization codes.
4090
4091 (scm_iprin1): Separate the handling of memoization codes and
4092 guile's special constants.
4093
4094 * tags.h (scm_tc9_flag, SCM_ITAG9, SCM_MAKE_ITAG9, SCM_ITAG9_DATA,
4095 SCM_IFLAGNUM): new
4096
4097 (scm_tc8_char, scm_tc8_iloc, SCM_BOOL_F, SCM_BOOL_T,
4098 SCM_UNDEFINED, SCM_EOF_VAL, SCM_EOL, SCM_UNSPECIFIED, SCM_UNBOUND,
4099 SCM_ELISP_NIL, SCM_IM_DISPATCH, SCM_IM_SLOT_REF,
4100 SCM_IM_SLOT_SET_X, SCM_IM_DELAY, SCM_IM_FUTURE,
4101 SCM_IM_CALL_WITH_VALUES, SCM_IM_NIL_COND, SCM_IM_BIND): Changed
4102 values.
4103
4104 (SCM_IFLAGP): SCM_IFLAGP now only tests for flags.
4105
4106 (SCM_IFLAGP, SCM_MAKIFLAG, SCM_IFLAGNUM): Generalized to use the
4107 tc9 macros and scm_tc9_flag.
4108
4109 2003-09-15 Marius Vollmer <mvo@zagadka.de>
4110
4111 * posix.c (scm_setgroups): Check that the gid list is not too
4112 long. Thanks to Paul Jarc!
4113
4114 2003-09-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
4115
4116 * tags.h: Reduced the number of short instructions from 14 to 13.
4117 The typecode of the former 14th short instruction is now used to
4118 represent long instructions. Changed some comments to reflect
4119 this fact.
4120
4121 (SCM_MAKISYM): ISYMs get a new tc7 code, namely the one that was
4122 previously used by SCM_IM_DEFINE.
4123
4124 (SCM_IM_DEFINE): Turned into a long instruction.
4125
4126 * eval.c (unmemocopy, SCM_CEVAL): Treat SCM_IM_DEFINE as a long
4127 instruction.
4128
4129 * eval.c (SCM_CEVAL): Since characters and iflags have now a tc7
4130 code that is separate from all instructions, one level of dispatch
4131 for long instructions can be eliminated.
4132
4133 * print.c (scm_isymnames): Removed some commented code.
4134
4135 2003-09-12 Marius Vollmer <mvo@zagadka.de>
4136
4137 * __scm.h (SCM_FENCE): Use __memory_barrier with the Intel
4138 compiler on IA64.
4139
4140 * hashtab.h (scm_tc16_hashtable): Added "extern" declaration.
4141
4142 * modules.c (scm_module_reverse_lookup): Check that the obarray
4143 really is a hashtable and do nothing if not.
4144
4145 * inline.h: Use "extern inline" only with GCC. Use "static
4146 inline" else.
4147
4148 2003-09-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
4149
4150 * numbers.h (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Removed uses
4151 of SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
4152
4153 * numbers.h, deprecated.h (SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP,
4154 SCM_SLOPPY_COMPLEXP): Deprecated and moved from numbers.h to
4155 deprecated.h.
4156
4157 2003-09-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
4158
4159 * eq.c (scm_eqv_p, scm_equal_p): Removed uses of
4160 SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
4161
4162 * eq.c (scm_eqv_p, scm_equal_p): Reordered comparisons from
4163 0.0==some_expression to some_expression==0.0. The latter is
4164 better readable. The former is preferred by some people, since it
4165 leads to a compiler error when confusing == with =. However, when
4166 using gcc, a warning will be issued if in an if-statement an
4167 assigment appears. Since many Guile developers are using gcc,
4168 such errors will not remain unnoticed anyway. We can therefore
4169 focus on better readability.
4170
4171 2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
4172
4173 * tags.h: Added description of Guile's type system. Removed some
4174 old and misleading comments.
4175
4176 2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
4177
4178 * unit.c (scm_cvref): Eliminate unnecessary uses of SCM_NIMP,
4179 SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
4180
4181 2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
4182
4183 * numbers.h (SCM_MAKINUM): Define in terms of scm_tc2_int.
4184
4185 (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Define in terms of the
4186 respective SLOPPY macro.
4187
4188 2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
4189
4190 * eq.c (scm_equal_p): Use SCM_TYP7 to check if an object is of
4191 type string, not SCM_TYP7S.
4192
4193 2003-09-03 Kevin Ryde <user42@zip.com.au>
4194
4195 * numbers.c (scm_lognot): Correction to docstring, ones-complement not
4196 2s-complement.
4197
4198 * stime.c (scm_strptime): Add comment about glibc strptime %s and
4199 current timezone requiring SCM_DEFER_INTS.
4200
4201 2003-08-30 Neil Jerram <neil@ossau.uklinux.net>
4202
4203 * script.c (scm_compile_shell_switches): Make -s switch optional
4204 if file to be loaded does not begin with a `-'. (Thanks to Aaron
4205 VanDevender for the patch!)
4206
4207 2003-08-30 Kevin Ryde <user42@zip.com.au>
4208
4209 * numbers.c (scm_lognot): Rewrite using ~ and mpz_com, for directness
4210 and to have non-integer types rejected as per other logical funcs.
4211
4212 2003-08-28 Kevin Ryde <user42@zip.com.au>
4213
4214 * gc.h (scm_remember_upto_here_1): Revise comments on the asm form.
4215
4216 2003-08-23 Kevin Ryde <user42@zip.com.au>
4217
4218 * simpos.c (scm_system): Remove SCM_DEFER_INTS, system() should be
4219 thread safe, and could take a long time too.
4220
4221 2003-08-22 Kevin Ryde <user42@zip.com.au>
4222
4223 * numbers.c (scm_difference): Correction to bignum - negative inum.
4224
4225 2003-08-14 Kevin Ryde <user42@zip.com.au>
4226
4227 * gc.h (scm_remember_upto_here_1, scm_remember_upto_here_2)
4228 [__GNUC__]: Use volatile asm macros rather than a function call.
4229 * gc.c (scm_remember_upto_here_1, scm_remember_upto_here_2): Undefine
4230 macros while defining functions.
4231
4232 * simpos.c (getenv): Use <stdlib.h> for prototype.
4233 (scm_system): In docstring, refer to status:exit-val rather than
4234 "functions above".
4235
4236 2003-08-09 Kevin Ryde <user42@zip.com.au>
4237
4238 * srcprop.c (scm_source_properties): Return plist from hash if it's a
4239 list set by source-properties! rather than an SRCPROPS object,
4240
4241 2003-07-29 Kevin Ryde <user42@zip.com.au>
4242
4243 * properties.c (scm_primitive_property_ref): In docstring, note
4244 parameters to not-found-proc, use hyphens rather than underscores for
4245 that parameter name.
4246 (scm_primitive_property_set_x): In docstring, VAL is the value
4247 parameter not CODE.
4248
4249 2003-07-27 Marius Vollmer <mvo@zagadka.de>
4250
4251 * print.c (scm_print_symbol_name): handle more weird characters by
4252 escaping the symbol name properly. Thanks to Paul Jarc!
4253
4254 * posix.h (scm_setgroups): New prototype.
4255 * posix.c (scm_setgroups): New. Thanks to Paul Jarc!
4256 (scm_getgroups): Handle groups ids that don't fit into a fixnum.
4257 Don't use SCM_WRITABLE_VELTS.
4258
4259 * gc.h (SCM_GC_SET_CELL_BVEC): New.
4260 * gc-card.c (scm_i_init_card_freelist): Use it. Thanks to
4261 Matthias Koeppe!
4262
4263 * __scm.h (SCM_C_INLINE_KEYWORD): New.
4264 * numbers.c: Use it in place of SCM_C_INLINE so that the code
4265 compiles when SCM_C_INLINE is undefined.
4266
4267 2003-07-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
4268
4269 * __scm.h: Reformulated the architecture and compiler properties
4270 in terms of properties of scm_t_bits and SCM variables rather than
4271 in terms of c standard types. This is since it is not known which
4272 of the standard types scm_t_bits and SCM variables will be defined
4273 to.
4274
4275 2003-07-24 Kevin Ryde <user42@zip.com.au>
4276
4277 * numbers.c (scm_angle): Use scm_flo0 for non-negative inum, bignum
4278 and real.
4279
4280 2003-07-18 Kevin Ryde <user42@zip.com.au>
4281
4282 * numbers.c (scm_product): In complex * bignum, correction to
4283 REAL/IMAG fetch, x is the complex, not y.
4284
4285 2003-07-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4286
4287 * numbers.c (scm_odd_p, scm_even_p): Bugfix: Treat result of
4288 scm_inf_p test as Scheme values.
4289 (scm_sum): Bugfix: Normalize bignum created from a negative bignum
4290 and a positive inum.
4291 Use GNU indentation style.
4292
4293 2003-07-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
4294
4295 * values.c (scm_values): Build lists of length 1 by using
4296 scm_list_1 instead of using scm_cons.
4297
4298 2003-07-10 Kevin Ryde <user42@zip.com.au>
4299
4300 * deprecation.c (scm_c_issue_deprecation_warning_fmt): Add va_end.
4301 * list.c (scm_list_n): Ditto.
4302
4303 * gc-malloc.c (scm_gc_realloc): Define "ptr" at start of function.
4304
4305 2003-07-08 Matthias Koeppe <mkoeppe@merkur.math.uni-magdeburg.de>
4306
4307 * tags.h (scm_t_bits, scm_t_signed_bits, etc): Avoid solaris empty
4308 defines of INTPTR_MAX and UINTPTR_MAX, combine conditionals for
4309 scm_t_bits and scm_t_signed_bits to avoid any chance of one and not
4310 the other using intptr_t.
4311
4312 2003-07-08 Kevin Ryde <user42@zip.com.au>
4313
4314 * numbers.c (scm_make_polar): Use sincos, when available.
4315 (scm_magnitude): Use hypot.
4316
4317 * ports.c (scm_char_ready_p, scm_peek_char): In docstrings, don't use
4318 @footnote since it doesn't go through to guile-procedures.txt.
4319
4320 * threads.c (scm_call_with_new_thread): In docstring, use "( )"
4321 outside @var to quieten makeinfo, and use @code.
4322
4323 2003-07-06 Han-Wen Nienhuys <hanwen@cs.uu.nl>
4324
4325 * gc-malloc.c (decrease_mtrigger): new function
4326 (increase_mtrigger): new function, separate debug registering and
4327 mtrigger administration.
4328 (scm_gc_realloc): bugfix: do mtrigger administration before the
4329 actual realloc, for the realloc might invalidate a GC-d segment of
4330 memory. Thanks to Sam Hocevar for pointing this out.
4331 (scm_gc_realloc): use scm_malloc_reregister instead of
4332 unregistering and registering in sequence.
4333
4334 2003-07-03 Han-Wen Nienhuys <hanwen@cs.uu.nl>
4335
4336 * __scm.h (SCM_ASSERT): change "else" expansion to "do { } while (0)"
4337
4338 2003-07-02 Han-Wen Nienhuys <hanwen@cs.uu.nl>
4339
4340 * __scm.h (SCM_ASRTGO): add "else" to macro expansions with if
4341 clauses.
4342
4343 2003-06-29 Marius Vollmer <mvo@zagadka.de>
4344
4345 * deprecated.h (SCM_OPDIRP, scm_fport, scm_option, scm_srcprops,
4346 scm_srcprops_chunk, scm_info_frame, scm_stack, scm_array,
4347 scm_array_dim, SCM_ARRAY_CONTIGUOUS, SCM_FUNC_NAME, SCM_WTA,
4348 RETURN_SCM_WTA, SCM_VALIDATE_NUMBER_COPY,
4349 SCM_VALIDATE_NUMBER_DEF_COPY, SCM_VALIDATE_OPDIR): Re-added from
4350 the release_1_6 branch.
4351
4352 2003-06-25 Stefan Jahn <stefan@lkcc.org>
4353
4354 * continuations.c: Redeclaration of getcontext() via the
4355 __asm__ ("getcontext") directive.
4356
4357 * continuations.h: Include <ucontext.h> instead of
4358 <sys/ucontext.h>.
4359
4360 2003-06-21 Kevin Ryde <user42@zip.com.au>
4361
4362 * numbers.c (_GNU_SOURCE): #define, to get C99 things.
4363 (scm_asinh, scm_acosh, scm_atanh, scm_truncate, $asinh, $acosh,
4364 $atanh, truncate): Use C library asinh, acosh, atanh and trunc, when
4365 available.
4366 (scm_inexact_to_exact): Expand isfinite to its definition !xisinf.
4367 (isfinite): Remove, conflicts with C99 isfinite().
4368
4369 2003-06-19 Marius Vollmer <mvo@zagadka.de>
4370
4371 * deprecated.h, deprecated.c (scm_strhash, scm_sym2ovcell_soft,
4372 scm_sym2ovcell, scm_intern_obarray_soft, scm_intern_obarray,
4373 scm_symbol_value0, scm_string_to_obarray_symbol scm_intern_symbol,
4374 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned_p,
4375 scm_symbol_bound_p, scm_symbol_set_x, scm_gentemp): Re-added from
4376 the release_1_6 branch.
4377
4378 2003-06-14 Stefan Jahn <stefan@lkcc.org>
4379
4380 * threads.h: Redefined scm_getspecific() and scm_setspecific()
4381 to be functions instead of macros.
4382
4383 * threads.c: Conditionalized inclusion of <sys/time.h> and
4384 <unistd.h>.
4385 (scm_getspecific, scm_setspecific): Made these two function
4386 real part of the API.
4387
4388 * posix.c (s_scm_putenv): Added some code to make a
4389 (putenv "FOO="), i.e. setting an empty string, work also on
4390 Win32 systems. Thanks to Kevin Ryde for the proposal.
4391
4392 2003-06-12 Kevin Ryde <user42@zip.com.au>
4393
4394 * posix.c (scm_putenv): Free temporary ptr in mingw unset. Add
4395 freebsd to comment about need to use unsetenv.
4396
4397 2003-06-02 Marius Vollmer <mvo@zagadka.de>
4398
4399 * ports.c (scm_peek_char): Safe the column of the port around the
4400 getc/ungetc calls. Thanks to Dr. Peter Ivanyi!
4401
4402 2003-06-07 Kevin Ryde <user42@zip.com.au>
4403
4404 * tags.h: Use inttypes.h and stdint.h when available, for INTPTR_MAX
4405 and friends required by scm_t_bits setups.
4406
4407 2003-06-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
4408
4409 * tags.h (scm_tc2_int): Added.
4410
4411 * tags.h (scm_tc3_int_1, scm_tc3_int_2): Expressed in terms of
4412 scm_tc2_int.
4413
4414 * tags.h (scm_tcs_cons_imcar, scm_tcs_cons_nimcar, scm_tcs_struct,
4415 scm_tcs_closures): Hard coded values replaced by symbolic ones.
4416
4417 2003-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
4418
4419 * eval.c: Partially undid my patch from 2003-05-31. This patch
4420 caused the segfault referenced in the previous changelog entry.
4421
4422 2003-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
4423
4424 * tags.h: Fixed comment about the immediate type code layout.
4425
4426 * eval.c: Fixed handling of non-special instructions. Without
4427 this patch, guile will segfault on (#\0) and similar instructions.
4428
4429 2003-06-05 Kevin Ryde <user42@zip.com.au>
4430
4431 * numbers.c (scm_max, scm_min): For inum, bignum and real, if other
4432 operand is NaN, then return NaN. Also avoid passing NaN to mpz_cmp_d.
4433
4434 * read.c (scm_input_error): Pass arg list parameter to scm_error_scm,
4435 rather than SCM_EOL. Needed by "Unknown # object" case in scm_lreadr.
4436
4437 2003-06-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
4438
4439 * __scm.h, gc-card.c (SCM_DEBUG_DEBUGGER_SUPPORT,
4440 SCM_DEBUG_DEBUGGING_SUPPORT): Renamed macro
4441 SCM_DEBUG_DEBUGGER_SUPPORT to SCM_DEBUG_DEBUGGING_SUPPORT and
4442 generalized it to apply not only to C level functions but also to
4443 scheme level functions.
4444
4445 * debug.c, debug.h, eval.c (make-iloc, scm_make_iloc, iloc?,
4446 scm_iloc_p, dbg-make-iloc, scm_dbg_make_iloc, dbg-iloc?,
4447 scm_dbg_iloc_p): Moved functions scm_make_iloc, scm_iloc_p to
4448 eval.c, made them available under SCM_DEBUG_DEBUGGING_SUPPORT == 1
4449 only and renamed them to scm_dbg_make_iloc, scm_dbg_iloc_p,
4450 respectively.
4451
4452 * deprecated.h, eval.c, eval.h (SCM_ILOC00, SCM_IDINC,
4453 SCM_IDSTMSK): Deprecated. The macro definitions are moved from
4454 eval.h into eval.c and a copy is placed into deprecated.h.
4455
4456 * eval.c, eval.h (SCM_MAKE_ILOC): Removed from eval.h and placed
4457 into eval.c. This definition was not part of the API in any
4458 officially released version of guile and thus does not need to go
4459 through a phase of deprecation.
4460
4461 2003-06-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
4462
4463 * deprecated.c, deprecated.h, eval.c, eval.h (scm_s_expression,
4464 scm_s_test, scm_s_body, scm_s_bindings, scm_s_variable,
4465 scm_s_clauses, scm_s_formals): Deprecated. In eval.c the
4466 definitions are make static and renamed from scm_s_xxx to s_xxx.
4467 In deprecated.c the original definitions are copied.
4468
4469 * deprecated.h, eval.c, eval (SCM_EVALIM2, SCM_EVALIM, SCM_XEVAL,
4470 SCM_XEVALCAR): Deprecated. The macro definitions are moved from
4471 eval.h into eval.c and a copy (slightly modified to work in user
4472 code) is placed into deprecated.h.
4473
4474 * eval.c: Use the local static s_xxx definitions instead of the
4475 scm_s_xxx definitions throughout.
4476
4477 2003-06-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
4478
4479 This set of patches separates the representation of the cxr family
4480 of functions (car, cdr etc.) from the dsubr family of functions
4481 (i. e. functions that take a double precision floating point
4482 argument). Further, the algorithm for handling the cxr function
4483 is improved.
4484
4485 * eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_1), numbers.c
4486 (scm_asinh, scm_acosh, scm_atanh, scm_truncate, scm_round, floor,
4487 ceil, sqrt, fabs, exp, log, sin, cos, tan, asin, acos, atan, sinh,
4488 cosh, tanh), objects.c (scm_class_of), procprop.c
4489 (scm_i_procedure_arity), ramap.c (scm_array_map_x), tags.h
4490 (scm_tc7_dsubr, scm_tcs_subrs): Introduce scm_tc7_dsubr as new
4491 typecode for the dsubr family of functions.
4492
4493 * ramap.c (ramap_cxr, ramap_dsubr): Renamed ramap_cxr to
4494 ramap_dsubr.
4495
4496 * eval.c (SCM_CEVAL, SCM_APPLY, call_cxr_1), pairs.c
4497 (scm_init_pairs): Make use of the (now usable) second cell element
4498 of a scm_tc7_cxr function to implement the cxr family of functions
4499 more efficiently.
4500
4501 2003-05-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
4502
4503 * eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_0,
4504 scm_trampoline_1, scm_trampoline_2): Postpone error cases to the
4505 end of an if-else-if-sequence of checks.
4506
4507 2003-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
4508
4509 * eval.c (SCM_CEVAL): Improved readability of call-with-values
4510 execution. Generalize apply_closure to apply_proc and use that
4511 for call-with-values.
4512
4513 2003-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
4514
4515 * eval.c (SCM_CEVAL): Avoid one level of indirection when applying
4516 a non closure.
4517
4518 2003-05-30 Stefan Jahn <stefan@lkcc.org>
4519
4520 * posix.c (s_scm_putenv): Use the new HAVE_UNSETENV
4521 appropriately for mingw32 hosts.
4522
4523 * numbers.h: Defining copysign(), isnan() and finite() to
4524 be prefixed by a single '_' for mingw32 hosts.
4525
4526 2003-05-30 Kevin Ryde <user42@zip.com.au>
4527
4528 * numbers.c (z_negative_one): New variable.
4529 (scm_init_numbers): Initialize it.
4530 (scm_logcount): Use it and mpz_hamdist to count zeros for negatives.
4531
4532 2003-05-29 Stefan Jahn <stefan@lkcc.org>
4533
4534 * win32-dirent.c: Use malloc() instead of scm_malloc().
4535
4536 * stime.c (s_scm_strftime): Add a type cast to avoid compiler
4537 warning.
4538
4539 * posix.c (s_scm_putenv): Disable use of unsetenv() for the
4540 mingw32 build.
4541
4542 * modules.c (s_scm_module_import_interface): Renamed local
4543 variable interface to _interface. Seems like 'interface'
4544 is a special compiler directive for the mingw32 compiler.
4545
4546 * mkstemp.c: Provide prototype to avoid compiler warning.
4547
4548 * load.c (s_scm_search_path): Fixed absolute and relative
4549 path detections for native Windows platforms.
4550
4551 * gc.h, threads.h: Export some more symbols using SCM_API (necessary
4552 to build on mingw32).
4553
4554 * gc-freelist.c ("s_scm_map_free_list",
4555 "s_scm_gc_set_debug_check_freelist_x"): Fixed use of FUNC_NAME.
4556
4557 * fports.c (fport_fill_input): Disable use of
4558 fport_wait_for_input() on Win32 platforms.
4559
4560 * filesys.c (s_scm_basename): Fixed __MINGW32__ code.
4561
4562 * Makefile.am: Modified some rules for cross compiling.
4563
4564 2003-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
4565
4566 * eval.c (SCM_CEVAL): In case of an application, all checks for a
4567 proper function object and the correct number of arguments are now
4568 performed in the application part of SCM_CEVAL.
4569
4570 (scm_badformalsp): Removed.
4571
4572 2003-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
4573
4574 * deprecated.c (scm_read_and_eval_x): Fixed C99-ism.
4575
4576 2003-05-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4577
4578 * num2integral.i.c (NUM2INTEGRAL): Avoid warning about conditional
4579 always being false by inserting preprocessor conditional. (Thanks
4580 to Bruce Korb.)
4581
4582 * __scm.h (SCM_STACK_PTR): New macro. (Cast argument through
4583 (void *) in order to avoid an aliasing warning; thanks to Bruce
4584 Korb.)
4585
4586 * stackchk.h (SCM_STACK_OVERFLOW_P): Use SCM_STACK_PTR.
4587
4588 * threads.c (suspend, launch_thread, scm_threads_mark_stacks): Use
4589 SCM_STACK_PTR.
4590
4591 * threads.c (scm_threads_mark_stacks): Bugfix: Changed
4592 thread->base --> t->base.
4593
4594 * eval.c (SCM_CEVAL): Don't cast argument of SCM_STACK_OVERFLOW_P.
4595
4596 2003-05-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4597
4598 * deprecated.h, deprecated.c (scm_makstr, scm_makfromstr,
4599 scm_variable_set_name_hint, scm_builtin_variable,
4600 scm_internal_with_fluids, scm_make_gsubr,
4601 scm_make_gsubr_with_generic, scm_create_hook, SCM_LIST0,
4602 SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5, SCM_LIST6,
4603 SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify, scm_sloppy_memq,
4604 scm_sloppy_memv, scm_sloppy_member, scm_read_and_eval_x,
4605 scm_subr_entry, SCM_SUBR_DOC, scm_make_subr,
4606 scm_make_subr_with_generic, scm_make_subr_opt,
4607 scm_call_catching_errors, scm_make_smob_type_mfpe,
4608 scm_set_smob_mfpe, scm_strprint_obj, scm_read_0str, scm_eval_0str,
4609 SCM_CHARS, SCM_UCHARS, SCM_LENGTH): Re-added from the release_1_6
4610 branch. Some have been slightly rewritten.
4611 (scm_i_object_chars, scm_i_object_length): New, to support
4612 SCM_CHARS, SCM_UCHARS, and SCM_LENTH.
4613
4614 2003-05-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
4615
4616 * eval.c (scm_m_do, unmemocopy, SCM_CEVAL): Reversed order of
4617 names and inits in the memoized code of do.
4618
4619 2003-05-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4620
4621 * c-tokenize.lex (yyget_lineno, yyget_in, yyget_out, yyget_leng,
4622 yyget_text, yyset_lineno, yyset_in, yyset_out, yyget_debug,
4623 yyset_debug, yylex_destroy): Added prototypes (otherwise we'll get
4624 a compilation error if error-on-warning is enabled).
4625
4626 2003-05-17 Marius Vollmer <mvo@zagadka.de>
4627
4628 * c-tokenize.lex: Gobble up complete lines after a '#'. This
4629 removes preprocessor directives from the snarfage that might
4630 otherwise confuse us. These directives appear when compiling with
4631 "-g3", for example.
4632
4633 2003-05-16 Han-Wen Nienhuys <hanwen@cs.uu.nl>
4634
4635 * ChangeLog: add my surname
4636
4637 * srcprop.c (scm_finish_srcprop): use
4638 scm_gc_register_collectable_memory()
4639 (scm_make_srcprops): idem.
4640
4641 2003-05-14 Han-Wen Nienhuys <hanwen@cs.uu.nl>
4642
4643 * gc-malloc.c (scm_gc_register_collectable_memory): avoid
4644 wrap-around for scm_mtrigger
4645 (scm_gc_register_collectable_memory): abort on overflowing
4646 scm_mallocated().
4647
4648 2003-05-13 Kevin Ryde <user42@zip.com.au>
4649
4650 * numbers.c (xmpz_cmp_d): New macro, handling infs if gmp doesn't.
4651 (scm_num_eq_p, scm_less_p, scm_max, scm_min): Use it.
4652
4653 2003-05-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4654
4655 * backtrace.c (scm_display_error_message): Introduced fancy
4656 printing with max level 7 and length 10. (Purpose: avoid printing
4657 gigantic objects in error messages.)
4658
4659 * print.c, print.h (scm_i_port_with_print_state): New function.
4660
4661 * print.c (scm_iprin1, scm_printer_apply,
4662 scm_port_with_print_state): Use scm_i_port_with_print_state.
4663 (scm_simple_format): Modified not to destroy print states.
4664 (print_state_mutex): New mutex.
4665 (scm_make_print_state, scm_free_print_state, scm_prin1):
4666 Lock/unlock print_state_mutex.
4667
4668 * deprecated.h (SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK):
4669 Use current names in definitions.
4670
4671 2003-05-10 Kevin Ryde <user42@zip.com.au>
4672
4673 * numbers.c (scm_num_eq_p, scm_less_p): Don't pass NaN to mpz_cmp_d.
4674
4675 * numbers.c (scm_integer_length): On negative bignums, adjust
4676 mpz_sizeinbase to account for it looking at absolute value where we
4677 want ones-complement.
4678
4679 * numbers.c (scm_gcd): In bignum/inum, don't pass yy==0 to mpz_gcd_ui
4680 since we're only using the ulong return value, and x might not fit.
4681
4682 2003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
4683
4684 * eval.c, eval.h, read.c, read.h (scm_sym_dot): Moved from eval to
4685 read. This will allow to make the definition in read.c static.
4686
4687 2003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
4688
4689 * eval.c, eval.h, evalext.c, evalext.h (scm_m_undefine): Moved
4690 from evalext to eval. This will allow to make some of the
4691 definitions in eval.c static.
4692
4693 2003-05-06 Kevin Ryde <user42@zip.com.au>
4694
4695 * numbers.c (scm_difference): In inum - bignum, handle negative inum.
4696 (scm_logcount): Use mpz_com, not mpz_neg.
4697
4698 2003-05-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
4699
4700 The purpose of this patch is to make guile's internal memoizers
4701 distinguishable from memoizing macros created on the scheme level
4702 or from user provided primitive memoizing macros. The reason is,
4703 that the internal memoizers are the only ones that are allowed to
4704 transform their scheme input into memoizer byte code, while all
4705 other memoizing macros may only transform scheme code into new
4706 scheme code.
4707
4708 To achieve this, a new macro type 'builtin-macro!' is introduced.
4709 Currently, 'builtin-macro!'s are handled as memoizing macros, but
4710 this will change when the memoizer and executor are separated.
4711
4712 * macros.[ch] (scm_i_makbimacro): New.
4713
4714 * macros.h (SCM_BUILTIN_MACRO_P): New.
4715
4716 * macros.c (macro_print, scm_macro_type): Support builtin-macro!s.
4717
4718 * eval.c, goops.c: All of guile's primitive memoizing macros are
4719 primitive builtin-macros now.
4720
4721 * eval.c (scm_macroexp, SCM_CEVAL): Make sure the primitive
4722 builtin-macros are handled equally to memoizing macros.
4723
4724 2003-05-04 Marius Vollmer <mvo@zagadka.de>
4725
4726 * throw.c (scm_ithrow): Remove "asm volatile" hack. It used to
4727 work around a bug in GCC 2.95.2 but is now a bug in itself.
4728
4729 2003-05-02 Marius Vollmer <mvo@zagadka.de>
4730
4731 * deprecated.h (scm_rstate, scm_rng, SCM_SLOPPY_CONSP,
4732 SCM_SLOPPY_NCONSP, scm_tc7_ssymbol, scm_tc7_msymbol,
4733 scm_tcs_symbols): New.
4734
4735 2003-04-30 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4736
4737 * deprecated.h, deprecated.c (scm_protect_object,
4738 scm_unprotect_object, SCM_SETAND_CAR, SCM_SETOR_CAR,
4739 SCM_SET_AND_CDR, SCM_SET_OR_CDR, SCM_FREEP, SCM_NFREEP,
4740 SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16,
4741 SCM_GCCDR, scm_remember, scm_the_root_module, scm_make_module,
4742 scm_ensure_user_module, scm_load_scheme_module, scm_port,
4743 scm_ptob_descriptor, scm_port_rw_active,
4744 scm_close_all_ports_except): New.
4745
4746 * ports.c (scm_c_port_for_each): New function, mostly copied from
4747 scm_port_for_each.
4748 (scm_port_for_each): Reimplemented using scm_c_port_for_each.
4749 * ports.h (scm_c_port_for_each): New prototype.
4750
4751 2003-04-28 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4752
4753 * eval.c (scm_m_atdispatch): Removed until actually needed. (This
4754 macro was introduced in anticipation of GOOPS method compilation
4755 code.)
4756
4757 * goops.c: Removed binding of @dispatch.
4758
4759 2003-04-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
4760
4761 * eval.c, goops.c (@dispatch, @slot-ref, @slot-set!): Move the
4762 instructions that bind the macros on the scheme level back to
4763 goops.c in order to make sure again that the bindings go into the
4764 (oop goops) module and are not visible from the outside.
4765
4766 2003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
4767
4768 * eval.c: Non functional change: Separated R5RS and non-R5RS
4769 macros into different sections of the file and ordered the
4770 memoizers alphabetically.
4771
4772 2003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
4773
4774 * eval.c (scm_ilookup): Rewritten to improve readability.
4775
4776 2003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
4777
4778 * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2):
4779 Partially reverted patch from 2003-04-23 in oder to find a better
4780 compromise between readability and debuggability.
4781
4782 2003-04-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
4783
4784 * eval.c, eval.h, goops.c, goops.h (scm_m_atslot_ref,
4785 scm_m_atslot_set_x, scm_m_atdispatch): Move the declarations and
4786 definitions of the special goops memoizers from goops.[ch] to
4787 eval.[ch]. Hmm... it seems that scm_m_atdispatch is not used
4788 throughout guile.
4789
4790 2003-04-24 Mikael Djurfeldt <mdj@kvast.blakulla.net>
4791
4792 * ports.c, ports.h (scm_i_port_table_mutex): New mutex.
4793
4794 * fports.c (scm_evict_ports): Lock/unlock scm_i_port_table_mutex.
4795
4796 * ports.c (scm_close_port, scm_flush_all_ports): Ditto.
4797
4798 * ioext.c (scm_fdes_to_ports): Ditto.
4799
4800 * vports.c (scm_make_soft_port): Changed SCM_DEFER/ALLOW_INTS into
4801 lock/unlock scm_i_port_table_mutex.
4802
4803 * strports.c (scm_mkstrport): Ditto.
4804
4805 * ports.c (scm_void_port, scm_port_for_each): Ditto.
4806
4807 * fports.c (scm_fdes_to_port): Ditto.
4808
4809 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
4810
4811 This set of patches contains no functional changes, only debatable
4812 minor stylistic ones. Still, in order to prepare a patch between
4813 my local copy and the CVS version, I decided to submit the changes
4814 below. Then, the patch will hopefully only contain relevant
4815 modifications :-)
4816
4817 * eval.c (iqq): Added const specifier.
4818
4819 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
4820 Use NULL instead of 0 to indicate that a pointer is returned.
4821 Removed some misleading 'fall through' comments.
4822
4823 * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2):
4824 Split up long expressions into smaller ones to be more debugging
4825 friendly.
4826
4827 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
4828
4829 * eval.h (SCM_ENTER_FRAME_HDLR, SCM_APPLY_FRAME_HDLR,
4830 SCM_EXIT_FRAME_HDLR): Use SCM_PACK to convert data to a SCM value
4831 rather than casting to SCM.
4832
4833 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
4834
4835 * sort.c, pairs.h: Removed unnecessary includes.
4836
4837 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
4838
4839 * sort.c: Replaced hand-made trampline code by the new official
4840 mechanism from eval.c. This fixes a segfault in the new test file
4841 sort.test.
4842
4843 (quicksort, compare_function, scm_restricted_vector_sort_x,
4844 scm_sorted_p, scm_merge, scm_merge_list_x, scm_merge_x,
4845 scm_merge_list_step, scm_sort_x, scm_sort, scm_merge_vector_x,
4846 scm_merge_vector_step, scm_stable_sort_x, scm_stable_sort,
4847 scm_sort_list_x, scm_sort_list): Use trampoline mechanism from
4848 eval.c.
4849
4850 (subr2less, lsubrless, closureless, applyless, scm_cmp_function,
4851 cmp_fun_t): Removed.
4852
4853 (compare_function): Added.
4854
4855 * sort.c (quicksort, SWAP, stack_node): Replaced pointer
4856 arithmetics with index arithmetics. Changed quicksort to work on
4857 an array of SCM values instead of an array of characters. Avoid
4858 bytewise copying of SCM elements. Avoid allocating memory on the
4859 stack with alloca. Fixed some comments.
4860
4861 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
4862
4863 * eval.c (EXTEND_ENV): Eliminated.
4864
4865 (unmemocopy, SCM_CEVAL, SCM_APPLY): Use SCM_EXTEND_ENV instead of
4866 EXTEND_ENV.
4867
4868 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
4869
4870 * __scm.h (SCM_DEBUG_DEBUGGER_SUPPORT): New compile-time option.
4871
4872 * gc.card.c (scm_gc_marked_p): Fixed compiler warning when
4873 compiling with SCM_DEBUG==1 by moving definition behind prototype.
4874
4875 * gc.card.c (scm_dbg_t_list_cell, scm_dbg_t_double_cell,
4876 scm_dbg_gc_marked_p, scm_dbg_gc_get_card, scm_dbg_gc_get_bvec,
4877 scm_t_list_cell_struct, scm_t_list_cell, scm_t_double_cell,
4878 scm_gc_marked_p, scm_gc_get_card, scm_gc_get_bvec): Fixed
4879 functions such that they check if the object is a non-immediate.
4880 Further, renamed identifiers to use the scm_dbg_ prefix and made
4881 their inclusion into the lib dependent of the
4882 SCM_DEBUG_DEBUGGER_SUPPORT compile time option.
4883
4884 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
4885
4886 * __scm.h: Fixed comment about the SCM_DEBUG_TYPING_STRICTNESS
4887 debug option.
4888
4889 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
4890
4891 * list.c (scm_ilength, scm_last_pair), unif.c (l2ra): Prefer
4892 !SCM_CONSP over SCM_NCONSP. Now, guile itself does not include
4893 any calls to SCM_NCONSP any more.
4894
4895 * unif.c (l2ra): Eliminate redundant check.
4896
4897 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
4898
4899 * list.c (scm_cons_star), ramap.c (scm_ra_sum, scm_ra_product,
4900 scm_array_map_x), unif.c (l2ra): Prefer !SCM_NULLP over
4901 SCM_NNULLP. Now, guile itself does not include any calls to
4902 SCM_NNULLP any more.
4903
4904 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
4905
4906 * eval.c (unmemocopy, SCM_APPLY, scm_map, scm_for_each,
4907 scm_copy_tree): Place assignment expressions which are part of
4908 other expressions into an expression of their own.
4909
4910 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
4911
4912 * goops.c (TEST_CHANGE_CLASS, scm_sys_initialize_object): Don't
4913 compare SCM values with !=.
4914
4915 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
4916
4917 * eval.c, eval.h, evalext.c, evalext.h (scm_sym_setter,
4918 scm_m_generalized_set_x, scm_init_evalext): Move the declaration
4919 and definition of the memoizer for the generalized set! macro from
4920 evalext.[ch] to eval.[ch]. Use the SCM_SYNTAX snarfer macro to
4921 define the macro object.
4922
4923 * eval.c, eval.h (s_set_x, scm_s_set_x, scm_m_set_x,
4924 scm_m_generalized_set_x): Since now scm_s_set_x is only used in
4925 eval.c, it is made static and renamed to s_set_x.
4926
4927 * evalext.c (scm_defined_p, scm_m_undefine): Prefer !SCM_<foo>
4928 over SCM_N<foo>.
4929
4930 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
4931
4932 * eval.c, root.h (scm_undefineds, SCM_NUM_PROTECTS, undefineds,
4933 scm_init_eval): Made scm_undefineds static in eval.c, renamed it
4934 to undefineds and registered the object as a permanent object.
4935
4936 * eval.c, eval.h (scm_f_apply, scm_init_eval): Made scm_f_apply
4937 static in eval.c, renamed it to f_apply and registered the object
4938 as a permanent object.
4939
4940 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
4941
4942 * eval.c (SCM_BIT7, SCM_BIT8, unmemocopy, SCM_CEVAL): Renamed
4943 file-local macro SCM_BIT8 to SCM_BIT7, which is more appropriate.
4944
4945 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
4946
4947 * numbers.c (scm_logtest): Fixed argument bug in the call to
4948 mpz_and, which showed up when compiling with SCM_DEBUG defined.
4949
4950 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
4951
4952 * gc-card.c (scm_i_sweep_card, scm_i_init_card_freelist): Fixed
4953 type errors that showed up when compiling with SCM_DEBUG defined.
4954
4955 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
4956
4957 * continuations.c, continuations.h, eval.c, eval.h, extensions.c,
4958 gsubr.c, guile.c, init.c, read.c, root.c, root.h, stackchk.h,
4959 throw.c: Removed uses of DEBUG_EXTENSIONS and DYNAMIC_LINKING to
4960 fix compile errors with --disable-deprecated.
4961
4962 2003-04-17 Rob Browning <rlb@defaultvalue.org>
4963
4964 * numbers.c (scm_integer_expt): fix case where we were declaring
4965 vars in the middle of a statement block. Thanks to Thamer
4966 Al-Harbash.
4967
4968 2003-04-17 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4969
4970 * goops.c (TEST_CHANGE_CLASS): Update variable class after class
4971 change.
4972
4973 * eq.c (scm_eqv_p): Turned into a primitive generic.
4974
4975 2003-04-16 Rob Browning <rlb@defaultvalue.org>
4976
4977 * gc_os_dep.c: Added patch for UnixWare and OpenUNIX support.
4978 Thanks to Boyd Gerber.
4979 Added check for __arm__ in addition to arm for LINUX and copied
4980 __s390__ defines from upstream libgc. Thanks to James Treacy for
4981 reporting the problems.
4982
4983 * numbers.c (PTRDIFF_MIN): use SCM_CHAR_BIT.
4984
4985 * socket.c: use SCM_CHAR_BIT.
4986
4987 * random.c (scm_c_random_bignum): use SCM_CHAR_BIT.
4988
4989 * num2integral.i.c (NUM2INTEGRAL): use SCM_CHAR_BIT.
4990
4991 2003-04-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
4992
4993 * feature.c (scm_init_feature): Always add threads feature.
4994
4995 2003-04-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4996
4997 * goops.c (scm_sys_fast_slot_ref): Use SCM_SLOT instead of
4998 scm_at_assert_bound_ref. (We don't want the unbound check. See
4999 oop/goops/active-slot.scm.)
5000
5001 2003-04-14 Rob Browning <rlb@defaultvalue.org>
5002
5003 * tags.h: scm_t_intptr should have been intptr_t.
5004
5005 2003-04-13 Rob Browning <rlb@defaultvalue.org>
5006
5007 * __scm.h (SCM_FLUSH_REGISTER_WINDOWS): don't just rely on "sparc"
5008 test. Instead use
5009 #if defined (sparc) || defined (__sparc__) || defined (__sparc)
5010 as gc_os_dep.c suggests is appropriate.
5011
5012 * goops.c (prep_hashsets): make static to match prototype.
5013 (scm_sym_args): SCM_SYMBOL -> SCM_GLOBAL_SYMBOL. Thanks to Albert
5014 Chin.
5015
5016 * c-tokenize.lex: remove trailing comma from enum. Thanks to
5017 Albert Chin.
5018
5019 * gc_os_dep.c: add NetBSD powerpc config info. Thanks to Thomas
5020 Klausner.
5021
5022 2003-04-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5023
5024 * goops.c (scm_sys_prep_layout_x): Instance allocation is now
5025 indicated through extra fields in getters-n-setters.
5026 (scm_add_slot): Adapted to new format of getters_n_setters slot.
5027 (Thanks to Andy Wingo.)
5028
5029 2003-02-25 Han-Wen Nienhuys <hanwen@cs.uu.nl>
5030
5031 * gc-segment.c: add comment
5032
5033 2003-04-07 Rob Browning <rlb@defaultvalue.org>
5034
5035 * debug.h: change "id" arg name to "info_id" to avoid objective-c
5036 clash.
5037
5038 * num2integral.i.c (NUM2INTEGRAL): fix bug pointed out by Mikael
5039 and add regression test to standalone/.
5040
5041 2003-04-06 Rob Browning <rlb@defaultvalue.org>
5042
5043 * strings.c (scm_mem2string): use memcpy rather than by-hand loop.
5044 Thanks to Dale P. Smith.
5045
5046 * random.c: #include gmp.h.
5047 (scm_c_random_bignum): normalize result on return.
5048
5049 * init.c: #include gmp.h.
5050
5051 * numbers.h: remove the gmp.h #include (not needed now).
5052
5053 * posix.h: change occurences of "id" to something else so we don't
5054 cause trouble when included via objective-c (can't hurt, might
5055 help). Still have usage in debug.h, though.
5056
5057 2003-04-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5058
5059 * random.c (scm_c_random_bignum): Don't generate a random number
5060 equal to m (the second argument of scm_c_random_bignum); only
5061 generate numbers in the range 0 <= r < m.
5062 (scm_c_default_rstate): Use SCM_VARIABLE_REF to access
5063 scm_var_random_state.
5064
5065 * num2integral.i.c (INTEGRAL2BIG): Put negation of n inside then
5066 clause.
5067
5068 2003-04-05 Rob Browning <rlb@defaultvalue.org>
5069
5070 * modules.c (scm_module_import_interface): move declaration of
5071 uses before any code.
5072
5073 2003-04-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5074
5075 * Makefile.am (scmconfig.h): Look for config.h in top_builddir,
5076 not top_srcdir.
5077
5078 * hashtab.c (rehash_after_gc): Clear to_rehash list before
5079 processing it in order to avoid an infinite loop.
5080
5081 * print.c (scm_prin1): Remember old state of pstate->writingp.
5082
5083 2003-04-05 Marius Vollmer <mvo@zagadka.de>
5084
5085 * Changed license terms to the plain LGPL thru-out.
5086
5087 2003-04-04 Rob Browning <rlb@defaultvalue.org>
5088
5089 * socket.c (FLIPCPY_NET_HOST_128): new macro.
5090 (ipv6_net_to_num, ipv6_num_to_net, bignum_in_ipv6_range_p):
5091 rewrite to handle GMP bignums.
5092
5093
5094 * random.c (scm_c_random_bignum): rewrite to handle GMP bignums.
5095
5096 * ports.c (scm_getc): minor tweak.
5097
5098 * numbers.h: remove SCM_BIGDIG conditionals, reorganize, and
5099 rewrite to handle GMP bignums.
5100
5101 * numbers.c: rewrite *many* functions to handle GMP bignums.
5102
5103 * num2integral.i.c (NUM2INTEGRAL, INTEGRAL2NUM, INTEGRAL2BIG):
5104 handle GMP bignums.
5105
5106 * num2float.i.c (NUM2FLOAT): handle GMP bignums.
5107
5108 * init.c (check_config): remove SCM_BIGDIG conditionals.
5109 (scm_init_guile_1): test to make sure mpz_t fits in a double_cell.
5110
5111 * gc-card.c ("sweep_card"): handle new mpz_t bignums.
5112
5113 * eval.c: remove SCM_BIGDIG conditionals.
5114
5115 * eq.c (s_scm_eqv_p): scm_i_bigcomp -> scm_i_bigcmp.
5116
5117 2003-03-31 Rob Browning <rlb@defaultvalue.org>
5118
5119 * Makefile.am (scmconfig.h): change srcdir to builddir. (Thanks
5120 to Kevin Ryde.)
5121
5122 2003-03-27 Rob Browning <rlb@defaultvalue.org>
5123
5124 * threads.h: 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 * threads.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 * tags.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 * stacks.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 * stackchk.h: 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 * stackchk.c: 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 * sort.c: 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 * read.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 * random.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 * print.c: 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 * objects.c: fix various preprocessor usages of new public
5165 symbols to expect 0 or 1 values rather than 1 or undefined.
5166 i.e. change #ifdef to #if, etc.
5167
5168 * numbers.h: fix various preprocessor usages of new public
5169 symbols to expect 0 or 1 values rather than 1 or undefined.
5170 i.e. change #ifdef to #if, etc.
5171
5172 * null-threads.c: 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 * lang.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 * lang.h: 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 * iselect.h: 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 * init.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 * gh_data.c: 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 * gh.h: 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 * gen-scmconfig.c: change most new public symbols to be defined to
5201 0 or 1 rather than being either 1 or undefined.
5202
5203 * gc_os_dep.c: fix various preprocessor usages of new public
5204 symbols to expect 0 or 1 values rather than 1 or undefined.
5205 i.e. change #ifdef to #if, etc.
5206 (STACK_GROWS_DOWN): define to 0 or 1 rather than 1 or undef.
5207
5208 * gc.h: 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 * gc-card.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 * gc-mark.c: 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 * feature.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 * evalext.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 * eval.h: fix various preprocessor usages of new public
5229 symbols to expect 0 or 1 values rather than 1 or undefined.
5230 i.e. change #ifdef to #if, etc.
5231
5232 * eval.c: fix various preprocessor usages of new public
5233 symbols to expect 0 or 1 values rather than 1 or undefined.
5234 i.e. change #ifdef to #if, etc.
5235
5236 * eq.c: fix various preprocessor usages of new public
5237 symbols to expect 0 or 1 values rather than 1 or undefined.
5238 i.e. change #ifdef to #if, etc.
5239
5240 * coop.c: fix various preprocessor usages of new public
5241 symbols to expect 0 or 1 values rather than 1 or undefined.
5242 i.e. change #ifdef to #if, etc.
5243
5244 * coop-threads.c: fix various preprocessor usages of new public
5245 symbols to expect 0 or 1 values rather than 1 or undefined.
5246 i.e. change #ifdef to #if, etc.
5247
5248 * coop-pthreads.c: fix various preprocessor usages of new public
5249 symbols to expect 0 or 1 values rather than 1 or undefined.
5250 i.e. change #ifdef to #if, etc.
5251
5252 * coop-defs.h: fix various preprocessor usages of new public
5253 symbols to expect 0 or 1 values rather than 1 or undefined.
5254 i.e. change #ifdef to #if, etc.
5255
5256 * convert.i.c: fix various preprocessor usages of new public
5257 symbols to expect 0 or 1 values rather than 1 or undefined.
5258 i.e. change #ifdef to #if, etc.
5259
5260 * continuations.c: fix various preprocessor usages of new public
5261 symbols to expect 0 or 1 values rather than 1 or undefined.
5262 i.e. change #ifdef to #if, etc.
5263
5264 * _scm.h: fix various preprocessor usages of new public symbols to
5265 expect 0 or 1 values rather than 1 or undefined. i.e. change
5266 #ifdef to #if, etc.
5267
5268 2003-03-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
5269
5270 * init.c (scm_init_guile_1): Call scm_i_init_deprecated.
5271
5272 * deprecated.c, deprecated.h: New files, to collect deprecated
5273 things in one place.
5274 * Makefile.am: Added them in all the right places.
5275
5276 * Makefile.am (EXTRA_DIST): Added "scmconfig.h.top".
5277 (scmconfig.h): Get "scmconfig.h.top" from $(srcdir) so that VPATH
5278 builds work.
5279 (DOT_X_FILES): Removed "iselect.x".
5280 (DOT_DOC_FILES): Removed "iselect.doc".
5281
5282 2003-03-25 Rob Browning <rlb@defaultvalue.org>
5283
5284 * win32-socket.h: #include "libguile/__scm.h". Replace usage of
5285 HAVE_WINSOCK2_H with SCM_HAVE_WINSOCK2_H.
5286
5287 * win32-socket.c: #include <config.h> if HAVE_CONFIG_H.
5288
5289 * vports.c: #include <config.h> if HAVE_CONFIG_H.
5290
5291 * unif.c: #include <config.h> if HAVE_CONFIG_H. Replace usage of
5292 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
5293
5294 * threads.h: replace usage of struct timespect with
5295 scm_t_timespec. Replace usage of USE_PTHREAD_THREADS with
5296 SCM_USE_PTHREAD_THREADS. Remove typedef for struct timespec in
5297 favor of scm_t_timespec from scmconfig.h.
5298
5299 * threads.c: move libguile/_scm.h include to the top so we pick up
5300 any critical defines like _GNU_SOURCE early. Replace usage of
5301 struct timespect with scm_t_timespec. Replace usage of
5302 STACK_GROWS_UP with SCM_STACK_GROWS_UP. Replace usage of
5303 USE_PTHREAD_THREADS with SCM_USE_PTHREAD_THREADS.
5304
5305 * threads-plugin.h: replace usage of struct timespect with
5306 scm_t_timespec.
5307
5308 * threads-plugin.c: #include <config.h> if HAVE_CONFIG_H. Replace
5309 usage of struct timespect with scm_t_timespec.
5310
5311 * tags.h: move HAVE_STDINT_H handling to scmconfig.h. Move
5312 HAVE_INTTYPES_H handling to scmconfig.h. #include
5313 "libguile/__scm.h". Rework handling for scm_t_bits,
5314 scm_t_signed_bits, SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
5315 SCM_T_SIGNED_BITS_MIN, and SIZEOF_SCM_T_BITS to use scm_t_intptr,
5316 scm_t_uintptr, SCM_SIZEOF_INTPTR_T, and SCM_SIZEOF_UINTPTR_T, and
5317 SCM_SIZEOF_UNSIGNED_LONG. Rename usage of HAVE_ARRAYS to
5318 SCM_HAVE_ARRAYS.
5319
5320 * symbols.c: #include <config.h> if HAVE_CONFIG_H.
5321
5322 * struct.c: #include <config.h> if HAVE_CONFIG_H.
5323
5324 * strports.c: #include <config.h> if HAVE_CONFIG_H.
5325
5326 * strop.c: #include <config.h> if HAVE_CONFIG_H.
5327
5328 * stime.h: move handling of time related headers to scmconfig.h.
5329
5330 * stime.c: #include <config.h> if HAVE_CONFIG_H.
5331
5332 * stacks.c: replace usage of STACK_GROWS_UP with
5333 SCM_STACK_GROWS_UP.
5334
5335 * sort.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
5336 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5337
5338 * socket.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
5339 of uint32 and HAVE_UINT_32 with scm_t_int32.
5340
5341 * smob.c: #include <config.h> if HAVE_CONFIG_H.
5342
5343 * simpos.c: #include <config.h> if HAVE_CONFIG_H.
5344
5345 * script.c: #include <config.h> if HAVE_CONFIG_H.
5346
5347 * scmsigs.c: #include <config.h> if HAVE_CONFIG_H.
5348
5349 * scmconfig.h.top: new file -- preamble for scmconfig.h.
5350
5351 * rw.c: #include <config.h> if HAVE_CONFIG_H.
5352
5353 * regex-posix.c: #include <config.h> if HAVE_CONFIG_H.
5354
5355 * read.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5356
5357 * rdelim.c: #include <config.h> if HAVE_CONFIG_H.
5358
5359 * random.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
5360 of LONG32, LONG64, SIZEOF_LONG, and HAVE_LONG_LONGS with
5361 scm_t_int32, scm_t_int64, and SCM_HAVE_T_INT64. Rename usage of
5362 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5363
5364 * ramap.c: replace usage of HAVE_LONG_LONGS with
5365 "SCM_SIZEOF_LONG_LONG != 0".
5366
5367 * putenv.c: #include <config.h> if HAVE_CONFIG_H. #include
5368 "libguile/scmconfig.h".
5369
5370 * pthread-threads.c: #include <config.h> if HAVE_CONFIG_H.
5371
5372 * print.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5373 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
5374
5375 * posix.c: #include <config.h> if HAVE_CONFIG_H.
5376
5377 * ports.c: #include <config.h> if HAVE_CONFIG_H.
5378
5379 * objects.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5380
5381 * numbers.h: replace usage of HAVE_FLOATINGPOINT_H with
5382 SCM_HAVE_FLOATINGPOINT_H. Replace usage of HAVE_IEEEFP_H with
5383 SCM_HAVE_IEEEFP_H. Replace usage of HAVE_NAN_H with
5384 SCM_HAVE_NAN_H. Replace usage of STDC_HEADERS with
5385 SCM_HAVE_STDC_HEADERS. Replace usage of ptrdiff_t with
5386 scm_t_ptrdiff. Replace usage of HAVE_LONG_LONGS with
5387 "SCM_SIZEOF_LONG_LONG != 0".
5388
5389 * numbers.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
5390 of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0". Replace
5391 usage of ptrdiff_t with scm_t_ptrdiff. Replace usage of
5392 SIZEOF_PTRDIFF_T with SCM_SIZEOF_SCM_T_PTRDIFF.
5393
5394 * num2integral.i.c: #include <config.h> if HAVE_CONFIG_H.
5395
5396 * null-threads.h: replace usage of struct timespect with
5397 scm_t_timespec.
5398
5399 * net_db.c: #include <config.h> if HAVE_CONFIG_H.
5400
5401 * mkstemp.c: #include <config.h> if HAVE_CONFIG_H. #include
5402 "libguile/__scm.h". Remove definition of gcc_uint64_t in favor of
5403 scm_t_uint64 and rename usages.
5404
5405 * mallocs.c: #include <config.h> if HAVE_CONFIG_H.
5406
5407 * load.c: #include <config.h> if HAVE_CONFIG_H.
5408
5409 * iselect.h: move handling of time related headers to scmconfig.h.
5410 Rename usage of HAVE_SYS_SELECT_H to SCM_HAVE_SYS_SELECT_H.
5411 Rename usage of HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Rename
5412 usage of USE_COOP_THREADS to SCM_USE_COOP_THREADS.
5413
5414 * iselect.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
5415 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
5416 USE_NULL_THREADS to SCM_USE_NULL_THREADS.
5417
5418 * ioext.c: #include <config.h> if HAVE_CONFIG_H.
5419
5420 * inline.h: #include "libguile/__scm.h" at the top. Change code
5421 to use SCM_C_INLINE and SCM_INLINE_C_INCLUDINT_INLINE_H to decide
5422 what to do instead of creating a new public #define. Rename usage
5423 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
5424 USE_NULL_THREADS to SCM_USE_NULL_THREADS. Rename usage of
5425 USE_COPT_THREADS to SCM_USE_COPT_THREADS.
5426
5427 * inline.c: rearrange handling -- now we just #define
5428 SCM_INLINE_C_INCLUDING_INLINE_H to 1 and #include
5429 "libguile/inline.h". scmconfig.h will define SCM_C_INLINE as
5430 appropriate, and we use that in inline.h along with the above
5431 define to determine how to respond.
5432
5433 * init.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
5434 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5435
5436 * guile.c: #include <config.h> if HAVE_CONFIG_H.
5437
5438 * gh_data.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
5439 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5440
5441 * gh.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5442
5443 * gen-scmconfig.h.in: new file -- see gen-scmconfig.c for details.
5444
5445 * gen-scmconfig.c: new file -- see comments in file for details.
5446
5447 * gdbinit.c: #include <config.h> if HAVE_CONFIG_H.
5448
5449 * gc_os_dep.c: #include <config.h> if HAVE_CONFIG_H. Replace
5450 usage of STACK_GROWS_UP with SCM_STACK_GROWS_UP.
5451
5452 * gc.h: replace usage of SIZEOF_LONG with
5453 SCM_SIZEOF_UNSIGNED_LONG. Replace usage of USE_PTHREAD_THREADS
5454 with SCM_USE_PTHREAD_THREADS. Remove SCM_SIZEOF_LONG definition
5455 since we handle that in scmconfig.h now.
5456
5457 * gc.c: #include <config.h> if HAVE_CONFIG_H.
5458
5459 * gc-mark.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
5460 of HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of
5461 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
5462
5463 * gc-malloc.c: #include <config.h> if HAVE_CONFIG_H.
5464
5465 * gc-card.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5466 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
5467
5468 * fports.c: #include <config.h> if HAVE_CONFIG_H.
5469
5470 * filesys.c: #include <config.h> if HAVE_CONFIG_H.
5471
5472 * feature.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
5473 of USE_NULL_THREADS to SCM_USE_NULL_THREADS.
5474
5475 * extensions.c: #include <config.h> if HAVE_CONFIG_H.
5476
5477 * evalext.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5478 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
5479
5480 * eval.c: #include <config.h> if HAVE_CONFIG_H. #include
5481 "libguile/__scm.h" rather than scmconfig.h. Rename usage of
5482 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
5483 with "SCM_SIZEOF_LONG_LONG != 0".
5484
5485 * error.c: #include <config.h> if HAVE_CONFIG_H.
5486
5487 * eq.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
5488 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
5489 with "SCM_SIZEOF_LONG_LONG != 0".
5490
5491 * deprecation.c: #include <config.h> if HAVE_CONFIG_H.
5492
5493 * coop.c: replace usage of struct timespect with scm_t_timespec.
5494 #include <config.h> if HAVE_CONFIG_H.
5495
5496 * coop-threads.c: #include "libguile/_scm.h" early. Replace
5497 usage of struct timespect with scm_t_timespec. Replace usage of
5498 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
5499
5500 * coop-pthreads.c: #include "libguile/_scm.h" early. Replace
5501 usage of struct timespect with scm_t_timespec. Replace usage of
5502 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
5503
5504 * coop-defs.h: move handling of time related headers to
5505 scmconfig.h. Add #include "libguile/__scm.h". Rename usage of
5506 HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Replace usage of struct
5507 timespect with scm_t_timespec.
5508
5509 * convert.i.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5510
5511 * convert.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5512
5513 * convert.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
5514 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5515
5516 * continuations.c: move libguile/_scm.h include to the top so we
5517 pick up any critical defines like _GNU_SOURCE early.
5518
5519 * backtrace.c: #include <config.h> if HAVE_CONFIG_H.
5520
5521 * async.c: #include <config.h> if HAVE_CONFIG_H.
5522
5523 * alloca.c: #include <config.h> if HAVE_CONFIG_H.
5524
5525 * _scm.h: #include <config.h> if HAVE_CONFIG_H.
5526 Rename usage of USE_PTHREAD_THREADS to SCM_USE_PTHREAD_THREADS.
5527
5528 * __scm.h: move libguile/scmconfig.h include up to the top, so
5529 we're sure to pick up any critical defines like _GNU_SOURCE early.
5530 #include <limits.h> removed in favor of scmconfig.h inclusion when
5531 appropriate. STDC_HEADERS based inclusion of stdlib.h,
5532 sys/types.h, stddef.h, and sys/stdtypes.h removed in favor of
5533 scmconfig.h inclusion when appropriate. Various Win32 related
5534 definitions removed in favor of scmconfig.h inclusion when
5535 appropriate.
5536 (HAVE_UINTPTR_T): definition removed (see NEWS).
5537 (SIZEOF_PTRDIFF_T): definition removed (see NEWS).
5538 (HAVE_LONG_LONGS): definition removed (see NEWS).
5539 (HAVE_LONG_LONG): definition removed (see NEWS).
5540 (HAVE_PTRDIFF_T): definition removed (see NEWS).
5541
5542 * Makefile.am: scmconfig.h is now generated by building and
5543 running gen-scmconfig.h and capturing its output. gen-scmconfig
5544 uses config.h and the configure.in generated gen-scmconfig.h to
5545 decide what to output. See gen-scmconfig.c for details.
5546 (noinst_PROGRAMS): add gen-scmconfig.
5547 (gen_scmconfig_SOURCES): new variable.
5548 (gen-scmconfig.$(OBJEXT)): new target - be careful to handle
5549 cross-compiling right.
5550 (scmconfig.h): build scmconfig.h from gen-scmconfig's output.
5551 (BUILT_SOURCES): add scmconfig.h.
5552
5553 2003-03-19 Marius Vollmer <mvo@zagadka.de>
5554
5555 * gc_os_dep.c: Added defines for sparc-unknown-netbsdelf1.5 from
5556 Adrian Bunk. Thanks!
5557
5558 2003-03-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5559
5560 * goops.c (make_class_from_template): New fourth arg:
5561 applicablep.
5562 (scm_class_extended_generic_with_setter, scm_class_self): Fixed
5563 cpls.
5564
5565 * smob.c (scm_set_smob_apply): Call scm_i_inherit_applicable.
5566
5567 * goops.c, objects.c, objects.h (scm_make_extended_class): New
5568 second arg: applicablep.
5569 (scm_i_inherit_applicable): New function.
5570
5571 * goops.c, goops.h (scm_class_applicable,
5572 scm_class_extended_accessor): New classes.
5573
5574 2003-03-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5575
5576 * procs.c (scm_procedure_documentation): Removed redundant
5577 SCM_NIMP test and replaced other calls to SCM_IMP by more explicit
5578 predicates.
5579
5580 2003-03-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5581
5582 * list.c, list.h (scm_filter, scm_filter_x): New functions.
5583
5584 * modules.c (scm_module_import_interface): New function.
5585
5586 * goops.c, goops.h (scm_class_accessor_method): Renamed from
5587 scm_class_accessor.
5588 (scm_class_accessor): New class.
5589
5590 2003-03-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5591
5592 * goops.c (scm_primitive_generic_generic): Enable primitive
5593 generic if not enabled.
5594 (scm_sys_goops_loaded): Setup unextended primitive generics.
5595
5596 * goops.c, goops.h (scm_c_extend_primitive_generic): New function.
5597
5598 * snarf.h (SCM_PRIMITIVE_GENERIC, SCM_PRIMITIVE_GENERIC_1): New
5599 snarf macros.
5600
5601 * numbers.c (scm_abs): Use SCM_PRIMITIVE_GENERIC. (This is only a
5602 testing example. All uses of SCM_GPROC should be converted.)
5603
5604 * procprop.c (scm_stand_in_scm_proc): Use scm_assq instead of
5605 scm_assoc.
5606
5607 * eq.c (scm_equal_p): Turned into a primitive generic.
5608
5609 2003-02-27 Rob Browning <rlb@defaultvalue.org>
5610
5611 * Makefile.am (scmconfig.h): new target -- generate file from
5612 ../config.h.
5613 (modinclude_HEADERS): remove version.h.
5614 (nodist_modinclude_HEADERS): add version.h.
5615
5616 2003-02-24 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5617
5618 This fixes a serious GC bug, introduced during the latest
5619 reorganization of the GC, which disabled freeing of structs and
5620 GOOPS objects:
5621
5622 * struct.c (scm_struct_prehistory): Init scm_i_structs_to_free to
5623 SCM_EOL.
5624 (scm_struct_prehistory): Move scm_free_structs to
5625 scm_before_mark_c_hook.
5626
5627 * gc-card.c (sweep_card): Check that we haven't swept structs on
5628 this card before. That can happen if scm_i_sweep_all_segments has
5629 been called from some other place than scm_igc.
5630
5631 2003-02-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5632
5633 * environments.c (DEFAULT_OBARRAY_SIZE): Changed from 137 to 31
5634 (since hash tables now adapt their size).
5635
5636 * modules.c (scm_modules_prehistory): Changed from 2001 to 1533
5637 (current number of prehistory bindings; hashtable code will select
5638 a prime which is greater than this value).
5639
5640 * symbols.c (scm_symbols_prehistory): Changed from 1009 to 2139
5641 (current number of initial symbols).
5642
5643 * properties.c (scm_init_properties): Don't specify size of
5644 scm_properties_whash.
5645
5646 * objprop.c (scm_init_objprop): Don't specify size of
5647 scm_object_whash.
5648
5649 * keywords.c (scm_init_keywords): Don't specify a hash table size.
5650
5651 * hooks.c (scm_c_hook_add): Fixed bug in append mode.
5652
5653 The following changes introduce the use of resizable hash tables
5654 throughout Guile. It also renames the old *-hash-table* functions
5655 to *-alist-vector* and places them, together with the rest of the
5656 weak vector support, in the module (ice-9 weak-vector). We should
5657 probably introduce a new, better, API for weak references, for
5658 example "weak pairs" a la MIT-Scheme. (In Chez scheme, they even
5659 look like and are used like ordinary pairs.)
5660
5661 * environments.c (obarray_enter, obarray_retrieve, obarray_remove,
5662 leaf_environment_fold, obarray_remove_all): Use hashtable
5663 accessors.
5664
5665 * gc.c (scm_init_storage): Moved hook initialization to
5666 scm_storage_prehistory.
5667 (scm_storage_prehistory): New function.
5668 (scm_igc): Added commentary about placement of
5669 scm_after_sweep_c_hook.
5670
5671 * gc-mark.c (scm_mark_all): Use hashtable accessors.
5672 (scm_gc_mark_dependencies): Use SCM_WVECT_WEAK_KEY_P and
5673 SCM_WVECT_WEAK_VALUE_P.
5674
5675 * hashtab.c, hashtab.h (scm_hash_for_each, scm_hash_map): New
5676 functions.
5677 (scm_vector_to_hash_table, scm_c_make_resizing_hash_table):
5678 Removed.
5679 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table,
5680 scm_make_doubly_weak_hash_table): Moved here from weaks.c.
5681
5682 * init.c (scm_init_guile_1): Removed call to scm_init_weaks; Added
5683 calls to scm_storage_prehistory and scm_hashtab_prehistory.
5684
5685 * modules.c (module-reverse-lookup): Use hashtable accessors.
5686
5687 * symbols.c, symbols.h (scm_i_hash_symbol): New function.
5688
5689 * weaks.c, weaks.h (scm_make_weak_key_alist_vector,
5690 scm_make_weak_value_alist_vector,
5691 scm_make_doubly_weak_alist_vector): New functions.
5692
5693 * weaks.c (scm_init_weaks_builtins): New function.
5694
5695 * weaks.h (SCM_WVECTF_WEAK_KEY, SCM_WVECTF_WEAK_VALUE,
5696 SCM_WVECTF_NOSCAN, SCM_WVECT_WEAK_KEY_P, SCM_WVECT_WEAK_VALUE_P,
5697 SCM_WVECT_NOSCAN_P): New macros.
5698
5699 * weaks.c (scm_scan_weak_vectors): Use SCM_WVECT_WEAK_KEY_P
5700 and SCM_WVECT_WEAK_VALUE_P.
5701
5702 * weaks.c, weaks.h (scm_i_allocate_weak_vector): Renamed from
5703 allocate_weak_vector and exported.
5704
5705 2003-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5706
5707 * hashtab.c: Undid thread safety. (We decided that it's better to
5708 let the user explicitly protect the tables (or not) according what
5709 is suitable for the application.)
5710
5711 2003-02-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5712
5713 * hashtab.c (scm_hash_fn_remove_x, scm_internal_hash_fold): Made
5714 thread safe and handle resizing tables.
5715 (scm_ihashx, scm_sloppy_assx, scm_delx_x): Removed
5716 SCM_DEFER/ALLOW_INTS.
5717
5718 2003-02-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5719
5720 * hashtab.c (scm_vector_to_hash_table,
5721 scm_c_make_resizing_hash_table, scm_make_hash_table): New
5722 functions.
5723 (scm_hash_fn_get_handle, scm_hash_fn_create_handle_x): Made thread
5724 safe and handle resizing tables.
5725
5726 * weaks.c (scm_make_weak_key_hash_table,
5727 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
5728 Size argument made optional. Return resizable table if not
5729 specified.
5730
5731 2003-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5732
5733 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
5734 Fixed formals tests for closures. (Thanks to Kevin Ryde.)
5735
5736 2003-02-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5737
5738 * debug.c (scm_procedure_source): Handle all objects for which
5739 procedure? is #t. (Thanks to Bill Schottstaedt.)
5740
5741 2003-01-23 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5742
5743 * futures.c (mark_futures): Don't need to mark data of recycled
5744 futures.
5745 (scan_futures, cleanup_undead): Be smarter about marking
5746 futures---avoid unnecessary passes through future lists.
5747
5748 * futures.h, futures.c: New files; Introduced recycling of
5749 futures. For fine-grained threading this lifts performance to
5750 another level. We can now use parallelization in inner loops of
5751 Guile programs without impossible overhead.
5752
5753 * threads.h, threads.c: Moved futures to their own file.
5754
5755 * Makefile.am (libguile_la_SOURCES): Added futures.c.
5756 (DOT_X_FILES): Added futures.x.
5757 (DOT_DOC_FILES): Added futures.doc.
5758 (modinclude_HEADERS): Added futures.h.
5759
5760 * threads.c, threads.h (scm_i_create_thread): Renamed from
5761 create_thread and made global.
5762
5763 * futures.c (scm_make_future): New procedure.
5764
5765 * eval.c: #include "libguile/futures.h".
5766
5767 * init.c: #include "futures.h"
5768 (scm_init_guile_1): Call scm_init_futures.
5769
5770 * stime.c (SCM_TIME_UNITS_PER_SECOND): Renamed from CLKTCK.
5771
5772 * stime.h (SCM_TIME_UNITS_PER_SECOND): Definition moved here.
5773
5774 * eval.c, eval.h (scm_trampoline_0, scm_i_call_closure_0): New
5775 functions.
5776
5777 * eval.c (scm_trampoline_1): Fixed arguments test for closures.
5778
5779 2003-01-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5780
5781 * threads.c (create_thread): Don't unwind dynwind chain of parent
5782 thread before creation. Just start the new thread with an empty
5783 dynwind chain.
5784
5785 2003-01-20 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5786
5787 * evalext.c, evalext.h (scm_self_evaluating_p): New function.
5788
5789 2003-01-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5790
5791 * threads.c (scm_timed_wait_condition_variable): Support timed
5792 waiting also for simple condition variables.
5793
5794 * goops.c (TEST_CHANGE_CLASS): Use scm_change_object_class instead
5795 of calling the procedure change-object-class.
5796
5797 2003-01-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5798
5799 * ramap.c (scm_ramapc): Typo in error message.
5800
5801 2003-01-08 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5802
5803 * goops.c (scm_sys_prep_layout_x): Bugfix: Only create layout for
5804 slots with instance allocation.
5805
5806 * goops.c, goops.h (scm_class_extended_generic_with_setter): New
5807 class.
5808 (scm_compute_applicable_methods): Use scm_generic_function_methods.
5809
5810 * goops.c (scm_generic_function_methods): Support extended
5811 generic functions.
5812
5813 2002-12-29 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5814
5815 * eval.c (unmemocopy): Bugfix: scm_sym_delay --> scm_sym_future.
5816 Thanks to Neil for pointing this out!
5817
5818 2002-12-29 Neil Jerram <neil@ossau.uklinux.net>
5819
5820 * lang.h: Remove declarations matching definitions removed from
5821 lang.c (just below).
5822
5823 2002-12-28 Neil Jerram <neil@ossau.uklinux.net>
5824
5825 * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null,
5826 scm_m_while, scm_nil_eq): Remove definitions that were superfluous
5827 and already commented out.
5828
5829 * read.h (scm_lreadparen), read.c (scm_lreadr, scm_read_token,
5830 scm_lreadparen): Support reading vectors with Elisp syntax if
5831 SCM_ELISP_READ_EXTENSIONS is defined. (SCM_ELISP_READ_EXTENSIONS
5832 is not currently defined, and there isn't even a configure switch
5833 to enable it yet.)
5834
5835 2002-12-26 Marius Vollmer <mvo@zagadka.ping.de>
5836
5837 * Makefile.am (c-tokenize.o): Refer to source via $< so that vpath
5838 builds work.
5839 (EXTRA_DIST): Added version.h.in.
5840
5841 2002-12-21 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5842
5843 This change makes it possible for one thread to do lazy sweeping
5844 while other threads are running. Now only the mark phase need to
5845 have all threads asleep. We should look further into this issue.
5846 Presently, I've put the locking of scm_i_sweep_mutex at
5847 "conservative" places due to my current lack of knowledge about
5848 the garbage collector. Please feel free to restrict these regions
5849 further to allow for maximal parallelism!
5850
5851 * gc.c, gc.h (scm_i_sweep_mutex): New mutex.
5852
5853 * gc.c (scm_gc_for_newcell), gc-malloc.c (scm_realloc,
5854 scm_gc_register_collectable_memory): Substitute locking of
5855 scm_i_sweep_mutex for calls to scm_i_thread_put_to_sleep.
5856 (scm_igc): Lock sweep mutex here instead of in callers; Calls to
5857 scm_i_thread_put_to_sleep/scm_i_thread_wake_up used to demarkate
5858 the single-thread section (which now only contains the mark
5859 phase).
5860 (scm_gc): Don't lock sweeo mutex here since scm_igc locks it;
5861 Removed SCM_DEFER/ALLOW_INTS. Simply call scm_igc directly.
5862
5863 * threads.c (gc_section_mutex): Removed.
5864
5865 2002-12-19 Mikael Djurfeldt <mdj@kvast.blakulla.net>
5866
5867 * threads.c (create_thread): Clear parent field in root state in
5868 order not to unnecessarily remember dead threads.
5869
5870 * eval.c (call_subr2o_1, call_lsubr2_2): New functions.
5871 (scm_trampoline_1, scm_trampoline_2): Use them.
5872
5873 2002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
5874
5875 Partial introduction of real plugin interface.
5876
5877 * Makefile.am (modinclude_HEADERS): Added threads-plugin.h.
5878 (EXTRA_DIST): Added threads-plugin.c.
5879
5880 * threads-plugin.h, threads-plugin.c: New files.
5881
5882 * threads.h: #include "libguile/threads-plugin.h".
5883
5884 * threads.c: #include "libguile/threads-plugin.c".
5885
5886 * pthread-threads.c: Temporarily remove debugging functions.
5887
5888 * threads.c, threads.h (scm_yield): Added back.
5889
5890 2002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
5891
5892 * threads.c (really_launch): Detach before unlocking
5893 thread_admin_mutex in order not to risk being joined.
5894 (scm_i_thread_put_to_sleep, scm_i_thread_wake_up): Keep
5895 thread_admin_mutex locked during GC.
5896
5897 * pthread-threads.c, pthread-threads.h: Improvements to debugging
5898 functions.
5899
5900 2002-12-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
5901
5902 * pthread-threads.c, pthread-threads.h (SCM_DEBUG_THREADS): Added
5903 support for debugging mutex operations.
5904
5905 * threads.c (scm_thread): Removed filed joining_threads.
5906 (thread_print): Print thread number as well as address of thread
5907 structure.
5908 (scm_join_thread): Bugfix.
5909 (scm_lock_mutex, scm_try_mutex, scm_unlock_mutex,
5910 scm_timed_wait_condition_variable, scm_signal_condition_variable,
5911 scm_broadcast_condition_variable): Use the low-level API.
5912 (scm_all_threads): Return copy of thread list (to prevent
5913 unintended destruction).
5914 (scm_threads_prehistory): Initialize heap_mutex of fake thread.
5915
5916 * pthread-threads.c, pthread-threads.h, threads.c: Fixes to
5917 pthread "native" recursive mutex support.
5918
5919 2002-12-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5920
5921 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): New definitions.
5922 Simply lock a thread C API recursive mutex.
5923 (SCM_NONREC_CRITICAL_SECTION_START,
5924 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
5925 SCM_REC_CRITICAL_SECTION_END): Removed.
5926
5927 * eval.c: Replaced SOURCE_SECTION_START / SOURCE_SECTION_END with
5928 direct calls to scm_rec_mutex_lock / unlock around the three calls
5929 to scm_m_expand_body.
5930
5931 * eval.c, eval.h (promise_free): New function.
5932 (scm_force): Rewritten; Now thread-safe; Removed
5933 SCM_DEFER/ALLOW_INTS.
5934
5935 * pthread-threads.h: Added partially implemented plugin interface
5936 for recursive mutexes. These are, for now, only intended to be
5937 used internally within the Guile implementation.
5938
5939 * pthread-threads.c: New file.
5940
5941 * threads.c: Conditionally #include "pthread-threads.c".
5942
5943 * eval.c, eval.h (scm_makprom, scm_force): Rewritten to be
5944 thread-safe;
5945
5946 * snarf.h (SCM_MUTEX, SCM_GLOBAL_MUTEX, SCM_REC_MUTEX,
5947 SCM_GLOBAL_REC_MUTEX): New macros.
5948
5949 * eval.c, threads.c, threads.h, snarf.h: Rewrote critical section
5950 macros---use mutexes instead.
5951
5952 * tags.h (SCM_IM_FUTURE): New tag.
5953
5954 * eval.c (scm_m_future): New primitive macro.
5955 (SCM_CEVAL): Support futures.
5956 (unmemocopy): Support unmemoization of futures.
5957
5958 * print.c (scm_isymnames): Name of future isym.
5959
5960 * version.c: Unmade some changes to my private copy that got
5961 committed by mistake.
5962
5963 2002-12-11 Mikael Djurfeldt <mdj@kvast.blakulla.net>
5964
5965 * gc-malloc.c, gc.h, init.c: Reverted gc-malloc change of
5966 2002-12-10.
5967
5968 * gc.c (scm_igc): Don't call scm_i_thread_invalidate_freelists.
5969
5970 * gc.c (scm_gc_sweep): Call it here instead, which is a more
5971 logical place.
5972
5973 * threads.c (create_thread): Remember root object until the handle
5974 of the new thread is on all_threads list.
5975
5976 * root.c (scm_make_root): Moved copying of fluids until after
5977 creation of root handle so that the fluids are GC protected. Also
5978 removed the critical section.
5979
5980 2002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
5981
5982 * gc-malloc.c, gc.h (scm_gc_malloc_prehistory): New function.
5983
5984 * gc-malloc.c (malloc_mutex): New mutex.
5985 (scm_gc_malloc_prehistory): Initialize it.
5986 (scm_realloc): Serialize call to realloc
5987 (scm_calloc): Same for calloc.
5988 Thanks to Wolfgang Jaehrling!
5989 (Now we have to make sure all calls to malloc/realloc are made
5990 through scm_malloc.)
5991
5992 * init.c (scm_init_guile_1): Call scm_gc_malloc_prehistory.
5993
5994 * threads.c (really_launch): Release heap (to prevent deadlock).
5995 (create_thread): Release heap before locking thread admin mutex.
5996
5997 2002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
5998
5999 * threads.c (scm_i_thread_invalidate_freelists): New
6000 function.
6001
6002 * gc.c (scm_igc): Call scm_i_thread_invalidate_freelists.
6003
6004 * modules.c (scm_export): Inserted a return statement.
6005
6006 2002-12-10 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6007
6008 * modules.c (scm_export): new function
6009
6010 * gc-card.c: add a note about malloc()/free() overhead.
6011
6012 2002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6013
6014 * Makefile.am (c-tokenize.$(OBJEXT)): Don't look for c-tokenize.c
6015 in srcdir.
6016
6017 2002-12-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6018
6019 These changes remove scm_ints_disabled (which hasn't has any
6020 effect in Guile for quite some time).
6021
6022 * async.c, error.h (scm_ints_disabled): Removed.
6023
6024 * gc.c (scm_gc_for_newcell), init.c (scm_init_guile_1),
6025 root.c (scm_internal_cwdr), gdbint.c (SCM_BEGIN_FOREIGN_BLOCK,
6026 SCM_END_FOREIGN_BLOCK): Don't touch scm_ints_disabled.
6027 (old_ints): Removed.
6028
6029 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Define as a recursive
6030 critical section.
6031 (SCM_REDEFER_INTS, SCM_ALLOW_INTS): Define as SCM_DEFER_INTS and
6032 SCM_ALLOW_INTS.
6033
6034 2002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6035
6036 * threads.c (scm_mutex_lock, scm_cond_wait, scm_cond_timedwait):
6037 Removed accidental #if 0 around these functions.
6038
6039 These changes are the start of support for preemptive
6040 multithreading. Marius and I have agreed that I commit this code
6041 into the repository although it isn't thoroughly tested and surely
6042 introduces many bugs. The bugs should only be exposed when using
6043 threads, though. Signalling and error handling for threads is
6044 very likely broken. Work on making the implementation cleaner and
6045 more efficient is needed.
6046
6047 * __scm.h (SCM_ALLOW_INTS_ONLY): Removed.
6048 (SCM_NONREC_CRITICAL_SECTION_START,
6049 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
6050 SCM_REC_CRITICAL_SECTION_END): New macros.
6051 (SCM_CRITICAL_SECTION_START/END): Defined here.
6052
6053 * eval.c: Insert SOURCE_SECTION_START / SOURCE_SECTION_END around
6054 the three calls to scm_m_expand_body.
6055
6056 * gc.h: #include "libguile/pthread-threads.h";
6057 (SCM_FREELIST_CREATE, SCM_FREELIST_LOC): New macros.
6058
6059 * gc.c (scm_i_freelist, scm_i_freelist2): Defined to be of type
6060 scm_t_key;
6061
6062 * gc.c, gc-freelist.c, inline.h: Use SCM_FREELIST_LOC for freelist
6063 access.
6064
6065 * gc-freelist.c (scm_gc_init_freelist): Create freelist keys.
6066
6067 * gc-freelist.c, threads.c (really_launch): Use
6068 SCM_FREELIST_CREATE.
6069
6070 * gc-malloc.c (scm_realloc, scm_gc_register_collectable_memory):
6071
6072 * gc.c (scm_i_expensive_validation_check, scm_gc,
6073 scm_gc_for_newcell): Put threads to sleep before doing GC-related
6074 heap administration so that those pieces of code are executed
6075 single-threaded. We might consider rewriting these code sections
6076 in terms of a "call_gc_code_singly_threaded" construct instead of
6077 calling the pair of scm_i_thread_put_to_sleep () and
6078 scm_i_thread_wake_up (). Also, we would want to have as many of
6079 these sections eleminated.
6080
6081 * init.c (scm_init_guile_1): Call scm_threads_prehistory.
6082
6083 * inline.h: #include "libguile/threads.h"
6084
6085 * pthread-threads.h: Macros now conform more closely to the
6086 pthreads interface. Some of them now take a second argument.
6087
6088 * threads.c, threads.h: Many changes.
6089
6090 2002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6091
6092 * Makefile.am (version.h): Changed $^ --> $< in rule for
6093 version.h.
6094
6095 2002-12-08 Rob Browning <rlb@defaultvalue.org>
6096
6097 * version.h.in (SCM_MICRO_VERSION): use @--@ substitution now.
6098 (SCM_MINOR_VERSION): use @--@ substitution now.
6099 (SCM_MICRO_VERSION): use @--@ substitution now.
6100 (scm_effective_version): new function prototype.
6101
6102 * version.c (scm_effective_version): new function, also add
6103 effective-version.
6104
6105 * Makefile.am (schemelibdir): VERSION -> GUILE_EFFECTIVE_VERSION.
6106 (libpath.h): use GUILE_EFFECTIVE_VERSION to compute
6107 SCM_LIBRARY_DIR.
6108 (version.h): generate this here rather than configure.in. This
6109 approach tracks source edits better (i.e. more immediately).
6110 Might be worth considering for other .in files too.
6111
6112 2002-12-02 Marius Vollmer <mvo@zagadka.ping.de>
6113
6114 Reorganized thread package selection. A thread package now only
6115 implements a small set of pthread like functions and Guile
6116 implements the rest on top of that. Guile's implementation is
6117 what the "coop-pthreads" package has been previously. Support for
6118 "coop" threads has been removed until I get time to add it again.
6119
6120 * Makefile.am (libguile_la_SOURCES): Removed iselect.c.
6121 (noinst_HEADERS): Removed coop-threads.c, coop-threads.h, coop.c,
6122 null-threads.c, coop-pthreads.c.
6123 (modinclude_HEADERS): Removed coop-defs.h, coop-pthreads.h. Added
6124 pthread-threads.h.
6125
6126 * validate.h (SCM_VALIDATE_THREAD): Moved to threads.h.
6127
6128 * threads.h: Do not include "libguile/coop-defs.h". Include
6129 "libguile/pthread-threads.h" for USE_COPT_THREADS. Removed
6130 (previously deprecated) C level thread API prototypes. They are
6131 now in the thread package specific headers, "null-threads.h" and
6132 "pthread-threads.h".
6133 (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR):
6134 New.
6135 (scm_threads_init): Removed.
6136 (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END,
6137 SCM_THREAD_SWITCHING_CODE, scm_i_switch_counter,
6138 SCM_I_THREAD_SWITCH_COUNT): Define here.
6139 (scm_single_thread_p): Removed.
6140 (scm_call_with_new_thread): Take two args directly instead of list
6141 of two args.
6142 (scm_i_thread_data, scm_i_set_thread_data, SCM_THREAD_LOCAL_DATA,
6143 SCM_SET_THREAD_LOCAL_DATA): Define here.
6144
6145 * threads.c: Merged with "coop-pthreads.c".
6146
6147 * null-threads.h: Implement pthread-like API as a set of macros.
6148
6149 * pthread-threads.h: New, implement pthread-like API by deferring
6150 to pthread itself.
6151
6152 * init.c (scm_init_guile_1): Do not call scm_init_iselect, which
6153 has been lost in the reorganization.
6154
6155 2002-12-01 Mikael Djurfeldt <mdj@linnaeus>
6156
6157 The following change makes it possible to move procedure
6158 application dispatch outside inner loops. The motivation was
6159 clean implementation of efficient replacements of R5RS primitives
6160 in SRFI-1.
6161
6162 The semantics is clear: scm_trampoline_N returns an optimized
6163 version of scm_call_N (or NULL if the procedure isn't applicable
6164 on N args).
6165
6166 Applying the optimization to map and for-each increases efficiency
6167 noticeably. For example, (map abs ls) is 8 times faster than
6168 before.
6169
6170 * eval.h (scm_t_trampoline_1, scm_t_trampoline_2): New types.
6171
6172 * eval.c, eval.h (scm_trampoline_1, scm_trampoline_2): New functions.
6173
6174 * eval.c (call_subr2_2, call_lsubr_2, call_closure_2): New functions;
6175 (map, for-each): Handle also application on two args as a special
6176 case; Use trampolines.
6177
6178 Other changes:
6179
6180 * sort.c (scm_cmp_function): Choose subr2less for scm_tc7_subr_2o;
6181 (subr2oless): Removed.
6182 (scm_restricted_vector_sort_x): Use scm_return_first to keep the
6183 vector GC protected.
6184
6185 * eval.c (check_map_args): Use scm_out_of_range_pos instead of
6186 scm_out_of_range.
6187
6188 2002-11-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
6189
6190 * evalext.[ch] (scm_m_undefine, undefine): Deprecated.
6191
6192 2002-11-17 Mikael Djurfeldt <mdj@linnaeus>
6193
6194 * debug.c (scm_make_iloc): Added missing "return".
6195
6196 2002-11-17 Marius Vollmer <mvo@zagadka.ping.de>
6197
6198 * strports.c (scm_eval_string_in_module): Validate second arg to
6199 be a module. Thanks to Arno Peters!
6200
6201 2002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
6202
6203 * .cvsignore: remove goops.c
6204
6205 2002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
6206
6207 * modules.c (scm_env_top_level, scm_lookup_closure_module,
6208 module_variable, scm_module_lookup_closure,
6209 scm_module_transformer, scm_sym2var, scm_module_reverse_lookup,
6210 scm_system_module_env_p): Don't compare SCM values with C
6211 operators == or !=. Avoid SCM_IMP predicates. Prefer !SCM_FALSEP
6212 over SCM_NFALSEP.
6213
6214 2002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
6215
6216 * eval.h (SCM_MAKE_ILOC): New macro.
6217
6218 * debug.c (scm_make_iloc): Use SCM_MAKE_ILOC instead of computing
6219 the iloc bitpattern here.
6220
6221 2002-11-14 Mikael Djurfeldt <mdj@linnaeus>
6222
6223 * coop-pthreads.c, coop-pthreads.h: scm_internal_select should be
6224 part of the API, otherwise it's difficult to write Guile
6225 extensions using non-blocking I/O => moved #include
6226 "libguile/iselect.h" from coop-pthreads.c --> coop-pthreads.h.
6227
6228 * coop-pthreads.c (scm_unlock_mutex): Changed s_lock_mutex -->
6229 s_unlock_mutex.
6230
6231 2002-11-10 Marius Vollmer <mvo@zagadka.ping.de>
6232
6233 * __scm.h (USE_THREADS, GUILE_ISELECT): Do not define here. They
6234 are defined in configure.in.
6235
6236 * threads.c: Removed SCM_API from function definitions. SCM_API
6237 is only for declarations.
6238
6239 2002-11-07 Mikael Djurfeldt <mdj@linnaeus>
6240
6241 * coop-pthreads.h: Added support for thread specific data to the
6242 generic C API for the coop-pthreads case.
6243
6244 * threads.c, threads.h (scm_cond_init): Undo unintentional API
6245 change.
6246 (scm_cond_broadcast): Added missing function.
6247
6248 2002-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6249
6250 * coop.c (coop_next_runnable_thread): Removed, wich should have
6251 happened when GUILE_ISELECT was hard-wired.
6252
6253 2002-11-03 Marius Vollmer <mvo@zagadka.ping.de>
6254
6255 * Makefile.am (libguile_la_SOURCES): Added threads.c
6256 (DOT_DOC_FILES): Added threads.doc.
6257 (DOT_X_FILES): Added threads.x.
6258 (EXTRA_libguile_la_SOURCES): Removed threads.c.
6259 (noinst_HEADERS): Added coop-pthreads.c.
6260 (modinclude_HEADERS): Added coop-pthreads.h.
6261
6262 * __scm.h (USE_THREADS, GUILE_ISELECT): Define when
6263 SCM_DEBUG_DEPRECATED. Removed their use thru-out Guile.
6264
6265 * iselect.c: Include "_scm.h" before testing HAVE_UNISTD_H.
6266 Thanks to Bill Schottstaedt!
6267
6268 * numbers.c (scm_integer_expt): Make 0^z == 0 for z != 0.
6269
6270 * _scm.h (HAVE_RESTARTABLE_SYSCALLS): Do define even when
6271 SCM_COPT_THREADS is defined.
6272 (SCM_SYSCALL): Use EINTR-expection version when SCM_COPT_THREADS
6273 is defined.
6274
6275 * coop-pthreads.c: Some harmless renamings of internal stuff.
6276 (create_thread): New, generalized version of
6277 scm_call_with_new_thread.
6278 (scm_call_with_new_thread): Use it.
6279 (scm_spawn_thread): New, use create_thread.
6280
6281 2002-11-02 Marius Vollmer <mvo@zagadka.ping.de>
6282
6283 * coop-pthreads.c, coop-pthreads.h: Redone completely, you might
6284 start testing it now.
6285
6286 * _scm.h: Include <errno.h< so that SCM_SYSCALL is correctly
6287 defined when HAVE_RESTARTABLE_SYSCALLS is not defined.
6288 (HAVE_RESTARTABLE_SYSCALLS): Do not define when USE_COPT_THREADS
6289 is defined.
6290
6291 2002-10-27 Marius Vollmer <mvo@zagadka.ping.de>
6292
6293 * scmsigs.c (signal_cell_handlers, install_handler_data,
6294 scm_delq_spine_x, really_install_handler, install_handler): New
6295 scheme for triggering signal handlers, to simplify take_signal.
6296 (take_signal): Simplified, to avoid race conditions.
6297 (scm_sigaction_for_thread): Use new Scheme. Validate that thread
6298 hasn't exited yet.
6299
6300 * async.c (scm_async_click): Reset pending_asyncs, handle
6301 signal_asyncs. Don't set cdr of a non-signal async to #f.
6302 (scm_i_queue_async_cell): Do not check cdr of cell for #f, queue
6303 always. Set pending_asyncs.
6304 (scm_system_async_mark_for_thread): Check that thread has not
6305 exited.
6306 (scm_unmask_signals, decrease_block): Call scm_async_click after
6307 block_asyncs becomes zero.
6308
6309 * __scm.h (SCM_ASYNC_CLICK): Check pending_asyncs instead of
6310 active_asyncs.
6311
6312 * root.h (scm_root_state): Added pending_asyncs and signal_asyncs
6313 fields.
6314 * root.c (root_mark): Mark them.
6315 (make_root): Initialize them.
6316
6317 * iselect.c, iselect.h: Replaced GUILE_ISELECT with
6318 USE_COOP_THREADS.
6319 (scm_internal_select): Define one version for USE_COOP_THREADS and
6320 one for USE_NULL_THREADS.
6321 (scm_init_iselect): Likewise.
6322
6323 * inline.h (scm_cell, scm_double_cell): Also allow
6324 USE_COPT_THREADS to not protect the slot initializers.
6325
6326 * init.c (scm_init_guile_1): Call scm_init_thread_procs. This is
6327 because threads need to be initialized before the stack, but
6328 gsubrs such as scm_timed_condition_variable_wait can only be
6329 created later.
6330
6331 * threads.h: Include "coop-pthreads.h" when requested.
6332 (scm_threads_make_mutex, scm_threads_lock_mutex,
6333 scm_threads_unlock_mutex, scm_threads_monitor): Removed, they were
6334 not implemented anyway.
6335 (scm_init_thread_procs, scm_try_mutex,
6336 scm_timed_condition_variable_wait,
6337 scm_broadcast_condition_variable, scm_c_thread_exited_p,
6338 scm_thread_exited_p): New prototypes.
6339 (struct timespec): Define if not already defined.
6340 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
6341 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
6342 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
6343 scm_cond_broadcast, scm_cond_destroy): Declarations moved here and
6344 deprecated.
6345
6346 * threads.c: Include <errno.h>. Include "coop-pthreads.c" when
6347 requested.
6348 (scm_thread_exited_p): New.
6349 (scm_try_mutex, scm_broadcast_condition_variable): Newly
6350 registered procedures.
6351 (scm_wait_condition_variable, scm_timed_wait_condition_variable):
6352 Use the latter as the procedure for "wait-condition-variable",
6353 thus offering a optional timeout parameter to Scheme.
6354 (scm_wait_condition_variable): Implement in terms of
6355 scm_timed_wait_condition_variable.
6356 (scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
6357 scm_mutex_unlock, scm_mutex_destroy, scm_cond_init,
6358 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
6359 scm_cond_broadcast, scm_cond_destroy): Implement in terms of
6360 scm_make_mutex, etc, and deprecate.
6361 (scm_init_threads): Do not create smobs, leave this to
6362 scm_threads_init. Do not include "threads.x" file.
6363 (scm_init_thread_procs): New, include "threads.x" here.
6364
6365 * null-threads.h (scm_null_mutex, scm_null_mutex_init,
6366 scm_null_mutex_lock, scm_null_mutex_unlock,
6367 scm_null_mutex_destroy, scm_null_condvar, scm_null_condvar_init,
6368 scm_null_condvar_wait, scm_null_condvar_signal,
6369 scm_null_condvar_destroy): Removed.
6370 (scm_mutex_init, scm_mutex_lock, scm_mutex_unlock, scm_cond_init,
6371 scm_cond_wait, scm_cond_signal, scm_cond_broadcast,
6372 scm_cond_destory): Do not define, they are now deprecated and
6373 handled by threads.{h,c}.
6374
6375 * null-threads.c (scm_null_mutex, scm_null_cond): Define here.
6376 (scm_threads_init): Create smobs here, using the appropriate
6377 sizes.
6378 (block): Removed, now unused.
6379 (scm_c_thread_exited_p): New.
6380 (scm_null_mutex_init, scm_null_mutex_lock, scm_null_mutex_unlock,
6381 scm_null_mutex_destroy, scm_null_condvar_init,
6382 scm_null_condvar_wait, scm_null_condvar_signal,
6383 scm_null_condvar_destroy): Removed and updated users to do their
6384 task directly.
6385 (scm_try_mutex, timeval_subtract,
6386 scm_timed_wait_condition_variable,
6387 scm_broadcast_condition_variable): New.
6388 (scm_wait_condition_variable): Removed.
6389
6390 * coop-defs.h (coop_m): Added 'level' field.
6391 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
6392 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
6393 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
6394 scm_cond_broadcast, scm_cond_destroy, struct timespec): Do not
6395 define.
6396 (coop_condition_variable_broadcast): New.
6397
6398 * coop-threads.c (scm_threads_init): Create smobs here, using the
6399 appropriate sizes.
6400 (scm_c_thread_exited_p, scm_try_mutex,
6401 scm_timed_wait_condition_variable,
6402 scm_broadcast_condition_variable): New.
6403 (scm_wait_condition_variable): Removed.
6404
6405 * coop.c (coop_new_mutex_init): Initialize level.
6406 (coop_mutex_trylock, coop_mutex_lock, coop_mutex_unlock): maintain
6407 level.
6408 (coop_condition_variable_signal): Renamed to
6409 coop_condition_variable_broadcast and reimplemented in terms of
6410 that. Thus...
6411 (coop_condition_variable_broadcast): New.
6412
6413 * goops.c (hell_mutex): Reimplemented using scm_make_mutex, etc.
6414
6415 * coop-pthreads.h, coop-pthreads.c: New, but unfinished.
6416
6417 2002-10-21 Marius Vollmer <mvo@zagadka.ping.de>
6418
6419 * null-threads.c: Include <time.h>. Also, use <...> for inclusion
6420 of system headers.
6421
6422 * async.c, goops.h, modules.h, validate.h (SCM_MAKE_VALIDATE_MSG):
6423 New. Use it instead of SCM_MAKE_VALIDATE in lots of places to
6424 give better error messages. Thanks to Bill Schottstaedt!
6425
6426 2002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
6427
6428 * evalext.h, evalext.c (scm_definedp, scm_defined_p): Renamed
6429 scm_definedp to scm_defined_p and deprecated scm_definedp.
6430
6431 2002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
6432
6433 * async.h, async.c (scm_system_async): Fixed deprecation to work
6434 correctly when deprecated features are excluded.
6435
6436 2002-10-16 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6437
6438 * async.c (scm_system_async_mark_for_thread): Validate thread
6439 argument.
6440
6441 * coop-threads.c (scm_i_thread_root): Do not validate argument.
6442
6443 * feature.c (scm_init_feature): Don't add 'threads' for
6444 USE_NULL_THREADS.
6445
6446 * inline.h (scm_cell, scm_double_cell): Also allow
6447 USE_NULL_THREADS to not protect the slot initializers.
6448
6449 * scmsigs.c (scm_sigaction_for_thread): It's "USE_THREADS" not
6450 "USE_THREAD".
6451
6452 * Makefile.am (noinst_HEADERS): Added null-threads.c.
6453 (modinclude_HEADERS): Added null-threads.h.
6454
6455 * threads.h: Include null-threads.h when !USE_COOP_THREADS.
6456 * threads.c: Include null-threads.c when !USE_COOP_THREADS.
6457 (scm_init_threads): Use generic type names scm_t_mutex and
6458 scm_t_cond instead of coop_m and coop_c.
6459
6460 * null-threads.c, null-threads.h: New files.
6461
6462 2002-10-15 Marius Vollmer <mvo@zagadka.ping.de>
6463
6464 * Makefile.am: Replaced "$<" in non-pattern rules with its value.
6465 This is to support makes that know about "$<" only in pattern
6466 rules, like Sun's make.
6467
6468 2002-10-13 Marius Vollmer <mvo@zagadka.ping.de>
6469
6470 * Makefile.am (libpath.h): Fixed typo in top_srcdir_absolute
6471 substitution. Thanks to David Allouche!
6472
6473 2002-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
6474
6475 * evalext.h: Replaced SCM_DEBUG_DEPRECATED with
6476 !SCM_ENABLE_DEPRECATED.
6477
6478 2002-10-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6479
6480 * async.c (scm_system_async_mark_for_thread): Only call
6481 scm_i_thread_root when USE_THREADS is defined. Use scm_root
6482 otherwise.
6483
6484 * scmsigs.c (take_signal): Only call scm_i_thread_root when
6485 USE_THREADS is defined. Use scm_root otherwise.
6486 (scm_sigaction_for_thread): Ignore THREAD argument when
6487 USE_THREADS is not defined. Also, move THREAD argument defaulting
6488 out of HAVE_SIGACTION section, which was a bug.
6489
6490 2002-10-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6491
6492 * scmsigs.c (scm_sigaction_for_thread): Store original handler in
6493 signal_handlers, not the closure that is used as the async.
6494 The closure is stored in signal_handler_cells, as previously.
6495
6496 2002-10-10 Marius Vollmer <mvo@zagadka.ping.de>
6497
6498 * root.h (scm_root_state): Added 'block_async' slot.
6499 (scm_active_asyncs): Removed abbrev.
6500 * root.c (scm_make_root): Initialize 'block_asyncs' slot.
6501
6502 * __scm.h (SCM_ASYNC_TICK): Do without the scm_active_asyncs
6503 abbrev.
6504
6505 * async.h (scm_call_with_blocked_asyncs,
6506 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
6507 scm_c_call_with_unblocked_asyncs): New prototypes.
6508 (scm_mask_signals, scm_unmask_signals): Deprecated.
6509 (scm_mask_ints): Turned into a macro.
6510 * async.c (scm_mask_ints): Removed.
6511 (scm_run_asyncs): Do not set scm_mask_ints while running an async.
6512 this should not be necessary.
6513 (scm_async_click): Test block_asyncs instead of scm_mask_ints.
6514 (scm_mask_signals, scm_unmask_signals): Deprecated. Emit
6515 deprecation warning and check for errornous use. Set block_asyncs
6516 instead of scm_mask_ints.
6517 (increase_block, decrease_block, scm_call_with_blocked_asyncs,
6518 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
6519 scm_c_call_with_unblocked_asyncs): New.
6520
6521 * script.c (scm_compile_shell_switches): Do not set scm_mask_ints.
6522 Asyncs are enabled by default.
6523
6524 2002-10-09 Neil Jerram <neil@ossau.uklinux.net>
6525
6526 * vports.c (scm_make_soft_port): Allow vector argument to carry a
6527 6th element: an input waiting thunk.
6528 (sf_input_waiting): New.
6529
6530 2002-10-05 Marius Vollmer <mvo@zagadka.ping.de>
6531
6532 * root.c (root_mark): Mark active_asyncs slot.
6533
6534 * async.c (scm_async_click): Set the cdr of a executed handler
6535 cell to SCM_BOOL_F, not SCM_EOL.
6536 (scm_i_queue_async_cell): Queue the cell at the end of the list,
6537 and only if the handler procedure is not already present.
6538 (scm_system_async_mark_for_thread): Initialize cdr of handler cell
6539 with SCM_BOOL_F.
6540 * scmsigs.c (scm_sigaction_for_thread): Likewise.
6541
6542 2002-10-04 Rob Browning <rlb@defaultvalue.org>
6543
6544 * guile.c (main): switch to scm_lt_dlset_preloaded_symbols;
6545
6546 * dynl.c (sysdep_dynl_link): switch to scm_lt_dlhandle,
6547 scm_lt_dlopenext, and scm_lt_dlerror.
6548 (sysdep_dynl_unlink): switch to scm_lt_dlhandle, scm_lt_dlclose,
6549 and scm_lt_dlerror.
6550 (sysdep_dynl_func): switch to scm_lt_dlhandle, scm_lt_dlsym,
6551 and scm_lt_dlerror.
6552 (sysdep_dynl_init): switch to scm_lt_dlinit();
6553
6554 * Makefile.am (libguile_la_LIBADD): switch to use
6555 libguile-ltdl.la.
6556
6557 * numbers.c (scm_integer_expt): (expt 0 1) should be 1.
6558
6559 2002-10-04 Marius Vollmer <mvo@zagadka.ping.de>
6560
6561 * scmsigs.h (scm_sigaction_for_thread): New prototype.
6562 * scmsigs.c (got_signal): Removed.
6563 (signal_handler_cells, signal_handler_threads): New.
6564 (take_signal): Queue the cell of the signal for the specified
6565 thread. Reset the signal handler on systems that don't have
6566 sigaction.
6567 (sys_deliver_signals): Removed.
6568 (close_1): New.
6569 (scm_sigaction_for_thread): Renamed from scm_sigaction and
6570 extended to also set the thread of a signal and allocate a cell
6571 for it. Keep the Scheme name "sigaction". Check that signum is
6572 within range. Also, use SCM_VECTOR_REF instead of SCM_VELTS.
6573 (scm_sigaction): Implement in terms of scm_sigaction_for_thread.
6574 (scm_init_scmsigs): Allocate signal_handler_cells and
6575 signal_handler_threads vectors.
6576
6577 * async.c: Removed GUILE_OLD_ASYNC_CLICK code. Reorganized so
6578 that system asnycs and user asyncs are separated. Reimplemented
6579 system asyncs to work per-thread.
6580
6581 * gc.c (scm_init_gc): Do not use scm_system_async.
6582
6583 * async.h (scm_asyncs_pending, scm_set_tick_rate,
6584 scm_set_switch_rate, scm_system_async_mark_from_signal_handler):
6585 Removed prototypes.
6586 (scm_i_queue_async_cell): New.
6587
6588 * __scm.h (scm_asyncs_pending_p): Removed.
6589 (SCM_ASYNC_CLICK): Check scm_active_asyncs instead of
6590 scm_asyncs_pending_p.
6591
6592 * async.h (scm_system_async_mark_for_thread): New prototype.
6593
6594 * __scm.h: Removed GUILE_OLD_ASYNC_CLICK code.
6595
6596 * root.h (scm_root_state): Added new "active_asyncs" slot.
6597 * root.c (scm_make_root): Initialize it to SCM_EOL.
6598
6599 * coop-defs.h (coop_t): Added new "handle" slot.
6600 * coop-threads.c (all_threads, scm_current_thread,
6601 scm_all_threads, scm_i_thread_root): New.
6602 (scm_threads_init): Add main thread to all_threads.
6603 (scheme_launch_thread): Remove thread from all_threads when it
6604 terminates.
6605 (scm_call_with_new_thread): Initialize handle slot of coop_t
6606 structure and add new thread to all_threads.
6607 (scm_spawn_thread): Likewise.
6608
6609 * threads.h (scm_current_thread, scm_all_threads): New prototypes.
6610 * threads.c (scm_current_thread, scm_all_threads): Register as
6611 primitives.
6612
6613 * dynl.c: Use scm_lt_ prefix for libltdl functions.
6614
6615 2002-09-29 Neil Jerram <neil@ossau.uklinux.net>
6616
6617 * script.c (scm_compile_shell_switches): Fix bad spelling of
6618 `explicitly' in comment.
6619
6620 2002-09-28 Neil Jerram <neil@ossau.uklinux.net>
6621
6622 * posix.c (scm_geteuid, scm_getegid, scm_seteuid, scm_setegid):
6623 Refer to provided? in doc string rather than deprecated feature?.
6624
6625 2002-09-24 Gary Houston <ghouston@arglist.com>
6626
6627 * inline.h (scm_double_cell): prevent reordering of statements
6628 with any following code (for GCC 3 strict-aliasing).
6629 * numbers.c (scm_make_real), num2float.i.c (FLOAT2NUM): removed
6630 the earlier version of the reordering prevention.
6631
6632 2002-09-19 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6633
6634 * inline.h (scm_double_cell): move SET_GCMARK set out of if body.
6635
6636 2002-09-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6637
6638 * gc-malloc.c (scm_gc_register_collectable_memory): more overflow
6639 protection.
6640
6641 2002-09-08 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6642
6643 * inline.h: include stdio.h
6644
6645 * smob.c (free_print): abort if scm_debug_cell_accesses_p is set
6646
6647 2002-09-05 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6648
6649 * gc-segment.c (scm_i_make_initial_segment): check user settings
6650 for sanity.
6651
6652 * gc-malloc.c (scm_gc_init_malloc): check user settings for
6653 sanity.
6654
6655 * gc-freelist.c (scm_init_freelist): check user settings for sanity.
6656
6657 * struct.h: change scm_structs_to_free to scm_i_structs_to_free
6658
6659 * gc-malloc.c (scm_gc_register_collectable_memory): use floats;
6660 these won't ever wrap around with high memory usage. Thanks to
6661 Sven Hartrumpf for finding this.
6662
6663 * gc-freelist.c: include <stdio.h>
6664
6665 * gc-malloc.c: add DEBUGINFO for mtrigger GCs.
6666
6667 2002-09-01 Marius Vollmer <mvo@zagadka.ping.de>
6668
6669 * vectors.h (SCM_VECTOR_REF): New.
6670
6671 * snarf.h (SCM_DEFINE_PUBLIC): New.
6672
6673 2002-08-30 Marius Vollmer <mvo@zagadka.ping.de>
6674
6675 * socket.c (scm_addr_vector): Added size of address to arguments.
6676 Use it to avoid accessing a non-existent path in a sockaddr_un.
6677 Changed all callers.
6678
6679 2002-08-29 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6680
6681 * gc.h: remove DOUBLECELL card flags.
6682
6683 * gc-malloc.c (scm_calloc): try to use calloc() before calling
6684 scm_realloc().
6685
6686 * gc-segment.c (scm_i_initialize_heap_segment_data): remove card
6687 init loop; handle this from scm_init_card_freelist()
6688
6689 * gc-card.c (scm_init_card_freelist): init bit vector here.
6690
6691 * numbers.c (scm_make_real): prevent reordering of statements
6692 num2float.i.c (FLOAT2NUM): idem
6693
6694 2002-08-27 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6695
6696 * eval.h: prepend libguile/ to include path
6697
6698 2002-08-26 Marius Vollmer <mvo@zagadka.ping.de>
6699
6700 * script.c (scm_compile_shell_switches): Added "2002" to Copyright
6701 years. Thanks to Martin Grabmüller!
6702
6703 2002-08-25 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6704
6705 * gc-segment.c (scm_i_get_new_heap_segment): use float in stead of
6706 unsigned numbers for computing minimum heap increment. This
6707 prevents weird results when a a negative minimum increment is
6708 computed.
6709
6710 2002-08-24 Marius Vollmer <mvo@zagadka.ping.de>
6711
6712 * gc_os_dep.c: When we have __libc_stack_end, use that directly
6713 instead of the old tricks.
6714
6715 * guile-snarf.in: Do not expect the input file to be the first
6716 argument after the optional "-o" option, just pass everything to
6717 the pre-processor without extracting the input file name.
6718
6719 2002-08-23 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6720
6721 * gc-segment.c (scm_i_get_new_heap_segment): Oops. We want segment
6722 length *at* least SCM_MIN_HEAP_SEG_SIZE, not at most.
6723
6724 2002-08-22 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6725
6726 * gc.h, gc.c: make scm_cells_allocated unsigned again. Thanks to
6727 Bill Schottstaedt for the bug report
6728
6729 2002-08-20 Marius Vollmer <mvo@zagadka.ping.de>
6730
6731 * print.c (scm_iprin1): Print primitives generics always as
6732 "primitive-generic" even when they have no primitive methods yet.
6733
6734 2002-08-17 Gary Houston <ghouston@arglist.com>
6735
6736 * coop.c (coop_create): removed bogus 2nd argument in scm_malloc
6737 call.
6738
6739 2002-08-17 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6740
6741 * ports.c (scm_add_to_port_table): small bugfix.
6742
6743 * mallocs.c (scm_malloc_obj): use scm_gc_malloc in stead of
6744 malloc.
6745
6746 * gc-segment.c (scm_i_get_new_heap_segment): remove cluster cruft:
6747 only use SCM_MIN_HEAP_SEG_SIZE.
6748
6749 * ports.c (scm_add_to_port_table): add backwards compatibility
6750 function
6751
6752 * ports.h: use scm_i_ prefix for port table and port table size.
6753
6754 2002-08-15 Mikael Djurfeldt <mdj@linnaeus>
6755
6756 * vports.c (scm_make_soft_port): Initialize pt variable.
6757
6758 2002-08-13 Marius Vollmer <mvo@zagadka.ping.de>
6759
6760 * strports.h (scm_c_eval_string_in_module,
6761 scm_eval_string_in_module): New prototypes.
6762 * strports.c (scm_eval_string_in_module): New, but use
6763 "eval-string" as the Scheme name and make second parameter
6764 optional.
6765 (scm_eval_string): Implement using scm_eval_string_in_module.
6766 (scm_c_eval_string_in_module): New.
6767 Thanks to Ralf Mattes for the suggestion!
6768
6769 2002-08-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6770
6771 * gc-card.c ("sweep_card"): remove SCM_MISC_ERROR messages: print
6772 message and abort.
6773
6774 * gc-mark.c ("scm_gc_mark_dependencies"): idem.
6775
6776 * ports.c ("scm_new_port_table_entry"): return a boxed SCM in
6777 stead of scm_t_port*. The function now takes a tag argument.
6778
6779 2002-08-08 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6780
6781 * gc.h: add scm_debug_cells_gc_interval to public interface
6782
6783 * gc-card.c ("sweep_card"): set scm_gc_running while sweeping.
6784
6785 * gc.c (scm_i_expensive_validation_check): separate expensive
6786 validation checks from cheap ones.
6787
6788 2002-08-06 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6789
6790 * read.c (scm_input_error): new function: give meaningful error
6791 messages, and throw read-error
6792
6793 * gc-malloc.c (scm_calloc): add scm_calloc.
6794
6795 2002-08-05 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6796
6797 * tags.h: remove GC bits documentation from the tags table.
6798
6799 * read.c (INPUT_ERROR): Prepare for file:line:column error
6800 messages for errors in scm_lreadr() and friends.
6801
6802 2002-08-04 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6803
6804 * gc-malloc.c (scm_malloc): use scm_realloc() (simplifies
6805 implementation).
6806 (scm_gc_calloc): new function
6807
6808 2002-08-04 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6809
6810 * ports.c (scm_new_port_table_entry): init port entry to 0
6811 completely.
6812
6813 * ports.c (scm_new_port_table_entry): change function from
6814 scm_add_to_port_table. This prevents cells with null-pointers from
6815 being exposed to GC.
6816
6817 * vports.c (scm_make_soft_port) strports.c (scm_mkstrport),
6818 fports.c (scm_fdes_to_port): Use scm_new_port_table_entry().
6819
6820 * gc.c (scm_gc_stats): add cell-yield and malloc-yield statistic
6821 to gc-stats.
6822
6823 * numbers.c (big2str): return "0" for 0 iso. ""
6824
6825 * gc-segment.c, gc-malloc.c gc-mark.c, gc-freelist.c, gc-card.c,
6826 private-gc.h: new file
6827
6828 * gc.c: completely revised and cleaned up the GC. It now uses lazy
6829 sweeping. More documentation in workbook/newgc.text
6830
6831 2002-07-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6832
6833 * random.c (rstate_free): Return zero.
6834
6835 2002-07-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
6836
6837 * environments.c (remove_key_from_alist): Removed.
6838
6839 (obarray_remove): Simplified.
6840
6841 2002-07-24 Stefan Jahn <stefan@lkcc.org>
6842
6843 * continuations.h: ia64: Include <signal.h> before
6844 <sys/ucontext.h>.
6845
6846 2002-07-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6847
6848 * modules.c (scm_sym2var): Don't compare SCM values with ==.
6849
6850 2002-07-21 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6851
6852 * goops.c (scm_compute_applicable_methods): use
6853 scm_remember_upto_here_1 iso scm_remember_upto_here
6854
6855 * macros.c: include deprecation.h
6856
6857 * vectors.c (scm_vector_move_right_x): remove side effect in
6858 macro arg.
6859 (scm_vector_move_left_x): idem.
6860
6861 * net_db.c, posix.c, socket.c: variable naming: change ans to
6862 result.
6863
6864 * sort.c (scm_merge_vector_x): accept vector as argument
6865 iso. SCM*. This is needed for full GC correctness.
6866
6867 * gc.h: undo previous undocumented changes related to #ifdef
6868 GENGC.
6869
6870 2002-07-20 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6871
6872 * *.c: add space after commas everywhere.
6873
6874 * *.c: use SCM_VECTOR_SET everywhere, where a vector is written.
6875 Document cases where SCM_WRITABLE_VELTS() is used.
6876
6877 * vectors.h (SCM_VELTS): prepare for write barrier, and let
6878 SCM_VELTS() return a const pointer
6879 (SCM_VECTOR_SET): add macro.
6880
6881 2002-07-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
6882
6883 * eval.c (SCM_CEVAL), macros.c (macro_print, scm_makmacro,
6884 scm_sym_macro, scm_macro_type), macros.h (scm_makmacro):
6885 Deprecated the special kind of built-in dynamic syntax transformer
6886 that was inaccurately named "macro". Note: The built-in syntax
6887 transformers that are named "mmacro" or "memoizing-macro" still
6888 exist, and it is these which come much closer to what one would
6889 call a macro.
6890
6891 2002-07-13 Neil Jerram <neil@ossau.uklinux.net>
6892
6893 * eval.c (unmemocopy): Fix for
6894 1001-local-eval-error-backtrace-segfaults (unmemoization crash
6895 with internal definitions and local-eval).
6896
6897 2002-07-12 Gary Houston <ghouston@arglist.com>
6898
6899 * dynl.c: Don't define stub procedures if DYNAMIC_LINKING is not
6900 defined. They don't do anything useful, especially since the
6901 only case where DYNAMIC_LINKING is undefined seems to be
6902 when --with-modules=no is given to configure, which is basically
6903 requesting that the "dynamic linking module" be omitted.
6904
6905 * Makefile.am (libguile_la_SOURCES): move dynl.c from
6906 libguile_la_SOURCES to EXTRA_libguile_la_SOURCES.
6907
6908 * extensions.c (load_extension): check DYNAMIC_LINKING for
6909 scm_dynamic_call.
6910 * init.c (scm_init_guile_1): check DYNAMIC_LINKING for
6911 scm_init_dynamic_linking.
6912
6913 2002-07-10 Marius Vollmer <mvo@zagadka.ping.de>
6914
6915 * guile.c, iselect.h, net_db.c, posix.c, socket.c: No need to
6916 check for Cygwin when including <winsock2.h>, this is already
6917 check for by configure. Thus, revert change from 2002-07-07.
6918
6919 2002-07-10 Gary Houston <ghouston@arglist.com>
6920
6921 * eq.c: include <string.h>
6922 * dynl.c: docstring editing.
6923
6924 2002-07-09 Gary Houston <ghouston@arglist.com>
6925
6926 * dynl.c (scm_dynamic_call): docstring editing.
6927
6928 2002-07-08 Rob Browning <rlb@defaultvalue.org>
6929
6930 * gc_os_dep.c: HURD fixes.
6931
6932 2002-07-07 Marius Vollmer <mvo@zagadka.ping.de>
6933
6934 Crosscompiling and Cygwin fixes by Jan Nieuwenhuizen. Thanks!
6935
6936 * Makefile.am: Override default rule for c-tokenize.$(OBJECT);
6937 this should be compiled for BUILD host.
6938 Override default rule for
6939 guile_filter_doc_snarfage$(EEXECT); this should run on BUILD host.
6940 Add missing $(EXEEXT) to guile_filter_doc_snarfage invocation.
6941 (snarf2checkedtexi): Use GUILE_FOR_BUILD instead of preinstguile.
6942
6943 * guile.c, iselect.h, net_db.c, posix.c, socket.c: Do not include
6944 <winsock2.h> on Cygwin even when we have it.
6945
6946 2002-07-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
6947
6948 * __scm.h (SCM_CAUTIOUS), eval.c (scm_eval_args, deval_args,
6949 SCM_CEVAL): Removed compile time option SCM_CAUTIOUS to clean up
6950 the code. Full number of arguments checking of closures is
6951 mandatory now. However, the option to disable the checking has
6952 most probably not been used anyway.
6953
6954 2002-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
6955
6956 * __scm.h (SCM_RECKLESS), backtrace.c (SCM_ASSERT), debug.c
6957 (scm_debug_options), eval.c (scm_lookupcar, scm_lookupcar1,
6958 scm_badargsp, SCM_CEVAL, SCM_APPLY, scm_map, scm_for_each),
6959 feature.c (scm_init_feature), gsubr.c (scm_gsubr_apply), numbers.c
6960 (scm_logand, scm_logior, scm_logxor, scm_i_dbl2big), srcprop.c
6961 (scm_source_properties, scm_set_source_properties_x,
6962 scm_source_property): Removed compile time option SCM_RECKLESS to
6963 clean up the code. Full number of arguments checking of closures
6964 is mandatory now. However, the option to disable the checking has
6965 most probably not been used anyway.
6966
6967 * srcprop.c (scm_source_properties, scm_set_source_properties_x,
6968 scm_source_property): Use !SCM_CONSP instead of SCM_NCONSP.
6969
6970 2002-06-30 Gary Houston <ghouston@arglist.com>
6971
6972 * dynl.c: Removed all SCM_DEFER_INTS/SCM_ALLOW_INTS, which won't
6973 do anything useful. Added a comment about need for a mutex if
6974 pre-emptive threading is supported.
6975
6976 * posix.c (scm_convert_exec_args), dynl.c
6977 (scm_make_argv_from_stringlist): static procs: 1) renamed both to
6978 allocate_string_pointers. 2) simplified: don't reallocate the
6979 strings, just make an array of pointers 3) avoid memory leaks on
6980 error 4) let the procedure report errors in its own name.
6981 Consequences: 1) the procedures now assume that SCM strings are
6982 nul-terminated, which should always be the case. 2) Since strings
6983 are not reallocated, it's now possible for strings passed to
6984 dynamic-args-call to be mutated.
6985
6986 2002-06-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
6987
6988 * __scm.h, eval.c, eval.h: Removed compile time option
6989 MEMOIZE_LOCALS to clean up the code. Now, caching of local
6990 variable positions during memoization is mandatory. However, the
6991 option to disable the caching has most probably not been used
6992 anyway.
6993
6994 2002-06-18 Marius Vollmer <mvo@zagadka.ping.de>
6995
6996 * print.c (scm_simple_format): Print missing part of format before
6997 ~% control. Thanks to Daniel Skarda!
6998
6999 2002-06-01 Marius Vollmer <mvo@zagadka.ping.de>
7000
7001 * mkstemp.c: Added exception notice to license statement.
7002
7003 2002-05-22 Marius Vollmer <mvo@zagadka.ping.de>
7004
7005 * numbers.c (mem2ureal): When returning an inexact zero, make sure
7006 it is represented as a floating point value so that we can change
7007 its sign.
7008
7009 From John W. Eaton <jwe@bevo.che.wisc.edu>
7010
7011 * numbers.c (idbl2str): Don't omit sign when printing negative zero.
7012
7013 2002-05-14 Thien-Thi Nguyen <ttn@giblet.glug.org>
7014
7015 * gc_os_dep.c: For I386/OPENBSD, allow for `__i386__'
7016 in addition to `i386'. Thanks to Dale P. Smith.
7017
7018 2002-05-08 Marius Vollmer <mvo@zagadka.ping.de>
7019
7020 * eq.c (real_eqv): New.
7021 (scm_eqv_p): Use it when comparing reals and complexes.
7022
7023 * numbers.c: Include <string.h>, for strncmp.
7024 (mem2complex): Do not create negative NaNs.
7025 (scm_leq_p, scm_geq_p): Explicitely return #f when comparing a
7026 NaN.
7027 (scm_inexact_to_exact): Signal error when converting a NaN.
7028
7029 2002-05-06 Marius Vollmer <mvo@zagadka.ping.de>
7030
7031 * posix.c (scm_putenv): Handle removing variables explicitely by
7032 calling unsetenv.
7033
7034 From John W. Eaton.
7035
7036 * numbers.h: Conditionally include floatingpoint.h, ieeefp.h, and
7037 nan.h. Provide declarations for scm_inf_p, scm_nan_p, scn_inf,
7038 and scm_nan.
7039 * numbers.c: [SCO && ! HAVE_ISNAN] (isnan): New function.
7040 [SCO && ! HAVE_ISINF] (isinf): New function.
7041 (xisinf, xisnan): New functions.
7042 (IS_INF): Delete.
7043 (isfinite): Define in terms of xisinf.
7044 (scm_inf_p, scm_nan_p): New functions.
7045 (guile_Inf, guile_NaN): New file-scope vars.
7046 (guile_ieee_init): New function.
7047 (scm_inf, scm_nan): New functions.
7048 (idbl2str): Handle Inf and NaN. Remove funny label and
7049 corresponding gotos.
7050 (ALLOW_DIVIDE_BY_ZERO): New macro.
7051 (scm_divide): Allow division by zero to occur if
7052 ALLOW_DIVIDE_BY_ZERO is defined.
7053 Handle bignums and ints as special cases.
7054
7055 Additional stuff by me:
7056
7057 numbers.c (mem2ureal): Recognize "inf.0" and "nan.xxx".
7058 (scm_even_p, scm_odd_p): Treat infinity as even and odd.
7059 (iflo2str): Don't output a '+' for negative numbers or for Inf and
7060 NaN. They will provide their own sign.
7061 (scm_divide): Only allow divides by inexact zeros. Dividing by
7062 exact zeros still signals an errors.
7063
7064 2002-04-22 Thien-Thi Nguyen <ttn@giblet.glug.org>
7065
7066 * goops.h (scm_slot_exists_p): Rename from scm_slots_exists_p.
7067 * goops.c (scm_slot_exists_p): Rename from scm_slots_exists_p.
7068 (scm_slot_exists_p): Rename from scm_slots_exists_p.
7069 Thanks to Andreas Rottmann.
7070
7071 2002-04-20 Gary Houston <ghouston@arglist.com>
7072
7073 * removal of unused fields in root state (thanks to Christopher
7074 Cramer for pointing out the disuse.)
7075 * root.h (scm_root_state): removed def_inp, def_outp, def_errp.
7076 (scm_def_inp, scm_def_outp, scm_def_errp): removed.
7077
7078 * root.c (root_mark): don't mark them.
7079 (scm_make_root): don't set them to #f.
7080 * init.c (scm_init_standard_ports): don't initialise with the
7081 default ports.
7082
7083 2002-04-17 Marius Vollmer <mvo@zagadka.ping.de>
7084
7085 * Makefile.am (EXTRA_DIST): Added cpp_err_symbols.c and
7086 cpp_sig_symbols.c.
7087
7088 2002-04-16 Marius Vollmer <mvo@zagadka.ping.de>
7089
7090 * guile-snarf.in: Do not clean input file. This would write to
7091 the $(srcdir) during a VPATH build, which is not allowed. It also
7092 isn't needed since it only works when an output filename has been
7093 specified and in that case we don't need to clean the input file
7094 because the output file will already exist.
7095
7096 2002-03-31 Marius Vollmer <mvo@zagadka.ping.de>
7097
7098 * guile-snarf: Install the trap for removing $cleanfile only when
7099 the value of $cleanfile is actually known.
7100
7101 2002-04-10 Rob Browning <rlb@defaultvalue.org>
7102
7103 * .cvsignore: add versiondat.h and *.c.clean.c.
7104
7105 2002-03-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
7106
7107 * srcprop.[ch] (scm_c_source_property_breakpoint_p): New
7108 function, replaces macro SRCBRKP.
7109
7110 (SRCBRKP): Deprecated.
7111
7112 * eval.c (SCM_CEVAL): Replaced use of SRCBRKP by call to
7113 scm_c_source_property_breakpoint_p. Removed some use of arg1 as
7114 temporary variable.
7115
7116 2002-03-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
7117
7118 * debug.h, eval.c: Deprecated CHECK_ENTRY, CHECK_APPLY and
7119 CHECK_EXIT and removed all references to them.
7120
7121 2002-03-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
7122
7123 * debug.h (scm_ready_p, debug_print): Removed declarations.
7124
7125 * eval.c (EVALCELLCAR): Removed.
7126
7127 (SCM_CEVAL): Eliminated label loopnoap. Removed side-effecting
7128 operation from condition.
7129
7130 2002-03-24 Marius Vollmer <mvo@zagadka.ping.de>
7131
7132 * guile-snarf.in: When the output filename is "-", write to
7133 stdout. When no "-o" option is given, use "-" as the output
7134 filename (i.e., stdout). Only 'clean' the inputfile or remove the
7135 output file on error when the output file name is not "-". Define
7136 the preprocessor macro SCM_MAGIC_SNARFER while snarfing.
7137
7138 * Makefile.am (.c.x): Pass "-o $@" to guile-snarf.
7139
7140 2002-03-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
7141
7142 * eval.c (SCM_CEVAL, SCM_APPLY): Eliminated labels wrongnumargs
7143 and the corresponding goto statements. Removed redundant code.
7144
7145 2002-03-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
7146
7147 * eval.c (SCM_CEVAL): Minimized scope of variable arg2.
7148 Eliminated redundant SCM_IMP check. Exlined call to EVALCAR.
7149 Re-enabled handing of rpsubrs and asubrs.
7150
7151 2002-03-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
7152
7153 * eval.c (SIDEVAL): Removed.
7154
7155 (SCM_CEVAL): Minimized scope of variable orig_sym. Eliminated
7156 goto-labels cdrxnoap, cdrxbegin and nontoplevel_cdrxnoap. Changed
7157 argument checking order for set! to locals, variables and symbols.
7158 Improvements to control structure. Removed some uses of arg1 and
7159 arg2 as temporary variables.
7160
7161 2002-03-15 Thien-Thi Nguyen <ttn@giblet.glug.org>
7162
7163 * guile-snarf.in: Remove "--compat=1.4" support.
7164 Add "-d" and "-D" support.
7165
7166 (deprecated_list): New var.
7167 (compat_mode_clean_xxx): Delete.
7168 (grep_deprecated): New func.
7169 ("main"): If "-d" or "-D", call `grep_deprecated'.
7170
7171 2002-03-15 Neil Jerram <neil@ossau.uklinux.net>
7172
7173 * hooks.h: Change scm_t_c_hookype_t everywhere to
7174 scm_t_c_hook_type.
7175
7176 Docstring fixes:
7177
7178 * strings.c (scm_string_p): Change unnecessary `iff' to `if'.
7179
7180 * ports.c (scm_sys_make_void_port): Use `@file'.
7181
7182 * numbers.c (scm_number_p, scm_real_p): Use `otherwise' rather
7183 than `else'.
7184
7185 * macros.c (scm_makmacro): Don't say that the form replaces its
7186 source, because it doesn't.
7187 (scm_makmmacro): Clarify difference between this and scm_makmacro.
7188
7189 * backtrace.c (scm_display_error), filesys.c (scm_umask,
7190 scm_select, scm_basename), goops.c (scm_method_generic_function),
7191 numbers.c (scm_integer_length), posix.c (scm_getgroups, scm_execl,
7192 scm_setlocale, scm_flock), socket.c (scm_shutdown): Correct
7193 spelling mistakes.
7194
7195 * debug.c (scm_debug_options), eval.c
7196 (scm_eval_options_interface), read.c (scm_read_options): Change
7197 incorrect @var in docstring to @code.
7198
7199 2002-03-14 Marius Vollmer <mvo@zagadka.ping.de>
7200
7201 * unif.c (singp): Use SCM_REALP instead of SCM_SLOPPY_REALP.
7202
7203 * snarf.h (SCM_SNARF_INIT): Add "^:^" after code so that
7204 guile-snarf can remove trailing non-init code.
7205
7206 * guile-snarf.in (modern_snarf): Remove everything following and
7207 including "^:^" from the output.
7208
7209 2002-03-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
7210
7211 * eval.c (SCM_CEVAL), srcprop.h (SRCBRKP): Eliminated union 't'.
7212
7213 * eval.c (SCM_CEVAL): Exlined call to EVALCAR.
7214
7215 2002-03-13 Thien-Thi Nguyen <ttn@giblet.glug.org>
7216
7217 * guile-snarf.in: Update copyright.
7218 Rewrite to internalize error handling.
7219 Add "--compat=1.4" handling.
7220 Add commentary.
7221
7222 * Makefile.am (libpath.h): Use @top_srcdir_absolute@.
7223 (snarfcppopts): New var.
7224 (.c.x): Use $(snarfcppopts). Rework guile-snarf usage.
7225 (.c.doc): Use $(snarfcppopts).
7226
7227 * alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,
7228 continuations.c, debug-malloc.c, debug.c, deprecation.c, dynl.c,
7229 dynwind.c, environments.c, eq.c, error.c, eval.c, evalext.c,
7230 extensions.c, feature.c, filesys.c, fluids.c, fports.c, gc.c,
7231 goops.c, gsubr.c, guardians.c, hash.c, hashtab.c, hooks.c,
7232 ioext.c, iselect.c, keywords.c, lang.c, list.c, load.c, macros.c,
7233 modules.c, net_db.c, numbers.c, objects.c, objprop.c, options.c,
7234 pairs.c, ports.c, posix.c, print.c, procprop.c, procs.c,
7235 properties.c, ramap.c, random.c, rdelim.c, read.c, regex-posix.c,
7236 root.c, rw.c, scmsigs.c, script.c, simpos.c, socket.c, sort.c,
7237 srcprop.c, stackchk.c, stacks.c, stime.c, strings.c, strop.c,
7238 strorder.c, strports.c, struct.c, symbols.c, threads.c, throw.c,
7239 unif.c, values.c, variable.c, vectors.c, version.c, vports.c,
7240 weaks.c: Retire inclusion guard macro SCM_MAGIC_SNARFER.
7241
7242 2002-03-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
7243
7244 * eval.c (SCM_CEVAL): Got rid of the last reference to t.lloc.
7245 The next step will be to remove the union 't' and simplify the
7246 code of SCM_CEVAL that way.
7247
7248 2002-03-12 Neil Jerram <neil@ossau.uklinux.net>
7249
7250 * iselect.c (collisionp, gnfds, greadfds, gwritefds, gexceptfds,
7251 rreadfds, rwritefds, rexceptfds): Made static.
7252
7253 * gc.c (terminating), fports.c (terminating): Renamed
7254 scm_i_terminating.
7255
7256 2002-03-11 Marius Vollmer <mvo@zagadka.ping.de>
7257
7258 * numbers.c (scm_divide): Adapt code from libstdc++/f2c to void
7259 potential overflow problems. Thanks to John W Eaton!
7260
7261 * strop.c (string_capitalize_x): Treat characters as unsigned so
7262 that 8-bit chars work. Thanks to David Pirotte!
7263
7264 2002-03-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
7265
7266 * eval.c (SCM_CEVAL): Cleaned up the handling of 'slot-ref',
7267 'slot-set!' and 'nil-cond'. Removed some uses of t.arg1, arg2 and
7268 proc as temporary variables. Introduced temporary variables with
7269 hopefully descriptive names for clarification. Replaced SCM_N?IMP
7270 by a more explicit predicate in some places.
7271
7272 2002-03-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
7273
7274 * eval.c (SCM_CEVAL): Cleaned up the handling of #@dispatch.
7275 Added lots of comments regarding the implementation of #@dispatch.
7276 Changed intra-procedure communication to use t.arg1 instead of
7277 arg2. Removed some uses of t.arg1, t.lloc and proc as temporary
7278 variables. Introduced temporary variables with hopefully
7279 descriptive names for clarification. Replaced SCM_N?IMP by a more
7280 explicit predicate in some places. Use SCM_INSTANCE_HASH instead
7281 of computing the expression explicitly. Eliminate now unused
7282 label nontoplevel_cdrxbegin.
7283
7284 * goops.h (SCM_INSTANCE_HASH): New macro.
7285
7286 * objects.h (SCM_CMETHOD_FORMALS, SCM_CMETHOD_BODY): New macros.
7287
7288 2002-03-08 Thien-Thi Nguyen <ttn@giblet.glug.org>
7289
7290 * Makefile.am (bin_SCRIPTS): Revive this decl, w/ initial element
7291 "guile-snarf" moved back from `noinst_SCRIPTS'.
7292
7293 2002-03-08 Neil Jerram <neil@ossau.uklinux.net>
7294
7295 * srcprop.c (scm_set_source_property_x): If SRCPROPS obj already
7296 exists when adding a source property other than those that are
7297 handled explicitly, add the new property to the SRCPROPS obj's
7298 plist.
7299
7300 * debug.h (SCM_MAX_FRAME_SIZE): Remove incorrect comment about use
7301 of SCM_MAX_FRAME_SIZE as a bit mask; it isn't used like this.
7302
7303 * eval.c (SCM_CEVAL): Don't store scm_debug_eframe_size in
7304 debug.status. It isn't needed, and it can overflow the bits
7305 reserved for it (which may lead to a segv or a GC abort).
7306
7307 2002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
7308
7309 * eval.c (SCM_CEVAL): Cleaned up the handling of 'apply'. Removed
7310 side-effecting operations from conditions and macro calls.
7311 Replaced SCM_N?IMP by a more explicit predicate in some places.
7312 Minimized the scope of some variables.
7313
7314 2002-03-02 Stefan Jahn <stefan@lkcc.org>
7315
7316 * convert.i.c: Fixed int <-> long conversions which would have
7317 failed if their sizes were different.
7318
7319 2002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
7320
7321 * eval.c (SCM_CEVAL): Cleaned up the handling of 'if', 'let',
7322 'letrec' and 'set*': Removed some uses of t.arg1, t.lloc and proc
7323 as temporary variables. Removed side-effecting operations from
7324 conditions and macro calls. Introduced temporary variables with
7325 hopefully descriptive names for clarification. Replaced SCM_N?IMP
7326 by a more explicit predicate in some places. Removed code that
7327 was conditionally compiled if SICP was defined - which it never
7328 is.
7329
7330 2002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
7331
7332 * eval.c (SCM_CEVAL): Cleaned up the handling of 'cons' and 'do':
7333 Removed some uses of t.arg1 and proc as temporary variables.
7334 Removed side-effecting operations from conditions and macro calls.
7335 Introduced temporary variables with hopefully descriptive names
7336 for clarification. Replaced SCM_N?IMP by a more explicit
7337 predicate in some places.
7338
7339 2002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
7340
7341 * eval.c (scm_badargsp, SCM_CEVAL): Replaced SCM_N?IMP by a more
7342 explicit predicate in some places.
7343
7344 (CHECK_EQVISH): Removed.
7345
7346 (SCM_CEVAL): Removed some uses of t.arg1 and proc as temporary
7347 variables. Removed side-effecting operations from conditions and
7348 macro calls. Introduced temporary variables for clarification.
7349 Sorted if-else-if check for the type of the last form in a list by
7350 frequency. Avoided some unnecessary tail-recursion calls.
7351
7352 2002-03-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
7353
7354 * gc.c (SCM_HEAP_SEG_SIZE, CELL_UP, CELL_DN, NEXT_DATA_CELL,
7355 init_heap_seg, alloc_some_heap), gc.h (struct scm_cell, struct
7356 scm_t_cell, SCM_CELLPTR, SCM_GC_CARD_SIZE,
7357 SCM_GC_IN_CARD_HEADERP), tags.h (SCM_CELLP): Renamed the struct
7358 scm_cell and all its uses to scm_t_cell in accordance to Guile's
7359 naming scheme for types.
7360
7361 * alist.c (scm_acons), convert.i.c (CTYPES2UVECT,
7362 CTYPES2UVECT_OPTIONAL), coop-threads.c (scm_call_with_new_thread,
7363 scm_spawn_thread), debug.c (scm_make_debugobj), environments.c
7364 (scm_make_environment), eval.c (scm_closure), fports.c
7365 (scm_fdes_to_port), gc.c (scm_deprecated_newcell,
7366 scm_deprecated_newcell2), inline.h (scm_alloc_cell, scm_cell),
7367 list.c (SCM_I_CONS), numbers.c (scm_i_mkbig), pairs.c (scm_cons),
7368 ports.c (scm_void_port), procs.c (scm_c_make_subr, scm_makcclo),
7369 smob.c (scm_make_smob), smob.h (SCM_NEWSMOB), strings.c
7370 (scm_take_str, scm_allocate_string), strports.c (scm_mkstrport),
7371 unif.c (scm_make_uve), variable.c (make_variable), vectors.c
7372 (scm_c_make_vector), vports.c (scm_make_soft_port): Renamed
7373 scm_alloc_cell to scm_cell.
7374
7375 * environments.c (core_environments_observe), gc.c
7376 (scm_deprecated_newcell2), goops.c (wrap_init, scm_wrap_object),
7377 inline.h (scm_alloc_double_cell, scm_double_cell), num2float.i.c
7378 (FLOAT2NUM), numbers.c (scm_make_real), procs.c
7379 (scm_make_procedure_with_setter), smob.h (SCM_NEWSMOB2,
7380 SCM_NEWSMOB3), struct.c (scm_make_struct, scm_make_vtable_vtable),
7381 symbols.c (scm_mem2symbol, scm_mem2uninterned_symbol), weaks.c
7382 (allocate_weak_vector): Renamed scm_alloc_double_cell to
7383 scm_double_cell.
7384
7385 2002-02-27 Stefan Jahn <stefan@lkcc.org>
7386
7387 * convert.i.c, convert.c: Better range checking.
7388
7389 * inet_aton.c, fports.c: Commented the inclusion of <winsock2.h>.
7390
7391 * deprecation.c (vsnprintf): Define to `_vsnprintf' for
7392 Windows (MinGW).
7393
7394 2002-02-26 Thien-Thi Nguyen <ttn@giblet.glug.org>
7395
7396 * Makefile.am: Update path to pre-inst-guile automake frag.
7397
7398 2002-02-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
7399
7400 * gc.c (scm_gc_sweep): Make it compile even when deprecated
7401 features are excluded.
7402
7403 2002-02-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
7404
7405 * num2integral.i.c (NUM2INTEGRAL): Fixed signedness problem.
7406
7407 2002-02-25 Gary Houston <ghouston@arglist.com>
7408
7409 * convert.c: include <string.h> for convert_i.c.
7410
7411 2002-02-24 Rob Browning <rlb@defaultvalue.org>
7412
7413 * .cvsignore: add stamp-h1.
7414
7415 2002-02-21 Neil Jerram <neil@ossau.uklinux.net>
7416
7417 * unif.c (scm_array_to_list): Correct name, which had been
7418 accidentally changed to scm_t_arrayo_list!
7419
7420 2002-02-20 Mikael Djurfeldt <mdj@linnaeus>
7421
7422 * gc.c (scm_gc_sweep): Print an error message when aborting due to
7423 underflowing scm_mallocated.
7424
7425 2002-02-14 Marius Vollmer <marius.vollmer@uni-dortmund.de>
7426
7427 * gc.h, gc.c (scm_must_malloc, scm_must_realloc, scm_must_strdup,
7428 scm_must_strndup, scm_done_malloc, scm_done_free, scm_must_free):
7429 Reimplemented using the new scm_gc_malloc, etc., functions and
7430 deprecated.
7431
7432 2002-02-11 Thien-Thi Nguyen <ttn@giblet.glug.org>
7433
7434 * Makefile.am (bin_PROGRAMS): Move `guile_filter_doc_snarfage'
7435 to `noinst_PROGRAMS'.
7436 (bin_SCRIPTS): Move all values to `noinst_SCRIPTS'; delete.
7437 (noinst_PROGRAMS, noinst_SCRIPTS): New.
7438
7439 2002-02-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
7440
7441 * gc.h, gc.c (scm_gc_sweep): Issue deprecation warning when
7442 non-zero is returned from a port or smob free function.
7443 (scm_malloc, scm_realloc, scm_strndup, scm_strdup,
7444 scm_gc_register_collectable_memory,
7445 scm_gc_unregister_collectable_memory, scm_gc_malloc,
7446 scm_gc_realloc, scm_gc_free, scm_gc_strndup, scm_gc_strdup): New.
7447
7448 * backtrace.c, continuations.c, convert.i.c, coop-threads.c,
7449 debug-malloc.c, dynl.c, environments.c, environments.h,
7450 extensions.c, filesys.c, fports.c, gc.c, gc.h, gh_data.c, goops.c,
7451 guardians.c, hooks.c, init.c, keywords.c, load.c, numbers.c,
7452 ports.c, posix.c, procs.c, rdelim.c, regex-posix.c, root.c,
7453 smob.c, stime.c, strings.c, struct.c, struct.h, symbols.c, unif.c,
7454 vectors.c, weaks.c: Use scm_gc_malloc/scm_malloc and
7455 scm_gc_free/free instead of scm_must_malloc and scm_must_free, as
7456 appropriate. Return zero from smob and port free functions.
7457
7458 * debug-malloc.c (scm_malloc_reregister): Handle "old == NULL".
7459
7460 * deprecation.h, deprecation.c: Reimplemented to allow deprecation
7461 messages while the GC is running.
7462 (scm_c_issue_deprecation_warning_fmt): New.
7463
7464 * fports.c (scm_setvbuf): Reset read buffer to saved values when
7465 it is pointing to the putback buffer.
7466
7467 2002-02-08 Thien-Thi Nguyen <ttn@giblet.glug.org>
7468
7469 * gsubr.c (create_gsubr): On "too many args" error,
7470 also display arg count and name. Thanks to Bill Schottstaedt.
7471
7472 2002-02-05 Thien-Thi Nguyen <ttn@giblet.glug.org>
7473
7474 * Makefile.am: Include $(top_srcdir)/pre-inst-guile.am.
7475
7476 (bin_SCRIPTS): Remove guile-snarf-docs-texi.
7477 (alldotdocfiles, snarf2checkedtexi, dotdoc2texi): New vars.
7478 (guile.texi, guile-procedures.texi): Use $(dotdoc2texi).
7479
7480 * guile-snarf-docs-texi.in: Bye bye.
7481
7482 2002-02-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
7483
7484 * symbols.c (scm_make_symbol): Fix typo in docstring.
7485
7486 * symbols.h (scm_mem2uninterned_symbol, scm_symbol_interned_p,
7487 scm_make_symbol): New prototypes.
7488
7489 2002-02-03 Marius Vollmer <mvo@zagadka.ping.de>
7490
7491 * symbols.h (SCM_SET_SYMBOL_HASH): Removed.
7492 (SCM_SYMBOL_INTERNED_P): New.
7493 * symbols.c (scm_symbol_hash): Use scm_ulong2num instead of
7494 SCM_MAKINUM since hash values can well be bignums.
7495 (scm_mem2symbol): Only use hash values below SCM_T_BITS_MAX/2.
7496 This signals a interned symbol.
7497 (scm_mem2uninterned_symbol, scm_symbol_interned_p,
7498 scm_make_symbol): New.
7499
7500 * print.c (scm_iprin1): Print uninterned symbols unreadably.
7501
7502 2002-02-02 Thien-Thi Nguyen <ttn@giblet.glug.org>
7503
7504 * __scm.h (HAVE_UINTPTR_T): Only define if UINTPTR_T attributes
7505 are defined: UINTPTR_MAX, INTPTR_MAX, INTPTR_MIN.
7506 Thanks to Dave Love.
7507
7508 2002-01-31 Marius Vollmer <mvo@zagadka.ping.de>
7509
7510 * symbols.c (scm_gensym): Use " g" as default prefix, not "g".
7511 This might help to make unintended clashes less likely.
7512 (scm_string_to_symbol): Protect the string until the symbols is
7513 created.
7514
7515 2002-01-31 Stefan Jahn <stefan@lkcc.org>
7516
7517 * convert.c, convert.h, convert.i.c: New files containing C
7518 array to Scheme conversion helpers meant to be replacement
7519 functions for the deprecated gh interface.
7520
7521 * Makefile.am: Setup rules for new `convert.*' files.
7522
7523 2002-01-28 Stefan Jahn <stefan@lkcc.org>
7524
7525 * symbols.c (scm_c_symbol2str): New function, replacement for
7526 `gh_scm2newsymbol()'.
7527
7528 * strings.c (scm_c_substring2str): New function. Proper
7529 replacement for `gh_get_substr()'.
7530
7531 * socket.c: Include `stdint.h' if available for the `uint32_t'
7532 declaration.
7533
7534 * scmsigs.c (scm_sigaction): Initialize `chandler' (inhibits
7535 compiler warning).
7536
7537 * backtrace.c: Include `lang.h' for GUILE_DEBUG conditional.
7538
7539 2002-01-22 Neil Jerram <neil@ossau.uklinux.net>
7540
7541 Other changes unrelated to Elisp...
7542
7543 * eval.c (scm_m_if): Use s_if rather than repeating string literal
7544 "if".
7545 (comments): Fix a few typos.
7546 (scm_for_each): Add parentheses around oddly unparenthesized
7547 if/while conditions.
7548
7549 * read.c (scm_read_opts): Add full stop at end of doc for
7550 `keywords' option.
7551
7552 * script.c (scm_compile_shell_switches): Use scm_str2symbol
7553 instead of gh_symbol2scm.
7554
7555 * srcprop.h (SRCPROPBRK): Return C type rather than SCM.
7556 (SRCBRKP): Use SRCPROPBRK rather than duplicating its logic.
7557
7558 * srcprop.c (scm_srcprops_to_plist, scm_source_property): Change
7559 SRCPROPBRK (x) to SCM_BOOL (SRCPROPBRK (x)).
7560
7561 First batch of changes for Elisp support...
7562
7563 * alist.c, async.c, boolean.c, dynl.c, eval.c, filesys.c,
7564 fluids.c, list.c, load.c, options.c, posix.c, print.c, sort.c,
7565 throw.c, vectors.c, weaks.c: Add #include for lang.h.
7566
7567 * eval.c, eval.h, init.c, lang.c, lang.h: Use SCM_ENABLE_ELISP to
7568 conditionalize compilation and initialization of Elisp support
7569 function.
7570
7571 * alist.c (scm_assq, scm_assv, scm_assoc), async.c
7572 (scm_asyncs_pending, scm_run_asyncs, noop), backtrace.c
7573 (scm_set_print_params_x), dynl.c (scm_make_argv_from_stringlist),
7574 filesys.c (fill_select_type, retrieve_select_type), fluids.c
7575 (scm_swap_fluids, scm_swap_fluids_reverse), list.c (scm_null_p,
7576 scm_ilength, scm_append_x, scm_last_pair, scm_reverse,
7577 scm_reverse_x, scm_list_ref, scm_list_set_x, scm_list_cdr_set_x,
7578 scm_c_memq, scm_memv, scm_member), load.c (scm_search_path),
7579 options.c (change_option_setting, scm_options), posix.c
7580 (environ_list_to_c), print.c (scm_iprlist), throw.c
7581 (scm_exit_status), vectors.c (scm_vector), weaks.c
7582 (scm_weak_vector): Use SCM_NULL_OR_NIL_P instead of SCM_NULLP.
7583
7584 * boolean.c (scm_not): Use `SCM_FALSEP || SCM_NILP' instead of
7585 just SCM_FALSEP.
7586
7587 * boolean.c (scm_boolean_p): Use `SCM_BOOLP || SCM_NILP' instead
7588 of just SCM_BOOLP.
7589
7590 * eval.c (scm_lisp_nil, scm_lisp_t, s_nil_ify, scm_m_nil_ify,
7591 s_t_ify, scm_m_t_ify, s_0_cond, scm_m_0_cond, s_0_ify,
7592 scm_m_0_ify, s_1_ify, scm_m_1_ify): Removed.
7593 (scm_m_atfop): Support function aliasing. Support both function
7594 args, which need transformation, and macro args, which do not.
7595 Add explanatory comments.
7596 (SCM_CEVAL): In switch cases for SCM_IM_AND, SCM_IM_COND,
7597 SCM_IM_DO, SCM_IM_IF and SCM_IM_OR, add `|| SCM_NILP' to existing
7598 checks for SCM_FALSEP. In switch case for SCM_IM_NIL_COND, use
7599 SCM_NULLP || SCM_NILP instead of checks against (removed)
7600 scm_lisp_nil. Removed switch cases for SCM_IM_NIL_IFY,
7601 SCM_IM_T_IFY, SCM_IM_0_COND, SCM_IM_0_IFY, SCM_IM_1_IFY.
7602
7603 * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null,
7604 scm_m_while, scm_nil_eq): Commented out; I don't think we need
7605 these, but I don't want to remove them yet, just in case.
7606 (scm_init_lang): Define `%nil' variable on Scheme level to hold
7607 Elisp nil value.
7608
7609 * lang.h (SCM_NILP): Test against Elisp nil value instead of
7610 against (removed) scm_lisp_nil.
7611 (SCM_NILNULLP, SCM_NIL2EOL, SCM_EOL2NIL): Commented out.
7612 (SCM_NULL_OR_NIL_P): New.
7613
7614 * list.c (scm_append): Use SCM_VALIDATE_NULL_OR_NIL instead of
7615 SCM_VALIDATE_NULL.
7616
7617 * print.c (scm_isymnames): Fix comment. Remove #@nil-ify,
7618 #@t-ify, #@0-cond, #@0-ify, #@1-ify. Add #nil (for SCM_ELISP_NIL
7619 value).
7620
7621 * sort.c (scm_sorted_p, scm_merge, scm_merge_list_x, scm_merge_x,
7622 scm_sort_x, scm_sort, scm_stable_sort_x, scm_stable_sort): Use
7623 SCM_NULL_OR_NIL_P instead of SCM_NULLP. In constructions like `if
7624 (SCM_NULLP (x)) return SCM_EOL;', return x rather than SCM_EOL.
7625
7626 * tags.h (SCM_IM_NIL_IFY, SCM_IM_T_IFY, SCM_IM_0_COND,
7627 SCM_IM_0_IFY, SCM_IM_1_IFY): Removed.
7628 (SCM_IM_BIND, SCM_IM_DELAY, SCM_IM_CALL_WITH_VALUES, SCM_UNBOUND):
7629 Numbering shifted down accordingly.
7630 (SCM_ELISP_NIL): New IFLAG.
7631
7632 * validate.h (SCM_VALIDATE_NULL_OR_NIL): New.
7633
7634 2002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
7635
7636 * eval.c: Removed outdated references to "everr". Improved some
7637 comments.
7638
7639 (scm_deval_args, deval_args): Renamed scm_deval_args to
7640 deval_args, since it is not part of the interface.
7641
7642 (SCM_CEVAL): Added (maybe somewhat verbose) comment. Avoid to
7643 use references to debug.vect[0] before it exists. Add parentheses
7644 to switch statement.
7645
7646 * goops.h: Added local emacs variables.
7647
7648 2002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
7649
7650 * eval.[ch] (scm_deval_args): Made static.
7651
7652 * srcprop.c (scm_source_property): Remove redundant SCM_IMP
7653 test.
7654
7655 * strings.c (scm_c_string2str): Clarified comment. Replaced
7656 THINKME by FIXME for uniformness. Removed question about whether
7657 arguments need to be protected from garbage collection: Arguments
7658 must be protected as any other variable.
7659
7660 2002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
7661
7662 * procs.h (SCM_CLOSURE_BODY): New Macro.
7663
7664 * debug.c (scm_procedure_name, scm_procedure_source), eval.c
7665 (SCM_CEVAL, SCM_APPLY), goops.c (scm_sys_initialize_object,
7666 get_slot_value, set_slot_value), procs.c
7667 (scm_procedure_documentation), sort.c (closureless), stacks.c
7668 (get_applybody): Replace SCM_CDR (SCM_CODE (...)) by
7669 SCM_CLOSURE_BODY.
7670
7671 * sort.c (closureless): Prefer !SCM_FOOP over SCM_NFOOP.
7672
7673 2001-12-26 Marius Vollmer <mvo@zagadka.ping.de>
7674
7675 * Makefile.am (guile-procedures.txt): When we don't have makeinfo,
7676 use "cp" instead.
7677
7678 2001-12-16 Marius Vollmer <mvo@zagadka.ping.de>
7679
7680 * stacks.c, stacks.h (scm_t_stackype): Renamed to scm_stack_type
7681 everywhere.
7682
7683 * continuations.c (scm_make_continuation): Do not retain the
7684 throw_value when the continuation is invoked.
7685
7686 2001-12-08 Stefan Jahn <stefan@lkcc.org>
7687
7688 * strings.c (scm_c_string2str): New function. Converts a
7689 given Scheme string into a C string. Also put in two
7690 THINKME's regarding the malloc policy for the missing converter
7691 routines.
7692
7693 2001-12-01 Neil Jerram <neil@ossau.uklinux.net>
7694
7695 * gh_data.c (gh_module_lookup): Use scm_str2symbol rather than
7696 gh_symbol2scm.
7697
7698 2001-11-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
7699
7700 * gc.h (SCM_GC_CELL_WORD, SCM_GC_CELL_OBJECT,
7701 SCM_GC_SET_CELL_WORD, SCM_GC_SET_CELL_OBJECT): New macros.
7702
7703 (SCM_GC_CELL_TYPE, SCM_CELL_WORD, SCM_CELL_OBJECT,
7704 SCM_SET_CELL_WORD, SCM_SET_CELL_OBJECT, SCM_FREE_CELL_CDR,
7705 SCM_GC_SET_CELL_OBJECT): Express in terms of SCM_GC_CELL_*
7706 macros.
7707
7708 (SCM_FREE_CELL_P): Express in terms of SCM_GC_CELL_TYPE.
7709
7710 * inline.h (scm_alloc_cell, scm_alloc_double_cell): Use
7711 SCM_GC_CELL_* macros when accessing free cells.
7712
7713 2001-11-25 Marius Vollmer <mvo@zagadka.ping.de>
7714
7715 * vectors.h (SCM_MAKE_VECTOR_TAG): New.
7716 * unif.h (SCM_MAKE_BITVECTOR_TAG, SCM_MAKE_UVECTOR_TAG): New.
7717 * symbols.h (SCM_MAKE_SYMBOL_TAG): New.
7718 * strings.h (SCM_MAKE_STRING_TAG): New.
7719 * procs.h (SCM_MAKE_CCLO_TAG): New.
7720 * numbers.h (SCM_MAKE_BIGNUM_TAG): New.
7721
7722 * goops.h: Replaced SCM_DEBUG_DEPRECATED with
7723 !SCM_ENABLE_DEPRECATED.
7724
7725 * async.c, async.h (scm_system_async_mark_from_signal_handler):
7726 New.
7727
7728 * scmsigs.c (scm_take_signal): Removed all code that assumes that
7729 signal handlers are allowed to divert the flow of control. Call
7730 scm_system_async_mark_from_signal_handler instead of
7731 scm_system_async_mark.
7732
7733
7734 Deprecated SCM_NEWCELL and SCM_NEWCELL2. Added scm_alloc_cell and
7735 scm_alloc_double_cell in their place.
7736
7737 * gc.h (SCM_GC_SET_ALLOCATED, scm_debug_newcell,
7738 scm_debug_newcell2, scm_tc16_allocated): Removed from header.
7739 (scm_deprecated_newcell, scm_deprecated_newcell2): New.
7740 (SCM_NEWCELL, SCM_NEWCELL2): Implement in terms of
7741 scm_deprecated_newcell and scm_deprecated_newcell2.
7742
7743 gc.c (scm_tc16_allocated): Only define when including deprecated
7744 features.
7745 (scm_debug_newcell, scm_debug_newcell2): Removed.
7746 (scm_init_storage): Do not initialize scm_tc16_allocated.
7747 (scm_init_gc): Do it here.
7748 (allocated_mark): New, from old code.
7749 (scm_deprecated_newcell, scm_deprecated_newcell2): New.
7750
7751 * inline.c, inline.h: New files.
7752 * Makefile.am: Added them in all the right places.
7753
7754 * _scm.h: Include "libguile/inline.h".
7755
7756 * alist.c, coop-threads.c, debug.c, environments.c, eval.c,
7757 fports.c, gh_data.c, goops.c, guardians.c, lang.c, list.c,
7758 num2float.i.c, numbers.c, pairs.c, ports.c, print.c, procs.c,
7759 smob.c, smob.h, strings.c, strports.c, struct.c, symbols.c,
7760 unif.c, variable.c, vectors.c, vports.c, weaks.c: Replaced
7761 SCM_NEWCELL and SCM_NEWCELL2 with scm_alloc_cell and
7762 scm_alloc_double_cell, respectively.
7763
7764 2001-11-23 Marius Vollmer <mvo@zagadka.ping.de>
7765
7766 * modules.c (scm_c_use_module): Adapt to changes to
7767 `process-use-modules'.
7768
7769 2001-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
7770
7771 * numbers.c (scm_divide): Fix more division by zero errors.
7772
7773 2001-11-21 Gary Houston <ghouston@arglist.com>
7774
7775 * Makefile.am (OMIT_DEPENDENCIES): removed, since it seems to be
7776 obsolete. autogen.sh says:
7777 invalid unused variable name: `OMIT_DEPENDENCIES'
7778
7779 2001-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
7780
7781 * numbers.c (scm_divide): Fix (/ 0). Thanks to Keith Wright for
7782 reporting the bug.
7783
7784 2001-11-21 Marius Vollmer <mvo@zagadka.ping.de>
7785
7786 * Makefile.am (install-exec-hook): Prepend $(DESTDIR) to filename.
7787 Thanks to Eric Gillespie, Jr!
7788
7789 2001-11-21 Stefan Jahn <stefan@lkcc.org>
7790
7791 * win32-socket.c (getservent, setservent, endservent,
7792 getprotoent, setprotoent, endprotoent): New functions.
7793 Appropriate replacements for M$-Windows.
7794
7795 * numbers.c (SIZE_MAX, PTRDIFF_MAX, PTRDIFF_MIN): Reintroduced
7796 these definitions for GUILE_DEBUG.
7797
7798 * net_db.c: Include "win32-socket.h" if compiling with a native
7799 M$-Windows compiler. Include some pieces of code (protoent and
7800 servent interface) protected by HAVE_* macros when using a
7801 native M$-Windows compiler.
7802
7803 2001-11-20 Marius Vollmer <mvo@zagadka.ping.de>
7804
7805 * modules.c (scm_c_export): Do nothing when the first argument is
7806 already the terminating NULL. Thanks to Han-Wen Nienhuys!
7807
7808 2001-11-20 Thien-Thi Nguyen <ttn@glug.org>
7809
7810 * Makefile.am (libpath.h): In SCM_BUILD_INFO,
7811 also include `buildstamp'.
7812
7813 2001-11-18 Rob Browning <rlb@defaultvalue.org>
7814
7815 * version.c
7816 (s_scm_major_version): use SCM_MAJOR_VERSION.
7817 (s_scm_minor_version): use SCM_MINOR_VERSION.
7818 (s_scm_micro_version): use SCM_MICRO_VERSION.
7819 (s_scm_version): use SCM_MAJOR_VERSION, SCM_MINOR_VERSION, and
7820 SCM_MICRO_VERSION.
7821
7822 * version.h.in
7823 (SCM_MAJOR_VERSION): renamed from SCM_GUILE_MAJOR_VERSION.
7824 (SCM_MINOR_VERSION): renamed from SCM_GUILE_MINOR_VERSION.
7825 (SCM_MICRO_VERSION): renamed from SCM_GUILE_MICRO_VERSION.
7826
7827 2001-11-18 Neil Jerram <neil@ossau.uklinux.net>
7828
7829 * vectors.c (scm_vector_move_left_x, scm_vector_move_right_x):
7830 Rewrite docstrings without reference to substring-move-left/right,
7831 since the latter no longer exist.
7832
7833 2001-11-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
7834
7835 * eval.c: Removed bogus comment about acros.
7836
7837 (scm_unmemocar): Use !SCM_CONSP instead of SCM_IMP.
7838 Minimize scope of local variable. Eliminate dependency on
7839 macro DEBUG_EXTENSIONS.
7840
7841 (s_splicing): New error message string.
7842
7843 (scm_m_body): Issue 'bad body' message rather than 'missing
7844 expression' message.
7845
7846 (scm_m_quote): Eliminate unnecessary copying.
7847
7848 (scm_m_lambda, scm_m_letstar, scm_m_letrec, scm_m_let): Leave the
7849 checking of the body to scm_m_body.
7850
7851 (scm_m_do): Move comment to function header. Rename arg1 to
7852 binding. Made the code a bit easier to read.
7853
7854 (evalcar): Removed.
7855
7856 (iqq): Added a comment. Changed the depth parameter to
7857 unsigned. Use size_t for vector lengths. Make sure vector object
7858 is gc protected as long as its contents are read. Add some syntax
7859 checks. Get rid of unnecessary SCM_IMP test. Clean up the
7860 control structure a bit.
7861
7862 (scm_m_delay): Added comment about the implementation of
7863 scm_m_delay.
7864
7865 (scm_m_define): Add comment about guile's currying define
7866 syntax. Renamed 'proc' to 'name'. Eliminate dependency on macro
7867 DEBUG_EXTENSIONS. Simplified code a bit. Eliminate SICP code.
7868
7869 (scm_m_letrec1): Removed. Part of the functionality is taken
7870 over by the new function 'transform_bindings'.
7871
7872 (transform_bindings): New function. Takes over some of the
7873 functionality of removed function 'scm_m_letrec1', namely to split
7874 a list of bindings into a reversed list of variables and a list of
7875 initializers.
7876
7877 (scm_m_letrec): Call 'transform_bindings'.
7878
7879 (scm_m_let): Minimized scope of local variables. Renamed 'proc'
7880 to 'temp' and 'arg1' to 'binding'. Eliminated redundant SCM_NIMP
7881 test. Use 'transform_bindings'. Fixed scoping error with named
7882 let (Thanks to Aubrey Jaffer for reporting the bug and to Neil
7883 Jerram for suggesting the fix). Cleaned up the control structure
7884 a bit.
7885
7886 (scm_m_expand_body): Use 'transform_bindings'. Eliminated
7887 unnecessary consing. Eliminated unnecessary
7888 SCM_DEFER/ALLOW_INTS.
7889
7890 (SCM_CEVAL): Un-obfuscated some loops.
7891
7892 2001-11-16 Neil Jerram <neil@ossau.uklinux.net>
7893
7894 * gc.h (scm_unhash_name): Old declaration removed.
7895
7896 * eval.c (s_scm_eval): Change @var{primitive-eval} to
7897 @code{primitive-eval}.
7898
7899 * feature.c, vectors.c, net_db.c, unif.c, weaks.c, struct.c,
7900 version.c, alist.c, ports.c, ramap.c, unif.c, strings.c, list.c:
7901 Change @deffnx lines in docstrings to say {Scheme Procedure}
7902 rather than primitive or procedure.
7903
7904 * posix.c (scm_execl), filesys.c (scm_close), unif.c
7905 (scm_array_set_x, scm_array_contents, scm_uniform_array_read_x,
7906 scm_bit_set_star_x, scm_bit_invert_x), ramap.c (scm_array_fill_x,
7907 scm_array_for_each, scm_array_index_map_x), vectors.c (scm_vector,
7908 scm_make_vector, scm_vector_to_list, scm_vector_fill_x), strop.c
7909 (scm_string_split, scm_string_ci_to_symbol), strings.c
7910 (scm_string_p), sort.c (scm_merge), print.c (scm_newline),
7911 macros.c (scm_macro_type), alist.c (scm_acons, scm_assq):
7912 Docstring fixes and improvements reflecting edits that have been
7913 made in the reference manual source.
7914
7915 * objprop.c (scm_object_properties, scm_set_object_properties_x,
7916 scm_object_property, scm_set_object_property_x): Remove invalid
7917 @deffnx lines for corresponding procedure property primitives.
7918
7919 These changes add a @deffnx C function declaration and function
7920 index entries for each Guile primitive to the copy of the doc
7921 snarf output that is used for reference manual synchronization.
7922 Online help is unchanged.
7923
7924 * snarf.h (SCM_SNARF_DOCS): Output primitive's C function name.
7925 (SCM_DEFINE, SCM_DEFINE1, SCM_REGISTER_PROC): Supply to C function
7926 name to SCM_SNARF_DOCS.
7927
7928 * guile-snarf-docs-texi.in: Pass the shell script's arguments into
7929 snarf-check-and-output-texi.
7930
7931 * Makefile.am (guile-procedures.texi): New rule.
7932 (BUILT_SOURCES, guile.texi, guile-procedures.txt, CLEANFILES):
7933 Changed so that the last stage of doc snarfing is now performed
7934 twice, once to produce guile-procedures.txt for online help, and
7935 once to produce guile.texi for reference manual synchronization.
7936
7937 2001-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
7938
7939 * eval.c (RETURN): Wrap in do{}while(0) in order to make it
7940 safely usable as a single statement followed by a ';', for example
7941 in an if statement.
7942
7943 (SCM_CEVAL, SCM_APPLY): Clean up code using 'RETURN'.
7944
7945 2001-11-13 Neil Jerram <neil@ossau.uklinux.net>
7946
7947 * random.c (scm_random_solid_sphere_x,
7948 scm_random_hollow_sphere_x): Correct "shere" typos.
7949
7950 * hashtab.c (scm_hash_fold): Add missing apostrophe to docstring.
7951
7952 * version.c (scm_version): Update docstring to include
7953 `micro-version'.
7954
7955 2001-11-13 Marius Vollmer <mvo@zagadka.ping.de>
7956
7957 * modules.c (scm_c_export): Call va_end after collecting the
7958 symbols.
7959
7960 * strop.h, strop.c (scm_substring_move_left_x,
7961 scm_substring_move_right_x): Removed.
7962
7963 * __scm.h (HAVE_UINTPTR_T, HAVE_PTRDIFF_T, HAVE_LONG_LONG,
7964 HAVE_LONG_LONGS): Define to "1" when defining them, to mirror what
7965 configure does.
7966
7967 2001-11-12 Marius Vollmer <mvo@zagadka.ping.de>
7968
7969 * numbers.c: Document macros to define when including
7970 num2integral.i.c. MAX_VALUE and MIN_VALU are no longer used, we
7971 now rely on SIZEOF_ macros that have been figured out at
7972 configure time.
7973
7974 * num2integral.i.c: Adapt to new interface.
7975 (NUM2INTEGRAL): Test whether a fixnum can be represented in the
7976 target type by casting it and checking whether it is still the
7977 same. Do not try to handle bignums for integral types that are
7978 smaller than fixnums. When handling bignums, collect the
7979 magnituse first into a unsigned type, and correctly check for
7980 overflow.
7981 (INTEGRAL2BIG): Do not use MIN_VALUE explicitely by observing that
7982 only -MIN_VALUE can still be negative of all negative numbers (in
7983 twos-complement).
7984
7985 * tags.h (SIZEOF_SCM_T_BITS): Define it appropriately.
7986
7987 * __scm.h: Define HAVE_UINTPTR_T, HAVE_PTRDIFF_T and
7988 HAVE_LONG_LONG depending on whether their size is non-zero.
7989
7990 2001-11-11 Thien-Thi Nguyen <ttn@glug.org>
7991
7992 * strop.c (scm_string_null_p): Docfix; nfc.
7993 Thanks to Scott Lenser.
7994
7995 2001-11-07 Neil Jerram <neil@ossau.uklinux.net>
7996
7997 * extensions.c (scm_load_extension): Canonicalize docstring
7998 whitespace.
7999
8000 * unif.c (scm_uniform_array_write), ports.c
8001 (scm_current_output_port, scm_force_output), dynwind.c
8002 (scm_dynamic_wind), scmsigs.c (scm_setitimer, scm_getitimer),
8003 filesys.c (scm_open, scm_lstat), struct.c
8004 (scm_make_struct_layout), random.c (scm_random,
8005 scm_random_solid_sphere_x, scm_random_hollow_sphere_x, strop.c
8006 (scm_i_index): Remove superfluous whitespace from end of docstring
8007 lines.
8008
8009 * filesys.c (scm_select), guardians.c (scm_guardian_greedy_p),
8010 strings.c (scm_make_string), variable.c (scm_make_variable,
8011 scm_make_undefined_variable, scm_variable_p, scm_variable_set_x,
8012 scm_variable_bound_p), scmsigs.c (scm_setitimer, scm_getitimer),
8013 posix.c (scm_crypt), struct.c (scm_make_vtable_vtable), hashtab.c
8014 (scm_hash_fold), ports.c (scm_port_for_each): Remove superfluous
8015 newline at end of docstrings.
8016
8017 * modules.c (scm_set_current_module): Add missing newline to
8018 docstring.
8019
8020 2001-11-07 Stefan Jahn <stefan@lkcc.org>
8021
8022 * win32-socket.[ch]: New files. Defines Winsock-API error codes
8023 and makes them available through Guile. That is because the
8024 Winsock-API does not store its errors in `errno' and thus cannot
8025 return error messages via `strerror (errno)'.
8026
8027 * socket.c (scm_init_socket): Initialize `win32-socket' part
8028 here under M$-Windows.
8029
8030 * numbers.h: Added missing declaration of
8031 `scm_sys_check_number_conversions()'.
8032
8033 * error.c: Local definition of SCM_I_STRERROR and SCM_I_ERRNO
8034 and use in `(strerror)' and `(system-error)'.
8035
8036 * Makefile.am (EXTRA_libguile_la_SOURCES): Added
8037 `win32-socket.[ch]' to extra source and header files.
8038
8039 2001-11-06 Marius Vollmer <mvo@zagadka.ping.de>
8040
8041 * script.c (scm_shell_usage, scm_compile_shell_switches): Prepend
8042 a call to turn-on-debugging when --debug has been given instead of
8043 turning it on directly. Also, handle new `--no-debug' option,
8044 which might suppress the call to turn-on-debugging.
8045
8046 2001-11-05 Stefan Jahn <stefan@lkcc.org>
8047
8048 * struct.c (s_scm_struct_vtable_p): Corrected docstring.
8049
8050 2001-11-04 Stefan Jahn <stefan@lkcc.org>
8051
8052 * Makefile.am (libguile_la_LIBADD): Added $(THREAD_LIBS_LOCAL)
8053 here (was at guile_LDADD) which describes the dependency
8054 correctly and allows a clean build on Win32.
8055
8056 * __scm.h (SCM_API): Follow-up patch. Renamed __FOO__ macros
8057 into FOO.
8058
8059 * __scm.h: USE_DLL_IMPORT indicates the usage of the DLL
8060 import macros for external libraries (libcrypt, libqthreads,
8061 libreadline and libregex).
8062
8063 * coop-defs.h: Include <winsock2.h> for `struct timeval'.
8064
8065 * posix.c (flock): Added support for flock() in M$-Windows.
8066
8067 * guile.c (SCM_IMPORT): Follow-up patch. Use SCM_IMPORT instead
8068 of __SCM_IMPORT__.
8069
8070 * fports.c (getflags): Differentiate reading and writing pipes
8071 descriptors.
8072
8073 * filesys.c (S_IS*): Redefine all of the S_IS*() macros for
8074 M$-Windows.
8075
8076 * coop.c (coop_condition_variable_timed_wait_mutex): Use
8077 conditionalized error code if `ETIMEDOUT' is not available.
8078 (scm_thread_usleep): Remove bogus declaration of `struct timeval
8079 timeout'.
8080
8081 * numbers.c (PTRDIFF_MIN): Moved this definition where it actually
8082 belongs. That is because NO_PREPRO_MAGIC gets undefined after
8083 each inclusion of `num2integral.i.c'.
8084 (SIZE_MAX): Define NO_PREPRO_MAGIC if SIZE_MAX is undefined.
8085
8086 2001-11-03 Marius Vollmer <mvo@zagadka.ping.de>
8087
8088 * eval.c (scm_m_begin): Allow `(begin)`, with no subforms.
8089 (SCM_CEVAL): Evaluate an empty `begin' to SCM_UNSPECIFIED.
8090
8091 2001-11-02 Mikael Djurfeldt <mdj@linnaeus>
8092
8093 * print.c (scm_iprin1): Mark print state as revealed when
8094 dispatching to generic write or display.
8095
8096 * unif.c (scm_ra2contig): Fixed memory overwrite bug.
8097
8098 2001-11-02 Marius Vollmer <mvo@zagadka.ping.de>
8099
8100 Support for native Win32. Thanks to Stefan Jahn!
8101
8102 * Makefile.am: Add win32-uname.c, win32-uname.h, win32-dirent.c
8103 and win32-dirent.h to extra source and header files. These
8104 include the uname() and the POSIX dirent interface implementation
8105 for M$-Windows. Put `-no-undefined' into LDFLAGS to support
8106 linkers which do not allow unresolved symbols inside shared
8107 libraries. Corrected `guile_filter_doc_snarfage$(EXEEXT)'
8108 dependency.
8109
8110 * __scm.h: Defined SCM_API. This macro gets prepended to all
8111 function and data definitions which should be exported or imported
8112 in the resulting dynamic link library in the Win32 port.
8113
8114 * __scm.h, alist.h, arbiters.h, async.h, backtrace.h, boolean.h,
8115 chars.h, continuations.h, coop-defs.h, coop-threads.h,
8116 debug-malloc.h, debug.h, deprecation.h, dynl.h, dynwind.h,
8117 environments.h, eq.h, error.h, eval.h, evalext.h, extensions.h,
8118 feature.h, filesys.h, fluids.h, fports.h, gc.h, gdb_interface.h,
8119 gdbint.h, gh.h, goops.h, gsubr.h, guardians.h, hash.h, hashtab.h,
8120 hooks.h, init.h, ioext.h, iselect.h, keywords.h, lang.h, list.h,
8121 load.h, macros.h, mallocs.h, modules.h, net_db.h, numbers.h,
8122 objects.h, objprop.h, options.h, pairs.h, ports.h, posix.h, print.h,
8123 procprop.h, procs.h, properties.h, ramap.h, random.h, rdelim.h,
8124 read.h, regex-posix.h, root.h, rw.h, scmsigs.h, script.h, simpos.h,
8125 smob.h, socket.h, sort.h, srcprop.h, stackchk.h, stacks.h, stime.h,
8126 strings.h, strop.h, strorder.h, strports.h, struct.h, symbols.h,
8127 tags.h, threads.h, throw.h, unif.h, values.h, variable.h, vectors.h,
8128 vports.h, weaks.h:
8129 Prefixed each each exported symbol with SCM_API.
8130
8131 * continuations.c: Added comment about the use of the extern
8132 declarations of {get,set}context() functions used in the ia64 port.
8133
8134 * continuations.h, gc.c: `__libc_ia64_register_backing_store_base'
8135 is meant to be a `unsigned long *'.
8136
8137 * filesys.c: Include `direct.h' if possible. Use local
8138 `win32-dirent.h' for the native M$-Windows port. Define S_IS*()
8139 macros for M$-Windows. Implementation of `fstat_Win32()' which is
8140 able to differentiate between sockets and other file descriptors.
8141 Use this function as wrapper in `scm_fstat()'. Fixed typo in
8142 `scm_dirname()'.
8143
8144 * fports.c: Include `io.h' is possible. Put `*fp' into referring
8145 statement block in `scm_fport_buffer_add()'.
8146 Some corrections in `getflags()'.
8147
8148 * gdb_interface.h (GDB_INTERFACE): Also support __CYGWIN__.
8149
8150 * guile.c: Make sure to define __SCM_IMPORT__ for shared library
8151 build on Win32. Disable preloaded symbols on Win2 platforms.
8152
8153 * ioext.c, ports.c: Include `io.h' is possible.
8154
8155 * mkstemp.c: Include `process.h' is possible.
8156
8157 * net_db.c: Disable extern declaration of `h_errno' for __CYGWIN__,
8158 too.
8159 Put `scm_return_entry()' into HAVE_GETSERVENT conditional.
8160
8161 * posix.c: Remove unnecessary dirent includes and defines. Include
8162 local `win32-uname.h' for MinGW. Extern declaration of
8163 `mkstemp()' for systems where it does not exists. Make
8164 `getlogin()' available on M$-Windows.
8165
8166 * scmsigs.c: Made `usleep()' avalable on MinGW.
8167
8168 * stime.c: On M$-Windows `tzname[]' is known to be `_tzname[]'.
8169
8170 * win32-dirent.c: Include "win32-dirent.h", not "dirent.h".
8171
8172 * win32-uname.c: Include "win32-uname.h", not "uname.h".
8173
8174 2001-10-28 Mikael Djurfeldt <mdj@linnaeus>
8175
8176 * unif.c (scm_uniform_array_read_x, scm_uniform_array_write):
8177 Don't apply scm_uniform_vector_length on arrays.
8178
8179 2001-10-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
8180
8181 * eval.c (scm_lookupcar, scm_m_letstar, scm_m_do, iqq,
8182 scm_m_define, scm_m_letrec1, scm_m_let, scm_m_expand_body,
8183 scm_macroexp, unmemocopy, scm_eval_args, scm_deval_args,
8184 SCM_CEVAL, scm_map, scm_init_eval): When building lists, prefer
8185 scm_list_<n> over scm_cons[2]?.
8186
8187 (scm_unmemocar, scm_m_cond, scm_m_letstar, scm_m_letrec1,
8188 scm_m_let, scm_m_atbind, unmemocopy, SCM_CEVAL, SCM_APPLY): Use
8189 SCM_C[AD][AD]R instead of explicit form.
8190
8191 (scm_m_set_x, scm_m_cond, scm_m_letstar, scm_m_do): Reordered
8192 comparison parameters.
8193
8194 (scm_m_case, scm_m_cond, scm_m_letstar, scm_m_do, SCM_CEVAL): Use
8195 !SCM_NULLP instead of SCM_NIMP.
8196
8197 (scm_m_case): Don't copy the form. Renamed proc to clause and
8198 minimized its scope. Renamed x to clauses. Removed side
8199 effecting operation from macro call.
8200
8201 (scm_m_cond): Don't copy the form. Renamed arg1 to clause and
8202 minimized its scope. Renamed x to clauses. Minimized the scope
8203 of variable 'len'. Make sure the else clause is treated specially
8204 even in case of '=>' occurences. Don't change the else to #t in
8205 order to be able to distinguish this case in the evaluator. Leave
8206 type checking of the recipient to the evaluator.
8207
8208 (scm_c_improper_memq): Made the comment somewhat clearer.
8209
8210 (scm_m_lambda): Renamed proc to formals. Removed unnecessary
8211 test for SCM_IM_LET at the place of the formal parameters.
8212 Simplified the formal parameter checking.
8213
8214 (scm_m_letstar): Added Comment. Renamed proc to bindings.
8215 Renamed arg1 to binding and minimized its scope. Eliminated
8216 unnecessary consing.
8217
8218 (scm_m_do): Renamed proc to bindings. Minimized the scope of
8219 variable 'len'.
8220
8221 (build_binding_list): New static function.
8222
8223 (unmemocopy): Don't use SCM_TYP7 on pairs (it's unclean).
8224 Further, split up the 'letrec' unmemoizing code to the
8225 corresponding parts for 'do', 'let' and 'letrec', adding comments
8226 to each form. Cleanup the handling of the do form (This removes
8227 some *real* code :-).
8228
8229 (SCM_CEVAL): Removed side effecting operation from macro call.
8230 Handle the 'else clause of the 'cond form specially - the symbol
8231 'else is not replaced with #t any more.
8232
8233 2001-10-14 Gary Houston <ghouston@arglist.com>
8234
8235 * version.c (scm_version): use sprintf instead of snprintf,
8236 for portability. thanks to Bill Schottstaedt.
8237
8238 2001-10-14 Mikael Djurfeldt <mdj@linnaeus>
8239
8240 * read.c (scm_lreadr): When user-defined hash procedure returns
8241 SCM_UNSPECIFIED: Fall back to standard handling instead of raising
8242 an exception. (This prevents parsing of uniform vectors from
8243 interfering with parsing of numbers.)
8244
8245 2001-10-13 Marius Vollmer <mvo@zagadka.ping.de>
8246
8247 * numbers.c: Set NO_PREPRO_MAGIC when defining our version of
8248 PTRDIFF_MIN. Thanks to Ken Raeburn.
8249
8250 2001-10-07 Marius Vollmer <mvo@zagadka.ping.de>
8251
8252 * Makefile.am (EXTRA_libguile_la_SOURCES): Added "mkstemp.c".
8253
8254 * eval.c (scm_m_atbind): First try to find the variable without
8255 defining it locally; when it has not been found, define it
8256 locally.
8257
8258 * modules.c (module_variable): Pass over variables that exist but
8259 are unbound.
8260
8261 2001-10-06 Marius Vollmer <mvo@zagadka.ping.de>
8262
8263 * backtrace.c (display_backtrace_file_and_line): Only use
8264 scm_basename when POSIX support is compiled in. Thanks to Chris
8265 Cramer.
8266
8267 2001-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
8268
8269 * numbers.c (mem2uinteger): Return number read so far when coming
8270 across a hexdigit after having read a # or if not reading a hex
8271 value. This will enable the calling code to correctly handle
8272 forms like 1e2. (The background is, that the exponent markers d,
8273 e and f are also hexdigits.) Thanks to Mikael Djurfeldt for
8274 providing this patch.
8275
8276 (mem2complex): Fix erroneous double-negation. Now, numbers like
8277 1-i will be read correctly.
8278
8279 2001-10-12 Mikael Djurfeldt <mdj@linnaeus>
8280
8281 * debug.c (scm_mem_to_proc): Fixed typo in previous change.
8282
8283 * validate.h (SCM_VALIDATE_DOUBLE_DEF_COPY): New macro.
8284
8285 2001-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
8286
8287 * print.c (scm_print_state_vtable, print_state_pool):
8288 Initialize. These variables are now registered as gc roots.
8289
8290 (scm_current_pstate): Update documentation.
8291
8292 (scm_current_pstate, scm_make_print_state, scm_free_print_state,
8293 scm_prin1, scm_init_print): print_state_pool is registered as a
8294 gc root and thus does not need to be protected by a surrounding
8295 pair any more.
8296
8297 (make_print_state): The car of print_state_pool no longer holds
8298 the scm_print_state_vtable.
8299
8300 (scm_current_pstate, scm_make_print_state, print_circref,
8301 scm_iprin1, scm_prin1, scm_iprlist): Prefer !SCM_<foo> over
8302 SCM_N<foo>.
8303
8304 (scm_prin1): When building lists, prefer scm_list_<n> over
8305 scm_cons[2]?.
8306
8307 (scm_iprlist): Removed a redundant SCM_IMP test.
8308
8309 (scm_simple_format): Use SCM_EQ_P to compare SCM values.
8310
8311 2001-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
8312
8313 * debug.c (scm_make_iloc): Prefer !SCM_<foo> over SCM_N<foo>.
8314
8315 (scm_memcons, scm_mem_to_proc): When building lists, prefer
8316 scm_list_<n> over scm_cons[2]?.
8317
8318 (scm_mem_to_proc): Prefer SCM_CONSP over SCM_NIMP.
8319
8320 (scm_procedure_name): Use SCM_CADR instead of explicit form.
8321
8322 (debugobj_print): Coerce scm_intprint arg 1 to long, not int.
8323 Thanks to Rob Browning for the patch (see log entry 2001-09-21) -
8324 for some reason his patch didn't make it into the cvs.
8325
8326 2001-10-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
8327
8328 * numbers.c (mem2decimal_from_point): Cleaned up the parsing a
8329 little bit - should even be somewhat more accurate now.
8330
8331 2001-10-08 Rob Browning <rlb@defaultvalue.org>
8332
8333 * gc.c: support ia64 register backing store.
8334 (SCM_MARK_BACKING_STORE): new macro.
8335
8336 * continuations.h: support ia64 register backing store.
8337 (struct scm_t_contregs): add ia64 register backing store.
8338
8339 * continuations.c: support ia64 register backing store.
8340 (continuation_mark): mark ia64 register backing store.
8341 (continuation_free): free ia64 register backing store.
8342 (scm_make_continuation): capture ia64 register backing store.
8343 (copy_stack_and_call): copy ia64 register backing store.
8344
8345 2001-10-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
8346
8347 * hashtab.c (scm_hash_fn_create_handle_x): The result of assoc_fn
8348 is known to be #f if no entry is found. Thus, use !SCM_FALSEP
8349 instead of SCM_NIMP to test for that case.
8350
8351 * strings.h (SCM_SET_STRING_LENGTH): Cast the length to
8352 scm_t_bits instead of long.
8353
8354 2001-10-06 Marius Vollmer <mvo@zagadka.ping.de>
8355
8356 * tags.h (SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
8357 SCM_T_SIGNED_BITS_MIN): New.
8358 * numbers.h (SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM):
8359 Use them to make these macros computable by the preprocessor.
8360
8361 * num2integral.i.c (INTEGRAL2NUM): Let the preprocessor test
8362 whether the integral type fits in a fixnum, not the compiler.
8363 This removes a spurious compiler warning. Also, honor the
8364 NO_PREPRO_MAGIC flag to suppress any preprocessor tests. This is
8365 needed for `long long's.
8366
8367 * numbers.c: Define NO_PREPRO_MAGOC when including
8368 num2integral.c.i for `long long' and `signed long long'.
8369
8370 2001-10-06 Mikael Djurfeldt <mdj@linnaeus>
8371
8372 These changes fixes a race condition in the Guile coop - pthread
8373 compatibility code.
8374
8375 * coop.c (mother_awake_p): New variable.
8376 (coop_create): Set mother_awake_p before creating or signalling
8377 mother; wait until mother is going to sleep before returning.
8378 (mother): Reset mother_awake_p before going to sleep.
8379
8380 2001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
8381
8382 * options.c (protected_objects, scm_init_options): The content of
8383 protected_objects is now protected from garbage collection using
8384 scm_gc_register_root instead of scm_permanent_object.
8385
8386 (get_option_setting): New static function that computes an option
8387 setting as it was formerly done in the function scm_options.
8388
8389 (get_documented_option_setting): New static function that
8390 returns option documentation as it was formerly done in the
8391 function scm_options. Note that documentation C strings are no
8392 longer precomputed into SCM objects. Instead, they are converted
8393 into SCM strings every time get_documented_option_setting is
8394 called.
8395
8396 (change_option_setting): New static functions that modifies the
8397 option setting as it was formerly done in the function
8398 scm_options. The function is now exception safe, i. e. won't
8399 cause a memory leak when interrupted. Further, only non-immediate
8400 option values are added to the protection list.
8401
8402 (scm_options): This function now has only the purpose to dispatch
8403 to to get_option_setting, get_documented_option_setting or
8404 change_option_setting, depending on the arguments given to
8405 scm_options.
8406
8407 (scm_init_opts): Don't convert documentation C strings into SCM
8408 strings. Further, don't protect any object values: They _must_
8409 be immediate values, otherwise there is no guarantee that they
8410 have not been collected before anyway.
8411
8412 * options.[ch] (scm_t_option): Made type unsigned, name into a
8413 constant char* and val into a scm_t_bits type.
8414
8415 (scm_options, scm_init_opts): The number of options is guaranteed
8416 to be larger or equal to zero. Thus, the type is changed to
8417 unsigned.
8418
8419 2001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
8420
8421 * num2integral.i.c (NUM2INTEGRAL): Eliminated some warnings about
8422 testing an unsigned value for being >= 0.
8423
8424 2001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
8425
8426 * numbers.h: Removed old comment about using SCM_CAR to access
8427 non-pair cells.
8428
8429 (SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM): Make sure
8430 the return value is signed. Thanks to Brian Crowder for the bug
8431 report.
8432
8433 (SCM_SRS): Avoid unnecessary casting and don't unpack input
8434 values. With this patch, SCM_SRS can be safely used for other
8435 types than scm_t_signed_bits. However, it should still better be
8436 an internal macro and thus be renamed to SCM_I_SRS.
8437
8438 (SCM_MAKINUM, SCM_INUM): Use proper casting.
8439
8440 2001-10-03 Gary Houston <ghouston@arglist.com>
8441
8442 * continuations.h, unif.h: in the descriptions of the bit patterns
8443 of the heap cells, make bit 0 the least significant.
8444
8445 2001-09-25 Thien-Thi Nguyen <ttn@glug.org>
8446
8447 * chars.h (SCM_MAKE_CHAR): Use `scm_t_bits' instead of `intptr_t'.
8448 Thanks to Golubev I. N.
8449
8450 2001-09-25 Gary Houston <ghouston@arglist.com>
8451
8452 * ports.c (scm_drain_input): extended the docstring. thanks to
8453 Alex Schroeder and Thien-Thi Nguyen.
8454
8455 2001-09-23 Mikael Djurfeldt <mdj@linnaeus>
8456
8457 * validate.h (SCM_NUM2FLOAT, SCM_NUM2DOUBLE,
8458 SCM_VALIDATE_FLOAT_COPY, SCM_VALIDATE_DOUBLE_COPY): New
8459 macros. (The NUM names might soon change.)
8460
8461 * numbers.h: Added missing declarations.
8462
8463 2001-09-22 Mikael Djurfeldt <mdj@linnaeus>
8464
8465 * Makefile.am: Distribute num2float.i.c.
8466
8467 * num2float.i.c: New file, multiply included by numbers.c, used
8468 to "templatize" the float <-> num conversion routines.
8469
8470 * numbers.c: New functions: scm_num2float, scm_float2num,
8471 scm_num2double, scm_double2num.
8472
8473 2001-09-21 Rob Browning <rlb@defaultvalue.org>
8474
8475 * .cvsignore: really add version.h
8476
8477 * strings.h (SCM_SET_STRING_LENGTH): coerce "l" to a long.
8478 Otherwise it fails on the alpha. However, we might rather choose
8479 this size conditionally.
8480
8481 * numbers.c (scm_gcd): change "k" to a long from an int.
8482 Otherwise it fails on the alpha. However, we might rather choose
8483 this size conditionally.
8484
8485 * error.c (scm_wta): coerce char* to intptr_t before int
8486 assignment.
8487
8488 * debug.c (debugobj_print): coerce scm_intprint arg 1 to long, not
8489 int.
8490
8491 * chars.h (SCM_MAKE_CHAR): coerce value to intptr_t.
8492
8493 2001-09-20 Mikael Djurfeldt <mdj@linnaeus>
8494
8495 * numbers.c (scm_integer_expt): Accept inexact integer in second
8496 argument. (Thanks to Bill Schottstaedt.)
8497
8498 2001-09-20 Rob Browning <rlb@defaultvalue.org>
8499
8500 * .cvsignore: add version.h
8501
8502 * versiondat.h.in: removed (obsolete).
8503
8504 * version.h.in: renamed from version.h.
8505 (SCM_GUILE_MAJOR_VERSION): new public macro.
8506 (SCM_GUILE_MINOR_VERSION): new public macro.
8507 (SCM_GUILE_MICRO_VERSION): new public macro.
8508
8509 * version.h: renamed to version.h.in.
8510
8511 * version.c
8512 (scm_major_version): support integer *_VERSION macros.
8513 (scm_minor_version): support integer *_VERSION macros.
8514 (scm_micro_version): support integer *_VERSION macros.
8515 (scm_version): support integer *_VERSION macros.
8516
8517 2001-09-20 Mikael Djurfeldt <mdj@linnaeus>
8518
8519 * error.c, error.h: Made error keys globally accessible.
8520 Applications might want to test for these or use them in a direct
8521 call to scm_error.
8522
8523 * num2integral.i.c (NUM2INTEGRAL): Report an error when these
8524 routines are passed an inexact. This change in behavior is
8525 motivated by concordance with R5RS: It is more common that a
8526 primitive doesn't want to accept an inexact for an exact.
8527
8528 2001-09-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
8529
8530 The following patch partially undoes my patch from 2001-06-30,
8531 where I added the function scm_gc_mark_cell_conservatively. The
8532 function is buggy, since it breaks guile during conservative
8533 marking if a pointer on the stack points directly into the list of
8534 free cells on the heap: With conservative cell marking this will
8535 cause the whole free list to be scanned and marked - boom!
8536
8537 * gc.c (allocated_mark, MARK, heap_segment,
8538 scm_gc_mark_cell_conservatively, scm_init_storage), gc.h
8539 (scm_gc_mark_cell_conservatively): Remove function
8540 scm_gc_mark_cell_conservatively and update the corresponding
8541 comments and uses accordingly. Thanks to Christopher Cramer for
8542 the patch. (Minor corrections by me.)
8543
8544 2001-09-15 Gary Houston <ghouston@arglist.com>
8545
8546 * root.h (scm_root_state): removed the continuation_stack and
8547 continuation_stack_ptr members, which have no apparent purpose.
8548 (scm_continuation_stack, scm_continuation_stack_ptr): #defines
8549 removed.
8550
8551 * root.c (root_mark), init.c (restart_stack, start_stack), gc
8552 (scm_igc): remove all references to contination_stack and
8553 continuation_stack_ptr, avoiding allocation of a vector and
8554 useless processing during gc.
8555
8556 2001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
8557
8558 * guardians.c (tconc_t, t_tconc): Renamed tconc_t to t_tconc.
8559
8560 (TCONC_IN): Make sure that the cell word 0 is initialized last.
8561
8562 (guardians_t, t_guardians): Renamed guardians_t to t_guardians.
8563
8564 (GUARDIAN, GUARDIAN_DATA): Renamed GUARDIAN to GUARDIAN_DATA.
8565
8566 (guardian_apply, scm_get_one_zombie, scm_make_guardian,
8567 mark_and_zombify): Prefer !SCM_<foo> over SCM_N<foo>.
8568
8569 2001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
8570
8571 * guardians.c (mark_dependencies_in_tconc,
8572 whine_about_self_centered_zombies, scm_init_guardians): Register
8573 the static global variable `self_centered_zombies' via
8574 scm_gc_register_root, to make some cdr-ing unnecessary.
8575
8576 2001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
8577
8578 * backtrace.c (display_backtrace_file,
8579 display_backtrace_file_and_line): Use SCM_EQ_P when comparing SCM
8580 values, use SCM_FALSEP when comparing SCM values against #f.
8581 Thanks to Rob Browning for the bug report.
8582
8583 2001-09-12 Martin Baulig <martin@home-of-linux.org>
8584
8585 * strings.[ch] (scm_str2string): New function.
8586
8587 2001-09-06 Marius Vollmer <mvo@zagadka.ping.de>
8588
8589 * gc.c (scm_done_free): Always subtract size from scm_mallocated
8590 when computing nm, even if it's negative.
8591 (scm_must_malloc): Abort on overflow of scm_mtrigger.
8592 (scm_must_realloc): Likewise.
8593
8594 2001-09-01 Michael Livshin <mlivshin@bigfoot.com>
8595
8596 * numbers.c (scm_sys_check_number_conversions): new function,
8597 defined if Guile is compiled in debugging mode. currently checks
8598 `scm_num2ulong', should check much much more.
8599
8600 * num2integral.i.c (NUM2INTEGRAL): when converting a bignum to
8601 unsigned, ensure that it's positive. thanks to Martin Baulig!
8602
8603 2001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
8604
8605 * __scm.h: Added new section about compile time selectable
8606 features.
8607
8608 (long_long, ulong_long, scm_sizet, SCM_WNA, SCM_OUTOFRANGE,
8609 SCM_NALLOC, SCM_HUP_SIGNAL, SCM_INT_SIGNAL, SCM_FPE_SIGNAL,
8610 SCM_BUS_SIGNAL, SCM_SEGV_SIGNAL, SCM_ALRM_SIGNAL, SCM_GC_SIGNAL,
8611 SCM_TICK_SIGNAL, SCM_SIG_ORD, SCM_ORD_SIG, SCM_NUM_SIGS):
8612 Removed.
8613
8614 * deprecation.c (scm_include_deprecated_features): Simplified.
8615
8616 * eval.c (EVALCAR, unmemocopy), eval.h (SCM_XEVALCAR): Use
8617 `SCM_IMP´ instead of `!SCM_CELLP´.
8618
8619 * eval.c (unmemocopy): Eliminate redundant SCM_CELLP tests.
8620 Extract side-effecting operations from macros.
8621
8622 (scm_init_eval): Don't initialize *top-level-lookup-closure*,
8623 scm_top_level_lookup_closure_var and scm_system_transformer.
8624
8625 * gc.c (CELL_P): New local definition to replace SCM_CELLP.
8626
8627 (heap_segment): Use CELL_P instead of SCM_CELLP.
8628
8629 * init.c (start_stack): Don't initialize
8630 scm_top_level_lookup_closure_var and scm_system_transformer.
8631
8632 * modules.c (scm_set_current_module): Don't access
8633 scm_top_level_lookup_closure_var and scm_system_transformer.
8634
8635 (scm_sym2var): Don't call scm_variable_set_name_hint.
8636
8637 (scm_post_boot_init_modules): Removed deprecated initializations.
8638
8639 * print.c (scm_ipruk): Don't access cell contents of non cells.
8640
8641 * strings.c (scm_string_set_x): All strings are writable.
8642
8643 * strings.h (SCM_STRINGP): Use SCM_TYP7 to determine the string
8644 type. There is only one string type now.
8645
8646 (SCM_STRING_COERCE_0TERMINATION_X): Deprecated.
8647
8648 * tags.h: Remove comments about two different string types.
8649
8650 (SCM_CELLP, SCM_NCELLP): Deprecated.
8651
8652 * variable.c (make_variable): Remove code variant for vcells.
8653
8654 * variable.h (SCM_VARIABLE_REF, SCM_VARIABLE_SET,
8655 SCM_VARIABLE_LOC): Remove code variant for vcells.
8656
8657 * __scm.h, deprecation.[ch]: Renamed SCM_DEBUG_DEPRECATED to
8658 SCM_ENABLE_DEPRECATED with the logic reversed.
8659
8660 * dynl.c (moddata, registered_mods), dynl.[ch]
8661 (scm_register_module_xxx, scm_registered_modules,
8662 scm_clear_registered_modules), error.[ch] (scm_wta), eval.c
8663 (*top-level-lookup-closure*), eval.[ch]
8664 (scm_top_level_lookup_closure_var, scm_system_transformer,
8665 scm_eval_3, scm_eval2), gc.h (SCM_SETAND_CAR, SCM_SETOR_CAR,
8666 SCM_SETAND_CDR, SCM_SETOR_CDR, SCM_FREEP, SCM_NFREEP,
8667 SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16,
8668 SCM_GCCDR), gc.[ch] (scm_remember, scm_protect_object,
8669 scm_unprotect_object), modules.c (root_module_lookup_closure,
8670 scm_sym_app, scm_sym_modules, module_prefix, make_modules_in_var,
8671 beautify_user_module_x_var, try_module_autoload_var,
8672 scm_module_full_name), modules.[ch] (scm_the_root_module,
8673 scm_make_module, scm_ensure_user_module, scm_load_scheme_module),
8674 ports.h (scm_port, scm_ptob_descriptor, scm_port_rw_active),
8675 ports.[ch] (scm_close_all_ports_except), random.h (scm_rstate,
8676 scm_rng, scm_i_rstate), strings.h (SCM_SLOPPY_STRINGP,
8677 SCM_RWSTRINGP, SCM_STRING_UCHARS, SCM_STRING_CHARS), strings.[ch]
8678 (scm_read_only_string_p, scm_makstr, scm_makfromstr,
8679 scm_make_shared_substring), tags.h (scm_tc7_substring,
8680 SCM_SLOPPY_CONSP, SCM_SLOPPY_NCONSP, scm_tc7_ssymbol,
8681 scm_tc7_msymbol, scm_tcs_symbols), variable.c (sym_huh),
8682 variable.[ch] (scm_variable_set_name_hint, scm_builtin_variable),
8683 variable.h (SCM_VARVCELL, SCM_UDVARIABLEP, SCM_DEFVARIABLEP):
8684 Removed.
8685
8686 * dynl.c (scm_dynamic_link, scm_dynamic_func), error.c
8687 (scm_error_scm), filesys.c (scm_chown, scm_chmod, scm_open_fdes,
8688 scm_stat, scm_link, scm_rename, scm_delete_file, scm_mkdir,
8689 scm_rmdir, scm_opendir, scm_chdir, scm_symlink, scm_readlink,
8690 scm_lstat, scm_copy_file), fports.c (scm_open_file), ioext.c
8691 (scm_fdopen), net_db.c (scm_gethost, scm_getnet, scm_getproto,
8692 scm_getserv), ports.c (scm_truncate_file, scm_sys_make_void_port),
8693 posix.c (scm_getpwuid, scm_getgrgid, scm_execl, scm_execlp,
8694 scm_execle, scm_mkstemp, scm_utime, scm_access, scm_setlocale,
8695 scm_mknod, scm_crypt, scm_chroot, scm_getpass, scm_sethostname),
8696 regex-posix.c (scm_make_regexp, scm_regexp_exec), simpos.c
8697 (scm_system, scm_getenv), socket.c (scm_inet_aton), stime.c
8698 (setzone, scm_strftime, scm_strptime), vports.c
8699 (scm_make_soft_port): Remove calls to
8700 SCM_STRING_COERCE_0TERMINATION_X. Since the substring type is
8701 gone, all strings are 0-terminated anyway.
8702
8703 * dynl.h (LIBGUILE_DYNL_H, SCM_DYNL_H), random.h (RANDOMH,
8704 SCM_RANDOM_H): Renamed the macros that are defined to inhibit
8705 double inclusion of the same headers to the SCM_<filename>_H
8706 format.
8707
8708 * eval.c (SCM_CEVAL), gc.c (MARK, scm_gc_sweep), gh_data.c
8709 (gh_scm2chars), hash.c (scm_hasher), objects.c (scm_class_of),
8710 print.c (scm_iprin1): The type scm_tc7_substring does not exist
8711 any more.
8712
8713 * ports.h (SCM_PORTP, SCM_OPPORTP, SCM_OPINPORTP, SCM_OPOUTPORTP,
8714 SCM_INPUT_PORT_P, SCM_OUTPUT_PORT_P, SCM_OPENP), tags.h
8715 (SCM_TYP16_PREDICATE), variable.h (SCM_VARIABLEP): Prefer
8716 !SCM_<foo> over SCM_N<foo>.
8717
8718 2001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
8719
8720 * Makefile.am: Remove references to symbols-deprecated.c.
8721
8722 * symbols.c (scm_init_symbols): Don't initialize deprecated
8723 symbol functions.
8724
8725 * symbols-deprecated.c: Removed.
8726
8727 * fluids.[ch] (scm_internal_with_fluids), gsubr.[ch]
8728 (scm_make_gsubr, scm_make_gsubr_with_generic), hooks.[ch]
8729 (scm_create_hook), list.c (list*), list.h (SCM_LIST[0-9],
8730 scm_listify), list.[ch] (scm_sloppy_memq, scm_sloppy_memv,
8731 scm_sloppy_member), load.c (scm_end_of_file_key), load.[ch]
8732 (scm_read_and_eval_x), numbers.[ch] (scm_mkbig, scm_big2inum,
8733 scm_adjbig, scm_normbig, scm_copybig, scm_2ulong2big, scm_dbl2big,
8734 scm_big2dbl), numbers.h (SCM_FIXNUM_BIT), procs.h
8735 (scm_subr_entry, SCM_SUBR_DOC), procs.[ch] (scm_make_subr_opt,
8736 scm_make_subr, scm_make_subr_with_generic), root.c (setjmp_type,
8737 setjmp_type), root.[ch] (scm_call_catching_errors), smob.[ch]
8738 (scm_make_smob_type_mfpe, scm_set_smob_mfpe), strports.[ch]
8739 (scm_strprint_obj, scm_read_0str, scm_eval_0str), symbols.h
8740 (SCM_CHARS, SCM_UCHARS, SCM_SETCHARS, SCM_SLOPPY_SUBSTRP,
8741 SCM_SUBSTR_STR, SCM_SUBSTR_OFFSET, SCM_LENGTH_MAX, SCM_LENGTH,
8742 SCM_SETLENGTH, SCM_ROSTRINGP, SCM_ROLENGTH, SCM_ROCHARS,
8743 SCM_ROUCHARS, SCM_SUBSTRP, SCM_COERCE_SUBSTR, scm_strhash,
8744 scm_sym2vcell, scm_sym2ovcell_soft, scm_sym2ovcell,
8745 scm_intern_obarray_soft, scm_intern_obarray, scm_intern,
8746 scm_intern0, scm_sysintern, scm_sysintern0,
8747 scm_sysintern0_no_module_lookup, scm_symbol_value0,
8748 scm_string_to_obarray_symbol, scm_intern_symbol,
8749 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned_p,
8750 scm_symbol_bound_p, scm_symbol_set_x, scm_gentemp,
8751 scm_init_symbols_deprecated), vectors.c (s_vector_set_length_x),
8752 vectors.[ch] (scm_vector_set_length_x): Removed.
8753
8754 * fluids.h (FLUIDSH, SCM_FLUIDS_H), gsubr.c (GSUBRH, SCM_GSUBR_H),
8755 list.h (LISTH, SCM_LIST_H), load.h (LOADH, SCM_LOAD_H), root.h
8756 (ROOTH, SCM_ROOT_H), strports.h (STRPORTSH, SCM_STRPORTS_H):
8757 Renamed the macros that are defined to inhibit double inclusion of
8758 the same headers to the SCM_<filename>_H format.
8759
8760 * procs.h (SCM_CLOSUREP, SCM_PROCEDURE_WITH_SETTER_P), symbols.h
8761 (SCM_SYMBOLP), vectors.h (SCM_VECTORP): Prefer !SCM_<foo> over
8762 SCM_N<foo>.
8763
8764 2001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
8765
8766 * continuations.h (scm_contregs), debug.h (scm_debug_info,
8767 scm_debug_frame, SCM_DSIDEVAL), filesys.h (SCM_OPDIRP), fports.h
8768 (scm_fport), options.h (scm_option), snarf.h (SCM_CONST_LONG,
8769 SCM_VCELL, SCM_GLOBAL_VCELL, SCM_VCELL_INIT,
8770 SCM_GLOBAL_VCELL_INIT), srcprop.h (scm_srcprops,
8771 scm_srcprops_chunk), stacks.h (scm_info_frame, scm_stack), unif.h
8772 (scm_array, scm_array_dim, SCM_ARRAY_CONTIGUOUS, SCM_HUGE_LENGTH),
8773 validate.h (SCM_FUNC_NAME, SCM_WTA, RETURN_SCM_WTA,
8774 SCM_VALIDATE_NUMBER_COPY, SCM_VALIDATE_NUMBER_DEF_COPY,
8775 SCM_VALIDATE_STRINGORSUBSTR, SCM_VALIDATE_ROSTRING,
8776 SCM_VALIDATE_ROSTRING_COPY, SCM_VALIDATE_NULLORROSTRING_COPY,
8777 SCM_VALIDATE_RWSTRING, SCM_VALIDATE_OPDIR): Removed.
8778
8779 * continuations.h (CONTINUATIONSH, SCM_CONTINUATIONS_H), filesys.h
8780 (FILESYSH, SCM_FILESYS_H), fports.h (FPORTSH, SCM_FPORTS_H),
8781 options.h (OPTIONSH, SCM_OPTIONS_H), regex-posix.h (REGEXPOSIXH,
8782 SCM_REGEX_POSIX_H), snarf.h (LIBGUILE_SNARF_H, SCM_SNARF_H),
8783 srcprop.h (SCM_SOURCE_PROPERTIES_H, SCM_SRCPROP_H), unif.h
8784 (SCM_UNIFORM_VECTORS_H, SCM_UNIF_H), validate.h (SCM_VALIDATE_H__,
8785 SCM_VALIDATE_H): Renamed the macros that are defined to inhibit
8786 double inclusion of the same headers to the SCM_<filename>_H
8787 format.
8788
8789 * debug.h (SCM_RESET_DEBUG_MODE), regex-posix.h (SCM_RGXP),
8790 srcprop.h (SRCBRKP, PROCTRACEP), struct.h (SCM_STRUCTP),
8791 validate.h (SCM_VALIDATE_THUNK, SCM_VALIDATE_ARRAY,
8792 SCM_VALIDATE_VECTOR_OR_DVECTOR, SCM_VALIDATE_VTABLE): Prefer
8793 !SCM_<foo> over SCM_N<foo>.
8794
8795 2001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
8796
8797 * _scm.h (_SCMH, SCM__SCM_H), alist.h (ALISTH, SCM_ALIST_H),
8798 arbiters.h (ARBITERSH, SCM_ARBITERS_H), backtrace.h (BACKTRACEH,
8799 SCM_BACKTRACE_H), boolean.h (BOOLEANH, SCM_BOOLEAN_H), chars.h
8800 (SCM_CHARSH, SCM_CHARS_H), coop-defs.h (COOP_DEFSH,
8801 SCM_COOP_DEFS_H), coop-threads.h (COOP_THREADSH,
8802 SCM_COOP_THREADS_H), debug-malloc.h (DEBUGMALLOCH,
8803 SCM_DEBUG_MALLOC_H), dynwind.h (DYNWINDH, SCM_DYNWIND_H),
8804 environments.h (ENVIRONMENTS_H, SCM_ENVIRONMENTS_H), eq.h (EQH,
8805 SCM_EQ_H), evalext.h (EVALEXTH, SCM_EVALEXT_H), extensions.h
8806 (LIBGUILE_EXTENSIONS_H, SCM_EXTENSIONS_H), feature.h (FEATUREH,
8807 SCM_FEATURE_H), gdbint.h (GDBINTH, SCM_GDBINT_H), guardians.h
8808 (SCM_GUARDIANH, SCM_GUARDIANS_H), hash.h (HASHH, SCM_HASH_H),
8809 hashtab.h (HASHTABH, SCM_HASHTAB_H), init.h (INITH, SCM_INIT_H),
8810 ioext.h (IOEXTH, SCM_IOEXT_H), iselect.h (ISELECTH,
8811 SCM_ISELECT_H), keywords.h (KEYWORDSH, SCM_KEYWORDS_H), lang.h
8812 (LANGH, SCM_LANG_H), mallocs.h (MALLOCSH, SCM_MALLOCS_H), net_db.h
8813 (SCM_NETDBH, SCM_NET_DB_H), objprop.h (OBJPROPH, SCM_OBJPROP_H),
8814 posix.h (POSIXH, SCM_POSIX_H), procprop.h (PROCPROPH,
8815 SCM_PROCPROP_H), properties.h (PROPERTIES_H, SCM_PROPERTIES_H),
8816 ramap.h (RAMAPH, SCM_RAMAP_H), rdelim.h (SCM_RDELIM,
8817 SCM_RDELIM_H), read.h (READH, SCM_READ_H), rw.h (SCM_RW,
8818 SCM_RW_H), scmsigs.h (SCMSIGSH, SCM_SCMSIGS_H), script.h (SCRIPTH,
8819 SCM_SCRIPT_H), simpos.h (SIMPOSH, SCM_SIMPOS_H), socket.h
8820 (SCM_SOCKETH, SCM_SOCKET_H), sort.h (SORTH, SCM_SORT_H),
8821 stackchk.h (STACKCHKH, SCM_STACKCHK_H), stime.h (STIMEH,
8822 SCM_STIME_H), strop.h (STROPH, SCM_STROP_H), strorder.h
8823 (STRORDERH, SCM_STRORDER_H), threads.h (THREADSH, SCM_THREADS_H),
8824 throw.h (THROWH, SCM_THROW_H), version.h (VERSIONH,
8825 SCM_VERSION_H), vports.h (VPORTSH, SCM_VPORTS_H): Renamed
8826 the macros that are defined to inhibit double inclusion of the
8827 same headers to the SCM_<filename>_H format.
8828
8829 2001-08-27 Marius Vollmer <mvo@zagadka.ping.de>
8830
8831 * ports.c, ports.h, fprots.c, gc.c, ioext.c: Replaced
8832 "scm_t_portable" with "scm_port_table" which was an artifact from
8833 the great "scm_*_t -> scm_t_" renaming.
8834
8835 2001-08-25 Thien-Thi Nguyen <ttn@revel.glug.org>
8836
8837 * gc_os_dep.c (GC_noop1): Move before `GC_find_limit' where it is
8838 used; nfc. Thanks to Bill Schottstaedt.
8839
8840 * validate.h (SCM_VALIDATE_USHORT_COPY, SCM_VALIDATE_SHORT_COPY,
8841 SCM_VALIDATE_UINT_COPY, SCM_VALIDATE_INT_COPY): New macros.
8842 Thanks to Chris Cramer.
8843
8844 2001-08-25 Marius Vollmer <mvo@zagadka.ping.de>
8845
8846 * Makefile.am (AUTOMAKE_OPTIONS): Change "foreign" to "gnu".
8847
8848 * eval.c (scm_m_atbind): Redesigned to behvae like `let', but with
8849 dynamic scope.
8850 * dynwind.h (scm_swap_bindings): Declare.
8851 * dynwind.c (scm_swap_bindings): Make non-static.
8852
8853 2001-08-25 Michael Livshin <mlivshin@bigfoot.com>
8854
8855 * gc.c (scm_gc_sweep): now can sweep unreachable variables (by
8856 doing exactly nothing about them). thanks Neil!
8857
8858 2001-08-18 Neil Jerram <neil@ossau.uklinux.net>
8859
8860 * __scm.h (SCM_ENABLE_VCELLS): Fix spelling mistake in comment.
8861
8862 2001-08-17 Thien-Thi Nguyen <ttn@revel.glug.org>
8863
8864 * gc.c: Fix omission bug: Add `heap_segment' forward decl
8865 (proto) in the case when either `GUILE_DEBUG' or
8866 `GUILE_DEBUG_FREELIST' preprocessor symbols are defined.
8867
8868 (map_free_list): Fix typo: Ref `f' correctly.
8869
8870 Thanks to Chris Cramer.
8871
8872 2001-08-15 Rob Browning <rlb@defaultvalue.org>
8873
8874 * Makefile.am (libguile_la_LDFLAGS): use libtool interface version
8875 variables.
8876 (libpath.h): change libguileversion to libguileinterface.
8877
8878 2001-08-07 Marius Vollmer <mvo@zagadka.ping.de>
8879
8880 * Makefile.am (EXTRA_DIST): Distribute ChangeLog-1996-1999 and
8881 ChangeLog-2000. Thanks to Daniel Skarda!
8882
8883 2001-08-07 Michael Livshin <mlivshin@bigfoot.com>
8884
8885 * guile-snarf-docs-texi.in: don't call the tokenizer here, we now
8886 do it from the Makefile.
8887
8888 * Makefile.am: rearrange the snarfing slightly, so that .doc files
8889 are of a reasonable size.
8890
8891 2001-08-02 Neil Jerram <neil@ossau.uklinux.net>
8892
8893 * stacks.c (scm_make_stack): Improve docstring by explaining use
8894 of cutting args.
8895
8896 2001-08-01 Marius Vollmer <mvo@zagadka.ping.de>
8897
8898 * chars.c (scm_char_alphabetic_p, scm_char_numeric_p,
8899 scm_char_whitespace_p, scm_char_upper_case_p,
8900 scm_char_lower_case_p, scm_char_is_both_p): Do not require
8901 characters to fulfill isascii in addition to the primary
8902 predicate.
8903
8904 2001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
8905
8906 * numbers.c (DIGITS, scm_small_istr2int, scm_istr2int,
8907 scm_istr2flo, scm_istring2number): Removed.
8908
8909 (iflo2str, scm_real_p, scm_integer_p): Use SCM_<foo> instead of
8910 SCM_SLOPPY_<foo>.
8911
8912 (t_exactness, t_radix, DIGIT2UINT, XDIGIT2UINT, mem2uinteger,
8913 mem2decimal_from_point, mem2ureal, mem2complex, scm_i_mem2number):
8914 Added.
8915
8916 (scm_string_to_number): Use new number parser.
8917
8918 (scm_exact_to_inexact): Replace dummy by a GPROC, which also
8919 handles complex numbers.
8920
8921 * numbers.h (NUMBERSH, SCM_NUMBERS_H): Rename <foo>H to
8922 SCM_<foo>_H.
8923
8924 (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Prefer !SCM_<pred> over
8925 SCM_N<pred>.
8926
8927 (scm_istr2int, scm_istr2flo, scm_istring2number): Removed.
8928
8929 (scm_i_mem2number): Added.
8930
8931 (scm_exact_to_inexact): Changed signature.
8932
8933 * read.c (scm_lreadr): Perform the shortcut test for '+ and '-
8934 here instead of within scm_i_mem2number. Call scm_i_mem2number
8935 instead of scm_istr2int and scm_istring2number.
8936
8937 2001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
8938
8939 * eval.c (scm_lookupcar, scm_m_body, scm_m_lambda, unmemocopy,
8940 scm_unmemocopy, scm_badargsp, scm_eval_body, CHECK_EQVISH,
8941 SCM_CEVAL, scm_nconc2last, SCM_APPLY, scm_copy_tree): Prefer
8942 !SCM_<pred> over SCM_N<pred>.
8943
8944 (scm_eval_body): Remove side effecting code from macro call.
8945
8946 (SCM_CEVAL, SCM_APPLY): Remove goto statement and redundant
8947 SCM_NIMP test.
8948
8949 2001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
8950
8951 * pairs.h (SCM_VALIDATE_PAIR): Use SCM_CONSP, not SCM_ECONSP.
8952
8953 2001-07-29 Marius Vollmer <mvo@zagadka.ping.de>
8954
8955 Removed vcell slot from structs.
8956
8957 * struct.h (scm_vtable_index_vcell): Removed. Renumbered
8958 subsequent indices.
8959
8960 * struct.c (scm_struct_vtable_p): Do not check vcell slot for
8961 zero. Use scm_vtable_index_layout instead of "0" when accessing
8962 said slot.
8963 (scm_init_struct): Remove vcell slot layout code from
8964 required_vtable_fields.
8965
8966 * objects.h (scm_si_redefined, scm_si_hashsets): Renumbered.
8967
8968 * goops.c (build_class_class_slots): Removed vcell slot
8969 definition.
8970
8971 * goops.h: Renumbered slot indices. (SCM_CLASS_CLASS_LAYOUT):
8972 Removed vcell slot layout code.
8973 (scm_si_vcell): Removed.
8974
8975 2001-07-26 Marius Vollmer <mvo@zagadka.ping.de>
8976
8977 "Glocs" have been removed.
8978
8979 * tags.h: Update tag system docs.
8980 (scm_tc3_cons_gloc): Renamed to scm_tc3_struct. Changed all uses.
8981 (scm_tcs_cons_gloc): Renamed to scm_tcs_struct. Changed all uses.
8982 (SCM_ECONSP, SCM_NECONSP): Removed. Changed all uses to SCM_CONSP
8983 or SCM_NCONSP, respectively.
8984
8985 * struct.c, struct.h, srcprop.c, procs.c, procprop.c, print.c,
8986 objects.c. modules.c, goops.c, eval.c, debug.c: Changed all uses
8987 of scm_tc3_cond_gloc and scm_tcs_cons_gloc. See above.
8988
8989 * print.c (scm_iprin1): Remove printing of glocs. Do not try to
8990 tell glocs from structs.
8991
8992 * gc.c (scm_gc_mark, scm_gc_sweep): Remove handling of glocs.
8993
8994 * eval.c (scm_m_atbind): Make a list of variables, not glocs.
8995 (scm_ceval, scm_deval): For SCM_IM_BIND, fiddle with variables
8996 instead of with glocs.
8997 (EVALCAR): Do not test for glocs.
8998 (scm_lookupcar, scm_lookupcar1): Do not handle glocs in race
8999 condition.
9000 (scm_unmemocar): Do not handle glocs.
9001 (scm_m_atfop): Memoize as a variable, not as a gloc.
9002 (scm_eval_args, scm_deval_args): Do not handle glocs.
9003 (scm_ceval, scm_deval): Likewise.
9004
9005 * eval.h (SCM_XEVALCAR): Do not test for glocs.
9006 (SCM_GLOC_VAR, SCM_GLOC_VAL, SCM_GLOC_SET_VAL, SCM_GLOC_VAL_LOC):
9007 Removed.
9008
9009 * debug.h, debug.c (scm_make_gloc, scm_gloc_p): Removed.
9010
9011 * dynwind.c (scm_swap_bindings): Likewise.
9012 (scm_dowinds): Updated to recognize lists of variables instead of
9013 lists of glocs.
9014
9015 * __scm.h (SCM_CAUTIOS, SCM_RECKLESS): Update comments.
9016
9017
9018 * gc_os_dep.c (GC_noop1): Moved into the same #if/#endif context
9019 where it is needed.
9020
9021 2001-07-25 Gary Houston <ghouston@arglist.com>
9022
9023 * numbers.c (scm_logand, scm_logior, scm_logxor): adjusted the
9024 docstrings to reflect the n-ary implementation.
9025
9026 2001-07-26 Marius Vollmer <mvo@zagadka.ping.de>
9027
9028 * eval.c (scm_ceval, scm_deval): Use "RETURN" macro when returning
9029 value of a variable, not the plain "return" statement.
9030
9031 2001-07-25 Marius Vollmer <mvo@zagadka.ping.de>
9032
9033 * eval.c: Allow variables in memoized code (in addition to glocs).
9034 (scm_lookupcar): Handle variables in lost races. Replace symbol
9035 with variable directly, do not make a gloc.
9036 (scm_unmemocar): Rewrite variables using a reverse lookup, just
9037 like glocs.
9038 (scm_ceval, scm_deval): Deal with variables in SCM_IM_SET and in
9039 the main switch.
9040
9041 2001-07-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
9042
9043 * variable.c (scm_i_variable_print): Use "value" instead of
9044 "binding" since a binding is the mapping between symbols and
9045 variables, not between variables and their values.
9046
9047 * tags.h (scm_tc7_variable): New.
9048 * gc.c (scm_gc_mark): Handle scm_tc7_variable objects.
9049 * print.c (scm_iprin1): Likewise.
9050
9051 * variable.h (scm_tc16_variable): Removed.
9052 (SCM_VARIABLEP): Test for new tc7 code.
9053 (scm_i_variable_print): New.
9054 * variable.c (scm_tc16_variable): Removed.
9055 (variable_print): Renamed to scm_i_variable_print and made
9056 non-static.
9057 (variable_equal_p): Removed.
9058 (make_variable): Construct a tc7 object instead of a smob.
9059 (scm_init_variable): Do not register smob.
9060
9061 2001-07-22 Marius Vollmer <mvo@zagadka.ping.de>
9062
9063 * tags.h: Include inttypes.h when we have it.
9064
9065 2001-07-13 Marius Vollmer <mvo@zagadka.ping.de>
9066
9067 * tags.h (SCM_UNBOUND): Make it the 34th isym/iflag, the 33th slot
9068 is taken by the new SCM_IM_CALL_WITH_VALUES.
9069 * print.c (scm_isymnames): Update table accordingly.
9070
9071 2001-07-22 Gary Houston <ghouston@arglist.com>
9072
9073 * regex-posix.c (s_scm_regexp_exec): use scm_long2num not
9074 SCM_MAKINUM to convert regoff_t value to SCM.
9075
9076 2001-07-21 Gary Houston <ghouston@arglist.com>
9077
9078 * scmsigs.c: include sys/time.h for itimer stuff.
9079
9080 2001-07-19 Rob Browning <rlb@defaultvalue.org>
9081
9082 * gc_os_dep.c (GC_noop1): ifdef out (unused) to quiet warning.
9083
9084 * c-tokenize.lex: add option %nounput to quiet warning.
9085 Add prototype for yylex to quiet warning.
9086
9087 * scmconfig.h.in: add flags for setitimer and getitimer.
9088
9089 * scmsigs.h (scm_init_scmsigs): new prototype.
9090 (scm_init_scmsigs): new prototype.
9091
9092 * scmsigs.c (s_scm_setitimer): new function.
9093 (s_scm_setitimer): new function.
9094
9095 2001-07-18 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9096
9097 * alist.c, arbiters.c, async.h, backtrace.h, boolean.c, chars.c,
9098 chars.h, continuations.h, debug-malloc.h, dynl.c, feature.c,
9099 feature.h, filesys.h, fluids.h, fports.h, gc_os_dep.c,
9100 gdb_interface.h, gh_eval.c, gh_funcs.c, gh_io.c, gh_list.c,
9101 gh_predicates.c, gsubr.c, gsubr.h, guardians.h,
9102 guile-func-name-check.in, guile-snarf-docs-texi.in,
9103 guile-snarf-docs.in, guile-snarf.awk.in, guile-snarf.in,
9104 hashtab.h, iselect.h, keywords.h, lang.c, list.h, load.h,
9105 objprop.c, objprop.h, options.c, options.h, random.h,
9106 regex-posix.h, root.c, root.h, script.c, snarf.h, stackchk.c,
9107 strerror.c, strop.h, strports.h, threads.h, values.c, values.h,
9108 version.c, version.h: Updated copyright notice.
9109
9110 2001-07-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
9111
9112 * goops.c (sym_layout, sym_vcell, sym_vtable, sym_print,
9113 sym_procedure, sym_setter, sym_redefined, sym_h0, sym_h1, sym_h2,
9114 sym_h3, sym_h4, sym_h5, sym_h6, sym_h7, sym_name,
9115 sym_direct_supers, sym_direct_slots, sym_direct_subclasses,
9116 sym_direct_methods, sym_cpl, sym_default_slot_definition_class,
9117 sym_slots, sym_getters_n_setters, sym_keyword_access, sym_nfields,
9118 sym_environment, scm_sym_change_class): New static variables to
9119 hold predefined symbols.
9120
9121 (build_class_class_slots): Build the list using scm_list_n
9122 instead of cons. Also, slots are already created as lists, thus
9123 making a call to maplist unnecessary.
9124
9125 (scm_class_name, scm_class_direct_supers, scm_class_direct_slots,
9126 scm_class_direct_subclasses, scm_class_direct_methods,
9127 scm_class_precedence_list, scm_class_slots, scm_class_environment,
9128 scm_method_procedure, create_standard_classes, purgatory): Use
9129 predefined symbols.
9130
9131 (build_slots_list, compute_getters_n_setters,
9132 scm_sys_initialize_object, scm_sys_inherit_magic_x,
9133 get_slot_value_using_name, set_slot_value_using_name,
9134 scm_sys_invalidate_method_cache_x, scm_generic_capability_p,
9135 scm_compute_applicable_methods, scm_sys_method_more_specific_p,
9136 make_struct_class): Prefer !SCM_<pred> over SCM_N<pred>.
9137
9138 (scm_sys_prep_layout_x): Minimize variable scopes.
9139
9140 (scm_sys_prep_layout_x, scm_sys_fast_slot_ref,
9141 scm_sys_fast_slot_set_x): Fix signedness.
9142
9143 (go_to_hell, go_to_heaven, purgatory, scm_change_object_class,
9144 lock_cache_mutex, unlock_cache_mutex, call_memoize_method,
9145 scm_memoize_method, scm_wrap_object): Use packing and unpacking
9146 when converting to and from SCM values.
9147
9148 (scm_enable_primitive_generic_x): Add rest argument checking.
9149
9150 (map, filter_cpl, maplist, scm_sys_initialize_object,
9151 scm_sys_prep_layout_x, slot_definition_using_name,
9152 scm_enable_primitive_generic_x, scm_compute_applicable_methods,
9153 call_memoize_method, scm_make, scm_make_class): Prefer explicit
9154 predicates over SCM_N?IMP tests.
9155
9156 (scm_sys_prep_layout_x): Fix typo in error message. Fix type
9157 checking.
9158
9159 (burnin, go_to_hell): Use SCM_STRUCT_DATA instead of the SCM_INST
9160 alias.
9161
9162 2001-07-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
9163
9164 * fports.c (fport_print): Don't use SCM_C[AD]R for non pairs.
9165
9166 * num2integral.i.c (INTEGRAL2NUM, INTEGRAL2BIG): Fix signedness.
9167
9168 * symbols-deprecated.c (scm_gentemp): Simplify vector test.
9169
9170 * vectors.c (scm_vector_p): Eliminate redundant IMP test.
9171
9172 2001-07-12 Michael Livshin <mlivshin@bigfoot.com>
9173
9174 * strings.c (s_scm_string): fix arg position in assert.
9175
9176 2001-07-11 Gary Houston <ghouston@arglist.com>
9177
9178 * strports.c (st_write): use memcpy, not strncpy. thanks to
9179 Dale P. Smith.
9180
9181 2001-07-09 Thien-Thi Nguyen <ttn@revel.glug.org>
9182
9183 * alist.c, alloca.c, arbiters.c, async.c, async.h, backtrace.c,
9184 boolean.c, chars.c, continuations.c, coop-defs.h, coop-threads.c,
9185 debug-malloc.h, debug.c, debug.h, dynl.c, dynwind.c, eq.c,
9186 error.c, eval.c, evalext.c, feature.c, feature.h, filesys.c,
9187 filesys.h, fluids.c, fluids.h, fports.c, fports.h, gc.c, gc.h,
9188 gdbint.c, gsubr.c, guardians.c, hash.c, hashtab.c, hooks.c,
9189 hooks.h, inet_aton.c, init.c, ioext.c, keywords.c, keywords.h,
9190 lang.c, list.c, load.c, macros.c, mallocs.c, memmove.c, modules.c,
9191 net_db.c, numbers.c, numbers.h, objects.c, objprop.c, options.c,
9192 pairs.c, pairs.h, ports.c, ports.h, posix.c, print.c, print.h,
9193 procprop.c, procs.c, procs.h, properties.c, putenv.c, ramap.c,
9194 random.c, random.h, read.c, regex-posix.c, regex-posix.h, root.c,
9195 root.h, scmsigs.c, script.c, simpos.c, smob.c, snarf.h, socket.c,
9196 sort.c, srcprop.c, srcprop.h, stackchk.c, stacks.c, stacks.h,
9197 stime.c, strerror.c, strings.c, strings.h, strop.c, strorder.c,
9198 strports.c, struct.c, struct.h, symbols-deprecated.c, symbols.c,
9199 symbols.h, tags.h, threads.c, threads.h, throw.c, unif.c, unif.h,
9200 variable.c, variable.h, vectors.c, vectors.h, version.c, vports.c,
9201 weaks.c, weaks.h: Remove "face-lift" comment.
9202
9203 2001-07-08 Rob Browning <rlb@defaultvalue.org>
9204
9205 * .cvsignore: add stamp-h.in.
9206
9207 2001-07-04 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9208
9209 * hooks.c (scm_make_hook, scm_add_hook_x),
9210 (scm_remove_hook_x, scm_reset_hook_x, scm_run_hook): Added return
9211 value info to the docstrings.
9212
9213 2001-07-03 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9214
9215 Some more compatibility patches for Windows.
9216
9217 * posix.c (getlogin): getlogin() implementation for Windows.
9218
9219 * backtrace.c, ioext.c: Include <stdio.h>.
9220
9221 * unif.c, script.c, rw.c, error.c: Include <io.h>, if it does
9222 exist.
9223
9224 * cpp_sig_symbols.in: Added SIGBREAK.
9225
9226 2001-07-01 Marius Vollmer <mvo@zagadka.ping.de>
9227
9228 * strports.c (scm_read_0str, scm_eval_0str): Call
9229 scm_c_read_string and scm_c_eval_string respectively, not
9230 themselves. Thanks to Dale P. Smith!
9231
9232 2001-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
9233
9234 * unif.c (scm_array_set_x): The variable args does not
9235 necessarily have to be a list. Further, got rid of a redundant
9236 SCM_NIMP test.
9237
9238 2001-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
9239
9240 * list.c (SCM_I_CONS): Make sure the cell type is initialized
9241 last.
9242
9243 * gc.c (s_scm_map_free_list, scm_igc, scm_gc_sweep,
9244 init_heap_seg): Fixed signedness.
9245
9246 (init_heap_seg): Replaced strange for-loop with a while loop.
9247
9248 * weaks.h (WEAKSH, SCM_WEAKS_H): Rename <foo>H to SCM_<foo>_H.
9249
9250 (SCM_WVECTP): Prefer !SCM_<pred> over SCM_N<pred>.
9251
9252 The following patch adds conservative marking for the elements of
9253 free or allocated cells.
9254
9255 * gc.c (allocated_mark, heap_segment): New static functions.
9256
9257 (which_seg): Deleted, since the functionality is now provided by
9258 function heap_segment.
9259
9260 (map_free_list): Use heap_segment instead of which_seg.
9261
9262 (MARK): If cell debugging is disabled, mark free cells
9263 conservatively.
9264
9265 (scm_mark_locations, scm_cellp): Extracted the search for the
9266 heap segment of a SCM value into function heap_segment.
9267
9268 (scm_init_storage): Allocated cells must be marked
9269 conservatively.
9270
9271 * gc.[ch] (scm_gc_mark_cell_conservatively): New function.
9272
9273 The following patch changes the representation of weak vectors to
9274 double cells instead of using an extension of the vector's
9275 allocated memory.
9276
9277 * gc.c (MARK): Use SCM_SET_WVECT_GC_CHAIN instead of assigning to
9278 the result of SCM_WVECT_GC_CHAIN.
9279
9280 (scm_gc_sweep): Weak vectors don't have extra fields any more.
9281
9282 * weaks.c (allocate_weak_vector): New static function. It does
9283 not patch any previously created vector object during the
9284 construction of a weak vector, and thus doesn't need to switch
9285 off interrupts during vector creation.
9286
9287 (scm_make_weak_vector, scm_make_weak_key_hash_table,
9288 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
9289 Use allocate_weak_vector to provide the new weak vector object.
9290
9291 * weaks.h (SCM_WVECT_TYPE, SCM_SET_WVECT_TYPE,
9292 SCM_SET_WVECT_GC_CHAIN): New macros. The weak vector subtype is
9293 now stored in the double cell.
9294
9295 (SCM_IS_WHVEC, SCM_IS_WHVEC_V, SCM_IS_WHVEC_B, SCM_IS_WHVEC_ANY):
9296 Use SCM_WVECT_TYPE.
9297
9298 (SCM_WVECT_GC_CHAIN): The weak objects are now chained together
9299 using an entry of the double cell.
9300
9301 2001-06-30 Thien-Thi Nguyen <ttn@revel.glug.org>
9302
9303 * stamp-h.in: bye bye
9304
9305 2001-06-30 Marius Vollmer <mvo@zagadka.ping.de>
9306
9307 * gh_eval.c (gh_eval_str): Use scm_c_eval_string instead of
9308 scm_eval_0str.
9309
9310 * load.c, load.h (scm_c_primitive_load,
9311 scm_c_primitive_load_path): New.
9312
9313 * strports.c, strports.h (scm_c_read_string): Renamed from
9314 scm_read_0str. Also, added "const" qualifier to argument.
9315 (scm_c_eval_string): Renamed from scm_eval_0str.
9316 (scm_read_0str, scm_eval_0str): Deprecated.
9317
9318 2001-06-28 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9319
9320 * fluids.c (scm_c_with_fluid): Use scm_list_1() instead of
9321 SCM_LIST1.
9322
9323 2001-06-28 Keisuke Nishida <kxn30@po.cwru.edu>
9324
9325 * list.h (scm_list_1, scm_list_2, scm_list_3, scm_list_4, scm_list_5,
9326 scm_list_n): New functions.
9327 (SCM_LIST0, SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5,
9328 SCM_LIST6, SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify): Deprecated.
9329 (lots of files): Use the new functions.
9330
9331 * goops.c (CALL_GF1, CALL_GF2, CALL_GF3, CALL_GF4): Use scm_call_N.
9332
9333 * strings.c: #include "libguile/deprecation.h".
9334
9335 2001-06-27 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9336
9337 * read.c (scm_lreadr): When reading a hash token, check for a
9338 user-defined hash procedure first, so that overriding the builtin
9339 hash characters is possible (this was needed for implementing
9340 SRFI-4's read synax `f32(...)').
9341
9342 * num2integral.i.c: Use scm_t_signed_bits instead of scm_t_bits,
9343 because the latter is unsigned now and breaks comparisons like
9344 (n < (scm_t_signed_bits)MIN_VALUE).
9345
9346 2001-06-26 Neil Jerram <neil@ossau.uklinux.net>
9347
9348 * eval.h, eval.c (scm_call_4): New function.
9349
9350 * eval.c (SCM_APPLY, SCM_CEVAL, ENTER_APPLY): Call trap handlers
9351 directly rather than dispatching to them via scm_ithrow and a lazy
9352 catch.
9353
9354 * eval.c (scm_evaluator_trap_table), eval.h (SCM_ENTER_FRAME_HDLR,
9355 SCM_APPLY_FRAME_HDLR, SCM_EXIT_FRAME_HDLR): Add three new options
9356 for trap handler procedures.
9357
9358 * debug.h (SCM_RESET_DEBUG_MODE): Add checks for trap handler
9359 procedures not being #f.
9360
9361 2001-06-27 Michael Livshin <mlivshin@bigfoot.com>
9362
9363 * Makefile.am (c-tokenize.c): add rule to generate it.
9364 (EXTRA_DIST): add c-tokenize.lex, so it gets distributed.
9365
9366 filter-doc-snarfage.c: remove.
9367
9368 2001-06-26 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9369
9370 * ports.c (scm_output_port_p): Use result of SCM_COERCE_OUTPORT.
9371
9372 The following set of changes makes compiling Guile under various
9373 Windows compilers easier. Compilation under GNU systems should
9374 not be affected at all.
9375
9376 Thanks to Stefan Jahn for all necessary information, patches and
9377 testing.
9378
9379 * posix.c: Conditialize getpwent, getgrent, kill, getppid, getuid,
9380 getpgrp, ttyname, primitive-fork and some header inclusion for
9381 Windows.
9382
9383 * random.c: Define M_PI, if not predefined and use __int64 for
9384 LONG64 under Windows.
9385
9386 * scmsigs.c: Emulate some functions (alarm, sleep, kill) under
9387 Windows and conditionalize some signal names.
9388
9389 * socket.c (scm_getsockopt): Added missing comma.
9390 Include socket library header under Windows.
9391
9392 * stime.c (CLKTCK): Add cast to int, to make it compile under
9393 Windows.
9394
9395 * ports.c (truncate): New function, compiled only under Windows.
9396
9397 * net_db.c: Do not declare errno under Windows.
9398
9399 * iselect.h, inet_aton.c: Include socket library headers under
9400 Windows.
9401
9402 * guile.c (inner_main): Under Windows, initialize socket library
9403 and initialize gdb_interface data structures.
9404
9405 * gdb_interface.h: Under Windows, gdb_interface cannot be
9406 initialized statically. Initialize at runtime instead.
9407
9408 * fports.c (write_all): ssize_t -> size_t.
9409 (fport_print): Conditionalize call to ttyname().
9410 (getflags): New function, compiled only under Windows.
9411
9412 * filesys.c: Conditionalize inclusion of <pwd.h>. Conditionalize
9413 primitives chown, link, fcntl.
9414 (scm_basename, scm_dirname): Under Windows, handle \ as well as /
9415 as path seperator.
9416
9417 * backtrace.c: Include <io.h> under Windows.
9418
9419 * async.h (ASYNCH, SCM_ASYNC_H): Rename <foo>H to SCM_<foo>_H.
9420
9421 * _scm.h: Added preprocessor conditional for __MINGW32__ for errno
9422 declaration.
9423
9424 2001-06-27 Keisuke Nishida <kxn30@po.cwru.edu>
9425
9426 * eval.c (scm_call_0, scm_call_1, scm_call_2, scm_call_3,
9427 scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3): New functions.
9428 * eval.h (scm_call_0, scm_call_1, scm_call_2, scm_call_3,
9429 scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3): Declared.
9430 * async.c (scm_run_asyncs), coop-threads.c (scheme_body_bootstrip,
9431 scheme_handler_bootstrip), debug.c (with_traps_inner), dynwind.c
9432 (scm_dynamic_wind, scm_dowinds), environments.c
9433 (import_environment_conflict), eval.c (scm_macroexp, scm_force,
9434 scm_primitive_eval_x, scm_primitive_eval), fluids.c (apply_thunk),
9435 goops.c (GETVAR, purgatory, make_class_from_template,
9436 scm_ensure_accessor), hashtab.c (scm_ihashx, scm_sloppy_assx,
9437 scm_delx_x, fold_proc), hooks.c (scm_c_run_hook), load.c
9438 (scm_primitive_load), modules.c (scm_resolve_module,
9439 scm_c_define_module, scm_c_use_module, scm_c_export,
9440 module_variable, scm_eval_closure_lookup, scm_sym2var,
9441 scm_make_module, scm_ensure_user_module, scm_load_scheme_module),
9442 ports.c (scm_port_for_each), print.c (scm_printer_apply),
9443 properties.c (scm_primitive_property_ref), ramap.c (ramap,
9444 ramap_cxr, rafe, scm_array_index_map_x, read.c (scm_lreadr),
9445 scmsigs.c (sys_deliver_signals), sort.c (applyless), strports.c
9446 (scm_object_to_string, scm_call_with_output_string,
9447 scm_call_with_input_string), throw.c (scm_body_thunk,
9448 scm_handle_by_proc, hbpca_body), unif.c (scm_make_shared_array,
9449 scm_make_shared_array), vports.c (sf_flush, sf_write,
9450 sf_fill_input, sf_close): Use one of the above functions.
9451 * goops.c, hashtab.c, scmsigs.c, sort.c: #include "libguile/root.h".
9452
9453 2001-06-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
9454
9455 * filesys.c (scm_close), ports.c (scm_close_port,
9456 scm_port_closed_p), strop.c (scm_string_null_p): Use SCM_BOOL
9457 instead of SCM_NEGATE_BOOL.
9458
9459 * filesys.c (scm_stat): Clean up type dispatch.
9460
9461 * filesys.c (scm_stat), ports.c (scm_input_port_p,
9462 scm_output_port_p): Get rid of redundant IM type check.
9463
9464 * filesys.c (scm_readdir, scm_getcwd, scm_readlink), gh_data.c
9465 (gh_str2scm), load.c (scm_primitive_load, scm_internal_parse_path,
9466 scm_search_path), net_db.c (scm_gethost, scm_getnet, scm_getproto,
9467 scm_return_entry), numbers.c (scm_number_to_string), objects.c
9468 (scm_make_subclass_object), ports.c (scm_port_mode), read.c
9469 (scm_lreadr), simpos.c (scm_getenv), socket.c (scm_inet_ntoa,
9470 scm_addr_vector), stime.c (scm_strftime), strings.c
9471 (scm_makfromstrs, scm_makfrom0str, scm_substring), strings.h
9472 (SCM_STRING_COERCE_0TERMINATION_X), strop.c (string_copy,
9473 scm_string_split), strports.c (scm_strport_to_string), symbols.c
9474 (scm_symbol_to_string), vports.c (sf_write): Use scm_mem2string
9475 instead of scm_makfromstr.
9476
9477 * net_db.c (scm_sethost, scm_setnet, scm_setproto, scm_setserv),
9478 ports.c (scm_close_all_ports_except), read.c (scm_lreadr,
9479 scm_read_hash_extend), stime.c (scm_strftime), strings.c
9480 (scm_string_append, scm_string), strings.h (SCM_STRINGP,
9481 SCM_STRING_COERCE_0TERMINATION_X, SCM_RWSTRINGP), strop.c
9482 (string_capitalize_x): Prefer explicit type check over SCM_N?IMP,
9483 !SCM_<pred> over SCM_N<pred>.
9484
9485 * strings.[ch] (scm_makfromstr): Deprecated.
9486
9487 (scm_mem2string): New function, replaces scm_makfromstr.
9488
9489 * strings.c (scm_substring), strop.c (string_copy,
9490 scm_string_split), strports.c (scm_strport_to_string), symbols.c
9491 (scm_symbol_to_string): Fix gc problem.
9492
9493 * strings.h (STRINGSH, SCM_STRINGS_H): Rename <foo>H to
9494 SCM_<foo>_H.
9495
9496 * validate.h (SCM_VALIDATE_SUBSTRING_SPEC_COPY): Eliminate
9497 warning about comparing signed and unsigned values. This fix is
9498 not optimal, since it won't work reliably if sizeof (c_start) >
9499 sizeof (size_t) or sizeof (c_end) > sizeof (size_t). A better
9500 solution is to define this macro as an inline function, thus
9501 allowing to specifiy the types of c_start and c_end.
9502
9503 2001-06-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
9504
9505 * debug.h (SCM_DEBUGOBJ_FRAME): Deliver result as a
9506 scm_t_debug_frame*.
9507
9508 * debug.h (DEBUGH, SCM_DEBUG_H), stacks.h (STACKSH, SCM_STACKSH):
9509 Rename <foo>H to SCM_<foo>_H.
9510
9511 * stacks.c (NEXT_FRAME, narrow_stack): Prefer explicit type check
9512 over SCM_N?IMP, !SCM_<pred> over SCM_N<pred>.
9513
9514 (narrow_stack): Make i unsigned. Don't use side-effecting
9515 operations in conditions.
9516
9517 (narrow_stack, scm_make_stack, scm_stack_id,
9518 scm_last_stack_frame): Get rid of redundant SCM_N?IMP checks.
9519
9520 (scm_make_stack, scm_stack_id, scm_last_stack_frame): Clean up
9521 type dispatch. No need to cast result of SCM_DEBUGOBJ_FRAME any
9522 more.
9523
9524 (scm_stack_ref, scm_frame_previous, scm_frame_next): Fix
9525 signedness.
9526
9527 (scm_last_stack_frame): Remove bogus `;´.
9528
9529 * stacks.h (SCM_FRAMEP): Fix type check.
9530
9531 2001-06-25 Michael Livshin <mlivshin@bigfoot.com>
9532
9533 * Makefile.am (MAINTAINERCLEANFILES): be sure to remove
9534 c-tokenize.c when doing maintainer-clean.
9535
9536 * snarf.h (SCM_SNARF_DOCS): change the "grammar" slightly.
9537
9538 * guile-snarf-docs.in, guile-snarf-docs-texi.in: rewrite &
9539 simplify.
9540
9541 * eval.c: all hash signs are in column 0.
9542
9543 * Makefile.am (guile_filter_doc_snarfage): build using
9544 c-tokenize.c, not filter-doc-snarfage.c.
9545 rearrange snarfing dependencies a bit.
9546
9547 * c-tokenize.lex: new file.
9548
9549 2001-06-25 Marius Vollmer <mvo@zagadka.ping.de>
9550
9551 * srcprop.h, srcprop.c (scm_srcprops_to_plist): Renamed from
9552 scm_t_srcpropso_plist. See the big type renaming.
9553 * coop-defs.h (scm_mutex_trylock, scm_cond_timedwait): Likewise.
9554 Thanks to Seth Alves!
9555
9556 * numbers.c (SIZE_MAX, PTRDIFF_MIN, PTRDIFF_MAX): Only define when
9557 they aren't defined already.
9558
9559 2001-06-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
9560
9561 * backtrace.c (display_backtrace_body): Use SCM_VALIDATE_STACK
9562 and SCM_VALIDATE_OPOUTPORT instead of SCM_ASSERT. Fix signedness
9563 problem.
9564
9565 * backtrace.c (display_expression, scm_set_print_params_x,
9566 display_application, display_frame, scm_backtrace), numbers.c
9567 (scm_istring2number), objects.c (scm_class_of,
9568 scm_mcache_lookup_cmethod, scm_mcache_compute_cmethod): Prefer
9569 explicit type check over SCM_N?IMP, !SCM_<pred> over SCM_N<pred>.
9570
9571 * fluids.c (scm_fluid_ref, scm_fluid_set_x): Fluid numbers are
9572 always positive.
9573
9574 * numbers.c (scm_i_mkbig): Remove unnecessary casts, remove
9575 unnecessary SCM_DEFER_INTS, SCM_ALLOW_INTS.
9576
9577 * objects.c (scm_class_of): Type fix.
9578
9579 (scm_mcache_lookup_cmethod): Improved comment, simplified,
9580 eliminated goto.
9581
9582 * pairs.h (scm_error_pair_access): The function can return if
9583 called recursively.
9584
9585 2001-06-20 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9586
9587 * init.c (scm_init_guile_1): Removed initialization of tag.c.
9588
9589 * gdbint.c, init.c: Removed inclusion of tag.h.
9590
9591 * tag.h, tag.c: Removed files.
9592
9593 * Makefile.am: Removed tag.{h,c,doc,x} in various places.
9594
9595 2001-06-20 Gary Houston <ghouston@arglist.com>
9596
9597 * deprecation.c, extensions.c, rw.c: include string.h.
9598
9599 2001-06-19 Gary Houston <ghouston@arglist.com>
9600
9601 * filter-doc-snarfage.c (process): added ungetc in
9602 MULTILINE_COOKIE case since otherwise it fails when there's no
9603 space between the '(' and the quote of the following string
9604 (gcc 3.0).
9605
9606 2001-06-14 Marius Vollmer <mvo@zagadka.ping.de>
9607
9608 Throughout: replace "scm_*_t" with "scm_t_*", except "scm_lisp_t".
9609
9610 2001-06-14 Marius Vollmer <mvo@zagadka.ping.de>
9611
9612 * unif.h (SCM_ARRAY_NDIM): Shift then cast so that no sign
9613 extension takes place.
9614 * strings.h (SCM_STRING_LENGTH): Likewise.
9615 (SCM_STRING_MAX_LENGTH): Use unsigned numbers.
9616
9617 * __scm.h (ptrdiff_t): Typedef to long when configure didn't find
9618 it.
9619
9620 * tags.h: Include <stdint.h> when we have it.
9621 (scm_bits_t): Changed to be a unsigned type. Use uintptr_t when
9622 available. Else use "unsigned long".
9623 (scm_signed_bits_t): New.
9624
9625 * numbers.h (SCM_SRS): Cast shiftee to scm_signed_bits_t.
9626 (SCM_INUM): Cast result to scm_signed_bits_t.
9627
9628 2001-06-13 Thien-Thi Nguyen <ttn@revel.glug.org>
9629
9630 * mkstemp.c: Update path to #include file scmconfig.h.
9631 Thanks to Golubev I. N.
9632
9633 2001-06-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
9634
9635 * struct.h (SCM_STRUCT_VTABLE_FLAGS): New macro.
9636
9637 * goops.h (SCM_NUMBER_OF_SLOTS): Removed bogus `\´ at the end of
9638 the macro definition.
9639
9640 (SCM_CLASSP, SCM_INSTANCEP, SCM_PUREGENERICP, SCM_ACCESSORP,
9641 SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Use SCM_STRUCT_VTABLE_FLAGS
9642 instead of SCM_INST_TYPE.
9643
9644 (SCM_ACCESSORP, SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Make sure
9645 the object is a struct before accessing its struct flags.
9646
9647 (SCM_INST_TYPE, SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Deprecated.
9648
9649 2001-06-10 Gary Houston <ghouston@arglist.com>
9650
9651 * rdelim.c (scm_init_rdelim_builtins): don't try to activate the
9652 (ice-9 rdelim) module in (guile) and (guile-user). it didn't
9653 work reliably anymore. try it from boot-9.scm instead.
9654
9655 2001-06-09 Marius Vollmer <mvo@zagadka.ping.de>
9656
9657 * ports.c (scm_lfwrite): Maintain columnd and row count in port.
9658 Thanks to Matthias Köppe!
9659
9660 2001-06-08 Michael Livshin <mlivshin@bigfoot.com>
9661
9662 * snarf.h, filter-doc-snarfage.c: more changes to cope with
9663 space-happy C preprocessors.
9664
9665 * filter-doc-snarfage.c, guile-snarf.in: try to cope with spaces
9666 inside cookies. thanks to Matthias Köppe!
9667
9668 2001-06-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
9669
9670 * keywords.c (keyword_print): Don't use SCM_C[AD]R to access
9671 keywords. Fix gc protection.
9672
9673 * objects.c (scm_mcache_lookup_cmethod): Don't use side effecting
9674 operations in macro calls.
9675
9676 * pairs.c (scm_error_pair_access): Avoid recursion.
9677
9678 Thanks to Matthias Koeppe for reporting the bugs that correspond
9679 to the following set of patches.
9680
9681 * unif.c (scm_bit_set_star_x, scm_bit_invert_x), vectors.h
9682 (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR): Obtain the
9683 bitvector base address using SCM_BITVECTOR_BASE.
9684
9685 * unif.h (SCM_BITVECTOR_BASE): Return the base address as an
9686 unsigned long*.
9687
9688 2001-06-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
9689
9690 * goops.c (SCM_CLASS_REDEF): Removed.
9691
9692 * vectors.h (VECTORSH, SCM_VECTORS_H): Renamed <foo>H to
9693 SCM_<foo>_H.
9694
9695 Thanks to Matthias Koeppe for reporting the bugs that correspond
9696 to the following set of patches.
9697
9698 * goops.c (scm_sys_prep_layout_x, scm_basic_basic_make_class,
9699 create_basic_classes, scm_sys_fast_slot_set_x, set_slot_value,
9700 scm_sys_allocate_instance, clear_method_cache,
9701 scm_sys_invalidate_method_cache_x, scm_make,
9702 create_standard_classes, scm_make_port_classes, scm_make_class,
9703 scm_add_slot): Use SCM_SET_SLOT to set slot values.
9704
9705 (prep_hashsets): Use SCM_SET_HASHSET to set class hash values.
9706
9707 * goops.h (SCM_SET_SLOT, SCM_SET_HASHSET): New macros.
9708
9709 * ramap.c (BINARY_ELTS_CODE, BINARY_PAIR_ELTS_CODE,
9710 UNARY_ELTS_CODE): Remove bogus break statement.
9711
9712 * vectors.h (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR):
9713 Don't access bit vectors elements as SCM objects.
9714
9715 * weaks.c (scm_make_weak_vector, scm_make_weak_key_hash_table,
9716 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
9717 Don't assign to an unpacked value.
9718
9719 2001-06-07 Dirk Herrmann <D.Herrmann@tu-bs.de>
9720
9721 * __scm.h (SCM_NORETURN): Moved here from error.h.
9722
9723 (SCM_UNUSED): New macro.
9724
9725 (SCM_DEBUG_PAIR_ACCESSES): New macro.
9726
9727 * backtrace.c (display_error_handler), continuations.c
9728 (continuation_print), debug.c (debugobj_print), dynwind.c
9729 (guards_print), environments.c (observer_print,
9730 core_environments_finalize, leaf_environment_cell,
9731 leaf_environment_print, eval_environment_print,
9732 eval_environment_observer, import_environment_define,
9733 import_environment_undefine, import_environment_print,
9734 import_environment_observer, export_environment_define,
9735 export_environment_undefine, export_environment_print,
9736 export_environment_observer), eval.c (scm_m_quote, scm_m_begin,
9737 scm_m_if, scm_m_set_x, scm_m_and, scm_m_or, scm_m_case,
9738 scm_m_cond, scm_m_lambda, scm_m_letstar, scm_m_do, scm_m_delay,
9739 scm_m_letrec1, scm_m_apply, scm_m_cont, scm_m_nil_cond,
9740 scm_m_nil_ify, scm_m_t_ify, scm_m_0_cond, scm_m_0_ify,
9741 scm_m_1_ify, scm_m_atfop, scm_m_at_call_with_values), evalext.c
9742 (scm_m_generalized_set_x), fluids.c (fluid_print), fports.c
9743 (fport_print), gc.c (gc_start_stats, scm_remember_upto_here_1,
9744 scm_remember_upto_here_2, scm_remember_upto_here, mark_gc_async),
9745 gh_init.c (gh_standard_handler), goops.c (get_slot_value,
9746 set_slot_value, test_slot_existence, scm_change_object_class,
9747 scm_m_atslot_ref, scm_m_atslot_set_x, make_struct_class,
9748 default_setter), guardians.c (guardian_print, guardian_gc_init,
9749 guardian_zombify, whine_about_self_centered_zombies), guile.c
9750 (inner_main), init.c (stream_handler), keywords.c (keyword_print),
9751 mallocs.c (malloc_print), numbers.c (scm_print_real,
9752 scm_print_complex, scm_bigprint), ports.c (flush_port_default,
9753 end_input_default, scm_port_print, fill_input_void_port,
9754 write_void_port), root.c (root_print), smob.c (scm_mark0,
9755 scm_free0, scm_smob_print, scm_smob_apply_1_error,
9756 scm_smob_apply_2_error, scm_smob_apply_3_error, free_print),
9757 stime.c (restorezone), strings.c (scm_makfromstr), struct.c
9758 (scm_struct_free_0, scm_struct_free_standard,
9759 scm_struct_free_entity, scm_struct_gc_init, scm_free_structs),
9760 throw.c (jmpbuffer_print, lazy_catch_print, ss_handler,
9761 scm_handle_by_throw, scm_ithrow), weaks.c
9762 (scm_weak_vector_gc_init, scm_mark_weak_vector_spines,
9763 scm_scan_weak_vectors), ramap.c (scm_array_fill_int), filesys.c
9764 (scm_dir_print): Mark unused parameters with SCM_UNUSED.
9765
9766 * error.h (SCM_NORETURN): Moved to __scm.h.
9767
9768 * error.h (ERRORH, SCM_ERROR_H), pairs.h (PAIRSH, SCM_PAIRS_H):
9769 Renamed <foo>H to SCM_<foo>_H.
9770
9771 * gc.c (debug_cells_gc_interval): New static variable.
9772
9773 (scm_assert_cell_valid): If selected by the user, perform
9774 additional garbage collections.
9775
9776 (scm_set_debug_cell_accesses_x): Extended to let the user specify
9777 if additional garbage collections are desired.
9778
9779 (mark_gc_async): If additional garbage collections are selected
9780 by the user, don't call the after-gc-hook. Instead require the
9781 user to run the hook manually.
9782
9783 * pairs.c (scm_error_pair_access): New function. Only compiled
9784 if SCM_DEBUG_PAIR_ACCESSES is set to 1.
9785
9786 * pairs.h (SCM_VALIDATE_PAIR): New macro.
9787
9788 (SCM_CAR, SCM_CDR, SCM_SETCAR, SCM_SETCDR): If
9789 SCM_DEBUG_PAIR_ACCESSES is set to 1, make sure that the argument
9790 is a real pair object. (Glocs are also accepted, but that may
9791 change.) If not, abort with an error message.
9792
9793 2001-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
9794
9795 * eval.c (SCM_VALIDATE_NON_EMPTY_COMBINATION): New macro.
9796
9797 (SCM_CEVAL, SCM_APPLY): Replace calls to SCM_EVALIM2 with calls
9798 to SCM_VALIDATE_NON_EMPTY_COMBINATION.
9799
9800 2001-06-05 Marius Vollmer <mvo@zagadka.ping.de>
9801
9802 * extensions.c (scm_c_register_extension): Allow NULL as library
9803 name.
9804 (load_extension): Ignore NULL library names when comparing.
9805
9806 * hash.c (scm_hasher): Use SCM_UNPACK in the case labels so that
9807 non-pointers are being compared. Thanks to Alexander Klimov!
9808
9809 2001-06-04 Gary Houston <ghouston@arglist.com>
9810
9811 * rw.c (scm_write_string_partial): new procedure implementing
9812 write-string/partial in (ice-9 rw).
9813 * rw.h: declare scm_write_string_partial.
9814
9815 2001-06-04 Marius Vollmer <mvo@zagadka.ping.de>
9816
9817 * keywords.c (keyword_print): Substract 1 from length of symbol
9818 name, accounting for the silly dash.
9819
9820 * dynl.c (scm_registered_modules, scm_clear_registered_modules):
9821 Do not emit deprecation warning.
9822
9823 Added exception notice to all files.
9824
9825 * dynl.c: Include "deprecation.h".
9826
9827 2001-06-03 Marius Vollmer <mvo@zagadka.ping.de>
9828
9829 * dynl.c (scm_register_module_xxx, scm_registered_modules,
9830 scm_clear_registered_modules): Deprecated.
9831
9832 2001-06-02 Rob Browning <rlb@cs.utexas.edu>
9833
9834 * .cvsignore: add guile_filter_doc_snarfage guile-snarf-docs
9835 guile-snarf-docs-texi.
9836
9837 * fports.c: HAVE_ST_BLKSIZE changed to
9838 HAVE_STRUCT_STAT_ST_BLKSIZE.
9839 (scm_fport_buffer_add): HAVE_ST_BLKSIZE changed to
9840 HAVE_STRUCT_STAT_ST_BLKSIZE.
9841
9842 * filesys.c (scm_stat2scm): HAVE_ST_RDEV changed to
9843 HAVE_STRUCT_STAT_ST_RDEV.
9844 (scm_stat2scm): HAVE_ST_BLKSIZE changed to
9845 HAVE_STRUCT_STAT_ST_BLKSIZE.
9846 (scm_stat2scm): HAVE_ST_BLOCKS changed to
9847 HAVE_STRUCT_STAT_ST_BLOCKS.
9848
9849 2001-06-02 Marius Vollmer <mvo@zagadka.ping.de>
9850
9851 * strports.c (scm_eval_string): Use scm_primitive_eval_x instead
9852 of scm_eval_x to allow module changes between the forms in the
9853 string. Set/restore module using scm_c_call_with_current_module.
9854
9855 * mkstemp.c: New file, slightly modified from libiberties
9856 mkstemps.c.
9857
9858 2001-05-31 Michael Livshin <mlivshin@bigfoot.com>
9859
9860 * guile-snarf-docs.in, guile-snarf-docs-texi.in,
9861 filter-doc-snarfage.c: new files.
9862
9863 * Makefile.am: add stuff to [build,] use and distribute
9864 guile-snarf-docs, guile-snarf-docs-texi, guile_filter_doc_snarfage.
9865
9866 * guile-snarf.in: grok the new snarf output.
9867
9868 * snarf.h: make the output both texttools- and `read'-friendly.
9869
9870 * guile-doc-snarf.in: reimplement in terms of guile-snarf and
9871 guile-snarf-docs. (should also deprecate, I guess. maybe not).
9872
9873 2001-05-31 Marius Vollmer <mvo@zagadka.ping.de>
9874
9875 * print.c (scm_simple_format): Support "~~" and "~%". Signal
9876 error for unsupported format controls and for superflous
9877 arguments. Thanks to Daniel Skarda!
9878
9879 * print.h, print.c (scm_print_symbol_name): Factored out of
9880 scm_iprin1.
9881 (scm_iprin1): Call it.
9882
9883 * keywords.c (keyword_print): Use scm_print_symbol_name so that
9884 weird names are printed correctly.
9885
9886 * print.c (scm_print_symbol_name): Symbols whose name starts with
9887 `#' or `:' or ends with `:' are considered weird.
9888
9889 2001-05-30 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9890
9891 * numbers.c (scm_difference, scm_divide): Clarified comments for -
9892 and /.
9893
9894 2001-05-29 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9895
9896 * debug.h: Removed prototype for scm_eval_string.
9897
9898 2001-05-28 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9899
9900 * symbols.c (scm_gensym): Fix buffer overrun (try `(gensym
9901 (make-string 2000 #\!))' in an older version).
9902
9903 Change strncpy to memcpy to allow embedded NUL characters in
9904 symbol prefix.
9905
9906 2001-05-28 Michael Livshin <mlivshin@bigfoot.com>
9907
9908 * hooks.c (scm_create_hook): deprecated.
9909 (make_hook): deleted.
9910 (scm_make_hook): all the hook creation code is now here.
9911
9912 * gc.c (scm_init_gc): don't call `scm_create_hook'. instead make
9913 a hook, make it permanent, and do a `scm_c_define' on it.
9914
9915 * strop.c (s_scm_string_capitalize_x): fix docstring quoting.
9916
9917 * socket.c (s_scm_inet_pton): fix docstring quoting.
9918 (s_scm_inet_ntop): ditto.
9919
9920 * num2integral.i.c (INTEGRAL2NUM): cast to fix a warning.
9921
9922 * hashtab.c (scm_internal_hash_fold): fix argument position in
9923 SCM_ASSERT.
9924
9925 * environments.c (s_scm_import_environment_set_imports_x): fix
9926 argument position in SCM_ASSERT.
9927
9928 * debug.c (s_scm_make_gloc): fix SCM packing/unpacking.
9929 (s_scm_make_iloc): ditto.
9930
9931 2001-05-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
9932
9933 * __scm.h (SCM_DEBUG_TYPING_STRICTNESS): Make 1 the default.
9934
9935 * eval.c (promise_print): Read the promise's value as an object.
9936
9937 (SCM_CEVAL): Don't perform side-effecting operations in macro
9938 parameters.
9939
9940 * eval.h (SCM_EVALIM2): Fix the typing strictness of the
9941 conditional expression.
9942
9943 * gc.c (scm_master_freelist, scm_master_freelist2): Added missing
9944 initializer.
9945
9946 * gh_data.c (gh_set_substr): Removed redundant unsigned >= 0
9947 text, removed redundant computation of effective_length and fixed
9948 the overflow check.
9949
9950 * goops.c (test_slot_existence): Use SCM_EQ_P to compare SCM
9951 values.
9952
9953 (wrap_init): Don't use SCM_C[AD]R for non pairs.
9954
9955 (hell): Make it a scm_bits_t pointer rather than a SCM pointer.
9956
9957 * goops.c (scm_sys_modify_class), strports.c (st_resize_port),
9958 struct.h (SCM_SET_STRUCT_PRINTER): Store unpacked values.
9959
9960 * goops.h (SCM_ACCESSORS_OF, SCM_SLOT): Return a SCM value.
9961
9962 * goops.h (GOOPSH, SCM_GOOPS_H), modules.h (MODULESH,
9963 SCM_MODULES_H), objects.h (OBJECTSH, SCM_OBJECTS_H), struct.h
9964 (STRUCTH, SCM_STRUCT_H), symbols.h (SYMBOLSH, SCM_SYMBOLS_H),
9965 __scm.h (__SCMH, SCM___SCM_H): Change <foo>H to SCM_<foo>_H.
9966
9967 * modules.[ch] (scm_module_tag): Make it a scm_bits_t value.
9968
9969 * objects.h (SCM_SET_CLASS_INSTANCE_SIZE): Fixed typing.
9970
9971 * ramap.c (ramap_rp): Removed bogus `;´.
9972
9973 * sort.c (scm_restricted_vector_sort_x): Fixed signedness
9974 problem.
9975
9976 * symbols.h (SCM_PROP_SLOTS, SCM_SET_PROP_SLOTS, SCM_SYMBOL_FUNC,
9977 SCM_SET_SYMBOL_FUNC, SCM_SYMBOL_PROPS, SCM_SET_SYMBOL_PROPS):
9978 Read SCM objects rather than scm_bits_t values.
9979
9980 * tags.h (SCM_VOIDP_TEST): Removed.
9981
9982 (SCM_DEBUG_TYPING_STRICTNESS): Now takes values 0, 1, 2. The
9983 value of 2 now corresponds to the former 1, the current 1
9984 corresponds to the former situation that SCM_VOIDP_TEST was
9985 defined.
9986
9987 (SCM): Now defined as typedef struct scm_unused_struct * SCM;
9988 If this appears to be not ANSI compliant, we will change it to
9989 typedef struct scm_unused_struct { } * SCM;
9990 Thanks to Han-Wen Nienhuys for the suggestion.
9991
9992 * unif.c (scm_array_set_x): Fix typing problem, and use
9993 SCM_UVECTOR_BASE instead of SCM_VELTS or SCM_CELL_WORD_1 when
9994 dealing with uniform vectors.
9995
9996 2001-05-27 Michael Livshin <mlivshin@bigfoot.com>
9997
9998 * gc.c (scm_init_storage): init `scm_gc_registered_roots'.
9999 (scm_igc): mark from them, too (precisely, not conservatively!).
10000
10001 * root.h (scm_gc_registered_roots): new object in
10002 scm_sys_protects.
10003
10004 * hooks.c (scm_create_hook): call `scm_gc_protect_object' instead
10005 `scm_protect_object'. shouldn't call it at all, though, it seems.
10006
10007 * gc.c (scm_[un]protect_object): deprecated.
10008 (scm_gc_[un]protect_object): new names for scm_[un]protect_object.
10009 (scm_gc_[un]register_root[s]): new.
10010
10011 * gc.h: add prototypes for scm_gc_[un]protect_object,
10012 scm_gc_[un]register_root[s].
10013
10014 2001-05-26 Michael Livshin <mlivshin@bigfoot.com>
10015
10016 revert the controversial part of the 2001-05-24 changes.
10017
10018 2001-05-25 Marius Vollmer <mvo@zagadka.ping.de>
10019
10020 * modules.c (scm_env_module): Exported to Scheme.
10021
10022 * eval.c (scm_debug_opts): New option `show-file-name'.
10023
10024 * debug.h (SCM_SHOW_FILE_NAME): New.
10025
10026 * backtrace.c: Include "libguile/filesys.h".
10027 (sym_base, display_backtrace_get_file_line,
10028 display_backtrace_file, display_backtrace_file_and_line): New.
10029 (display_frame): Call display_backtrace_file_and_line if that is
10030 requested.
10031 (display_backtrace_body): Call scm_display_backtrace_file if
10032 requested.
10033
10034 * debug.h (scm_lookup_cstr, scm_lookup_soft, scm_evstr):
10035 Prototypes removed since there's no definition for these
10036 functions.
10037
10038 2001-05-24 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10039
10040 * unif.c (scm_make_ra, array_free), unif.h (SCM_ARRAY_DIMS):
10041 Changed use of scm_array->scm_array_t and
10042 scm_array_dim->scm_array_dim_t to enable build with
10043 --disable-deprecated.
10044
10045 2001-05-24 Michael Livshin <mlivshin@bigfoot.com>
10046
10047 The purpose of this set of changes is to regularize Guile's usage
10048 of ANSI C integral types, with the following ideas in mind:
10049
10050 - SCM does not nesessarily have to be long.
10051 - long is not nesessarily enough to store pointers.
10052 - long is not nesessarily the same size as int.
10053
10054 The changes are incomplete and possibly buggy. Please test on
10055 something exotic.
10056
10057 * validate.h
10058 (SCM_NUM2{SIZE,PTRDIFF,SHORT,USHORT,BITS,UBITS,INT,UINT}[_DEF]):
10059 new macros.
10060
10061 * unif.h: type renaming:
10062 scm_array -> scm_array_t
10063 scm_array_dim -> scm_array_dim_t
10064 the old names are deprecated, all in-Guile uses changed.
10065
10066 * tags.h (scm_ubits_t): new typedef, representing unsigned
10067 scm_bits_t.
10068
10069 * stacks.h: type renaming:
10070 scm_info_frame -> scm_info_frame_t
10071 scm_stack -> scm_stack_t
10072 the old names are deprecated, all in-Guile uses changed.
10073
10074 * srcprop.h: type renaming:
10075 scm_srcprops -> scm_srcprops_t
10076 scm_srcprops_chunk -> scm_srcprops_chunk_t
10077 the old names are deprecated, all in-Guile uses changed.
10078
10079 * gsubr.c, procs.c, print.c, ports.c, read.c, rdelim.c, ramap.c,
10080 rw.c, smob.c, sort.c, srcprop.c, stacks.c, strings.c, strop.c,
10081 strorder.c, strports.c, struct.c, symbols.c, unif.c, values.c,
10082 vectors.c, vports.c, weaks.c:
10083 various int/size_t -> size_t/scm_bits_t changes.
10084
10085 * random.h: type renaming:
10086 scm_rstate -> scm_rstate_t
10087 scm_rng -> scm_rng_t
10088 scm_i_rstate -> scm_i_rstate_t
10089 the old names are deprecated, all in-Guile uses changed.
10090
10091 * procs.h: type renaming:
10092 scm_subr_entry -> scm_subr_entry_t
10093 the old name is deprecated, all in-Guile uses changed.
10094
10095 * options.h (scm_option_t.val): unsigned long -> scm_bits_t.
10096 type renaming:
10097 scm_option -> scm_option_t
10098 the old name is deprecated, all in-Guile uses changed.
10099
10100 * objects.c: various long -> scm_bits_t changes.
10101 (scm_i_make_class_object): flags: unsigned long -> scm_ubits_t
10102
10103 * numbers.h (SCM_FIXNUM_BIT): deprecated, renamed to
10104 SCM_I_FIXNUM_BIT.
10105
10106 * num2integral.i.c: new file, multiply included by numbers.c, used
10107 to "templatize" the various integral <-> num conversion routines.
10108
10109 * numbers.c (scm_mkbig, scm_big2num, scm_adjbig, scm_normbig,
10110 scm_copybig, scm_2ulong2big, scm_dbl2big, scm_big2dbl):
10111 deprecated.
10112 (scm_i_mkbig, scm_i_big2inum, scm_i_adjbig, scm_i_normbig,
10113 scm_i_copybig, scm_i_short2big, scm_i_ushort2big, scm_i_int2big,
10114 scm_i_uint2big, scm_i_long2big, scm_i_ulong2big, scm_i_bits2big,
10115 scm_i_ubits2big, scm_i_size2big, scm_i_ptrdiff2big,
10116 scm_i_long_long2big, scm_i_ulong_long2big, scm_i_dbl2big,
10117 scm_i_big2dbl, scm_short2num, scm_ushort2num, scm_int2num,
10118 scm_uint2num, scm_bits2num, scm_ubits2num, scm_size2num,
10119 scm_ptrdiff2num, scm_num2short, scm_num2ushort, scm_num2int,
10120 scm_num2uint, scm_num2bits, scm_num2ubits, scm_num2ptrdiff,
10121 scm_num2size): new functions.
10122
10123 * modules.c (scm_module_reverse_lookup): i, n: int -> scm_bits_t.
10124
10125 * load.c: change int -> size_t in various places (where the
10126 variable is used to store a string length).
10127 (search-path): call scm_done_free, not scm_done_malloc.
10128
10129 * list.c (scm_ilength): return a scm_bits_t, not long.
10130 some other {int,long} -> scm_bits_t changes.
10131
10132 * hashtab.c: various [u]int -> scm_bits_t changes.
10133 scm_ihashx_closure -> scm_ihashx_closure_t (and made a typedef).
10134 (scm_ihashx): n: uint -> scm_bits_t
10135 use scm_bits2num instead of scm_ulong2num.
10136
10137 * gsubr.c: various int -> scm_bits_t changes.
10138
10139 * goops.[hc]: various {int,long} -> scm_bits_t changes.
10140
10141 * gh_data.c (gh_num2int): no loss of precision any more.
10142
10143 * gh.h (gh_str2scm): len: int -> size_t
10144 (gh_{get,set}_substr): start: int -> scm_bits_t,
10145 len: int -> size_t
10146 (gh_<num>2scm): n: int -> scm_bits_t
10147 (gh_*vector_length): return scm_[u]size_t, not unsigned long.
10148 (gh_length): return scm_bits_t, not unsigned long.
10149
10150 * gc.[hc]: various small changes relating to many things stopping
10151 being long and starting being scm_[u]bits_t instead.
10152 scm_mallocated should no longer wrap around.
10153
10154 * fports.h: type renaming:
10155 scm_fport -> scm_fport_t
10156 the old name is deprecated, all in-Guile uses changed.
10157
10158 * fports.c (fport_fill_input): count: int -> scm_bits_t
10159 (fport_flush): init_size, remaining, count: int -> scm_bits_t
10160
10161 * debug.h (scm_lookup_cstr, scm_lookup_soft, scm_evstr): removed
10162 those prototypes, as the functions they prototype don't exist.
10163
10164 * fports.c (default_buffer_size): int -> size_t
10165 (scm_fport_buffer_add): read_size, write_size: int -> scm_bits_t
10166 default_size: int -> size_t
10167 (scm_setvbuf): csize: int -> scm_bits_t
10168
10169 * fluids.c (n_fluids): int -> scm_bits_t
10170 (grow_fluids): old_length, i: int -> scm_bits_t
10171 (next_fluid_num, scm_fluid_ref, scm_fluid_set_x): n: int ->
10172 scm_bits_t
10173 (scm_c_with_fluids): flen, vlen: int -> scm_bits_t
10174
10175 * filesys.c (s_scm_open_fdes): changed calls to SCM_NUM2LONG to
10176 the new and shiny SCM_NUM2INT.
10177
10178 * extensions.c: extension -> extension_t (and made a typedef).
10179
10180 * eval.h (SCM_IFRAME): cast to scm_bits_t, not int. just so
10181 there are no nasty surprises if/when the various deeply magic tag
10182 bits move somewhere else.
10183
10184 * eval.c: changed the locals used to store results of SCM_IFRAME,
10185 scm_ilength and such to be of type scm_bits_t (and not int/long).
10186 (iqq): depth, edepth: int -> scm_bits_t
10187 (scm_eval_stack): int -> scm_bits_t
10188 (SCM_CEVAL): various vars are not scm_bits_t instead of int.
10189 (check_map_args, scm_map, scm_for_each): len: long -> scm_bits_t
10190 i: int -> scm_bits_t
10191
10192 * environments.c: changed the many calls to scm_ulong2num to
10193 scm_ubits2num.
10194 (import_environment_fold): proc_as_ul: ulong -> scm_ubits_t
10195
10196 * dynwind.c (scm_dowinds): delta: long -> scm_bits_t
10197
10198 * debug.h: type renaming:
10199 scm_debug_info -> scm_debug_info_t
10200 scm_debug_frame -> scm_debug_frame_t
10201 the old names are deprecated, all in-Guile uses changed.
10202 (scm_debug_eframe_size): int -> scm_bits_t
10203
10204 * debug.c (scm_init_debug): use scm_c_define instead of the
10205 deprecated scm_define.
10206
10207 * continuations.h: type renaming:
10208 scm_contregs -> scm_contregs_t
10209 the old name is deprecated, all in-Guile uses changed.
10210 (scm_contregs_t.num_stack_items): size_t -> scm_bits_t
10211 (scm_contregs_t.num_stack_items): ulong -> scm_ubits_t
10212
10213 * continuations.c (scm_make_continuation): change the type of
10214 stack_size from long to scm_bits_t.
10215
10216 * ports.h: type renaming:
10217 scm_port_rw_active -> scm_port_rw_active_t (and made a typedef)
10218 scm_port -> scm_port_t
10219 scm_ptob_descriptor -> scm_ptob_descriptor_t
10220 the old names are deprecated, all in-Guile uses changed.
10221 (scm_port_t.entry): int -> scm_bits_t.
10222 (scm_port_t.line_number): int -> long.
10223 (scm_port_t.putback_buf_size): int -> size_t.
10224
10225 * __scm.h (long_long, ulong_long): deprecated (they pollute the
10226 global namespace and have little value beside that).
10227 (SCM_BITS_LENGTH): new, is the bit size of scm_bits_t (i.e. of an
10228 SCM handle).
10229 (ifdef spaghetti): include sys/types.h and sys/stdtypes.h, if they
10230 exist (for size_t & ptrdiff_t).
10231 (scm_sizet): deprecated.
10232
10233 * Makefile.am (noinst_HEADERS): add num2integral.i.c
10234
10235 2001-05-23 Marius Vollmer <mvo@zagadka.ping.de>
10236
10237 * snarf.h (SCM_CONST_LONG): Use SCM_VCELL_INIT instead of
10238 SCM_VARIABLE_INIT since that it what it used to be.
10239
10240 * deprecation.c (scm_include_deprecated_features): Make docstring
10241 ANSIsh. Thanks to Matthias Köppe!
10242
10243 2001-05-21 Marius Vollmer <mvo@zagadka.ping.de>
10244
10245 * symbols.c (scm_mem2symbol): Re-introduce indirect cell. It is
10246 needed for weak-key hashtables.
10247
10248 * procs.c (scm_make_subr_with_generic): Add missing last argument
10249 in call to scm_c_define_gsubr_with_generic. Thanks to Ariel Rios.
10250
10251 * eval.c: Use SCM_EQ_P instead of `==' or `!=' in certain
10252 places. (scm_c_improper_memq): Return 1 instead of SCM_BOOL_T.
10253
10254 * eval.h (SCM_EVALIM2): Use SCM_EQ_P instead of `=='.
10255
10256 2001-05-20 Marius Vollmer <mvo@zagadka.ping.de>
10257
10258 * symbols.c (scm_mem2symbol): Call `scm_must_strndup' instead of
10259 `duplicate_string'. Do not use an indirect cell, store symbol
10260 directly in collision list of hash table.
10261 (duplicate_string): Removed.
10262
10263 * init.c (scm_init_guile_1): Call scm_init_extensions.
10264
10265 * Makefile.am: Add "extensions.c" and related files in all the
10266 right places.
10267
10268 * extensions.h, extension.c: New files.
10269
10270 * gc.h, gc.c (scm_must_strdup, scm_must_strndup): New.
10271
10272 * modules.h (scm_system_module_env_p): Move out of deprecated
10273 section.
10274
10275 * rw.h (scm_init_rw): Added prototype.
10276
10277 * gsubr.h, gsubr.c (scm_c_make_gsubr, scm_c_define_gsubr,
10278 scm_c_make_gsubr_with_generic, scm_c_define_gsubr_with_generic):
10279 New functions. They replace scm_make_gsubr and
10280 scm_make_gsubr_with_generic. The `make' variants only create the
10281 gsubr object, while the `define' variants also put it into the
10282 current module. Changed all callers.
10283 (scm_make_gsubr, scm_make_gsubr_with_generic): Deprecated.
10284
10285 * procs.h, procs.c (scm_c_make_subr, scm_c_define_subr,
10286 scm_c_make_subr_with_generic, scm_c_define_subr_with_generic): New
10287 functions. They replace scm_make_subr, scm_make_subr_opt and
10288 scm_make_subr_with_generic. The `make' variants only create the
10289 subr object, while the `define' variants also put it into the
10290 current module. Changed all callers.
10291 (scm_make_subr, scm_make_subr_opt, scm_make_subr_with_generic):
10292 Deprecated.
10293
10294 * eval.c, gc.c, gh_funcs.c, goops.c, macros.c, pairs.c, ramap.c,
10295 rdelim.c, rw.c, scmsigs.c, snarf.h, values.c: Changed according to
10296 the comments above.
10297
10298 2001-05-19 Neil Jerram <neil@ossau.uklinux.net>
10299
10300 * throw.c (scm_lazy_catch): Slight docstring clarification.
10301
10302 2001-05-19 Marius Vollmer <mvo@zagadka.ping.de>
10303
10304 * throw.c: Lazy-catch handlers are no longer allowed to return.
10305 Fixed comments throughout.
10306 (scm_ithrow): Signal an error when a lazy-catch handler returns.
10307 Moved actual jump to jmpbuf into if-branch where the jmpbuf is
10308 recognized as such.
10309
10310 * version.c (s_scm_micro_version): Fix typo in FUNC_NAME, it
10311 refered to s_scm_minor_version previously.
10312
10313 * modules.h, modules.c: Moved around a lot of code so that
10314 deprecated features appear at the bottom.
10315 (root_module_lookup_closure, scm_sym_app, scm_sym_modules,
10316 module_prefix, make_modules_in_var, beautify_user_module_x_var,
10317 scm_the_root_module, scm_make_module, scm_ensure_user_module,
10318 scm_load_scheme_module): Deprecated.
10319 (scm_system_module_env_p): Return SCM_BOOL_T directly for
10320 environments corresponding to the root module.
10321 (convert_module_name, scm_c_resolve_module,
10322 scm_c_call_with_current_module, scm_c_define_module,
10323 scm_c_use_module, scm_c_export): New.
10324 (the_root_module): New static variant of scm_the_root_module. Use
10325 it everywhere instead of scm_the_root_module.
10326
10327 * fluids.h, fluids.c (scm_internal_with_fluids): Deprecated.
10328 (scm_c_with_fluids): Renamed from scm_internal_with_fluids.
10329 (scm_c_with_fluid): New.
10330 (scm_with_fluids): Use scm_c_with_fluids instead of
10331 scm_internal_with_fluids.
10332
10333 * goops.h, goops.c (scm_init_goops_builtins): Renamed from
10334 `scm_init_goops'. Do not explicitly create/switch modules.
10335 Return SCM_UNSPECIFIED.
10336 (scm_init_goops): Only register `%init-goops-builtins' procedure.
10337 (scm_load_goops): Use scm_c_resolve_module instead of
10338 scm_resolve_module.
10339
10340 * init.c (scm_init_guile_1): Call `scm_init_goops' instead of
10341 `scm_init_oop_goops_goopscore_module'. Call `scm_init_rdelim' and
10342 `scm_init_rw' prior to loading the startup files.
10343
10344 * rdelim.h, rdelim.c: (scm_init_rdelim_builtins): Renamed from
10345 scm_init_rdelim. Do not explicitly create/switch modules.
10346 Return SCM_UNSPECIFIED.
10347 (scm_init_rdelim): Only register `%init-rdelim-builtins'
10348 procedure.
10349
10350 * rw.c (scm_init_rw_builtins): Renamed from scm_init_rw. Do not
10351 explicitly create/switch modules. Return SCM_UNSPECIFIED.
10352 (scm_init_rw): Only register `%init-rw-builtins' procedure.
10353
10354 * script.c (scm_shell): Evaluate the compiled switches in the
10355 current module, not in the root module.
10356
10357 2001-05-18 Marius Vollmer <mvo@zagadka.ping.de>
10358
10359 * fluids.c (scm_c_with_fluids): Rename from
10360 scm_internal_with_fluids.
10361 (scm_internal_with_fluids): Deprecated.
10362 (scm_c_with_fluid): New.
10363
10364 2001-05-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
10365
10366 * print.h (PRINTH, SCM_PRINT_H): Renamed PRINTH to SCM_PRINT_H.
10367
10368 (SCM_PORT_WITH_PS_PORT, SCM_PORT_WITH_PS_PS): Only pairs may be
10369 accessed with SCM_C[AD]R.
10370
10371 (SCM_COERCE_OUTPORT): Removed redundant SCM_NIMP test.
10372
10373 2001-05-16 Rob Browning <rlb@cs.utexas.edu>
10374
10375 * version.c (s_scm_major_version): doc fixes.
10376 (s_scm_minor_version): doc fixes.
10377 (s_scm_minor_version): new function.
10378
10379 * version.h (scm_init_version): new function.
10380
10381 * versiondat.h.in: add GUILE_MICRO_VERSION.
10382
10383 2001-05-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
10384
10385 * deprecation.c (scm_init_deprecation): Renamed
10386 GUILE_WARN_DEPRECATED_DEFAULT to SCM_WARN_DEPRECATED_DEFAULT.
10387
10388 2001-05-16 Marius Vollmer <mvo@zagadka.ping.de>
10389
10390 * Makefile.am (cpp_sig_symbols.c, cpp_err_symbols.c): Make
10391 dependent on cpp_cnvt.awk
10392
10393 2001-05-15 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10394
10395 * script.c (scm_compile_shell_switches): New command line option
10396 `--use-srfi' for loading a list of SRFIs on startup.
10397 (scm_shell_usage): Added `--use-srfi' to help message.
10398
10399 2001-05-10 Marius Vollmer <mvo@zagadka.ping.de>
10400
10401 Merged from mvo-vcell-cleanup-1-branch.
10402
10403 The concept of vcells has been removed from Guile. With it,
10404 explicit obarrays and associated operations are gone. Use
10405 hashtables instead of obarrays.
10406
10407 Throughout: use scm_sym2var instead of scm_sym2vcell and treat
10408 result as variable instead of vcell. Glocs no longer point to a
10409 vcell but to a variable. Use scm_c_define instead of
10410 scm_sysintern and treat the result as a variable (which it is),
10411 not a vcell.
10412
10413 * variable.c, variable.h (SCM_VARVCELL, SCM_UDVARIABLEP,
10414 SCM_DEFVARIABLEP): Deprecated.
10415 (SCM_VARIABLE_REF, SCM_VARIABLE_SET, SCM_VARIABLE_LOC): New.
10416 (variable_print): Do not print name of variable.
10417 (variable_equalp): Compare values, not vcells.
10418 (anonymous_variable_sym): Removed.
10419 (make_vcell_variable): Removed.
10420 (make_variable): New, as replacement.
10421 (scm_make_variable, scm_make_undefined_variable): Do not take name
10422 hint parameter.
10423 (scm_variable_ref): Check for SCM_UNDEFINED and throw "unbound"
10424 error in that case.
10425 (scm_builtin_variable): Deprecated.
10426
10427 * symbols.c, symbols.h (scm_sym2vcell, scm_sym2ovcell_soft,
10428 scm_sym2ovcell, scm_intern_obarray_soft, scm_intern_obarray,
10429 scm_intern, scm_intern0, scm_sysintern0_no_module_lookup,
10430 scm_sysintern, scm_sysintern0, scm_symbol_value0,
10431 scm_string_to_obarray_symbol, scm_intern_symbol,
10432 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned,
10433 scm_symbol_bound_p, scm_symbol_set_x, scm_gentmp, gentmp_counter):
10434 Deprecated and moved to "symbols-deprecated.c".
10435 (copy_and_prune_obarray, scm_builtin_bindings): Removed.
10436 (scm_init_symbols): Call scm_init_symbols_deprecated.
10437 * symbols-deprecated.c: New file.
10438 * Makefile.am: Added symbols-deprecated.c and related files in all
10439 the right places.
10440
10441 * snarf.h (SCM_VCELL, SCM_GLOBAL_VCELL, SCM_VCELL_INIT,
10442 SCM_GLOBAL_VCELL_INIT): Deprecated.
10443 (SCM_VARIABLE, SCM_GLOBAL_VARIABLE, SCM_VARIABLE_INIT,
10444 SCM_GLOBAL_VARIABLE_INIT): New, as replacement. Changed all uses.
10445
10446 * print.c (scm_iprin1): Use scm_module_reverse_lookup instead of
10447 SCM_GLOC_SYM.
10448
10449 * evalext.c, filesys.c, fports.c, gdbint.c, gh_data.c, gsubr.c,
10450 hooks.c, load.c, numbers.c, objects.c, ports.c, posix.c, procs.c,
10451 ramap.c, random.c, read.c, regex-posix.c, scmsigs.c, script.c,
10452 socket.c, srcprop.c, stacks.c, stime.c, struct.c, tag.c, throw.c:
10453 Changed according to the `throughout' comments.
10454
10455 * modules.h, modules.c (scm_module_system_booted_p): Changed type
10456 to `int'.
10457 (scm_module_type): Removed.
10458 (the_root_module): Renamed to the_root_module_var. Now points to
10459 a variable instead of a vcell. Updated all uses.
10460 (scm_the_root_module): Return SCM_BOOL_F when module systems
10461 hasn't been booted yet.
10462 (SCM_VALIDATE_STRUCT_TYPE): Removed.
10463 (scm_post_boot_init_modules): Made static.
10464 (scm_set_current_module): Call scm_post_boot_init_modules on first
10465 call.
10466 (make_modules_in, beautify_user_module_x, resolve_module,
10467 try_module_autoload, module_make_local_var_x): Tacked on "_var"
10468 suffix. Now point to variables instead of vcells. Updated all
10469 uses.
10470 (scm_module_lookup_closure): Deal with the module being SCM_BOOL_F
10471 and return SCM_BOOL_F in that case.
10472 (scm_module_transformer): Likewise.
10473 (sym_module, scm_lookup_closure_module, scm_env_module): New.
10474 (SCM_F_EVAL_CLOSURE_INTERFACE, SCM_EVAL_CLOSURE_INTERFACE_P): New.
10475 (scm_eval_closure_lookup): Do not allow new definitions when
10476 `interface' flag is set.
10477 (scm_standard_interface_eval_closure): New.
10478 (scm_pre_modules_obarray, scm_sym2var, scm_module_lookup,
10479 scm_lookup, scm_module_define, scm_define, scm_c_module_lookup,
10480 scm_c_lookup, scm_c_module_define, scm_c_define,
10481 scm_module_reverse_lookup, scm_get_pre_modules_obarray,
10482 scm_modules_prehistory): New.
10483 (scm_post_boot_init_modules): Use scm_c_define and scm_c_lookup
10484 instead of scm_intern0.
10485
10486 * macros.c (scm_make_synt): Return SCM_UNSPECIFIED instead of the
10487 symbol.
10488
10489 * keywords.c (s_scm_make_keyword_from_dash_symbol): Use a regular
10490 hashtable operations to maintain the keywords, not obarray ones.
10491
10492 * init.c (scm_load_startup_files): Do not call
10493 scm_post_boot_init_modules. This is done by
10494 scm_set_current_module now.
10495 (scm_init_guile_1): Call scm_modules_prehistory. Call
10496 scm_init_variable early on.
10497
10498 * goops.c (s_scm_sys_goops_loaded): Get
10499 var_compute_applicable_methods from scm_sym2var, not from a direct
10500 invocation of scm_goops_lookup_closure.
10501
10502 * gh_funcs.c (gh_define): Return SCM_UNSPECIFIED instead of vcell.
10503
10504 * gc.c: Added simple debugging hack to mark phase of GC: When
10505 activated, do not tail-call scm_gc_mark. This gives nice
10506 backtraces.
10507 (scm_unhash_name): Removed.
10508
10509 * feature.c (features): Renamed to features_var. Now points to a
10510 variable instead of a vcell. Updated all uses.
10511
10512 * eval.h (SCM_TOP_LEVEL_LOOKUP_CLOSURE): Use
10513 `scm_current_module_lookup_closure' which will do the right thing
10514 when the module system hasn't been booted yet.
10515 (SCM_GLOC_SYM): Removed.
10516 (SCM_GLOC_VAR, SCM_GLOC_SET_VAL): New.
10517 (SCM_GLOC_VAL, SCM_GLOC_LOC): Reimplemented in terms of variables.
10518
10519 * eval.c (scm_lookupcar, scm_lookupcar1): Deal with variables
10520 instead of with vcells. Do not overwrite `var' with the result of
10521 the lookup, use the new `real_var' instead. Remove `var2' in
10522 exchange (which was only used with threads).
10523 (sym_three_question_marks): New.
10524 (scm_unmemocar): Use `scm_module_reverse_lookup' instead of
10525 `SCM_GLOC_SYM'.
10526 (scm_lisp_nil, scm_lisp_t): Directly define as symbols.
10527 (scm_m_atfop): Expect the function definition to be a variable
10528 instead of a vcell.
10529 (scm_macroexp): Do not use `unmemocar', explicitely remember the
10530 symbol instead.
10531 (scm_unmemocopy): Removed thoughts about anti-macro interface.
10532 (scm_eval_args): Use more explicit code in the gloc branch of the
10533 atrocious struct ambiguity test. The optimizer will sort this
10534 out.
10535 (scm_deval_args): Likewise.
10536 (SCM_CEVAL): Likewise. Also, do not use unmemocar, explicitely
10537 remember the symbol instead. Added some comments where
10538 scm_tc3_cons_gloc really exclusively refers to structs.
10539 (scm_init_eval): Use scm_define to initialize "nil" and "t" to
10540 scm_lisp_nil and scm_lisp_t, respectively. Use scm_define instead
10541 of scm_sysintern in general.
10542
10543 * dynwind.c (scm_swap_bindings): Use SCM_GLOC_SET_VAL instead of
10544 explicit magic.
10545
10546 * debug.c (s_scm_make_gloc): Only allow proper variables, no
10547 pairs. Put the variable directly in the gloc.
10548 (s_scm_gloc_p): Use `scm_tc3_cons_gloc' instead of the magic `1'.
10549 (scm_init_debug): Use scm_c_define instead scm_sysintern.
10550
10551 * cpp_cnvt.awk: Emit "scm_c_define" instead of "scm_sysintern".
10552
10553 * backtrace.h, backtrace.c (scm_the_last_stack_fluid): Renamed to
10554 scm_the_last_stack_fluid_var. It now points to a variable instead
10555 of a vcell. Updated all uses.
10556 (scm_has_shown_backtrace_hint_p_var): Now points to a variable
10557 instead of a vcell. Updated all uses.
10558
10559 * _scm.h: Include "variables.h" and "modules.h" since almost
10560 everybody needs them now.
10561
10562 * root.h (scm_symhash, scm_symhash_vars): Removed.
10563 * gc.c (scm_init_storage): Do not initialize them.
10564
10565 2001-05-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
10566
10567 * eval.c (scm_init_eval): Initialize scm_undefineds and
10568 scm_listofnull.
10569
10570 * gc.c (scm_debug_newcell, scm_debug_newcell2): Fixed to behave
10571 like the SCM_NEWCELL macro counterparts.
10572
10573 (scm_init_storage, scm_init_gc): Moved initialization of
10574 scm_tc16_allocated from scm_init_gc to scm_init_storage.
10575
10576 (scm_init_storage): Moved initialization of scm_undefineds and
10577 scm_listofnull to eval.c, initializion of scm_nullstr to
10578 strings.c, initializion of scm_nullvect to vectors.c.
10579
10580 * gc.h (SCM_NEWCELL, SCM_NEWCELL2): Prefer SCM_NULLP over
10581 SCM_IMP, as in scm_debug_newcell and scm_debug_newcell2.
10582
10583 * init.c (scm_init_guile_1): Reordered some initializations and
10584 added dependcy information comments.
10585
10586 * load.c (scm_init_load): Use scm_nullstr.
10587
10588 * strings.c (scm_init_strings): Initialize scm_nullstr.
10589
10590 * vectors.c (scm_init_vectors): Initialize scm_nullvect.
10591
10592 2001-05-15 Marius Vollmer <mvo@zagadka.ping.de>
10593
10594 * values.c (print_values): Print as a unreadable object, not as
10595 multiple lines. Thanks to Matthias Köppe!
10596
10597 2001-05-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
10598
10599 * deprecation.c: Fixed copyright date.
10600
10601 * deprecation.h (DEPRECATION_H, SCM_DEPRECATION_H): Renamed
10602 DEPRECATION_H to SCM_DEPRECATION_H.
10603
10604 2001-05-10 Thien-Thi Nguyen <ttn@revel.glug.org>
10605
10606 * guile-doc-snarf.in: Update copyright.
10607 Fix relative path bug. Thanks to Sergey Poznyakoff.
10608
10609 2001-05-10 Marius Vollmer <mvo@zagadka.ping.de>
10610
10611 * ports.c (scm_port_revealed, scm_set_port_revealed_x): Only
10612 accept open ports. Thanks to Quetzalcoatl Bradley!
10613
10614 2001-05-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10615
10616 * procs.c: Increased `scm_subr_table_room' to 800 because Guile now
10617 has 779 primitives on startup.
10618
10619 2001-05-09 Marius Vollmer <mvo@zagadka.ping.de>
10620
10621 * eval.c (scm_i_eval): Copy expression before passing it to
10622 SCM_XEVAL. The copy operation was removed unintendedly during my
10623 change on 2001-03-25.
10624
10625 2001-05-09 Michael Livshin <mlivshin@bigfoot.com>
10626
10627 from Matthias Köppe (thanks!):
10628
10629 * ports.c (scm_c_read): pointer arithmetic on void pointers isn't
10630 portable.
10631
10632 * deprecation.c (s_scm_include_deprecated_features): ANSI'fied the
10633 docstring.
10634
10635 2001-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
10636
10637 * gc.c (scm_init_gc): Added FIXME comment.
10638
10639 * hooks.c: Since hooks don't have a name any more, it is not
10640 necessary to include objprop.h.
10641
10642 (hook_print, scm_add_hook_x): Replace SCM_NFALSEP by !SCM_FALSEP.
10643
10644 (symbol_name, scm_make_hook_with_name): Removed.
10645
10646 (scm_create_hook): Don't set the hook's name property.
10647
10648 * hooks.h (HOOKSH, SCM_HOOKS_H): Renamed HOOKSH to SCM_HOOKS_H.
10649
10650 (SCM_HOOK_NAME, scm_make_hook_with_name): Removed.
10651
10652 * init.c (scm_init_guile_1): Hooks don't use objprops any more.
10653
10654 * numbers.c (SCM_FLOBUFLEN, FLOBUFLEN, scm_number_to_string,
10655 scm_print_real, scm_print_complex): Renamed SCM_FLOBUFLEN to
10656 FLOBUFLEN and define it unconditionally.
10657
10658 2001-05-07 Marius Vollmer <mvo@zagadka.ping.de>
10659
10660 * gh_data.c (gh_lookup): Call gh_module_lookup with
10661 `scm_current_module ()', not `#f'.
10662 (gh_module_lookup): Expect a module instead of an obarray as first
10663 argument and do lookup in that module.
10664
10665 * ramap.c (raeql_1): Do not call scm_uniform_vector_length on
10666 arrays. The length of array is already determined differently and
10667 scm_uniform_vector_length does not work on arrays.
10668
10669 2001-05-06 Marius Vollmer <mvo@zagadka.ping.de>
10670
10671 * snarf.h (SCM_FUNC_CAST_ARBITRARY_ARGS): Use "SCM (*)()" for C++
10672 as well. "SCM (*)(...)" does not work on RedHat 7.1.
10673
10674 * __scm.h (SCM_WTA_DISPATCH_0): Removed ARG and POS parameters,
10675 they are not used. Changed `wrong type' error into `wrong num
10676 args' error. Changed all callers.
10677
10678 * numbers.c (scm_difference): Call SCM_WTA_DISPATCH_0 when zero
10679 arguments are supplied.
10680
10681 2001-05-05 Thien-Thi Nguyen <ttn@revel.glug.org>
10682
10683 * regex-posix.c (scm_regexp_exec): Expand docstring to briefly
10684 describe `regexp/notbol' and `regexp/noteol' execution flags.
10685
10686 * strop.c (scm_substring_move_x): Doc fix; nfc.
10687
10688 2001-05-05 Marius Vollmer <mvo@zagadka.ping.de>
10689
10690 * objects.c, objects.h (scm_valid_object_procedure_p): New.
10691 (scm_set_object_procedure_x): Use it to check argument. Fix
10692 docstring.
10693
10694 * evalext.c (scm_definedp): Fix docstring.
10695
10696 2001-05-05 Gary Houston <ghouston@arglist.com>
10697
10698 * socket.c: use HAVE_IPV6 instead of AF_INET6 to enable IPv6
10699 support.
10700
10701 2001-05-04 Neil Jerram <neil@ossau.uklinux.net>
10702
10703 * eval.c (scm_promise_p), list.c (scm_append_x, scm_reverse_x),
10704 symbols.c (scm_symbol_to_string), vports.c (scm_make_soft_port):
10705 Change R4RS references to R5RS.
10706
10707 * guile-snarf.awk.in: Fixes so that (i) blank lines in the
10708 docstring source are correctly reproduced in the output (ii)
10709 we don't anymore get occasional trailing quotes. Also reorganized
10710 and commented the code a little.
10711
10712 * scmsigs.c (scm_raise), throw.c (scm_throw): Docstring format
10713 fixes.
10714
10715 2001-05-04 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10716
10717 * strop.c (scm_string_split): New procedure.
10718
10719 * strop.h (scm_string_split): Added prototype.
10720
10721 2001-05-04 Gary Houston <ghouston@arglist.com>
10722
10723 * socket.c: define uint32_t if netdb.h doesn't. thanks to
10724 Dale P. Smith.
10725
10726 2001-05-02 Marius Vollmer <mvo@zagadka.ping.de>
10727
10728 * rw.c: Include "modules.h" and "strports.h".
10729
10730 * net_db.h (scm_gethost): Added prototype.
10731
10732 * deprecation.h, deprecation.c: New.
10733 * Makefile.am (libguile_la_SOURCES): Added "deprecation.c".
10734 (DOT_X_FILES): Added "deprecation.x".
10735 (modinclude_HEADERS): Added "deprecation.h".
10736
10737 * init.c: Include "deprecation.h".
10738 (scm_init_guile_1): Call scm_init_deprecation.
10739
10740 2001-05-01 Marius Vollmer <mvo@zagadka.ping.de>
10741
10742 * gh.h (gh_init_guile, gh_make_string, gh_string_length,
10743 gh_string_ref, gh_string_set_x, gh_substring, gh_string_append):
10744 New.
10745
10746 2001-04-29 Gary Houston <ghouston@arglist.com>
10747
10748 * rw.c: new file, implementing C part of module (ice-9 rw).
10749 (scm_read_string_x_partial): moved from ioext.c
10750 (scm_init_rw): new proc.
10751 * rw.h: new file.
10752 init.c: include rw.h and call scm_init_rw.
10753 Makefile.am: include rw.c and rw.h.
10754
10755 2001-04-28 Rob Browning <rlb@cs.utexas.edu>
10756
10757 * numbers.c: enabled local definition of SCM_FLOBUFLEN until we
10758 know what's supposed to happen to it.
10759
10760 * list.h (scm_list_star): deprecation expired - removed.
10761
10762 * numbers.h (scm_dblproc): deprecation expired - removed.
10763 (SCM_UNEGFIXABLE): deprecation expired - removed.
10764 (SCM_FLOBUFLEN): deprecation expired - removed.
10765 (SCM_INEXP): deprecation expired - removed.
10766 (SCM_CPLXP): deprecation expired - removed.
10767 (SCM_REAL): deprecation expired - removed.
10768 (SCM_IMAG): deprecation expired - removed.
10769 (SCM_REALPART): deprecation expired - removed.
10770 (scm_makdbl): deprecation expired - removed.
10771 (SCM_SINGP): deprecation expired - removed.
10772 (SCM_NUM2DBL): deprecation expired - removed.
10773 (SCM_NO_BIGDIG): deprecation expired - removed.
10774
10775 * tags.h (SCM_DOUBLE_CELLP): deprecation expired - removed.
10776 (scm_tc_dblr): deprecation expired - removed.
10777 (scm_tc_dblc): deprecation expired - removed.
10778 (scm_tc16_flo): deprecation expired - removed.
10779 (scm_tc_flo): deprecation expired - removed.
10780
10781 * tag.h (scm_tag): deprecation expired - removed.
10782
10783 * tag.c: (scm_tag): deprecation expired - removed.
10784
10785 * ioext.c: (scm_fseek): deprecation expired - removed.
10786
10787 * ioext.h (scm_fseek): deprecation expired - removed.
10788
10789 * gh_data.c (gh_int2scmb): deprecation expired - removed.
10790
10791 * gh.h (gh_int2scmb): deprecation expired - removed.
10792
10793 2001-04-28 Neil Jerram <neil@ossau.uklinux.net>
10794
10795 * stacks.c (scm_make_stack): Fix typo in docstring.
10796
10797 2001-04-27 Rob Browning <rlb@cs.utexas.edu>
10798
10799 * error.c (scm_sysmissing): deprecation expired - removed.
10800
10801 * error.h (scm_sysmissing): deprecation expired - removed.
10802
10803 * gc.c
10804 (scm_init_gc): gc-thunk deprecation expired - removed.
10805 (scm_gc_vcell): deprecation expired - removed.
10806 (gc_async_thunk): scm_gc_vcell related code removed.
10807
10808 * vectors.h (SCM_NVECTORP): deprecation expired - removed.
10809
10810 * strings.h
10811 (SCM_NSTRINGP): deprecation expired - removed.
10812 (SCM_NRWSTRINGP): deprecation expired - removed.
10813
10814 * continuations.h (SCM_SETJMPBUF): deprecation expired - removed.
10815
10816 * chars.h
10817 (SCM_ICHRP): deprecation expired - removed.
10818 (SCM_ICHR): deprecation expired - removed.
10819 (SCM_MAKICHR): deprecation expired - removed.
10820
10821 * ports.h
10822 (SCM_INPORTP): deprecation expired - removed.
10823 (SCM_OUTPORTP): deprecation expired - removed.
10824
10825 2001-04-25 Marius Vollmer <mvo@zagadka.ping.de>
10826
10827 * modules.c (scm_module_type): New.
10828 (scm_post_boot_init_modules): Initialize from Scheme value.
10829 (the_module, scm_current_module, scm_init_modules): the_module is
10830 now a C only fluid.
10831 (scm_current_module): Export to Scheme.
10832 (scm_set_current_module): Do not call out to Scheme, do all the
10833 work in C. Export procedure to Scheme. Only accept modules, `#f'
10834 is no longer valid as the current module. Only set
10835 scm_top_level_lookup_closure_var and scm_system_transformer when
10836 they are not deprecated.
10837 (scm_module_transformer, scm_current_module_transformer): New.
10838
10839 * modules.h (scm_module_index_transformer, SCM_MODULE_TRANSFORMER,
10840 scm_current_module_transformer, scm_module_transformer): New.
10841
10842 * gh_data.c: Removed FIXME comment about gh_lookup returning
10843 SCM_UNDEFINED. That's the right thing to do.
10844
10845 * eval.h, eval.c (scm_system_transformer): Deprecated by moving it
10846 into the conditionally compiled sections.
10847 * eval.c (scm_primitive_eval_x, scm_primitive_eval): Use
10848 scm_current_module_transformer instead of scm_system_transformer.
10849 * init.c (start_stack): Move initialization of
10850 scm_system_transformer to the deprecated section.
10851
10852 2001-04-22 Neil Jerram <neil@ossau.uklinux.net>
10853
10854 * throw.c (scm_throw): Correct docstring.
10855
10856 2001-04-22 Gary Houston <ghouston@arglist.com>
10857
10858 * socket.c: attempted to improve the docstrings slightly.
10859
10860 * net_db.c: remove bogus "close" declaration.
10861 (inet_aton declaration, scm_inet_aton, scm_inet_ntoa,
10862 scm_inet_netof, scm_lnaof, scm_inet_makeaddr, INADDR_ANY etc.):
10863 moved to socket.c.
10864 * net_db.h: declarations moved too.
10865
10866 * socket.c (scm_htonl, scm_ntohl): use uint32_t instead of unsigned
10867 long.
10868 (ipv6_net_to_num, ipv6_num_to_net): new static procedures.
10869 (VALIDATE_INET6): new macro.
10870 (scm_inet_pton, scm_inet_ntop): new procedures, implementing
10871 inet-pton and inet-ntop.
10872 (scm_fill_sockaddr): use VALIDATE_INET6 and ipv6_num_to_net.
10873 (scm_addr_vector): use ipv6_net_to_num.
10874
10875 2001-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
10876
10877 * eq.c (scm_equal_p), ramap.c (scm_init_ramap): Don't compute the
10878 smob number explicitly. Use SCM_TC2SMOBNUM instead.
10879
10880 * gc.c (MARK, scm_gc_sweep): Only check for illegal heap objects
10881 when compiled in debug mode.
10882
10883 (scm_gc_sweep): Only call smob's free function if it is defined.
10884
10885 * print.c (scm_iprin1): No need to check for validity of smob
10886 type or existence of print function.
10887
10888 * smob.[ch] (scm_smobs): Made into a fixed size global array.
10889 Resizing will not work well with preemptive threading.
10890
10891 * smob.c (scm_smob_print): Don't use SCM_CDR to access smob data.
10892
10893 (scm_make_smob_type): Extracted initialization of smob
10894 descriptors to scm_smob_prehistory. Don't use scm_numsmob outside
10895 of the critical section.
10896
10897 (scm_smob_prehistory): Initialize all smob descriptors. By
10898 default, don't assign a smob free function: Most smob types don't
10899 need one.
10900
10901 * smob.h (SMOBH, SCM_SMOB_H): Renamed SMOBH to SCM_SMOB_H.
10902
10903 2001-04-21 Gary Houston <ghouston@arglist.com>
10904
10905 * socket.c (FLIP_NET_HOST_128): new macro.
10906 (scm_fill_sockaddr): use new macro.
10907 (scm_addr_vector): completed IPv6 address support. added const
10908 to the address parameter.
10909
10910 2001-04-20 Gary Houston <ghouston@arglist.com>
10911
10912 * socket.c (scm_fill_sockaddr): call htons for sin6_port.
10913 Don't assign sin6_scope_id in structure unless HAVE_SIN6_SCOPE_ID
10914 is defined.
10915 (scm_addr_vector): use a switch instead of multiple if statements.
10916 Add support for IPv6 (incomplete) .
10917 MAX_ADDR_SIZE: increase to size of struct sockaddr_in6 if needed.
10918
10919 2001-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
10920
10921 * struct.c (scm_free_structs): Only pairs may be accessed with
10922 SCM_C[AD]R.
10923
10924 2001-04-19 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
10925
10926 * unif.h (SCM_ARRAY_CONTIGUOUS): Reintroduced as deprecated.
10927
10928 * __scm.h (SCM_WTA_DISPATCH_0, SCM_WTA_DISPATCH_1,
10929 SCM_WTA_DISPATCH_2, SCM_WTA_DISPATCH_n): Inserted required
10930 parentheses in order to get the correct associativity.
10931
10932 2001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
10933
10934 * unif.c (scm_array_to_list): Added missing handling of arrays of
10935 bytes. Thanks to Masao Uebayashi for the bug report.
10936
10937 2001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
10938
10939 * debug.c (scm_procedure_source): Use SCM_CLOSURE_FORMALS more
10940 consistently.
10941
10942 2001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
10943
10944 * procs.h (SCM_CLOSURE_FORMALS): New macro.
10945
10946 * debug.c (scm_procedure_source), eval.c (scm_badformalsp,
10947 SCM_CEVAL, SCM_APPLY), goops.c (get_slot_value, set_slot_value),
10948 procprop.c (scm_i_procedure_arity), sort.c (closureless): Use
10949 SCM_CLOSURE_FORMALS.
10950
10951 * eval.c (scm_badformalsp, SCM_CEVAL), procprop.c
10952 (scm_i_procedure_arity): Prefer stronger predicates like
10953 SCM_NULLP or SCM_FALSEP over SCM_IMP.
10954
10955 * macros.c (macro_print): Extracted macro printing code from
10956 print.c and simplified it.
10957
10958 (scm_macro_type): Use SCM_MACRO_TYPE;
10959
10960 (scm_init_macros): Use macro_print for printing macros.
10961
10962 * print.c (scm_print_opts): Improved option documentation.
10963
10964 (scm_iprin1): Extracted printing of macros to macros.c.
10965 Simplified printing of ordinary closures.
10966
10967 * procs.c (scm_thunk_p): Fixed handling of closures. Thanks to
10968 Martin Grabmueller for the bug report.
10969
10970 2001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
10971
10972 This patch eliminates some further applications of SCM_C[AD]R to
10973 non pair cells.
10974
10975 * gc.h (SCM_SETAND_CAR, SCM_SETOR_CAR): Deprecated. These have
10976 never been applied to real pairs.
10977
10978 * srcprop.h (SCM_SOURCE_PROPERTY_FLAG_BREAK): Added.
10979
10980 (SRCPROPBRK): Use SCM_SOURCE_PROPERTY_FLAG_BREAK.
10981
10982 * unif.h (SCM_ARRAY_CONTIGUOUS, SCM_ARRAY_FLAG_CONTIGUOUS,
10983 SCM_ARRAY_CONTP): Renamed SCM_ARRAY_CONTIGUOUS to
10984 SCM_ARRAY_FLAG_CONTIGUOUS and use it.
10985
10986 (SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG):
10987 Added.
10988
10989 * srcprop.h (SRCPROPH), unif.h (UNIFH): Renamed to
10990 SCM_SOURCE_PROPERTIES_H and SCM_UNIFORM_VECTORS_H, respectively.
10991
10992 * srcprop.h (SETSRCPROPBRK, CLEARSRCPROPBRK), unif.c
10993 (scm_dimensions_to_uniform_array, scm_ra_set_contp): Don't use
10994 SCM_SET{AND,OR}_CAR.
10995
10996 2001-04-17 Gary Houston <ghouston@arglist.com>
10997
10998 * some initial support for IPv6:
10999
11000 * socket.c (scm_fill_sockaddr): improve the argument validation.
11001 don't allocate memory until all args are checked. instead of
11002 unconditional memset of soka, try setting sin_len to 0 if
11003 SIN_LEN is defined. add support for AF_INET6. define FUNC_NAME.
11004 (scm_socket, scm_connect): extend docstrings for IPv6.
11005 (scm_init_socket): intern AF_INET6 and PF_INET6.
11006
11007 2001-04-17 Niibe Yutaka <gniibe@m17n.org>
11008
11009 * srcprop.c (scm_make_srcprops): Added SCM_ALLOW_INTS which
11010 matches SCM_DEFER_INTS at the beginning of the function.
11011
11012 * mallocs.c (scm_malloc_obj): Remove un-matched SCM_ALLOW_INTS.
11013
11014 * gc.c (scm_igc): Unconditionally call
11015 SCM_CRITICAL_SECTION_START/END.
11016
11017 * fluids.c (next_fluid_num): Unconditionally call
11018 SCM_CRITICAL_SECTION_START/END.
11019 (s_scm_make_fluid): Remove un-matched SCM_DEFER_INTS.
11020
11021 * coop-defs.h (SCM_THREAD_DEFER, SCM_THREAD_ALLOW,
11022 SCM_THREAD_REDEFER, SCM_THREAD_REALLOW_1, SCM_THREAD_REALLOW_2):
11023 Removed.
11024
11025 * __scm.h (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END):
11026 Defined as nothing for the case of !defined(USE_THREADS).
11027 (SCM_THREAD_DEFER, SCM_THREAD_ALLOW, SCM_THREAD_REDEFER):
11028 Removed.
11029 (<stdio.h>): Include when (SCM_DEBUG_INTERRUPTS == 1).
11030 (SCM_CHECK_NOT_DISABLED, SCM_CHECK_NOT_ENABLED): Print FILE and
11031 LINE.
11032 (SCM_DEFER_INTS, SCM_ALLOW_INTS_ONLY, SCM_ALLOW_INTS,
11033 SCM_REDEFER_INTS, SCM_REALLOW_INTS): Don't use
11034 SCM_THREAD_DEFER/SCM_THREAD_ALLOW. Instead, use
11035 SCM_CRITICAL_SECTION_START/END.
11036 (SCM_REALLOW_INTS: Bug fix. Don't call
11037 SCM_THREAD_SWITCHING_CODE.
11038 (SCM_TICK): Don't use SCM_DEFER_INTS/SCM_ALLOW_INTS. Instead, use
11039 SCM_THREAD_SWITCHING_CODE directly.
11040 (SCM_ENTER_A_SECTION): Unconditionally use
11041 SCM_CRITICAL_SECTION_START/END. (was:
11042 SCM_DEFER_INTS/SCM_ALLOW_INTS when SCM_POSIX_THREADS defined).
11043
11044 2001-04-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
11045
11046 * __scm.h (SCM_CAREFUL_INTS, SCM_DEBUG_INTERRUPTS): Replaced the
11047 macro SCM_CAREFUL_INTS by the macro SCM_DEBUG_INTERRUPTS and
11048 allowed to explicitly set this macro via the CFLAGS variable
11049 during make.
11050
11051 * fluids.c (next_fluid_num), gc.c (scm_igc), coop-defs.h
11052 (SCM_THREAD_CRITICAL_SECTION_START,
11053 SCM_THREAD_CRITICAL_SECTION_END): Renamed
11054 SCM_THREAD_CRITICAL_SECTION_START/END to
11055 SCM_CRITICAL_SECTION_START/END.
11056
11057 2001-04-11 Keisuke Nishida <kxn30@po.cwru.edu>
11058
11059 * debug-malloc.c (grow, scm_debug_malloc_prehistory): Use memset
11060 instead of bzero.
11061
11062 * coop.c, iselect.c (FD_ZERO_N): Unconditionally use memset.
11063 (MISSING_BZERO_DECL): Remove the declaration.
11064
11065 Thanks to NIIBE Yutaka.
11066
11067 2001-04-10 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11068
11069 * init.c, goops.c, goops.h: Reverted change of 2001-03-29. (The
11070 goops module should be registered in order to work for an
11071 application which uses libguile statically linked.)
11072
11073 2001-04-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
11074
11075 * numbers.[ch] (scm_num2long, scm_num2long_long,
11076 scm_num2ulong_long, scm_num2ulong): Argument position is an
11077 unsigned integer.
11078
11079 * environments.c (eval_environment_folder,
11080 import_environment_folder), gh_data.c (gh_scm2longs,
11081 gh_scm2floats, gh_scm2doubles): Distinguish between 0 and NULL
11082 for integers and pointers, respectively.
11083
11084 * gh_data.c (gh_scm2ulong, gh_scm2long, gh_scm2int), socket.c
11085 (scm_fill_sockaddr), unif.c (scm_array_set_x), validate.h
11086 (SCM_NUM2ULONG, SCM_NUM2LONG, SCM_NUM2LONG_DEF,
11087 SCM_NUM2LONG_LONG): Don't pass argument positions as pointers.
11088
11089 * filesys.c (scm_open_fdes, scm_open), net_db (scm_inet_ntoa,
11090 scm_inet_netof, scm_lnaof, scm_gethost, scm_getproto), posix.c
11091 (scm_utime), ramap.c (scm_array_fill_int), scmsigs.c
11092 (scm_sigaction), socket.c (scm_htonl, scm_ntohl, scm_sendto),
11093 stime.c (scm_localtime, scm_gmtime), struct.c (scm_struct_set_x),
11094 validate.h (SCM_VALIDATE_LONG_COPY): Whitespace fixes.
11095
11096 2001-04-09 Neil Jerram <neil@ossau.uklinux.net>
11097
11098 * strings.c (scm_read_only_string_p): Update docstring to reflect
11099 current (non-)usage of "read only" strings.
11100 (scm_make_shared_substring): Clarify docstring by changing
11101 "semantics" to "arguments".
11102
11103 2001-04-06 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11104
11105 * hooks.c (scm_make_hook, scm_make_hook_with_name),
11106 (scm_hook_p, scm_hook_empty_p, scm_run_hook): Docstring
11107 improvements.
11108
11109 2001-04-03 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11110
11111 The following changes make the documentation more consistent.
11112
11113 * rdelim.c (scm_write_line), posix.c (scm_utime), ports.c
11114 (scm_seek), net_db.c (scm_inet_aton, scm_inet_ntoa),
11115 (scm_inet_netof, scm_lnaof, scm_inet_makeaddr), ioext.c
11116 (scm_ftell): Changed @smalllisp ... @end smalllisp to @lisp
11117 ... @end lisp.
11118
11119 * vports.c (scm_make_soft_port), version.c (scm_version), unif.c
11120 (scm_array_dimensions, scm_make_shared_array),
11121 (scm_transpose_array, scm_enclose_array, scm_bit_count_star),
11122 throw.c (scm_catch), struct.c (scm_make_vtable_vtable), strop.c
11123 (scm_string_rindex, scm_string_index, scm_substring_fill_x),
11124 (scm_string_null_p), strings.c (scm_read_only_string_p), root.c
11125 (scm_call_with_dynamic_root), ramap.c (scm_array_index_map_x),
11126 posix.c (scm_mknod), numbers.c (scm_logtest, scm_logbit_p),
11127 macros.c (scm_makmmacro), list.c (scm_append), environments.c
11128 (scm_environment_fold), dynwind.c (s_scm_dynamic_wind): Changed
11129 @example ... @end example to @lisp ... @end lisp.
11130
11131 * weaks.c (scm_weak_vector): Corrected docstring.
11132
11133 * hashtab.c (scm_hashq_ref, scm_hashq_set_x, scm_hashq_remove_x),
11134 (scm_hashv_ref, scm_hashv_set_x, scm_hashv_remove_x),
11135 (scm_hash_ref, scm_hash_set_x, scm_hash_remove_x, scm_hashx_ref),
11136 (scm_hashx_set_x, scm_hashx_get_handle),
11137 (scm_hashx_create_handle_x), regex-posix.c (scm_make_regexp),
11138 (scm_regexp_exec, scm_regexp_p), numbers.c (scm_logtest),
11139 vectors.c (scm_vector_fill_x), strings.c
11140 (scm_make_shared_substring), symbols.c (scm_string_to_symbol),
11141 objprop.c (scm_set_object_properties_x):
11142 (scm_set_object_property_x), throw.c (scm_catch, scm_lazy_catch),
11143 strports.c (scm_call_with_input_string), ports.c
11144 (scm_truncate_file), ioext.c (scm_ftell), ports.c (scm_seek),
11145 list.c (scm_append_x), dynwind.c (scm_dynamic_wind), error.c
11146 (scm_error_scm), vports.c (scm_make_soft_port), weaks.c
11147 (scm_make_weak_vector,scm_weak_vector_p),
11148 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table),
11149 (scm_make_doubly_weak_hash_table, scm_weak_key_hash_table_p),
11150 (scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
11151 macros.c (scm_macro_type), dynl.c (scm_dynamic_link),
11152 (scm_dynamic_unlink, scm_dynamic_call, scm_dynamic_args_call):
11153 Made parameter names match documentation by renaming parameters
11154 and/or fixing docstrings.
11155
11156 * numbers.c (scm_ash): Corrected Texinfo markup.
11157
11158 * strop.c (scm_string_index, scm_string_rindex),
11159 (scm_substring_fill_x, scm_string_null_p): Removed `qdocs'.
11160
11161 * vports.c (scm_make_soft_port), unif.c
11162 (scm_uniform_vector_length, scm_array_p, scm_array_rank),
11163 (scm_dimensions_to_uniform_array, scm_transpose_array),
11164 (scm_array_in_bounds_p, scm_uniform_vector_ref),
11165 (scm_bit_count, scm_bit_position, scm_bit_count_star),
11166 (scm_array_to_list, scm_list_to_uniform_array),
11167 (scm_array_prototype, symbols.c (scm_string_to_symbol), strports.c
11168 (scm_open_input_string, scm_open_output_string),
11169 (scm_get_output_string), strop.c (scm_string_copy),
11170 (scm_string_fill_x), strings.c (scm_string_p, scm_string), stime.c
11171 (scm_get_internal_real_time, scm_times),
11172 (scm_get_internal_run_time, scm_current_time, scm_gettimeofday),
11173 (scm_localtime, scm_gmtime), socket.c (scm_htons, scm_ntohs),
11174 (scm_htonl, scm_ntohl, scm_socket, scm_socketpair),
11175 (scm_getsockopt, scm_getsockname, scm_getpeername, scm_recvfrom),
11176 simpos.c (scm_system), random.c (scm_random_uniform),
11177 (scm_random_normal, scm_random_exp), ramap.c
11178 (scm_array_equal_p), posix.c (scm_pipe, scm_getgroups),
11179 (scm_status_exit_val, scm_status_term_sig, scm_status_stop_sig),
11180 (scm_getppid, scm_getuid, scm_getgid, scm_geteuid, scm_getegid),
11181 (scm_getpgrp, scm_ttyname, scm_ctermid, scm_tcgetpgrp, scm_uname),
11182 (scm_environ, scm_tmpnam, scm_mkstemp, scm_access, scm_getpid),
11183 (scm_setlocale), ports.c (scm_char_ready_p, scm_drain_input),
11184 (scm_pt_size, scm_pt_member, scm_port_revealed, scm_port_mode),
11185 (scm_close_port, scm_input_port_p, scm_output_port_p, scm_port_p),
11186 (scm_port_closed_p, scm_eof_object_p, scm_read_char),
11187 (scm_peek_char), pairs.c (scm_pair_p, scm_cons), numbers.c
11188 (scm_logand, scm_logior, scm_logxor, scm_lognot),
11189 (scm_integer_expt, scm_bit_extract, scm_logcount),
11190 (scm_integer_length, scm_string_to_number, scm_inexact_to_exact),
11191 net_db.c (scm_inet_netof, scm_lnaof), modules.c
11192 (scm_interaction_environment), macros.c (scm_makacro),
11193 (scm_makmacro, scm_makmmacro), keywords.c (scm_keyword_p), ioext.c
11194 (scm_ftell, scm_dup_to_fdes, scm_fileno, scm_isatty_p),
11195 (scm_fdopen, scm_fdes_to_ports), gc.c (scm_gc_stats), fluids.c
11196 (scm_fluid_ref), filesys.c (scm_open_fdes),
11197 (scm_stat, scm_directory_stream_p, scm_getcwd, scm_readlink):
11198 Docstring correction: `Returns' -> `Return'
11199
11200 * gc.c (scm_set_debug_cell_accesses_x):
11201 (s_scm_gc_set_debug_check_freelist_x):
11202 * fluids.c (scm_fluid_p): Added texinfo markup.
11203
11204 * error.c (scm_strerror): Made docstring more precise.
11205
11206 * vectors.c (scm_vector_p, scm_vector, scm_make_vector),
11207 (scm_vector_to_list, _scm_vector_fill_x), symbols.c
11208 (scm_symbol_p, scm_symbol_to_string), strorder.c
11209 (scm_string_equal_p, scm_string_ci_equal_p, scm_string_less_p),
11210 (scm_string_leq_p, scm_string_gr_p, scm_string_geq_p),
11211 (scm_string_ci_less_p, scm_string_ci_leq_p, scm_string_ci_gr_p):
11212 (scm_string_ci_geq_p), strop.c (scm_string_copy),
11213 (scm_string_fill_x): Removed `(r5rs)' from docstrings.
11214
11215 2001-04-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
11216
11217 * gc.c (MARK): Re-introduce a cheap sanity test for non debug
11218 mode, as suggested by Michael Livshin.
11219
11220 2001-03-31 Michael Livshin <mlivshin@bigfoot.com>
11221
11222 * backtrace.c (display_backtrace_body): since the `print_state'
11223 variable is not used (instead its data field is used directly as
11224 `pstate'), protect it from the hungry compiler optimizations.
11225 thanks to Bill Schottstaedt for the report.
11226
11227 2001-03-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
11228
11229 * gc.[ch] (scm_tc16_allocated): New type tag for allocated cells.
11230 It is only defined and used if guile is compiled with
11231 SCM_DEBUG_CELL_ACCESSES set to true. It's purpose is, to never
11232 let cells with a free_cell type tag be visible outside of the
11233 garbage collector when in debug mode.
11234
11235 * gc.c (scm_debug_cell_accesses_p): Set to true as default.
11236
11237 (scm_assert_cell_valid): Use a local static variable to avoid
11238 recursion.
11239
11240 (MARK): Only check for rogue cell pointers in debug mode. Use
11241 scm_cellp for this purpose and place all checks for rogue pointers
11242 into that function. Further, since due to conservative scanning
11243 we may encounter free cells during marking, don't use the standard
11244 cell type accessor macro to determine the cell type.
11245
11246 (scm_cellp): Check if the cell pointer actually points into a
11247 card header.
11248
11249 (scm_init_gc): Initalize scm_tc16_allocated.
11250
11251 * gc.h (GCH): Renamed to SCM_GC_H.
11252
11253 (SCM_VALIDATE_CELL): Enclose the expression in brackets. This
11254 might be unnecessary, but I feel better this way :-)
11255
11256 (SCM_GC_CELL_TYPE): New macro.
11257
11258 (SCM_SETAND_CDR, SCM_SETOR_CDR): Deprecated. These are not used
11259 in guile, and it is unlikely that they will be applied to real
11260 pairs anyway.
11261
11262 (SCM_SET_FREE_CELL_TYPE): Removed. It was not used.
11263
11264 (SCM_GC_SET_ALLOCATED): New macro. Only non-empty if guile is
11265 compiled with SCM_DEBUG_CELL_ACCESSES set to true.
11266
11267 (SCM_NEWCELL, SCM_NEWCELL2): Use of SCM_GC_SET_ALLOCATED will
11268 make sure that in debug mode no free cell will ever be visible
11269 outside of the garbage collector.
11270
11271 2001-03-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
11272
11273 * async.c (scm_asyncs_pending): Don't use != to compare SCM
11274 values.
11275
11276 * async.c (scm_system_async), variable.c (scm_make_variable,
11277 scm_make_undefined_variable): Use scm_cons to create a pair.
11278
11279 * debug.c (scm_reverse_lookup): Perform proper type checking.
11280 Remove suspicious use of SCM_SLOPPY_CONSP.
11281
11282 * eq.c (scm_equal_p), tags.h (SCM_ECONSP): Use SCM_CONSP instead
11283 of SCM_SLOPPY_CONSP. A sane compiler should be able to perform
11284 the corresponding optimization.
11285
11286 * eval.c (iqq): Use proper type check.
11287
11288 (scm_m_expand_body): Remove redundant type checks.
11289
11290 (promise_print): Don't access promise cells as pairs.
11291
11292 * eval.c (EVALCAR, iqq, scm_m_expand_body, scm_eval_args,
11293 scm_deval_args SCM_CEVAL), guardians.c (scm_guard), hashtab.c
11294 (scm_internal_hash_fold), print.c (scm_iprlist): Use !SCM_CELLP
11295 for SCM_NCELLP, !SCM_CONSP for SCM_NCONSP, !SCM_IMP for SCM_NIMP,
11296 !SCM_FALSEP for SCM_NFALSEP, !SCM_NULLP for SCM_NNULLP
11297
11298 * eval.c (scm_m_define, scm_macroexp, SCM_CEVAL), print.c
11299 (scm_iprin1): Use new macro predicate and accessors.
11300
11301 * eval.h (scm_tc16_macro): Removed declaration. It is declared
11302 in macros.h.
11303
11304 * eval.h (EVALH), macros.h (MACROSH), ports.h (PORTSH), procs.h
11305 (PROCSH), tags.h (TAGSH), variable.h (VARIABLEH): Renamed to
11306 SCM_EVAL_H, SCM_MACROS_H, SCM_PORTS_H, SCM_PROCS_H, SCM_TAGS_H and
11307 SCM_VARIABLE_H. Even the macros that are used to inhibit
11308 including a header file twice should be in the SCM_ namespace.
11309
11310 * fluids.c (scm_swap_fluids, scm_swap_fluids_reverse),
11311 properties.c (scm_primitive_property_ref,
11312 scm_primitive_property_del_x): Prefer stronger predicates like
11313 SCM_NULLP or SCM_FALSEP over SCM_IMP.
11314
11315 * gc.c (MARK): Use proper macros to access procedure-with-setter
11316 cell elements and closure cell elements.
11317
11318 (gc_sweep_freelist_finish, scm_gc_sweep, init_heap_seg): Don't
11319 access free cells as pairs.
11320
11321 (scm_unprotect_object): scm_hashq_get_handle returns #f if
11322 no hashtab entry is found.
11323
11324 * gc.c (scm_gc_sweep), ports.c (scm_close_port): Use new macro
11325 SCM_CLR_PORT_OPEN_FLAG.
11326
11327 * guardians.c (TCONC_IN), print.c (scm_free_print_state): Don't
11328 use SCM_SET_C[AD]R for uninitialized cells.
11329
11330 * hashtab.c (scm_hash_fn_get_handle): Use SCM_VALIDATE_VECTOR.
11331 If the hashtable has no slots, return #f instead of '(). This
11332 unifies the return value with most assoc-functions.
11333
11334 (scm_hash_fn_ref): Use proper type check.
11335
11336 (scm_hashq_get_handle, scm_hashv_get_handle, scm_hash_get_handle):
11337 Removed references to non-existing functions from documentation.
11338
11339 * keywords.c (scm_keyword_dash_symbol): Use proper macros to
11340 access keyword cell elements.
11341
11342 * macros.h (SCM_MACROP, SCM_MACRO_TYPE, SCM_MACRO_CODE): New
11343 macros.
11344
11345 * ports.h (SCM_CLR_PORT_OPEN_FLAG): New macro.
11346
11347 * print.c (scm_iprlist): Added comment. Improved loop
11348 conditions.
11349
11350 * procs.h (SCM_ENV, SCM_SETENV): Don't access closure cells as
11351 pairs.
11352
11353 * smob.c (scm_markcdr): Don't access smob cells as pairs.
11354
11355 * tags.h (SCM_SLOPPY_CONSP, SCM_SLOPPY_NCONSP): Deprecated.
11356
11357 * throw.c (ACTIVATEJB, DEACTIVATEJB): Don't access jump buffer
11358 cells as pairs.
11359
11360 * variable.c (variable_print, variable_equalp, scm_variable_ref,
11361 scm_variable_set_x): Use proper macros to access variable cell
11362 elements.
11363
11364 (scm_variable_bound_p): Don't use SCM_NEGATE_BOOL.
11365
11366 * variable.h (SCM_VARVCELL): Don't access variable cells as
11367 pairs.
11368
11369 * vectors.c (scm_vector), weaks.c (scm_weak_vector): Simplified,
11370 added FIXME comment, removed register specifier.
11371
11372 2001-03-29 Keisuke Nishida <kxn30@po.cwru.edu>
11373
11374 * goops.c, goops.h (scm_init_oop_goops_goopscore_module): Deprecated.
11375 * init.c (scm_init_guile_1): Don't init goopscore module.
11376
11377 2001-03-27 Marius Vollmer <mvo@zagadka.ping.de>
11378
11379 * eval.c (SCM_APPLY): Check that arg1 is bound for scm_tc7_cxr.
11380
11381 2001-03-27 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11382
11383 * strop.c (scm_string_to_list): Fixed docstring markup.
11384 (scm_string_upcase_x, scm_string_upcase, scm_string_downcase_x),
11385 (scm_string_downcase, scm_string_capitalize_x),
11386 (scm_string_capitalize): Rewrote and corrected docstrings.
11387 (scm_string_ci_to_symbol): Made docstring more explicit.
11388
11389 2001-03-27 Marius Vollmer <mvo@zagadka.ping.de>
11390
11391 * values.h (scm_values_vtable, SCM_VALUESP): Moved here so that
11392 eval.c can use it.
11393 (scm_call_with_values): Removed.
11394 * values.c (values_vtable, scm_values_vtable): Added "scm_" prefix
11395 so that it can be exported.
11396 (scm_call_with_values): Removed.
11397
11398 * tags.h (SCM_IM_CALL_WITH_VALUES): New isym.
11399 * eval.c: Include "libguile/values.h"
11400 (scm_m_at_call_with_values, scm_sym_at_call_with_values):
11401 New.
11402 (unmemocopy, scm_ceval, scm_deval): Handle new isym.
11403 * eval.h (scm_sym_at_call_with_values, scm_m_at_call_with_values):
11404 New delcarations to support above change.
11405
11406 * eval.c (scm_primitive_eval_x, scm_primitive_eval): Fix syntax
11407 errors with last change.
11408
11409 2001-03-25 Marius Vollmer <mvo@zagadka.ping.de>
11410
11411 * eval.c (scm_primitive_eval_x, scm_primitive_eval, scm_i_eval_x,
11412 scm_i_eval): Moved the application of the system transformer from
11413 scm_i_eval to scm_primitive_eval.
11414
11415 2001-03-23 Neil Jerram <neil@ossau.uklinux.net>
11416
11417 * guile-snarf.awk.in: Substitute "\\" with "\" in .doc output.
11418
11419 * strop.c (scm_string_index): Fix docstring line break
11420 regression.
11421
11422 * list.c (scm_cons_star): Fix docstring typo.
11423
11424 2001-03-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
11425
11426 * gc.c (scm_init_storage), gdbint.c (scm_init_gdbint), numbers.c
11427 (big2str), ports.c (scm_drain_input), read.c (scm_read,
11428 scm_grow_tok_buf), strings.c (scm_string, scm_makfromstr,
11429 scm_make_string, scm_string_append), strports.c (st_resize_port,
11430 scm_object_to_string), unif.c (scm_make_uve): Replace calls to
11431 scm_makstr with calls to scm_allocate_string.
11432
11433 * strings.[ch] (scm_allocate_string): New function.
11434
11435 * strings.[ch] (scm_makstr): Deprecated.
11436
11437 2001-03-18 Gary Houston <ghouston@arglist.com>
11438
11439 * posix.c (scm_tmpnam): check that return value from tmpnam is not
11440 NULL. rewrote the docstring.
11441 (scm_mkstemp): new procedure implementing "mkstemp!".
11442 * posix.h: declare scm_mkstemp.
11443
11444 * net_db.c: declare h_errno if configure didn't define HAVE_H_ERRNO.
11445 normally it would be found in netdb.h.
11446
11447 2001-03-17 Gary Houston <ghouston@arglist.com>
11448
11449 * sort.c (scm_sort): move sortvec variable to avoid a compiler
11450 warning when HAVE_ARRAYS is not defined. move len too.
11451
11452 * Makefile.am (DOT_X_FILES): remove net_db.x, posix.x, socket.x.
11453 (EXTRA_DOT_X_FILES): let configure set the value.
11454 (DOT_DOC_FILES): remove net_db.doc, posix.doc, socket.doc.
11455
11456 * gc.c (scm_must_malloc): changed the comment explaining when
11457 scm_must variants of malloc/free etc., should be used, based on
11458 explanation from Dirk Herrmann.
11459 * fports.c (scm_fport_buffer_add): use FUNC_NAME instead of a local
11460 string with procedure name. use scm_must_malloc instead of malloc.
11461 (scm_setvbuf, scm_fdes_to_port, fport_close): use scm_must variants
11462 of malloc/free.
11463 * ports.c (scm_add_to_port_table, scm_remove_from_port_table,
11464 scm_ungetc): use scm_must variants of malloc/realloc/free.
11465 (scm_add_to_port_table, scm_ungetc): define FUNC_NAME.
11466
11467 2001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
11468
11469 * __scm.h (SCM_ASSERT, SCM_WTA_DISPATCH_0, SCM_WTA_DISPATCH_1,
11470 SCM_WTA_DISPATCH_2, SCM_WTA_DISPATCH_n): Don't call scm_wta, call
11471 scm_wrong_type_arg instead.
11472
11473 (SCM_WNA): Deprecated.
11474
11475 * error.[ch] (scm_wta): Deprecated.
11476
11477 * numbers.c (s_i_log): Minor comment fix.
11478
11479 * read.c (scm_lreadr), unif.c (scm_aind, scm_shap2ra,
11480 scm_make_shared_array, scm_transpose_array, scm_enclose_array,
11481 scm_array_in_bounds_p): Don't use SCM_ASSERT to check for
11482 wrong-num-args or misc errors.
11483
11484 * unif.c (scm_make_shared_array, scm_transpose_array,
11485 scm_enclose_array, scm_array_in_bounds_p, scm_array_set_x):
11486 Validate the rest argument (note: this is only done when guile is
11487 built with SCM_DEBUG_REST_ARGUMENT=1)
11488
11489 (scm_array_in_bounds_p, scm_uniform_vector_ref, scm_array_set_x):
11490 Replace calls to scm_wrong_num_args by SCM_WRONG_NUM_ARGS.
11491
11492 * validate.h (SCM_FUNC_NAME, SCM_VALIDATE_NUMBER_COPY,
11493 SCM_VALIDATE_NUMBER_DEF_COPY): Deprecated.
11494
11495 2001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
11496
11497 * validate.h (SCM_WRONG_NUM_ARGS): Call scm_error_num_args_subr
11498 instead of scm_wrong_num_args.
11499
11500 * coop-threads.c: Don't include libguile/strings.h. (Was only
11501 needed for former implementation of SCM_WRONG_NUM_ARGS.)
11502
11503 * debug.c (scm_m_start_stack): Don't use SCM_ASSERT to check for
11504 wrong-num-args errors.
11505
11506 2001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
11507
11508 * error.[ch] (scm_error_num_args_subr): New function.
11509
11510 2001-03-16 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11511
11512 * list.c (scm_list, scm_cons_star, scm_null_p, scm_list_p),
11513 (scm_length, scm_append, scm_reverse, scm_list_ref),
11514 (scm_memq, scm_memv, scm_member, scm_delv_x, scm_delete_x),
11515 (scm_delq, scm_delv, scm_delete, scm_delq1_x, scm_delv1_x),
11516 (scm_delete1_x), gc.c (scm_map_free_list),
11517 (scm_free_list_length), hash.c (scm_hashq, scm_hashv),
11518 (scm_hash), hashtab.c (scm_hashq_ref, scm_hashq_set_x),
11519 (scm_hashq_remove_x, scm_hashv_ref, scm_hashv_set_x),
11520 (scm_hashv_remove_x, scm_hash_ref, scm_hash_set_x),
11521 (scm_hash_remove_x), ports.c (scm_pt_size, scm_pt_member), print.c
11522 (scm_current_pstate), scmsigs.c (scm_usleep), goops.c
11523 (scm_get_keyword, scm_sys_compute_slots): Added texinfo markup.
11524
11525 * weaks.c (scm_weak_vector_p, scm_weak_key_hash_table_p),
11526 (scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
11527 rdelim.c (scm_read_delimited_x), strop.c (scm_string_index),
11528 symbols.c (scm_symbol_interned_p), numbers.c
11529 (scm_string_to_number), ports.c (scm_port_p): Corrected texinfo
11530 markup.
11531
11532 2001-03-16 Keisuke Nishida <kxn30@po.cwru.edu>
11533
11534 * snarf.h (SCM_CONST_LONG): Deprecated.
11535 * tag.c (CONST_INUM): New macro. Use it to define scm_utag_*.
11536
11537 2001-03-15 Marius Vollmer <marius.vollmer@uni-dortmund.de>
11538
11539 * numbers.c (scm_num2ulong): Check that a bignum is positive
11540 before looking at the magnitude. Correctly check for overflow
11541 during conversion.
11542 (scm_num2long_long): Likewise.
11543 (scm_num2ulong_long): New.
11544 (ULONG_LONG_MAX): Define if not already defined.
11545 * numbers.h: (scm_num2ulong_long): New prototype.
11546
11547 2001-03-15 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11548
11549 * validate.h (SCM_VALIDATE_OPOUTSTRPORT): New macro.
11550
11551 * strports.h (SCM_STRPORTP, SCM_OPSTRPORTP, SCM_OPINSTRPORTP),
11552 (SCM_OPOUTSTRPORTP): New predicate macros.
11553 (scm_open_input_string, scm_open_output_string),
11554 (scm_get_output_string): New prototypes.
11555
11556 * strports.c (scm_open_input_string, scm_open_output_string),
11557 (scm_get_output_string): New procedures (SRFI-6 compliant).
11558 Made scm_tc16_strport non-static.
11559
11560 2001-03-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
11561
11562 * macros.h (SCM_ASSYNT): Removed unused object argument from
11563 signature.
11564
11565 * eval.c (scm_m_body, scm_m_quote, scm_m_begin, scm_m_if,
11566 scm_m_set_x, scm_m_and, scm_m_or, scm_m_case, scm_m_cond,
11567 scm_m_letstar, scm_m_do, scm_m_quasiquote, scm_m_delay,
11568 scm_m_define, scm_m_letrec1, scm_m_letrec, scm_m_let, scm_m_apply,
11569 scm_m_cont, scm_m_nil_cond, scm_m_nil_ify, scm_m_t_ify,
11570 scm_m_0_cond, scm_m_0_ify, scm_m_1_ify, scm_m_atfop, scm_m_atbind,
11571 scm_m_expand_body), evalext.c (scm_m_generalized_set_x,
11572 scm_m_undefine), goops.c (scm_m_atslot_ref, scm_m_atslot_set_x,
11573 scm_m_atdispatch): Removed unused object argument from call to
11574 SCM_ASSYNT.
11575
11576 2001-03-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
11577
11578 * gh.h/gh_data.c (gh_ints2scm): Changed the signature to use a
11579 const int* to reflect that the input array of integers remains
11580 unchanged. Thanks to Brett Viren for the hint.
11581
11582 2001-03-14 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11583
11584 * gh_data.c (gh_scm2chars, gh_scm2shorts, gh_scm2longs),
11585 (gh_scm2floats, gh_scm2doubles): Check for malloc() returning NULL
11586 in various places.
11587 (gh_scm2newstr, gh_symbol2newstr): Change call to
11588 scm_must_malloc() to malloc(), because user-free()able memory is
11589 allocated.
11590
11591 * gc.c: Added declaration of `scm_debug_check_freelist'.
11592
11593 2001-03-13 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11594
11595 * ports.c (scm_port_mode): Changed `mode' array size to 4.
11596
11597 2001-03-12 Keisuke Nishida <kxn30@po.cwru.edu>
11598
11599 * strports.c (scm_object_to_string): New procedure.
11600 (scm_strprint_obj): Deprecated.
11601 * strports.h: Reflect the changes.
11602
11603 2001-03-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
11604
11605 * goops.h (SCM_VALIDATE_PUREGENERIC): New macro.
11606
11607 * goops.c (scm_m_atslot_ref, scm_m_atslot_set_x,
11608 scm_m_atdispatch): Provide definitions for FUNC_NAME. Don't use
11609 SCM_ASSYNT to check for correct argument types. Either use some
11610 SCM_VALIDATE_* macro or an explicit test.
11611
11612 (scm_make_foreign_object): Don't use SCM_ASSERT to check for
11613 misc-errors.
11614
11615 * macros.h (SCM_ASSYNT): On assertion failure, issue a misc-error
11616 instead of calling scm_wta.
11617
11618 2001-03-12 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11619
11620 * load.c (scm_primitive_load, scm_primitive_load_path),
11621 (scm_sys_search_load_path): Corrected docstrings (file ->
11622 filename).
11623
11624 * eval.c (scm_force): Added texinfo markup to docstring.
11625 (scm_promise_p): Renamed parameter to `obj' to match docstring.
11626
11627 * debug-malloc.c: Reinserted #include <stdio.h>.
11628
11629 2001-03-11 Keisuke Nishida <kxn30@po.cwru.edu>
11630
11631 * list.c (s_scm_reverse_x): Use SCM_VALIDATE_LIST.
11632
11633 * environments.c, error.c, eval.c, filesys.c, hashtab.c, load.c,
11634 net_db.c, procprop.c, read.c, scmsigs.c, socket.c, struct.c:
11635 Use SCM_LISTn instead of scm_listify.
11636
11637 2001-03-10 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11638
11639 * _scm.h: Removed #include <errno.h>.
11640
11641 * error.c, net_db.c, putenv.c, stime.c: Removed declaration of
11642 errno variable (can be a macro on some systems, for example when
11643 using linux libc with threads).
11644
11645 * error.c, filesys.c, gc.c, ioext.c, iselect.c, net_db.c, ports.c,
11646 posix.c, print.c, putenv.c, scmsigs.c, script.c, simpos.c, smob.c,
11647 socket.c, srcprop.c, stime.c, strop.c, unif.c, vports.c: Added
11648 #include <errno.h> in these 20 out of 100 files.
11649
11650 2001-03-10 Gary Houston <ghouston@arglist.com>
11651
11652 * socket.c: add a definition of SUN_LEN (from glibc) for when it's
11653 not already defined.
11654
11655 2001-03-09 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11656
11657 * coop.c: Inserted #include <stdio.h>.
11658
11659 * iselect.c: Reinserted #include <stdio.h>.
11660
11661 2001-03-10 Marius Vollmer <mvo@zagadka.ping.de>
11662
11663 * posix.c: Replaced `#define' of __USE_XOPEN right before
11664 including unistd.h with a define of _GNU_SOURCE at the very top of
11665 the file.
11666
11667 2001-03-09 Keisuke Nishida <kxn30@po.cwru.edu>
11668
11669 * alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,
11670 continuations.c, debug-malloc.c, debug.c, dynwind.c, eq.c, eval.c,
11671 feature.c, filesys.h, gc_os_dep.c, gh_data.c, gh_eval.c,
11672 gh_funcs.c, gh_io.c, gh_list.c, gh_predicates.c, hash.c,
11673 hashtab.c, iselect.c, keywords.c, list.c, load.c, mallocs.c,
11674 net_db.c, numbers.c, objprop.c, objprop.h, options.c, pairs.c,
11675 print.c, procprop.c, procs.c, properties.c, ramap.c,
11676 regex-posix.c, root.c, scmsigs.c, simpos.c, socket.c, srcprop.c,
11677 stackchk.c, stacks.c, strings.c, strop.c, strorder.c, struct.c,
11678 symbols.c, tag.c, threads.c, variable.c, vectors.c, weaks.c:
11679 Remove #include <stdio.h>
11680 * gc.c, gdbint.c, root.c, sort.c, unif.c: Add #include <string.h>.
11681
11682 * procs.c (scm_make_subr_opt): Init symcell to avoid warning.
11683
11684 2001-03-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11685
11686 * posix.c (scm_gethostname): Set initial name length to 256 for
11687 Solaris.
11688
11689 2001-03-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11690
11691 * posix.h (scm_crypt, scm_chroot, scm_getlogin, scm_cuserid),
11692 (scm_getpriority, scm_setpriority, scm_getpass, scm_flock),
11693 (scm_sethostname, scm_gethostname): New prototypes.
11694
11695 * posix.c: Added inclusion of <crypt.h>, <sys/resource.h> and
11696 <sys/file.h>, if present.
11697 (scm_init_posix): [PRIO_PROCESS, PRIO_PGRP, PRIO_USER, LOCK_SH,
11698 LOCK_EX, LOCK_UN, LOCK_NB]: New variables.
11699 (scm_crypt, scm_chroot, scm_getlogin, scm_cuserid),
11700 (scm_getpriority, scm_setpriority, scm_getpass, scm_flock),
11701 (scm_sethostname, scm_gethostname): New procedures.
11702
11703 2001-03-08 Neil Jerram <neil@ossau.uklinux.net>
11704
11705 * ports.c (scm_port_column): Docstring fixes: (i) port-line arg is
11706 not optional (ii) "recommend" spelling correction.
11707
11708 2001-03-08 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11709
11710 * ramap.c (racp): Removed optimization which caused array copying
11711 to fail if the two arrays shared storage. Re-inserted the IVDEP
11712 macros removed in the change of 2000-03-09. (Don't really have a
11713 complete grasp of what they are for, but they seem to be necessary
11714 on Crays. This needs testing!) Thanks to Miroslav Silovic.
11715
11716 * hash.c (scm_string_hash): Don't downcase characters.
11717
11718 2001-03-07 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11719
11720 * symbols.c (scm_symbols_prehistory): Changed symbol hash table
11721 size from 277 --> 1009.
11722
11723 * symbols.c, symbols.h (scm_sys_symbols): New function GUILE_DEBUG
11724 function.
11725
11726 * coop-threads.c: Fixed change of 2001-03-06.
11727
11728 * validate.h: Code formatting.
11729
11730 2001-03-07 Keisuke Nishida <kxn30@po.cwru.edu>
11731
11732 * Makefile.am (*.x): Add dependency on snarf.h and guile-doc-snarf.in.
11733 (*.doc): Add dependency on guile-snarf.awk.in.
11734
11735 * guile-snarf.awk.in: Neglect spaces at the end of
11736 SCM_SNARF_DOCSTRING_END. Skip lines "# NN ..." in the
11737 middle of docstrings. (To avoid the problem with gcc-2.96.)
11738
11739 2001-03-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
11740
11741 * coop-threads.c (scm_call_with_new_thread), load.c
11742 (scm_primitive_load, scm_sys_search_load_path), random.c
11743 (scm_c_default_rstate), struct.c (scm_make_struct_layout,
11744 scm_struct_ref, scm_struct_set_x): Don't use SCM_ASSERT to
11745 (potentially) issue a scm-misc-error or wrong-num-args error
11746 message.
11747
11748 * load.c (scm_search_path): Use SCM_ASSERT_TYPE to give details
11749 about the expected type with the wrong-type-arg error message.
11750
11751 * smob.c (scm_make_smob): Abort on misuse of smob - it indicates
11752 a C level bug that can't be fixed from scheme anyway.
11753
11754 2001-03-05 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11755
11756 * eval.c (scm_m_letstar): Removed check for duplicate bindings.
11757 Duplicate bindings are OK in a let* since a let* is semantically
11758 equivalent to a nested set of let:s.
11759
11760 2001-03-05 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11761
11762 * print.c (scm_print_options): Fixed texinfo in docstring.
11763
11764 * net_db.c (scm_getserv, scm_getproto, scm_getnet): Return #f if
11765 the underlying functions getservent, getprotoent or getnetent
11766 return NULL instead of signalling an error.
11767
11768 2001-03-04 Gary Houston <ghouston@arglist.com>
11769
11770 * socket.c (scm_fill_sockaddr): don't allow buffer overflows when
11771 taking an unexpectedly large filename for an AF_UNIX socket from
11772 bind/connect/sendto (thanks to Martin Grabmueller).
11773
11774 * socket.c (scm_sock_fd_to_port, SCM_SOCK_FD_TO_PORT): removed the
11775 former and adjusted the latter.
11776 (scm_socket, scm_socketpair): cosmetic changes.
11777 (scm_getsockopt, scm_setsockopt): declare optlen as int, not
11778 size_t as socklen_t substitute. don't restrict args/return values
11779 to INUM: allow full range of int or size_t.
11780 (scm_fill_sockaddr): check arguments before allocating memory, to
11781 avoid leakage. use malloc, not scm_must_malloc.
11782 (scm_connect, scm_bind, scm_sendto): use int, not size_t as socklen_t
11783 substitute. free the sockaddr structure before throwing an error.
11784 (scm_init_add_buffer): procedure removed, together with its static
11785 buffer scm_addr_buffer, which wouldn't be thread safe. instead,
11786 define a macro MAX_ADDR_SIZE and declare the buffer where needed.
11787 (scm_accept, scm_getpeername, scm_getsockname, scm_recvfrom,
11788 scm_sendto): use a local buffer instead of scm_addr_buffer.
11789 adjust for new SCM_SOCK_FD_TO_PORT. use int for address size,
11790 not size_t.
11791 (scm_recvfrom): set addr->sa_family to AF_UNSPEC before the recvfrom
11792 call to detect whether recvfrom could be bothered to set the address.
11793 (scm_init_socket): don't call scm_init_addr_buffer.
11794
11795 2001-03-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
11796
11797 * debug.c (scm_procedure_source, scm_procedure_environment),
11798 print.c (scm_get_print_state), ramap.c (scm_array_fill_int,
11799 scm_array_index_map_x), sort.c (scm_sort_x, scm_sort,
11800 scm_stable_sort_x, scm_stable_sort), stacks.c (scm_make_stack,
11801 scm_last_stack_frame), symbols.c (scm_sym2vcell, scm_sym2ovcell),
11802 unif.c (scm_list_to_uniform_array, scm_uniform_vector_length,
11803 scm_transpose_array, scm_enclose_array, scm_array_in_bounds_p,
11804 scm_uniform_vector_ref, scm_array_set_x, scm_uniform_array_read_x,
11805 scm_uniform_array_write, scm_bit_set_star_x, scm_bit_count_star,
11806 scm_array_to_list, scm_array_prototype), validate.h
11807 (SCM_VALIDATE_NUMBER_COPY): Don't call function scm_wta, call
11808 scm_misc_error or scm_wrong_type_arg instead.
11809
11810 * validate.h (SCM_WTA, RETURN_SCM_WTA): Deprecated.
11811
11812 2001-03-04 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11813
11814 * goops.c, goops.h (scm_sys_pre_expand_closure_x): Removed.
11815 (scm_sys_tag_body): Added.
11816
11817 2001-03-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
11818
11819 * continuations.c (continuation_apply), eval.c (scm_m_lambda,
11820 scm_m_letstar, scm_m_letrec1, scm_m_let, SCM_APPLY), eval.h
11821 (SCM_EVALIM2), evalext.c (scm_m_generalized_set_x), gc.c
11822 (get_bvec, MARK), goops.c (scm_primitive_generic_generic),
11823 options.c (scm_options), ports.c (scm_remove_from_port_table),
11824 ramap.c (scm_ramapc), read.c (skip_scsh_block_comment, scm_lreadr,
11825 scm_lreadparen, scm_lreadrecparen), script.c (script_get_octal,
11826 script_get_backslash, script_read_arg), unif.c (scm_cvref): Don't
11827 call function scm_wta, call scm_misc_error or scm_wrong_type_arg
11828 instead.
11829
11830 2001-03-04 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11831
11832 * goops.c (scm_sys_pre_expand_closure_x): New procedure.
11833
11834 2001-03-04 Marius Vollmer <mvo@zagadka.ping.de>
11835
11836 * eval.c (scm_s_duplicate_bindings): New error message.
11837 (scm_m_letrec1, scm_m_letstar): Check for duplicate bindings.
11838
11839 2001-03-03 Marius Vollmer <mvo@zagadka.ping.de>
11840
11841 * eval.h (SCM_EVALIM2): New macro. Use it when a
11842 immediate, literal constant should be evaluated.
11843 * eval.c (scm_s_duplicate_formals): New error message string.
11844 (scm_c_improper_memq): New function.
11845 (scm_m_lambda): Check for duplicate arguments.
11846 (scm_ceval, scm_deval): When executing a body: only cons a new
11847 toplevel environment frame when it is different from the
11848 existing one; use EVALCAR instead of SIDEVAL so that we can properly
11849 check for empty combinations; use SCM_EVALIM2 for the same reason
11850 in the non-toplevel loop.
11851 (nontoplevel_cdrxnoap, nontoplevel_cdrxbegin, nontoplevel_begin):
11852 New labels with the meaning of their non-"nontoplevel" partners,
11853 but they are used when it is known that the body is not evaluated at
11854 top-level.
11855 (scm_apply, scm_dapply): use SCM_EVALIM2 to get proper error
11856 reporting for empty combinations.
11857
11858 2001-03-02 Keisuke Nishida <kxn30@po.cwru.edu>
11859
11860 * Remove dump facilities.
11861 * dump.c, dump.h: Removed.
11862 * Makefile.am: Remove dump.c, dump.h, dump.x, dump.doc.
11863 * init.c: Remove #include "libguile/dump.h".
11864 (scm_init_guile_1): Remove scm_init_dump.
11865 * smob.h (scm_smob_descriptor): Remove slots: dump, undump.
11866 (scm_set_smob_dump, scm_set_smob_undump): Remove declaration.
11867 * smob.c (scm_make_smob_type): Remove initialization: dump, undump.
11868 (scm_set_smob_dump, scm_set_smob_undump): Removed.
11869
11870 * keywords.c: Remove #include "libguile/dump.h".
11871 (keyword_dump, keyword_undump): Removed.
11872 (scm_init_keywords): Remove scm_set_smob_dump and scm_set_smob_undump.
11873
11874 2001-03-02 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11875
11876 * vectors.c (s_scm_vector_p, list->vector, scm_vector)
11877 (scm_vector_ref, scm_vector_set_x, scm_vector_to_list)
11878 (scm_vector_fill_x), strorder.c (scm_string_equal_p)
11879 (scm_string_ci_equal_p, scm_string_less_p, scm_string_leq_p)
11880 (scm_string_gr_p, scm_string_geq_p, scm_string_ci_less_p)
11881 (scm_string_ci_geq_p), symbols.c (scm_symbol_p)
11882 (scm_symbol_to_string, scm_string_to_symbol): Changed use of @t{}
11883 to @code{} as the texinfo manual recommends, converted the
11884 examples to use a @lisp{}-environment.
11885
11886 * strports.c (scm_eval_string): Cleaned up the docstring.
11887
11888 * struct.c (scm_struct_p, scm_struct_vtable_p): Added texinfo
11889 markup.
11890
11891 * numbers.c (scm_exact_p, scm_odd_p, scm_even_p)
11892 (scm_number_to_string, scm_string_to_number, scm_number_p)
11893 (scm_real_p, scm_integer_p, scm_inexact_p, scm_make_rectangular)
11894 (scm_make_polar, scm_inexact_to_exact): Added texinfo markup.
11895 (scm_ash): Added texinfo markup and removed obsolete @refill.
11896 (scm_gr_p): Corrected comment.
11897 (scm_gr_p, scm_leq_p, scm_geq_p): Added texinfo markup to (future
11898 docstring) comments.
11899 (scm_positive_p, scm_less_p, scm_num_eq_p, scm_real_p)
11900 (scm_number_p, scm_negative_p, scm_max, scm_min, scm_sum)
11901 (scm_difference, scm_product, scm_divide, scm_asinh, scm_acosh)
11902 (scm_atanh, scm_truncate, scm_round, scm_exact_to_inexact)
11903 (floor, ceiling, $sqrt, $abs, $exp, $log, $sin, $cos, $tan, $asin)
11904 ($acos, $atan, $sinh, $cosh, $tanh, scm_real_part, scm_imag_part)
11905 (scm_magnitude, scm_angle, scm_abs, scm_quotient, scm_remainder)
11906 (scm_modulo, scm_gcd, scm_lcm): Added (future docstring) comments.
11907
11908 2001-02-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
11909
11910 * __scm.h (SCM_ASSERT_TYPE): Add missing macro parameter.
11911 (Obviously nobody compiles with SCM_RECKLESS defined...)
11912
11913 * validate.h (SCM_ASSERT_RANGE): Use the argument number.
11914
11915 2001-02-23 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11916
11917 * ports.c, ports.h (scm_c_read, scm_c_write): New functions.
11918
11919 * ports.h (SCM_READ_BUFFER_EMPTY_P): New macro.
11920
11921 2001-02-24 Neil Jerram <neil@ossau.uklinux.net>
11922
11923 * numbers.c (scm_two_doubles, scm_sys_expt, scm_sys_atan2,
11924 scm_make_polar): Rename arguments `z1' and `z2' to `x' and `y',
11925 since use of `z' suggests that the arguments may be complex.
11926
11927 * goops.c (scm_make), numbers.c (scm_sys_expt): Fix docstring
11928 typos.
11929
11930 2001-02-23 Neil Jerram <neil@ossau.uklinux.net>
11931
11932 * dump.c (scm_binary_write, scm_binary_read), eval.c
11933 (scm_primitive_eval), guardians.c (scm_guardian_destroyed_p,
11934 scm_guardian_greedy_p, scm_make_guardian), fports.c
11935 (scm_file_port_p): Minor docstring fixes.
11936
11937 2001-02-22 Marius Vollmer <mvo@zagadka.ping.de>
11938
11939 * load.c (load): Use scm_primitive_eval_x instead of scm_i_eval_x.
11940
11941 * goops.c (scm_add_method, DEFVAR): Use scm_eval instead of
11942 scm_i_eval.
11943 (make_class_from_template): Do not bother to set the current
11944 module around the call to DEFVAR, scm_eval takes care of that.
11945 (scm_init_goops): Make scm_module_goops and
11946 scm_goops_lookup_closure permanent objects.
11947
11948 * eval.c (scm_ceval, scm_deval): When evaluating expressions on
11949 top level, create a fresh top-level environment for each
11950 expression instead of mutating the exisint frame. This is
11951 important when that frame is closed over.
11952
11953 * numbers.c (s_scm_logior) [SCM_DIGSTOOBIG]: Also use
11954 SCM_DIGSPERLONG instead of DIGSPERLONG.
11955
11956 2001-02-21 Marius Vollmer <mvo@zagadka.ping.de>
11957
11958 * eval.c (scm_ceval, scm_deval): Check for wrong number of args
11959 before applying arrow procedure in `cond' and before applying
11960 receiver procedure in call-with-current-continuation.
11961 (scm_i_eval): Do not invoke scm_copy_tree in argument in SCM_XEVAL
11962 macro. The argument is expanded more than one time.
11963
11964 * numbers.c (scm_logior) [SCM_DIGSTOOBIG]: Correctly use
11965 SCM_BIGDIG instead of BIGDIG. Thanks to Steven G. Johnson!
11966
11967 2001-02-20 Marius Vollmer <mvo@zagadka.ping.de>
11968
11969 * guile-doc-snarf.in, guile-func-name-check.in: Added copyright
11970 notice and license.
11971
11972 2001-02-17 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11973
11974 * variable.c (scm_make_variable, scm_make_undefined_variable)
11975 (scm_variable_ref, scm_variable_set_x, scm_builtin_variable)
11976 (scm_variable_bound_p), values.c (scm_values)
11977 (scm_call_with_values), unif.c (scm_bit_count)
11978 (scm_bit_set_star_x), symbols.c (scm_gentemp)
11979 (scm_gensym), strings.c (scm_string_p, scm_make_string)
11980 (scm_read_only_string_p, scm_string_length, scm_string_ref)
11981 (scm_string_set_x, scm_substring, scm_string_append), stime.c
11982 (scm_strptime, scm_mktime), random.c (scm_seed_to_random_state)
11983 (scm_copy_random_state, scm_random), print.c (scm_newline)
11984 (scm_write_char, scm_simple_format), debug-malloc.c
11985 (scm_malloc_stats), environments.c (scm_environment_p)
11986 (scm_environment_bound_p, scm_environment_ref)
11987 (scm_environment_fold, scm_environment_define)
11988 (scm_environment_undefine, scm_environment_set_x)
11989 (scm_environment_cell, scm_environment_observe)
11990 (scm_environment_observe_weak, scm_environment_unobserve)
11991 (scm_make_eval_environment, scm_eval_environment_p)
11992 (scm_eval_environment_set_local_x, scm_eval_environment_local)
11993 (scm_eval_environment_imported)
11994 (scm_eval_environment_set_imported_x, scm_make_import_environment)
11995 (scm_import_environment_p, scm_import_environment_imports)
11996 (scm_import_environment_set_imports_x, scm_make_export_environment)
11997 (scm_export_environment_p, scm_export_environment_private)
11998 (scm_export_environment_set_private_x)
11999 (scm_export_environment_signature)
12000 (scm_export_environment_set_signature_x, scm_leaf_environment_p):
12001 Added texinfo markup.
12002
12003 * ports.c (scm_drain_input): Lowercased argument to @var.
12004 (scm_current_input_port, scm_current_output_port): Filled in
12005 missing explanation.
12006 (scm_current_load_port, scm_set_current_output_port)
12007 (scm_set_current_error_port, scm_port_line, scm_set_port_line_x):
12008 Added texinfo markup.
12009
12010 * arbiters.c (scm_make_arbiter, scm_try_arbiter)
12011 (scm_release_arbiter): Added texinfo markup to docstrings.
12012 Changed `Returns' to `Return'.
12013 (arbiter_print): Changed SCM_CDR to SCM_SMOB_DATA.
12014
12015 2001-02-16 Neil Jerram <neil@ossau.uklinux.net>
12016
12017 * guile-snarf.awk.in: Quote any `@'s that occur in Scheme names,
12018 by doubling them to `@@'.
12019
12020 2001-02-16 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12021
12022 * numbers.c (scm_lognot), random.c (scm_random,
12023 scm_random_normal, scm_random_solid_sphere_x,
12024 scm_random_hollow_sphere_x, scm_random_normal_vector_x,
12025 scm_random_exp), dynwind.c
12026 (scm_dynamic_wind): Removed unnecessary "" from docstrings.
12027
12028 * goops.c (scm_sys_initialize_object, scm_instance_p,
12029 scm_class_name, scm_class_precedence_list, scm_class_slots,
12030 scm_class_environment, scm_generic_function_name,
12031 scm_generic_function_methods, scm_method_generic_function,
12032 scm_method_specializers, scm_method_procedure, scm_make_unbound,
12033 scm_unbound_p, scm_assert_bound, scm_at_assert_bound_ref,
12034 scm_sys_fast_slot_ref, scm_sys_fast_slot_set_x, scm_slot_ref,
12035 scm_slot_set_x, _scm_slot_bound_p, scm_slots_exists_p,
12036 scm_sys_allocate_instance, scm_make, scm_pure_generic_p,
12037 scm_class_direct_supers, scm_class_direct_slots,
12038 scm_class_direct_subclasses, scm_class_direct_methods,
12039 scm_accessor_method_slot_definition, scm_sys_goops_loaded),
12040 debug.c (scm_with_traps, scm_memoized_p, scm_make_gloc,
12041 scm_gloc_p, scm_make_iloc, scm_iloc_p, scm_memcons,
12042 scm_mem_to_proc, scm_proc_to_mem, scm_unmemoize,
12043 scm_memoized_environment, scm_procedure_name,
12044 scm_procedure_source, scm_procedure_environment, scm_debug_hang),
12045 objects.c
12046 (scm_class_of, scm_entity_p, scm_operator_p,
12047 scm_set_object_procedure_x, scm_object_procedure,
12048 scm_make_class_object), hooks.c (scm_make_hook_with_name,
12049 scm_make_hook, scm_hook_p, scm_hook_empty_p, scm_add_hook_x,
12050 scm_remove_hook_x, scm_reset_hook_x, scm_run_hook,
12051 scm_hook_to_list), lang.c
12052 (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null, scm_nil_eq),
12053 numbers.c (scm_sys_expt, scm_sys_atan2), print.c
12054 (scm_print_options, scm_port_with_print_state,
12055 scm_get_print_state), procs.c (scm_make_cclo, scm_procedure_p,
12056 scm_closure_p, scm_thunk_p, scm_procedure_with_setter_p,
12057 scm_make_procedure_with_setter, scm_procedure), throw.c
12058 (scm_lazy_catch), modules.c (scm_standard_eval_closure), load.c
12059 (scm_parse_path, scm_search_path), stacks.c (scm_make_stack,
12060 scm_stack_ref, scm_stack_length, scm_frame_p,
12061 scm_last_stack_frame, scm_frame_number, scm_frame_source,
12062 scm_frame_procedure, scm_frame_arguments, scm_frame_previous,
12063 scm_frame_next, scm_frame_real_p, scm_frame_procedure_p,
12064 scm_frame_evaluating_args_p, scm_frame_overflow_p), filesys.c
12065 (scm_dirname, scm_basename), dynwind.c
12066 (scm_wind_chain), read.c (scm_read_options, scm_read,
12067 scm_read_hash_extend), gc.c
12068 (scm_unhash_name), eval.c (scm_eval_options_interface,
12069 scm_evaluator_traps, s_scm_nconc2last), backtrace.c
12070 (scm_display_error, scm_set_print_params_x,
12071 scm_display_application, scm_display_backtrace, scm_backtrace),
12072 async.c (scm_async, scm_system_async, scm_async_mark,
12073 scm_system_async_mark, scm_run_asyncs, scm_noop,
12074 scm_set_tick_rate, scm_set_switch_rate, scm_unmask_signals,
12075 scm_mask_signals): Added docstrings.
12076
12077 2001-02-15 Keisuke Nishida <kxn30@po.cwru.edu>
12078
12079 * dump.c (scm_undump): Use SCM_CARLOC/SCM_CDRLOC to obtain the
12080 address of car/cdr. (Thanks to Dirk Herrmann)
12081 Use scm_sizet to obtain the length of strings.
12082 (Thanks to Matthias Koeppe)
12083
12084 2001-02-15 Marius Vollmer <mvo@zagadka.ping.de>
12085
12086 * symbols.c (scm_mem2symbol): Put a empty statement after the
12087 next_symbol label. This is mandated by ANSI, appearantly.
12088
12089 2001-02-13 Marius Vollmer <marius.vollmer@uni-dortmund.de>
12090
12091 * gc_os_dep.c: Do not include <linux/version.h>. It makes no
12092 sense to compile for a specific kernel version. Do not include
12093 <asm/signal.h> while defining __KERNEL__. This hack should no
12094 longer be needed and caused problems.
12095
12096 2001-02-13 Marius Vollmer <mvo@zagadka.ping.de>
12097
12098 * eval.c (scm_ceval, scm_deval): use `SIDEVAL' instead of
12099 SCM_CEVAL when evaluating subforms of `begin' forms. SCM_CEVAL
12100 can not deal with immediates.
12101
12102 2001-02-12 Keisuke Nishida <kxn30@po.cwru.edu>
12103
12104 * list.c (scm_list_copy): Validate the first argument.
12105
12106 2001-02-11 Marius Vollmer <mvo@zagadka.ping.de>
12107
12108 Fix evaluator so that top-level expressions are correctly
12109 evaluated with respect to the module system.
12110
12111 * modules.h. modules.c (scm_current_module_lookup_closure): New
12112 function.
12113
12114 * eval.h (scm_primitive_eval, scm_primitive_eval_x): New
12115 prototypes.
12116 (scm_i_eval, scm_i_eval_x, scm_eval, scm_eval_x): Changed argument
12117 names to better reflect their meaning.
12118
12119 * eval.c (scm_ceval, scm_deval): Recognize when `begin' is being
12120 evaluated at top-level and synronize lookup closure before
12121 executing every subform.
12122 (scm_primitve_eval_x, scm_primitive_eval): New functions.
12123 (scm_eval_x, scm_eval): Reimplement in terms of
12124 scm_primitive_eval_x and scm_primitive_eval, respectively.
12125
12126 2001-02-09 Marius Vollmer <mvo@zagadka.ping.de>
12127
12128 * macros.c (scm_macro_name, scm_macro_transformer): Use
12129 SCM_SMOB_DATA instead of SCM_CDR. Provided by Martin Grabmueller.
12130 Thanks!
12131
12132 2001-02-10 Keisuke Nishida <kxn30@po.cwru.edu>
12133
12134 * dump.c (scm_store_bytes): Store data size before data.
12135 (scm_restore_bytes): Restore data size. Takes a pointer to size.
12136 * dump.h (scm_restore_bytes): Updated.
12137
12138 2001-02-09 Keisuke Nishida <kxn30@po.cwru.edu>
12139
12140 * dump.c: Use double cells for update schedule.
12141
12142 2001-02-08 Keisuke Nishida <kxn30@po.cwru.edu>
12143
12144 * ports.c (scm_unread_char): Take an optional argument.
12145
12146 2001-02-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
12147
12148 * modules.h (scm_selected_module, scm_current_module): Renamed
12149 scm_selected_module to scm_current_module to synchronize Scheme
12150 and C names.
12151 (scm_select_module, scm_set_current_module): Likewise. Changed
12152 all uses.
12153
12154 * ports.c (scm_port_for_each): Make a snapshot of the port table
12155 before iterating over it. The table might change while the user
12156 code is running. With the snapshot, the user can depend on the
12157 fact that each port that existed at the start of the iteration is
12158 encountered exactly once. (ice-9 popen) depends on this.
12159
12160 2001-02-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
12161
12162 * strings.h (SCM_STRING_MAX_LENGTH): New macro.
12163
12164 * strings.c (scm_makstr, scm_take_str, scm_make_string): Added
12165 range checking for the size parameter. Thanks to Martin
12166 Grabmueller for the hint.
12167
12168 (scm_makstr): Reordered string initialization to make interrupt
12169 deferring unnecessary.
12170
12171 * vectors.c (scm_make_vector): Fixed range checking.
12172
12173 2001-02-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
12174
12175 * vectors.h (SCM_VECTOR_MAX_LENGTH): New macro.
12176
12177 * vectors.c (scm_make_vector, scm_c_make_vector): Improved the
12178 checking of the size parameter for type correctness and valid
12179 range. Thanks to Rob Browning for reporting the problem. Instead
12180 of deferring interrupts, scm_remember_upto_here_1 is used.
12181
12182 2001-02-05 Keisuke Nishida <kxn30@po.cwru.edu>
12183
12184 * dump.c (scm_store_cell_object, scm_restore_cell_object): Removed.
12185 (scm_dump_cell_update): Removed.
12186 (scm_dump_update): Renamed from scm_dump_object_update.
12187 (scm_restore_string, scm_restore_bytes, scm_restore_word): Takes
12188 a pointer instead of returning a value.
12189 * keywords.c (keyword_undump): Updated.
12190
12191 2001-02-05 Keisuke Nishida <kxn30@po.cwru.edu>
12192
12193 * dump.c, dump.h: Modified a lot.
12194 (SCM_DUMP_COOKIE): Version 0.1
12195 (scm_dump_mark): Removed.
12196 (scm_restore_cell_object, scm_store_cell_object): New functions.
12197
12198 * smob.h (scm_smob_descriptor): Removed slots: dump_mark,
12199 dump_dealloc, dump_store, undump_alloc, undump_restore, undump_init.
12200 New slots: dump, undump.
12201 * smob.c (scm_make_smob_type, scm_set_smob_dump, scm_set_smob_undump):
12202 Updated.
12203
12204 * keywords.c (keyword_dump): Renamed from keyword_dealloc.
12205 (keyword_undump): Renamed from keyword_alloc.
12206 (scm_init_keywords): Set keyword_dump and keyword_undump.
12207
12208 2001-02-03 Michael Livshin <mlivshin@bigfoot.com>
12209
12210 * gc.c (DOUBLECELL_ALIGNED_P): new macro, a better-named analog of
12211 the deprecated SCM_DOUBLE_CELLP.
12212
12213 * tags.h (SCM_DOUBLE_CELLP): deprecated.
12214
12215 2001-02-02 Keisuke Nishida <kxn30@po.cwru.edu>
12216
12217 * dump.c, dump.h: New files.
12218 * Makefile.am: Added dump.c, dump.h, dump.x, dump.doc.
12219 * init.c: #include "libguile/dump.h".
12220 (scm_init_guile_1): Call scm_init_dump.
12221 * smob.h (scm_smob_descriptor): New slots: dump_mark,
12222 dump_dealloc, dump_store, undump_alloc, undump_restore,
12223 undump_init.
12224 * smob.c (scm_make_smob_type): Init the new slots.
12225 (scm_set_smob_dump, scm_set_smob_undump): New functions.
12226 * smob.h (scm_set_smob_dump, scm_set_smob_undump): Declared.
12227
12228 * keywords.c: #include "libguile/dump.h".
12229 (keyword_dealloc, keyword_alloc): New functions.
12230 (scm_init_keywords): Set smob_dump and smob_undump.
12231
12232 2001-02-01 Keisuke Nishida <kxn30@po.cwru.edu>
12233
12234 * vectors.c (scm_c_make_vector): New function.
12235 * vectors.h (scm_c_make_vector): Declared.
12236 * eval.c (scm_copy_tree), filesys.c (scm_stat2scm), fluids.c
12237 (scm_make_initial_fluids, grow_fluids), gc.c (scm_init_storage),
12238 gh_data.c (gh_ints2scm, gh_doubles2scm): goops.c
12239 (scm_make_method_cache, scm_i_vector2list,
12240 scm_compute_applicable_methods, scm_sys_method_more_specific_p),
12241 init.c (start_stack), net_db.c (scm_gethost, scm_getnet,
12242 scm_getproto, scm_return_entry), posix.c (scm_getgroups,
12243 scm_getpwuid, scm_getgrgid, scm_uname), print.c (make_print_state,
12244 grow_ref_stack), regex-posix.c (scm_regexp_exec), scmsigs.c
12245 (scm_init_scmsigs), socket.c (scm_addr_vector, scm_addr_vector),
12246 stime.c (scm_times, filltime), unif.c (scm_make_uve), vectors.c
12247 (scm_vector, scm_make_vector): Use scm_c_make_vector.
12248
12249 * hashtab.c (scm_c_make_hash_table): New function.
12250 * hashtab.h (scm_c_make_hash_table): Declared.
12251 * environments.c (scm_make_leaf_environment,
12252 scm_make_eval_environment), gc.c (scm_init_storage),
12253 keywords.c (scm_init_keywords), symbols.c (scm_builtin_bindings):
12254 Use scm_c_make_hash_table.
12255
12256 2001-01-31 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12257
12258 * unif.c (rapr1): Don't apply scm_uniform_vector_length on arrays.
12259
12260 2001-01-29 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12261
12262 * struct.c (scm_make_vtable_vtable): Removed unnecessary "" from
12263 end of docstring.
12264
12265 * struct.c (scm_struct_set_x, scm_struct_vtable_tag,
12266 scm_struct_vtable_name, scm_set_struct_vtable_name_x), weaks.c
12267 (scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table,
12268 scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
12269 srcprop.c (scm_source_properties, scm_set_source_properties_x,
12270 scm_source_property, scm_set_source_property_x), sort.c
12271 (scm_sort_list_x, scm_restricted_vector_sort_x, scm_sorted_p,
12272 scm_merge, scm_merge_x, scm_sort_x, scm_sort, scm_stable_sort_x,
12273 scm_stable_sort, scm_sort_list_x, scm_sort_list): Added
12274 docstrings.
12275
12276 2001-01-29 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12277
12278 * eval.c (SCM_APPLY): Check that primitives which take 1 arg
12279 really get that arg.
12280
12281 2001-01-26 Keisuke Nishida <kxn30@po.cwru.edu>
12282
12283 * goops.c (s_scm_get_keyword): Bug fix.
12284
12285 2001-01-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
12286
12287 The following patch was sent by Martin Grabmueller. It makes sure
12288 that in case of parameter errors the correct function name is
12289 shown, and that parameter types are only checked once.
12290
12291 * strop.c (string_copy, string_upcase_x, string_downcase_x,
12292 string_capitalize_x): New functions. Each one performs the core
12293 functionality of the corresponding scm_* function.
12294
12295 (scm_string_copy, scm_string_upcase_x, scm_string_upcase,
12296 scm_string_downcase_x, scm_string_downcase,
12297 scm_string_capitalize_x, scm_string_capitalize): Reduced to
12298 parameter checking wrappers of the above functions.
12299
12300 2001-01-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
12301
12302 * continuations.c, dynl.c, keywords.c, load.c: Include
12303 strings.h. Thanks to Bill Schottstaedt for the bug report.
12304
12305 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
12306
12307 * backtrace.c (display_header): Make sure that line and column
12308 information is shown independent of whether the port the code was
12309 read from had an associated filename. Thanks to Martin
12310 Grabmueller for providing this patch.
12311
12312 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
12313
12314 * fports.[ch] (scm_file_port_p): New primitive.
12315
12316 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
12317
12318 * tags.h (scm_tc16_fport, scm_tc16_strport, scm_tc16_sfport):
12319 These are now defined in fports.c, strports.c and vports.c.
12320
12321 * fports.[ch] (scm_tc16_fport), strports.c (scm_tc16_strport),
12322 vports.c (scm_tc16_sfport): Made variables (were macros defined in
12323 tags.h).
12324
12325 fports.c (scm_make_fptob), strports.c (scm_make_stptob), vports.c
12326 (scm_make_sfptob): Made static. These return a type code now.
12327
12328 fports.c (scm_init_fports), strports.c (scm_init_strports),
12329 vports.c (scm_init_vports): Create the corresponding port types.
12330
12331 * fports.h (SCM_FPORTP, SCM_OPFPORTP, SCM_OPINFPORTP,
12332 SCM_OPOUTFPORTP): Redefined in terms of scm_tc16_fport.
12333
12334 * init.c (scm_init_guile_1): Make sure strports are initialized
12335 before gdbint.
12336
12337 * ports.[ch] (scm_make_port_type): Changed the return type to
12338 scm_bits_t.
12339
12340 * ports.c (scm_ports_prehistory): Don't create any port types
12341 here.
12342
12343 * posix.c (scm_ttyname): Use SCM_FPORTP instead of comparing
12344 against scm_tc16_fport directly.
12345
12346 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
12347
12348 * srcprop.c (scm_set_source_property_x): Fix to handle
12349 (set-source-property! <obj> 'copy <datum>) correctly.
12350
12351 2001-01-24 Gary Houston <ghouston@arglist.com>
12352
12353 * filesys.c (scm_link): docstring fix.
12354 * fports.h (scm_setfileno): obsolete declaration removed.
12355 * posix.c: bogus popen declaration removed.
12356
12357 * rdelim.c: new file, split from ioext.c.
12358 * rdelim.h: new file, split from ioext.h
12359 * Makefile.am: add rdelim.c and related files.
12360 * init.c: call scm_init_rdelim. include rdelim.h.
12361
12362 2001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
12363
12364 This patch was sent by Martin Grabmueller and makes sure that
12365 parameter errors are reported correctly by the lexicographic
12366 ordering predicates.
12367
12368 * strorder.c (string_less_p, string_ci_less_p): New functions.
12369
12370 (scm_string_less_p, scm_string_ci_less_p): Extracted the core
12371 functionality into string_less_p, string_ci_less_p respectively.
12372 The remaining code is just a wrapper to do the parameter
12373 checking.
12374
12375 (scm_string_leq_p, scm_string_gr_p, scm_string_geq_p): Check the
12376 parameters and call string_less_p instead of scm_string_less_p.
12377
12378 (scm_string_ci_leq_p, scm_string_ci_gr_p, scm_string_ci_geq_p):
12379 Check the parameters and call string_less_ci_p instead of
12380 scm_string_ci_less_p.
12381
12382 2001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
12383
12384 This patch modifies scm_display_error to perform parameter
12385 checking. Thanks to Neil Jerram for the bug report.
12386
12387 * backtrace.[ch] (scm_i_display_error): New function.
12388
12389 * backtrace.c (scm_display_error): Added parameter check and
12390 extracted the core functionality into function
12391 scm_i_display_error.
12392
12393 * throw.c (handler_message): Call scm_i_display_error to display
12394 the error message.
12395
12396 2001-01-23 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12397
12398 * eval.c (SCM_APPLY): Added # args check for application of
12399 procedures with arity 3. (Thanks to Anders Holst.)
12400
12401 2001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
12402
12403 * filesys.h (SCM_DIR_FLAG_OPEN, SCM_DIR_OPEN_P): Added.
12404
12405 (SCM_OPDIRP): Deprecated.
12406
12407 * filesys.c (scm_opendir): Use SCM_DIR_FLAG_OPEN instead of
12408 SCM_OPN.
12409
12410 (scm_readdir, scm_rewinddir): Don't use SCM_VALIDATE_OPDIR.
12411 Instead, give an explicit error message in case the directory is
12412 closed.
12413
12414 (scm_closedir, scm_dir_print): Rewritten to use SCM_DIR_OPEN_P
12415 instead of SCM_OPENP and SCM_CLOSEDP.
12416
12417 * validate.h (SCM_VALIDATE_OPDIR): Deprecated.
12418
12419 2001-01-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
12420
12421 * eval.c (inner_eval, scm_eval): Move all real functionality into
12422 inner_eval. Avoid to copy the expression twice by inlining some
12423 code from scm_i_eval.
12424
12425 2001-01-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
12426
12427 * eval.c (scm_m_case): The 'else' clause of a 'case' statement
12428 now has to be the last clause, as required by R5RS. Thanks to
12429 Martin Grabmueller for the patch.
12430
12431 2001-01-18 Gary Houston <ghouston@arglist.com>
12432
12433 * ioext.c: further simplify scm_read_string_x_partial by defining
12434 a macro SCM_EBLOCK.
12435
12436 2001-01-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
12437
12438 * gh_data.c (gh_ints2scm): Simplified using SCM_FIXABLE.
12439
12440 2001-01-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
12441
12442 * __scm.h: Added comment about architecture and compiler
12443 properties that are required by guile.
12444
12445 (SCM_FIXNUM_BIT, SCM_MOST_POSITIVE_FIXNUM,
12446 SCM_MOST_NEGATIVE_FIXNUM): Moved to numbers.h.
12447
12448 (SCM_CHAR_BIT, SCM_LONG_BIT): Moved here from numbers.h.
12449
12450 * numbers.h (SCM_CHAR_BIT, SCM_LONG_BIT): Moved to __scm.h.
12451
12452 (SCM_FIXNUM_BIT, SCM_MOST_POSITIVE_FIXNUM,
12453 SCM_MOST_NEGATIVE_FIXNUM): Moved here from __scm.h.
12454
12455 2001-01-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
12456
12457 * __scm.h (SCM_FIXNUM_BIT): Added. The name is chosen in analogy
12458 to the names in limits.h.
12459
12460 * numbers.c (abs_most_negative_fixnum): Added.
12461
12462 (scm_quotient, scm_remainder): Fixed the fixnum-min / (abs
12463 fixnum-min) special case.
12464
12465 (scm_big_and): Fix for negative first parameter.
12466
12467 (scm_bit_extract): Fix for fixnum paramters.
12468 Thanks to Rob Browning for the bug report.
12469
12470 (scm_init_numbers): Initialize abs_most_negative_fixnum.
12471
12472 2001-01-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
12473
12474 * symbols.c (scm_symbol_bound_p): Fixed comment.
12475 Thanks to Chris Cramer.
12476
12477 2001-01-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
12478
12479 * smob.[ch] (scm_make_smob_type): Return type is scm_bits_t now.
12480 Thanks to Bill Schottstaedt.
12481
12482 2001-01-11 Michael Livshin <mlivshin@bigfoot.com>
12483
12484 from Matthias Köppe:
12485
12486 * objects.h (SCM_SET_ENTITY_SETTER): new macro. SCM_ENTITY_SETTER
12487 casts its result, so doesn't yield an lvalue per ANSI C.
12488
12489 * goops.c (s_scm_sys_set_object_setter_x): use
12490 SCM_SET_ENTITY_SETTER.
12491 (clear_method_cache): use SCM_SET_ENTITY_PROCEDURE.
12492
12493 * gc.h (SCM_GC_SET_CARD_BVEC): new macro. SCM_GC_CARD_BVEC casts
12494 its result, so doesn't yield an lvalue per ANSI C.
12495 (SCM_GC_SET_CARD_FLAGS): ditto for SCM_GC_GET_CARD_FLAGS.
12496 (SCM_GC_CLR_CARD_FLAGS): redefined in terms of
12497 SCM_GC_SET_CARD_FLAGS.
12498 (SCM_GC_SET_CARD_FLAG, SCM_GC_CLR_CARD_FLAGS): ditto.
12499
12500 * gc.c (INIT_CARD): use the explicit setter macro to set the bvec.
12501
12502 2001-01-08 Gary Houston <ghouston@arglist.com>
12503
12504 * validate.h (SCM_VALIDATE_SUBSTRING_SPEC_COPY): new macro.
12505 * ioext.c (scm_read_string_x_partial, scm_read_delimited_x),
12506 socket.c (scm_recvfrom): use the new macro, plus minor docstring
12507 changes.
12508 * ioext.c (scm_read_string_x_partial): don't crash if -1 is supplied
12509 for fdes. if current input port is used, check that it's a file
12510 port.
12511
12512 2001-01-06 Gary Houston <ghouston@arglist.com>
12513
12514 * ioext.c (scm_read_string_x_partial): new procedure, implements
12515 read-string!/partial.
12516 * ports.c (scm_take_from_input_buffers): new procedure used by
12517 scm_read_string_x_partial.
12518 (scm_drain_input): use scm_take_from_input_buffers.
12519
12520 2001-01-06 Marius Vollmer <mvo@zagadka.ping.de>
12521
12522 * validate.h (SCM_VALIDATE_NUMBER): New.
12523
12524 2001-01-03 Michael Livshin <mlivshin@bigfoot.com>
12525
12526 * guardians.c (F_GREEDY, F_LISTED, F_DESTROYED, GREEDY_P,
12527 SET_GREEDY, LISTED_P, SET_LISTED, CLR_LISTED, DESTROYED_P,
12528 SET_DESTROYED): new defines/macros.
12529 (GUARDIAN_LIVE, GUARDIAN_ZOMBIES, GUARDIAN_NEXT): deleted.
12530 (add_to_live_list): takes a `guardian_t *' now, not SCM.
12531 (guardian_print): print more info.
12532 (guardian_apply): check if the guardian is destroyed, and throw an
12533 error if so. take one more optional argument `throw_p'.
12534 (scm_guard): depending on the value of `throw_p', return a boolean
12535 result.
12536 (scm_get_one_zombie): remove redundant property test.
12537 (guardian_t): represent the various (currently 3, I hope nothing
12538 more gets added) boolean fields as bit flags.
12539 (scm_guardian_destroyed_p, scm_guardian_greedy_p): new predicates.
12540 (scm_destroy_guardian_x): new procedure.
12541
12542 * guardians.h: added prototypes for `scm_guardian_greedy_p' and
12543 `scm_guardian_destroyed_p'. changed prototype for `scm_guard'.
12544
12545 2001-01-01 Gary Houston <ghouston@arglist.com>
12546
12547 * fports.c (fport_write): bugfix: handle short writes for
12548 unbuffered ports too. optimize the buffered case by minimizing
12549 the number of write/flush calls.
12550 (write_all): new helper procedure.
12551
12552 The ChangeLog continues in the file: "ChangeLog-2000"