*** empty log message ***
[bpt/guile.git] / libguile / ChangeLog
1 2005-06-12 Marius Vollmer <mvo@zagadka.de>
2
3 * ramap.c (scm_array_index_map_x): First test for real arrays,
4 then check for generalized vectors. This ensures that the
5 generalized vector case need only work with zero-origin ranges.
6
7 * gh.h, gh_data.c, gh_eval.c, gh_funcs.c, gh_init.c, gh_io.c,
8 gh_list.c, gh_predicates.c: Deprecated everything.
9
10 * environments.c (environment_default_folder,
11 environment_default_observer): Do not use gh_call3, gh_call1.
12
13 2005-06-10 Han-Wen Nienhuys <hanwen@xs4all.nl>
14
15 * modules.c (s_scm_eval_closure_module): new function. Return the
16 module inside an eval-closure.
17
18 * gc.c (scm_init_storage): make scm_stand_in_procs a weak_key hash
19 table. This means that procedure properties are GC'd if the
20 procedure dies.
21
22 2005-06-11 Kevin Ryde <user42@zip.com.au>
23
24 * srfi-13.c (scm_string_filter, scm_string_delete): For char and
25 charset cases, count chars kept and build a string in a second pass,
26 rather than using a cons cell for every char kept. Use a shared
27 substring when nothing removed (such sharing is allowed by the srfi).
28
29 2005-06-09 Han-Wen Nienhuys <hanwen@xs4all.nl>
30
31 * gc.c (tag_table_to_type_alist): convert tag number to "tag %d"
32 string, so live object stats can be sorted with string<?.
33
34 2005-06-06 Marius Vollmer <mvo@zagadka.de>
35
36 * print.c (iprin1): When writing a string, collect all characters
37 that can be printed directly into one call to scm_lfwrite.
38 Previously, every character was output with its own call to
39 write(2) on unbuffered ports.
40
41 * eval.c (scm_eval_options_interface): Use
42 scm_frame_critical_section instead of SCM_CRITICAL_SECTION_START
43 and SCM_CRITICAL_SECTION_END.
44
45 * unif.c (scm_array_in_bounds_p): First test for real arrays, then
46 check for generalized vectors. This ensures that the generalized
47 vector case need only work with zero-origin ranges.
48
49 2005-06-06 Kevin Ryde <user42@zip.com.au>
50
51 * srfi-13.c (scm_string_split): Compare char/char in scan. Mixing an
52 unsigned int SCM_CHAR and a char string meant an 8-bit char was never
53 matched.
54
55 2005-06-05 Marius Vollmer <mvo@zagadka.de>
56
57 * eval.c: Added comment on how to make case 1.1 of
58 r5rs_pitfall.test succeed.
59
60 From Jan Nieuwenhuizen <janneke@gnu.org>. Thanks!
61
62 * hashtab.h: Bugfix: use SCM_API (WAS: extern).
63
64 * socket.c: Remove obsolete comment about socklen_t.
65 (s_scm_setsockopt)[!HAVE_IP_MREQ]: Do not use ip_mreq code.
66
67 * numbers.h (isnan)[__MINGW32__]: Remove.
68
69 * Makefile.am (gen_scmconfig_SOURCES): Bugfix: Add
70 DEFAULT_INCLUDES when cross compiling.
71
72 * threads.c (ETIMEDOUT, pipe)[__MINGW32__]: Add defines.
73
74 * stime.c (scm_strftime)[!HAVE_TM_ZONE]: Use
75 SCM_SIMPLE_VECTOR_REF instead of SCM_VELTS. (Changed slightly
76 from Jan's patch.)
77
78 2005-05-22 Marius Vollmer <mvo@zagadka.de>
79
80 * unif.c (scm_make_shared_array): Add old base to new base since
81 scm_array_handle_pos does not include the base.
82 (scm_aind): Likewise.
83
84 * ports.c (scm_putc, scm_puts): Assert that the port argument is a
85 output port.
86
87 2005-05-12 Neil Jerram <neil@ossau.uklinux.net>
88
89 Mac OS X compile warning fixes, reported by Richard Todd.
90
91 * unif.c (scm_i_read_array): Declare rank as ssize_t, to guarantee
92 that it is signed.
93
94 * strports.c (st_resize_port): Add unsigned char cast.
95 (scm_mkstrport): Make read/write_buf cast unsigned.
96
97 * srfi-13.c (string_titlecase_x): Add unsigned char cast.
98
99 * rdelim.c (scm_read_line): Initialize slen.
100
101 * load.c (scm_search_path): Remove weird >=1, and add
102 parentheses to clarify conditions.
103
104 * hash.c (scm_hasher): Add const unsigned char cast.
105
106 * gh_data.c (gh_chars2byvect): Add scm_t_int8 cast.
107
108 2005-05-11 Neil Jerram <neil@ossau.uklinux.net>
109
110 Fix C99isms reported by Ludovic Courtès:
111
112 * threads.c (s_scm_lock_mutex): Don't declare msg in middle of
113 code.
114
115 * gc.c (s_scm_gc_live_object_stats): Don't declare alist in middle
116 of code.
117
118 * gc-card.c (scm_i_card_statistics): Don't declare tag in middle
119 of code.
120 (scm_i_card_statistics): Add block for declarations of tag_as_scm
121 and current.
122
123 2005-05-10 Neil Jerram <neil@ossau.uklinux.net>
124
125 * scmsigs.c (signal_delivery_thread): Return a value, to avoid
126 compile warning reported by Werner Scheinast.
127
128 2005-04-30 Han-Wen Nienhuys <hanwen@xs4all.nl>
129
130 * list.h: remove scm_list()
131
132 * fluids.c (DYNAMIC_STATE_NEXT_LOC): new macro for use with
133 SCM_DEBUG_CELL_ACCESSES
134 (FLUID_NEXT_LOC): idem.
135
136 2005-04-30 Kevin Ryde <user42@zip.com.au>
137
138 * numbers.c (scm_divide): Correction to 1/complex and <any>/complex,
139 need to test abs(re)<abs(im) for choice of cases, otherwise divide by
140 zero when re==0 and im<0. Reported by Jean Crepeau.
141
142 2005-04-25 Kevin Ryde <user42@zip.com.au>
143
144 * ramap.c (scm_array_map_x): Allow no source args, add num args checks
145 to subr_1, subr_2, subr_2o and dsubr cases. No source args only has a
146 few sensible uses (like filling with a random number generator say),
147 but has been allowed in the past and so should be kept.
148
149 2005-04-23 Kevin Ryde <user42@zip.com.au>
150
151 * hashtab.c (scm_hashx_remove_x): Need to pass "closure" to
152 scm_hash_fn_remove_x.
153
154 * list.c (scm_cons_star): Don't modify the rest list, it belongs to
155 the caller when cons* is reached through apply.
156
157 * list.c (list): Use scm_list_copy, so as to produce a fresh list when
158 list is called using apply, under the debugging evaluator.
159 (scm_list): Remove.
160
161 * list.c, list.h (scm_make_list): New code, moving make-list from
162 boot-9.scm.
163
164 2005-04-14 Kevin Ryde <user42@zip.com.au>
165
166 * numbers.c, numbers.h (scm_oneplus, scm_oneminus): New functions,
167 converted from scheme code in boot-9.scm.
168
169 2005-04-11 Kevin Ryde <user42@zip.com.au>
170
171 * srfi-13.c (scm_string_concatenate, scm_string_concatenate_shared):
172 Validate list argument, scm_string_append and scm_string_append_shared
173 don't do that to their rest argument (in a normal build).
174
175 2005-04-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
176
177 * hashtab.h, hashtab.c (scm_t_hashtable): Removed 'closure' field. The
178 closure can not be stored since it is no longer valid at GC time.
179 (make_hash_table): Initialize 'hash_fn' field.
180 (scm_i_rehash): Only store hash_fn in hash table when closre is
181 NULL.
182 (rehash_after_gc): Only call scm_i_rehash when 'hash_fn' is
183 non-NULL. Always use a NULL closure.
184 (scm_hash_fn_create_handle_x): Also rehash when table contains too
185 few entries.
186
187 2005-03-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
188
189 * hashtab.h, hashtab.c (scm_hash_fx_remove_x): Removed delete_fn
190 argument; always use scm_delq_x. The delete_fn function works on
191 the handle, not the key, and it therefore makes no sense to make
192 it configurable. Changed all callers.
193 (scm_hashx_remove_x): Likewise. Also, exported to Scheme.
194 (scm_hash_clear): Accept plain vectors as hashtables.
195 (scm_delx_x): Removed.
196
197 2005-03-28 Han-Wen Nienhuys <hanwen@xs4all.nl>
198
199 * inline.h (scm_double_cell): use __asm__ iso. asm, to maintain
200 compatibility with gcc -std=c99.
201
202 2005-03-24 Mikael Djurfeldt <djurfeldt@nada.kth.se>
203
204 * async.h (scm_mask_ints): Removed left over reference to
205 scm_root.
206
207 * threads.c: Removed fprintf debug statements.
208
209 2005-03-24 Neil Jerram <neil@ossau.uklinux.net>
210
211 * debug.c (scm_make_memoized): Restore use of SCM_UNPACK.
212
213 2005-03-23 Neil Jerram <neil@ossau.uklinux.net>
214
215 * debug.c (scm_make_memoized): Remove unnecessary critical
216 section, and simplify by using SCM_RETURN_NEWSMOB.
217
218 2005-03-20 Mikael Djurfeldt <djurfeldt@nada.kth.se>
219
220 * strings.h (SCM_STRING_UCHARS): Added missing argument.
221
222 2005-03-18 Kevin Ryde <user42@zip.com.au>
223
224 * arbiters.c (FETCH_STORE) [generic C]: Should be
225 scm_i_scm_pthread_mutex_lock/unlock now. Reported by Ludovic Courtès.
226
227 2005-03-13 Kevin Ryde <user42@zip.com.au>
228
229 * numbers.c, numbers.h (scm_i_clonebig): Remove static, so can use in
230 srfi-60.
231
232 * numbers.c (scm_logior): Must scm_i_normbig results as per scm_logand,
233 because OR-ing bits into a negative can reduce the value to an inum.
234
235 * numbers.c (scm_num_eq_p): On 64-bit systems, be careful about
236 casting inum to double since that can lose precision.
237
238 2005-03-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
239
240 * threads.h, threads.c (scm_i_thread): Added gc_running_p field.
241 (guilify_self_1): Initialize it.
242
243 * gc.h, gc.c (SCM_FREECELL_P): Removed for good.
244 (scm_block_gc, scm_gc_heap_lock): Removed. Removed all uses.
245 (scm_gc_running_p): Now a macro that refers to the scm_i_thread
246 field.
247 (scm_i_sweep_mutex): Now a non-recursive mutex. GC can not happen
248 recursively.
249 (scm_igc, scm_i_gc): Renamed former to latter. Changed all uses.
250 Do not lock scm_i_sweep_mutex, which is now non-recursive, or set
251 scm_gc_running_p. Do not run the scm_after_gc_c_hook.
252 (scm_gc): Lock scm_i_sweep_mutex, set scm_gc_running_p and run the
253 scm_after_gc_c_hook here.
254 (scm_gc_for_new_cell): Set scm_gc_running_p here and run the
255 scm_after_gc_c_hook when a full GC has in fact been performed.
256 (scm_i_expensive_validation_check): Call scm_gc, not scm_i_gc.
257
258 * gc-segment.c (scm_i_get_new_heap_segment): Do not check
259 scm_gc_heap_lock.
260
261 * gc-malloc.c (scm_realloc, increase_mtrigger): Set
262 scm_gc_running_p while the scm_i_sweep_mutex is locked.
263
264 * inline.h (scm_cell, scm_double_cell): Do not check
265 scm_gc_running_p, allocation during sweeping is OK.
266
267 * gdbint.c (SCM_BEGIN_FOREIGN_BLOCK, SCM_END_FOREIGN_BLOCK): Do
268 not set scm_block_gc.
269
270 * init.c (scm_i_init_guile): Do not set scm_block_gc.
271
272 * deprecation.c (scm_c_issue_deprecation_warning): Use malloc
273 instead of scm_malloc. The latter can not be used during GC.
274
275 2005-03-09 Marius Vollmer <mvo@zagadka.de>
276
277 * script.c (scm_compile_shell_switches): Added 2005 to Copyright
278 years.
279
280 2005-03-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
281
282 * gc-card.c (scm_i_sweep_card): Do not increase/decrease
283 scm_gc_running_p. Sweeping can happen in parallel with
284 allocation.
285
286 * inline.h: Updated comments for current threading implementation.
287
288 * threads.h, threads.c (scm_i_frame_single_threaded): Removed.
289 (scm_i_thread): Removed unused signal_asyncs field.
290 (threads_mark): Do not mark it.
291 (guilify_self_1): Do not initialize it. Do initialize
292 continuation_root field.
293 (do_thread_exit): Do not remove thread from all_threads list.
294 (on_thread_exit): Do it here, after leaving guile mode.
295 (sleep_level): Removed.
296 (scm_i_thread_put_to_sleep): Leave thread_admin_mutex locked when
297 returning. Do not support recursive sleeps.
298 (scm_i_thread_wake_up): Expect thread_admin_mutex to be locked on
299 entry. Do not support recursive sleeps.
300
301 * fluids.c (ensure_state_size, ensure_all_state_sizes,
302 resize_all_states): Collapsed ensure_state_size and
303 ensure_all_state_sizes into one function named resize_all_states.
304 Allocate new vectors outside of single threaded region. Do only
305 simple things inside that region.
306 (scm_make_fluid, scm_make_dynamic_state): Lock fluid_admin_mutex
307 while adding to the global lists.
308
309
310 2005-03-08 Marius Vollmer <mvo@zagadka.de>
311
312 libltdl is no longer distributed. We expect it to be installed
313 already.
314
315 * Makefile.am (INCLUDES): Removed @LTDLINCL@.
316 (libguile_la_LIBADD): Removed @LIBLTDL@.
317
318 2005-03-07 Marius Vollmer <mvo@zagadka.de>
319
320 * threads.h, async.h, threads.c (SCM_CRITICAL_SECTION_START,
321 SCM_CRITICAL_SECTION_END): Moved here from threads.h since now
322 they also block/unblock execution of asyncs and call
323 scm_async_click which is declared in async.h but threads.h can not
324 include async.h since async.h already includes threads.h.
325 (scm_i_critical_section_level): New, for checking mistakes in the
326 use of the SCM_CRITICAL_SECTION_* macros.
327 (scm_i_critical_section_mutex): Make it a recursive mutex so that
328 critical sections can be nested.
329
330 * throw.c (scm_ithrow): Abort when scm_i_critical_section_level is
331 not zero.
332
333 * threads.h, threads.c (scm_frame_lock_mutex): New.
334 (scm_frame_critical_section): Take mutex as argument.
335 (framed_critical_section_mutex): New, used as default for above.
336 (scm_init_threads): Initialize it.
337 (scm_threads_prehistory): Do not initialize thread_admin_mutex and
338 scm_i_critical_section_mutex; both are initialized statically.
339
340 * continuation.c, deprecated.c, goops.c, guardians.c keywords.c,
341 libguile_la-arrays.loT, objprop.c, ports.c, smob.c, sort.s,
342 srcprop.c, stime.c, struct.c, throw.c, regex-posix.c: Include
343 "libguile/async.h" for SCM_CRITICAL_SECTION_START/END.
344
345 * debug.c (scm_debug_options): Replace
346 SCM_CRITICAL_SECTION_START/END with a frame and
347 scm_frame_critical_section.
348
349 * continuations.c (scm_make_continuation): No longer a critical
350 section.
351 (scm_dynthrow): Abort when scm_i_critical_section_level is
352 not zero.
353
354 2005-03-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
355
356 * threads.c (scm_try_mutex): Renamed argument for consistency.
357
358 * root.c (scm_call_with_dynamic_root): New docstring.
359
360 * eval.c: Define _GNU_SOURCE.
361
362 2005-03-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
363
364 Big merge from the mvo-thread-cleanup branch. The main changes
365 are:
366
367 - The dynamic roots functionality has been split into dynamic
368 states and continuations barriers. Fluids have been
369 reimplemented and can now be garbage collected.
370
371 - Initialization of Guile now works in a multi-thread friendly
372 manner. Threads can freely enter and leave guile mode.
373
374 - Blocking on mutexes or condition variables or while selecting
375 can now be reliably interrupted via system asyncs.
376
377 - The low-level threading interface has been removed.
378
379 - Signals are delivered via a pipe to a dedicated 'signal delivery
380 thread'.
381
382 - SCM_DEFER_INTS, SCM_ALLOW_INTS etc have been deprecated.
383
384 * throw.c (scm_handle_by_message): Exit only the current thread,
385 not the whole process.
386 (scm_handle_by_message_noexit): Exit when catching 'quit.
387
388 * scmsigs.c (take_signal, signal_delivery_thread,
389 start_signal_delivery_thread, ensure_signal_delivery_thread,
390 install_handler): Reimplemented signal delivery as explained in
391 the comments.
392
393 * pthreads-threads.h (scm_i_pthread_t, scm_i_pthread_self,
394 scm_i_pthread_create, scm_i_pthread_detach, scm_i_pthread_exit,
395 scm_i_sched_yield, scm_i_pthread_sigmask,
396 SCM_I_PTHREAD_MUTEX_INITIALIZER,
397 SCM_I_PTHREAD_RECURSIVE_MUTEX_INITIALIZER, scm_i_pthread_mutex_t ,
398 scm_i_pthread_mutex_init, scm_i_pthread_mutex_destroy,
399 scm_i_pthread_mutex_trylock, scm_i_pthread_mutex_lock,
400 scm_i_pthread_mutex_unlock, SCM_I_PTHREAD_COND_INITIALIZER,
401 scm_i_pthread_cond_t, scm_i_pthread_cond_init,
402 scm_i_pthread_cond_destroy, scm_i_pthread_cond_signal,
403 scm_i_pthread_cond_broadcast, scm_i_pthread_cond_wait,
404 scm_i_pthread_cond_timedwait, scm_i_pthread_once_t,
405 SCM_I_PTHREAD_ONCE_INIT, scm_i_pthread_once, scm_i_pthread_key_t ,
406 scm_i_pthread_key_create, scm_i_pthread_setspecific,
407 scm_i_pthread_getspecific, scm_i_scm_pthread_mutex_lock,
408 scm_i_frame_pthread_mutex_lock, scm_i_scm_pthread_cond_wait,
409 scm_i_scm_pthread_cond_timedwait): Provide the obvious mapping
410 when using pthreads.
411 * null-threads.c, null-threads.h: Provide dummy definitions for
412 the above symbols when not using pthreads.
413
414 * modules.h, modules.c (scm_frame_current_module): New.
415
416 * load.c (scm_primitive_load): Use scm_i_frame_current_load_port
417 instead of scm_internal_dynamic_wind.
418
419 * init.h, init.c (restart_stack, start_stack): Removed.
420 (scm_boot_guile, invoke_main_func): Simply use scm_with_guile.
421 (scm_boot_guile_1): Removed.
422 (scm_i_init_mutex): New.
423 (really_cleanup_for_exit, cleanup_for_exit): New.
424 (scm_init_guile_1, scm_i_init_guile): Renamed former to latter.
425 Moved around some init funcs. Call
426 scm_init_threads_default_dynamic_state. Register cleanup_for_exit
427 with atexit.
428
429 * hashtab.c (scm_hash_fn_create_handle_x, scm_hash_fn_remove_x):
430 Use "!scm_is_eq" instead of "!=".
431
432 * ge-scmconfig.c, gen-scmconfig.h.in (SCM_I_GSC_USE_COOP_THREADS,
433 SCM_USE_COOP_THREADS): Removed.
434
435 * gc.c (scm_igc): Take care that scm_gc_running_p is properly
436 maintained. Unlock scm_i_sweep_mutex before running
437 scm_after_gc_c_hook.
438 (scm_permanent_object): Allocate outside of critical section.
439 (cleanup): Removed.
440
441 * fluids.h, fluids.c: Reimplemented completely.
442 (SCM_FLUID_NUM, SCM_FAST_FLUID_REF,
443 SCM_FAST_FLUID_SET): Reimplemented as functions.
444 (scm_is_fluid): New.
445 (scm_i_make_initial_fluids, scm_i_copy_fluids): Removed.
446 (scm_make_dynamic_state, scm_dynamic_state_p,
447 scm_is_dynamic_state, scm_current_dynamic_state,
448 scm_set_current_dynamic_state, scm_frame_current_dynamic_state,
449 scm_c_with_dynamic_state, scm_with_dynamic_state,
450 scm_i_make_initial_dynamic_state, scm_fluids_prehistory): New.
451
452 * feature.c (progargs_fluid): New.
453 (scm_program_arguments, scm_set_program_arguments): Use it instead
454 of scm_progargs.
455 (scm_init_feature): Allocate it. Also, only add "threads" feature
456 when SCM_USE_PTHREAD_THREADS is true.
457
458 * eval.c (scm_makprom): Use scm_make_recursive_mutex instead of
459 scm_make_rec_mutex, with all the consequences.
460 (scm_eval_x, scm_eval): Use scm_frame_begin etc instead of
461 scm_internal_dynamic_wind. Handle dynamic states as second
462 argument.
463
464 * threads.h, threads.c (scm_internal_select): Renamed to
465 scm_std_select and discouraged old name.
466 (scm_thread_sleep, scm_thread_usleep): Likewise, as scm_std_sleep
467 and scm_std_usleep.
468 (scm_tc16_fair_mutex, scm_tc16_fair_condvar, SCM_MUTEXP,
469 SCM_FAIR_MUTEX_P, SCM_MUTEX_DATA, SCM_CONDVARP,
470 SCM_FAIR_CONDVAR_P, SCM_CONDVAR_DATA, SCM_THREADP,
471 SCM_THREAD_DATA): Removed.
472 (SCM_I_IS_THREAD, SCM_I_THREAD_DATA): New.
473 (scm_i_thread): New.
474 (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR):
475 Use scm_assert_smob_type.
476 (scm_c_scm2thread, scm_thread_join, scm_thread_detach,
477 scm_thread_self, scm_thread_yield, scm_mutex_init,
478 scm_mutex_destroy, scm_mutex_trylock, scm_mutex_unlock,
479 scm_rec_mutex_init, scm_rec_mutex_destroy, scm_make_rec_mutex,
480 scm_rec_mutex_free, scm_rec_mutex_lock, scm_rec_mutex_trylock,
481 scm_cond_init, scm_cond_destroy, scm_cond_wait,
482 scm_cond_timedwait, scm_cond_signal, scm_cond_broadcast,
483 scm_key_create, scm_key_delete, scm_setspecific, scm_getspecific,
484 scm_thread_select): Removed. Replaced with scm_i_pthread
485 functions as appropriate.
486 (scm_in_guile, scm_outside_guile): Removed.
487 (scm_t_guile_ticket, scm_leave_guile, scm_enter_guile): Return and
488 take a ticket.
489 (scm_with_guile, scm_without_guile, scm_i_with_guile_and_parent):
490 New.
491 (scm_i_frame_single_threaded): New.
492 (scm_init_threads_default_dynamic_state): New.
493 (scm_i_create_thread): Removed.
494 (scm_make_fair_mutex, scm_make_fair_condition_variable): Removed.
495 (scm_make_recursive_mutex): New.
496 (scm_frame_critical_section): New.
497 (SCM_CURRENT_THREAD, SCM_I_CURRENT_THREAD): Renamed former to
498 latter, changed all uses.
499 (scm_i_dynwinds, scm_i_setdynwinds, scm_i_last_debug_frame,
500 scm_i_set_last_debug_frame): New, use them instead of scm_root
501 stuff.
502 (SCM_THREAD_LOCAL_DATA, SCM_SET_THREAD_LOCAL_DATA,
503 scm_i_root_state_key,m scm_i_set_thread_data): Removed.
504 (scm_pthread_mutex_lock, scm_frame_pthread_mutex_lock,
505 scm_pthread_cond_wait, scm_pthread_cond_timedwait).
506 (remqueue): Allow the removal of already removed cells. Indicate
507 whether a real removal has happened.
508 (scm_thread): Removed, replaced with scm_i_thread.
509 (make_thread, init_thread_creatant): Removed.
510 (cur_thread): Removed.
511 (block_self, unblock_from_queue): New.
512 (block, timed_block, unblock): Removed.
513 (guilify_self_1, guilify_self_2, do_thread_exit,
514 init_thread_key_once, init_thread_key,
515 scm_i_init_thread_for_guile, get_thread_stack_base,
516 scm_init_guile): New initialisation method.
517 (scm_call_with_new_thread, scm_spawn_thread): Use it to simplify
518 thread creation.
519 (fair_mutex, fat_mutex, etc, fair_condvar, fat_condvar): Renamed
520 "fair" to fat and implemented new semantics, including reliable
521 interruption.
522 (all_threads): Now a pointer to a scm_i_thread, not a SCM.
523 (scm_threads_mark_stacks): Explicitly mark handle.
524 (scm_std_select): Allow interruption by also selecting on the
525 sleep_pipe.
526 (scm_i_thread_put_to_sleep): Handle recursive requests for
527 single-threadedness.
528 (scm_threads_prehistory, scm_init_threads): Put current thread
529 into guile mode via guileify_self_1 and guileify_self_2,
530 respectively.
531
532 * fluid.h (SCM_FLUIDP): Deprecated.
533
534 * coop-threads.c: Removed.
535
536 * continuations.h, continuations.c (scm_with_continuation_barrier,
537 scm_c_with_continuation_barrier, scm_i_with_continuation_barrier):
538 New.
539
540 * async.h, async.c (scm_i_setup_sleep, scm_i_reset_sleep): New.
541 (async_mutex): New.
542 (scm_async_click): Protected with async_mutex. Do not deal with
543 signal_asyncs, which are gone. Set cdr of handled async cell to
544 #f.
545 (scm_i_queue_async_cell): Protected with async_mutex. Interrupt
546 current sleep.
547 (scm_system_async_mark_for_thread): Do not use scm_current_thread
548 since that might not work during early initialization.
549
550 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS, SCM_REDEFER_INTS,
551 SCM_REALLOW_INTS): Deprecated by moving into deprecated.h and
552 deprecated.c. Replaced all uses with SCM_CRITICAL_SECTION_START
553 and SCM_CRITICAL_SECTION_END.
554 (SCM_ENTER_A_SECTION, SCM_EXIT_A_SECTION): Removed. Replaced with
555 SCM_CRITICAL_SECTION_START/END.
556
557 * Makefile.am (modinclude_HEADER): Removed threads-plugin.h.
558 (libguile_la_SOURCES): Added null-threads.c
559 (EXTRA_libguile_la_SOURCES): Removed pthread-threads.c and
560 threads-plugin.c.
561 * pthread-threads.c, threads-plugin.c, threads-plugin.h: Removed.
562
563 * root.h, root.c (scm_tc16_root, SCM_ROOTP, SCM_ROOT_STATE,
564 scm_root_state, scm_stack_base, scm_save_regs_gc_mark,
565 scm_errjmp_bad, scm_rootcont, scm_dynwinds, scm_progargs,
566 scm_last_debug_frame, scm_exitval, scm_cur_inp, scm_outp,
567 scm_cur_err, scm_cur_loadp, scm_root, scm_set_root,
568 scm_make_root): Removed or deprecated. Replaced with references
569 to the current thread, dynamic state, continuation barrier, or
570 some fluid, as appropriate.
571 (root_mark, root_print): Removed.
572 (scm_internal_cwdr): Reimplemented guts with
573 scm_frame_current_dynamic_state and
574 scm_i_with_continuation_barrier.
575 (scm_dynamic_root): Return current continuation barrier.
576
577
578 2005-02-28 Marius Vollmer <mvo@zagadka.de>
579
580 * socket.c (scm_setsockopt): Handle IP_ADD_MEMBERSHIP and
581 IP_DROP_MEMBERSHIP options. Also, reorganized the code a bit for
582 cleanliness.
583 (scm_init_socket): Define IP_ADD_MEMBERSHIP and
584 IP_DROP_MEMBERSHIP.
585 Thanks to Greg Troxel!
586
587 2005-02-27 Mikael Djurfeldt <djurfeldt@nada.kth.se>
588
589 * gh.h: Bugfix: Include <libguile.h> outside of the extern "C"
590 block.
591
592 2005-02-25 Marius Vollmer <mvo@zagadka.de>
593
594 * hashtab.c (scm_i_rehash): Remove elements from old bucket vector
595 so that no two weak alist vectors share a spine.
596 (scm_hash_fn_create_handle_x): Deal with a possible rehashing
597 during GC before inserting the new alist cell.
598
599 2005-02-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
600
601 * hashtab.c (scm_i_rehash): Cope with the case that a GC modifies
602 the hashtable.
603 (scm_hash_fn_create_handle_x): Likewise.
604 * vectors.h (SCM_I_SET_WVECT_TYPE): New, for use in scm_i_rehash.
605
606 2005-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
607
608 * unif.c (prototype_to_type): Bugfix: Don't compare prototype to
609 the prototypical examples mentioned in the old reference manual.
610 Instead keep the old semantics of dispatching on type. (Yes, this
611 is extremely ugly, but the whole point of keeping the deprecated
612 interface is not to break old code.)
613
614 2005-02-08 Mikael Djurfeldt <djurfeldt@nada.kth.se>
615
616 * deprecated.h (SCM_ARRAY_DIMS): Rename scm_i_attay_dims -->
617 scm_i_array_dims.
618
619 2005-01-28 Kevin Ryde <user42@zip.com.au>
620
621 * numbers.c (scm_ash): Rewrite using shifts, much faster than
622 integer-expt and multiply/divide. Inexacts and fractions no longer
623 supported (they happened to work before for left shifts, but not
624 right). Don't really need inexacts and fractions, since ash is
625 documented as a "bitwise operation", and all the rest of those only
626 take exact integers.
627
628 2005-01-27 Han-Wen Nienhuys <hanwen@xs4all.nl>
629
630 * gc-card.c (scm_i_card_statistics): map structs, closures and
631 subrs to one tag.
632
633 * gc.c (s_scm_gc_live_object_stats): return alist, not hashtable.
634 (tag_table_to_type_alist): ignore unknown types.
635
636 * gc-segment.c (scm_i_all_segments_statistics): new function.
637 (scm_i_heap_segment_statistics): new function
638
639 * gc.c (s_scm_gc_live_object_stats): new GUILE callable: return
640 statistics on the number of live objects of each type.
641
642 * gc-card.c (scm_i_tag_name): new function.
643 (scm_i_card_statistics): new function.
644
645 2005-01-24 Kevin Ryde <user42@zip.com.au>
646
647 * posix.c (scm_setlocale): Force errno=EINVAL for an error, since
648 POSIX and C99 don't document errno being set. Reported by Bruno
649 Haible.
650 (scm_flock): Update docstring from manual.
651
652 * random.c (scm_i_init_rstate): Compare w to -1 not 0xffffffffUL, now
653 that it's an scm_t_int32. Otherwise gcc 3.4 says it's always false on
654 a 64-bit system.
655
656 * scmsigs.c (scm_sigaction_for_thread): Use scm_to_long for
657 sa_handler, needs to be a long on 64-bit systems where int is only 32
658 bits.
659
660 2005-01-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
661
662 * environments.c (obarray_enter, obarray_replace): Call
663 SCM_HASHTABLE_INCREMENT when adding a new entry.
664
665 * objects.c: Include goops.h for the scm_class_of prototype.
666
667 * hashtab.c (hashtable_size, HASHTABLE_SIZE_N): Restrict hashtable
668 sizes to be smaller than the maximum lengths of vectors.
669
670 2005-01-18 Marius Vollmer <marius.vollmer@uni-dortmund.de>
671
672 * ports.c, smob.c: Include "libguile/goops.h".
673
674 * objects.h, objects.c, goops.c, goops.h (scm_class_boolean,
675 scm_class_char, scm_class_pair, scm_class_procedure,
676 scm_class_string, scm_class_symbol,
677 scm_class_procedure_with_setter, scm_class_primitive_generic,
678 scm_class_vector, scm_class_null, scm_class_real,
679 scm_class_complex, scm_class_integer, scm_class_fraction,
680 scm_class_unknown, scm_port_class, scm_smob_class,
681 scm_no_applicable_method, scm_class_of): Moved from objects to
682 goops since they are only useable once goops has been loaded.
683 (scm_classes_initialized): Removed.
684 (scm_class_of): Do not check it.
685 (create_standard_classes): Do not set it.
686
687 2005-01-17 Marius Vollmer <marius.vollmer@uni-dortmund.de>
688
689 * objects.h, objects.c (scm_classes_initialized): New.
690 (scm_class_of): Signal error when scm_classes_initialized is zero.
691 * goops.c (create_standard_classes): Set scm_classes_initialized
692 to one.
693
694 * random.c (scm_random_solid_sphere_x): Use
695 scm_c_generalized_vector_length instead of
696 scm_uniform_vector_length.
697
698 2005-01-16 Marius Vollmer <mvo@zagadka.de>
699
700 * script.c (scm_compile_shell_switches): Removed debugging output.
701
702 2005-01-15 Kevin Ryde <user42@zip.com.au>
703
704 * numbers.c (scm_logtest, scm_logbit_p, scm_integer_expt): Update
705 docstrings from manual.
706 * random.c (scm_random_solid_sphere_x): Update docstring from manual.
707
708 2005-01-14 Marius Vollmer <marius.vollmer@uni-dortmund.de>
709
710 * random.c: Don't check for definedness of SCM_HAVE_T_INT64, check
711 its value.
712
713 Implement u64 and s64 uniform numeric vectors with bignums when
714 scm_t_uint64 and scm_t_int64 are not available.
715
716 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_take_u64vector,
717 scm_array_handle_u64_elements,
718 scm_array_handle_u64_writable_elements, scm_u64vector_elements,
719 scm_u64vector_writable_elements): Do not define when scm_t_uint64
720 is not available.
721 (scm_take_s64vector, scm_array_handle_s64_elements,
722 scm_array_handle_s64_writable_elements, scm_s64vector_elements,
723 scm_s64vector_writable_elements): Likewise for scm_t_int64.
724 (uvec_sizes, uvec_print, uvec_equalp): Use SCM bignums when
725 scm_t_int64/scm_t_uint64 are not available.
726 (uvec_mark): New, to mark the bignums.
727 (alloc_uvec): Initialize bignums.
728 (uvec_fast_ref): Return bignums directly.
729 (scm_uint64_min, scm_uint64_max, scm_int64_min, scm_int64_max,
730 assert_exact_integer): New.
731 (uvec_fast_set): Use them to validate the bignums.
732 (scm_init_srfi_4): Set mark function of smob when needed.
733 Initialize scm_uint64_min, scm_uint64_max, scm_int64_min,
734 scm_int64_max.
735
736 Recognize 1.4 -e syntax.
737
738 * script.c (sym_at, sym_atat, sym_main, all_symbols): New.
739 (scm_compile_shell_switches): Use them to recognize and convert
740 1.4 "-e" syntax.
741
742 2005-01-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
743
744 * deprecated.h, deprecated.c, strings.h, strings.c: Turn all
745 deprecated features that once were macros but are now functions
746 back into macros.
747
748 2005-01-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
749
750 * eval.c, debug.h (SCM_WARN_DEPRECATED): New debug option.
751 * deprecation.c (scm_issue_deprecation_warning,
752 scm_c_issue_deprecation_warning_fmt): Use it.
753 (mode): Removed.
754 (print_summary): New.
755 (scm_init_deprecation): Initialize SCM_WARN_DEPRECATED instead of
756 mode.
757
758 Deprecated SCM_ARRAY* macros.
759
760 * unif.h, unif.c, ramap.c, vectors.c, srfi-4.c, srfi-4.i.c
761 (SCM_ARRAYP, SCM_I_ARRAYP): Renamed former to latter internal
762 version. Changed all uses.
763 (scm_tc16_array, scm_i_tc16_array,
764 scm_tc16_enclosed_array, scm_i_tc16_enclosed_array,
765 SCM_ARRAY_FLAG_CONTIGUOUS, SCM_I_ARRAY_FLAG_CONTIGUOUS,
766 SCM_ENCLOSE_ARRAYP, SCM_I_ENCLOSE_ARRAYP,
767 SCM_ARRAY_NDIM, SCM_I_ARRAY_NDIM,
768 SCM_ARRAY_CONTP, SCM_I_ARRAY_CONTP,
769 SCM_ARRAY_MEM, SCM_I_ARRAY_MEM,
770 SCM_ARRAY_V, SCM_I_ARRAY_V,
771 SCM_ARRAY_BASE, SCM_I_ARRAY_BASE,
772 SCM_ARRAY_DIMS, SCM_I_ARRAY_DIMS,
773 scm_t_array, scm_i_t_array): Likewise.
774 (SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG):
775 Moved from unif.h to unif.c.
776 (scm_c_array_rank): New.
777 (scm_array_rank): Reimplement using it.
778
779 * deprecated.h, deprecated.c (SCM_ARRAYP, SCM_ARRAY_NDIM,
780 SCM_ARRAY_CONTP, SCM_ARRAY_MEM, SCM_ARRAY_V, SCM_ARRAY_BASE,
781 SCM_ARRAY_DIMS, scm_t_array): New deprecated versions.
782
783 2005-01-11 Marius Vollmer <mvo@zagadka.de>
784
785 * ramap.c: Replace uses of scm_make_ra with scm_i_make_ra.
786 (GVREF, GVSET): New abbreviations. Use them everywhere instead of
787 scm_c_generalized_vector_ref and scm_cvref, and
788 scm_c_generalized_vector_set_x, respectively.
789 (RVREF, IVDEP, BINARY_ELTS_CODE, BINARY_PAIR_ELTS_CODE,
790 UNARY_ELTS_CODE, UNARY_PAIR_ELTS_CODE): Removed since unused.
791
792 * unif.h, unif.c (indices_to_pos, scm_array_handle_pos): Renamed
793 former to latter and made public. Changed all uses.
794 (scm_i_make_ra): Made public, changed tag param to enclosed flag.
795 (scm_make_ra): Deprecated, changed all uses to scm_i_make_ra.
796 (scm_i_shap2ra): New internal version of scm_shap2ra.
797 (scm_shap2ra): Deprecated, changed all uses to scm_i_shap2ra.
798 (scm_i_ra_set_contp): New internal version of scm_ra_set_contp.
799 (scm_ra_set_contp): Deprecated, changed all uses to
800 scm_i_ra_set_contp.
801 (scm_cvref, scm_aind, scm_raprin1): Deprecated.
802
803 2005-01-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
804
805 * eval.c (scm_eval): Added example to docstring. Thanks to Issac
806 Trotts!
807
808 * unif.c (scm_list_to_typed_array): Allow the specification of the
809 upper bound as well. This is needed for empty arrays.
810 (l2ra): Give needed number of elements in error message.
811 (scm_i_print_array): Print length information for arrays that need
812 it.
813 (scm_i_read_array): Parse it.
814
815 * deprecated.h, deprecated.c (SCM_CHARS, SCM_UCHARS, SCM_LENGTH,
816 scm_i_object_chars, scm_i_object_length): Brought back from the
817 dead.
818
819 2005-01-10 Marius Vollmer <mvo@zagadka.de>
820
821 * ramap.c: Replaced single-index uses of scm_array_set_x with
822 scm_c_generalized_vector_set_x.
823
824 * unif.c (scm_array_rank, scm_array_dimensions,
825 scm_shared_array_offset, scm_shared_array_increments,
826 scm_array_ref, scm_array_set_x): Use scm_t_array_handle operations
827 to simplify code and make it more general.
828 (scm_shared_array_root): Work with all kinds of arrays, including
829 naked vectors.
830 (indices_to_pos): New.
831 (scm_make_shared_array): Use it instead of scm_aind; use handle
832 for oldra.
833
834 2005-01-10 Kevin Ryde <user42@zip.com.au>
835
836 * posix.c (scm_mkstemp): Update docstring from manual.
837
838 * stime.c (scm_mktime): Missing default errno=EINVAL from prev change.
839
840 2005-01-09 Marius Vollmer <mvo@zagadka.de>
841
842 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_i_uniform_vector_ref_proc,
843 scm_i_uniform_vector_set_proc): New.
844 (u8ref, u8set, s8ref, s8set, etc): New.
845 (uvec_reffers, uvec_setters): New.
846 (uvec_to_list): Use generic scm_array_handle_ref instead of
847 uvec_fast_ref since scm_array_handle_ref should be faster now.
848 (coerce_to_uvec, scm_c_uniform_vector_ref,
849 scm_c_uniform_vector_set_x): Likewise.
850
851 * unif.h, unif.c, inline.h (scm_i_t_array_ref, scm_i_t_array_set):
852 New.
853 (scm_t_array_handle): Added ref, set, elements and
854 writable_elements for fast inline operation of
855 scm_array_handle_ref and scm_array_handle_set.
856 (scm_array_handle_ref, scm_array_handle_set): Moved to inline.h
857 and replaced with inline code that simply calls the ref/set
858 members of the handle.
859 (enclosed_ref, vector_ref, string_ref, bitvector_ref, memoize_ref,
860 enclosed_set, vector_set, string_set, bitvector_set, memoize_set):
861 New.
862 (scm_array_handle_get): Initialize ref/set fields to memoize_ref
863 and memoize_set.
864 (scm_bitvector_fill_x, scm_bitvector_to_list, scm_bit_count,
865 scm_bit_position, scm_bit_set_star_x, scm_bit_count_star,
866 scm_bit_invert_x): Correctly multiply index with increment in the
867 general case.
868
869 * unif.c (scm_array_handle_set): Correctly execute only one
870 alternative. D'Oh!
871 (scm_list_to_typed_array, l2ra): Use scm_t_array_handle to fill
872 the array; this covers all cases with much simpler code.
873
874 * srfi-4.c (scm_uniform_element_size): Deprecated implementation
875 as well.
876
877 2005-01-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
878
879 * srfi-4.c (uvec_type): New.
880 (uvec_to_list, uvec_ref, uvec_set_x, scm_c_uniform_vector_ref,
881 scm_c_uniform_vector_x): Use it to get concrete type.
882
883 * unif.h (scm_t_array_dim): Changed type of members to ssize_t, to
884 fit the docs.
885
886 * unif.c (ra2l): Handle zero rank arrays.
887 (scm_i_print_array): Print zero rank arrays specially.
888 (tag_to_type): Return #t for an empty tag, not the empty symbol.
889 (scm_i_read_array): Allow zero rank arrays.
890
891 2005-01-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
892
893 * hashtab.h, hashtab.c (SCM_HASHTAB_BUCKET_LOC): Removed.
894 (scan_weak_hashtables): Rewrote its use with SCM_HASHTAB_BUCKET
895 and SCM_SET_HASHTAB_BUCKET.
896
897 * print.h, print.c (scm_print_state, SCM_PRINT_STATE_LAYOUT):
898 Removed ref_stack field.
899 (PSTATE_STACK_REF, PSTATE_STACK_SET): New, for accessing the stack
900 of a print state. Use them everywhere instead of ref_stack.
901
902 * srfi-4.h (scm_uniform_element_size): Deprecated for real.
903
904 * srfi-4.c: Include deprecation.h.
905
906 * vectors.h, vectors.c, unif.h, unif.c, deprecated.h,
907 deprecated.c, eq.c
908 (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR): Removed.
909 (scm_vector_elements, scm_vector_writable_elements,
910 scm_generalized_vector_get_handle): Moved to vectors.[hc] from
911 unif.[hc].
912 (SCM_SIMPLE_VECTOR_LOC): Removed.
913 (SCM_VECTOR_MAX_LENGTH, SCM_VECTOR_LENGTH, SCM_VELTS,
914 SCM_WRITABLE_VELTS, SCM_VECTOR_REF, SCM_VECTOR_SET,
915 scm_vector_equal_p): Moved from vectors.[hc] to deprecated.[hc].
916 (scm_vector_equal_p, scm_i_vector_equal_p): Renamed former to
917 latter. Changed use in eq.c.
918
919 2005-01-07 Marius Vollmer <mvo@zagadka.de>
920
921 Make the uniform vector routines also deal with one dimensional
922 arrays.
923
924 * srfi-4.c (SCM_IS_UVEC): New, use it instead of
925 SCM_SMOB_PREDICATE in this file.
926 (is_uvec): Also recognize one-dimensional uniform numeric arrays
927 of the right type.
928 (scm_is_uniform_vector): Likewise.
929 (uvec_fast_ref): Made BASE param const.
930 (uvec_writable_elements, uvec_elements): New.
931 (uvec_to_list, uvec_ref, uvec_set_x, uvec_length,
932 scm_c_uniform_vector_length, scm_c_uniform_vector_ref,
933 scm_c_uniform_set_x): Use them to also deal with one-dimensional
934 arrays.
935 (scm_uniform_vector_ref, scm_uniform_vector_set_x): Deprecate old
936 argument convention.
937 (scm_uniform_vector_to_list): Let uvec_to_list do all the
938 checking.
939 (scm_uniform_vector_length): Use uvec_length.
940
941 2005-01-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
942
943 * srfi-4.h, srfi-4.c (scm_c_uniform_vector_element_size,
944 scm_c_uniform_vector_size): Removed.
945 (scm_array_handle_uniform_element_size): New.
946
947
948 * unif.h (scm_array_handle_ref, scm_array_handle_set): Changed
949 type of POS parameter to be signed, positions can be negative.
950 (scm_array_handle_release): New, changed all uses of
951 scm_t_array_handle to properly call it.
952 (scm_vector_get_handle, scm_generalized_vector_get_handle):
953 Renamed former to latter, changed all uses.
954
955 2005-01-05 Marius Vollmer <mvo@zagadka.de>
956
957 Updated bitvector routines to also use scm_t_array_handles.
958
959 * unif.h (scm_bitvector_elements,
960 scm_bitvector_writable_elements): Use a scm_t_array_handle and
961 deliver offset, length and increment to caller. Changed all uses.
962 (scm_bitvector_release_elements,
963 scm_frame_bitvector_release_elements,
964 scm_bitvector_release_writable_elements,
965 scm_frame_bitvector_release_writable_elements): Removed.
966 (scm_array_handle_bit_elements,
967 scm_array_handle_bit_writable_elements,
968 scm_array_handle_bit_elements_offset): New.
969 (scm_make_typed_array): The special value for non-initialized
970 arrays is now SCM_UNSPECIFIED. The old special value SCM_BOOL_F
971 was a valid value to fill bitvectors with, so it can't really be
972 specialed out.
973
974 2005-01-04 Kevin Ryde <user42@zip.com.au>
975
976 * stime.c (scm_strftime): Free t.tm_zone produced by bdtime2c.
977 Reported by Bill Schottstaedt.
978
979 2005-01-02 Marius Vollmer <mvo@zagadka.de>
980
981 * sort.c (quicksort): Added INC parameter for non-contigous
982 vectors.
983 (quicksort1): New, for contigous vectors. Both functions are
984 generated from the same code by including "quicksort.i.c".
985 (scm_restricted_vector_sort_x): Call one of quicksort and
986 quicksort1, depending on increment of vector.
987 (scm_sort): Simply call scm_sort_x on a copy of the list or
988 vector.
989 (scm_merge_vector_x, scm_merge_vector_step): Changed indices to
990 size_t, added inc parameter.
991 (scm_stable_sort_x): Allocate temporary storage as Scheme vector
992 so that it doesn't leak.
993 (scm_stable_sort): Simply call scm_stable_sort_x on a copy of the
994 list or vector.
995
996 * ramap.c (scm_array_map_x): Do not try to convert fill value
997 before filling, any necessary conversion is done while storing.
998
999 * gc-card.c (scm_i_sweep_card): Call scm_i_vector_free instead of
1000 doing it inline.
1001
1002 * hashtab.c, hashtab.h (SCM_HASHTABLE_BUCKETS): Removed.
1003 (SCM_HASHTABLE_BUCKET, SCM_HASHTABLE_BUCKET_LOC): New. Replaced
1004 all uses of SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET.
1005
1006 * tags.h, weaks.c, vports.c, hashtab.c, convert.c, sort.c,
1007 convert.c, convert.h, convert.i.c, deprecated.c, environments.c,
1008 eval.c, filesys.c, fluids.c, gc-mark.c, gh.h, gh_data.c, goops.c,
1009 hash.c, init.c, libguile_la-arrays.loT, modules.c, net_db.c,
1010 objects.c, ports.c, posix.c, print.c, random.c, read.c,
1011 regex-posix.c, scmsigs.c, socket.c, stime.c, symbols.c: Use new
1012 vector elements API or simple vector API, as appropriate. Removed
1013 SCM_HAVE_ARRAYS ifdefery. Replaced all uses of
1014 SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET.
1015
1016 * srfi-4.h, srfi-4.c,
1017 srfi-4.i.c (scm_array_handle_uniform_elements,
1018 scm_array_handle_uniform_writable_elements,
1019 scm_uniform_vector_elements,
1020 scm_uniform_vector_writable_elements):
1021 (scm_<foo>vector_elements, scm_<foo>vector_writable_elements): Use
1022 scm_t_array_handle, deliver length and increment.
1023 (scm_array_handle_<foo>_elements,
1024 scm_array_handle_<foo>_writable_elements): New.
1025
1026 * gen-scmconfig.h.in (SCM_I_GSC_HAVE_ARRAYS): Removed.
1027 * gen-scmconfig.c: Hard code SCM_HAVE_ARRAYS to "1".
1028
1029 * unif.h, unif.c (scm_t_array_handle, scm_array_get_handle,
1030 scm_array_handle_rank, scm_array_handle_dims, scm_array_handle_ref
1031 scm_array_handle_set, scm_array_handle_elements
1032 scm_array_handle_writable_elements, scm_vector_get_handle): New.
1033 (scm_make_uve, scm_array_prototype, scm_list_to_uniform_array,
1034 scm_dimensions_to_uniform_array): Deprecated for real.
1035 (scm_array_p, scm_i_array_p): Use latter for SCM_DEFINE since
1036 snarfing wont allow a mismatch between C and Scheme arglists.
1037 (scm_make_shared_array, scm_enclose_array): Correctly use
1038 scm_c_generalized_vector_length instead of
1039 scm_uniform_vector_length.
1040
1041 * validate.h (SCM_VALIDATE_VECTOR,
1042 SCM_VALIDATE_VECTOR_OR_DVECTOR): use scm_is_simple_vector instead
1043 of SCM_VECTORP.
1044
1045 * weaks.h, weaks.c: Use new internal weak vector API from
1046 vectors.h.
1047
1048 * Makefile.am (libguile_la_SOURCES, DOT_X_FILES, DOT_DOC_FILES,
1049 EXTRA_libguile_la_SOURCES): Changed ramap.c and unif.c from being
1050 'extra' to being regular sources.
1051 (noinst_HEADERS): Added quicksort.i.c.
1052 * quicksort.i.c: New file.
1053
1054 * vectors.h, vector.c (SCM_VECTORP, SCM_VECTOR_LENGTH, SCM_VELTS,
1055 SCM_WRITABLE_VELTS, SCM_VECTOR_REF, SCM_VECTOR_SET): Deprecated
1056 and reimplemented. Replaced all uses with scm_vector_elements,
1057 scm_vector_writable_elements, or SCM_SIMPLE_VECTOR_*, as
1058 appropriate.
1059 (scm_is_simple_vector, SCM_SIMPLE_VECTOR_LENGTH,
1060 SCM_SIMPLE_VECTOR_REF, SCM_SIMPLE_VECTOR_SET,
1061 SCM_SIMPLE_VECTOR_LOC): New.
1062 (SCM_VECTOR_BASE, SCM_SET_VECTOR_BASE, SCM_VECTOR_MAX_LENGTH,
1063 SCM_MAKE_VECTOR_TAG, SCM_SET_VECTOR_LENGTH,
1064 SCM_VELTS_AS_STACKITEMS, SCM_SETVELTS, SCM_GC_WRITABLE_VELTS):
1065 Removed.
1066 (scm_vector_copy): New.
1067 (scm_vector_elements, scm_vector_writable_elements): Use
1068 scm_t_array_handle, deliver length and increment. Moved to
1069 unif.h. Changed all uses.
1070 (scm_vector_release_elements,
1071 scm_vector_release_writable_elements,
1072 (scm_frame_vector_release_elements,
1073 scm_frame_vector_release_writable_elements): Removed.
1074 (SCM_I_IS_VECTOR, SCM_I_VECTOR_ELTS, SCM_I_VECTOR_WELTS,
1075 SCM_I_VECTOR_LENGTH, scm_i_vector_free): New internal API.
1076 (SCM_I_WVECTP SCM_I_WVECT_LENGTH SCM_I_WVECT_VELTS
1077 SCM_I_WVECT_GC_WVELTS SCM_I_WVECT_TYPE SCM_I_WVECT_GC_CHAIN
1078 SCM_I_SET_WVECT_GC_CHAIN, scm_i_allocate_weak_vector): New, for
1079 weak vectors.
1080
1081 2004-12-29 Marius Vollmer <mvo@zagadka.de>
1082
1083 No longer use creators to specify the type of an array. Creators
1084 expose the fact that arrays are wrapped around vectors, but that
1085 might change.
1086
1087 * srfi-4.h (scm_i_proc_make_u8vector, scm_i_proc_make_s8vector,
1088 scm_i_proc_make_u16vector, scm_i_proc_make_s16vector,
1089 scm_i_proc_make_u32vector, scm_i_proc_make_s32vector,
1090 scm_i_proc_make_u64vector, scm_i_proc_make_s64vector,
1091 scm_i_proc_make_f32vector, scm_i_proc_make_f64vector,
1092 scm_i_proc_make_c32vector, scm_i_proc_make_c64vector,
1093 uvec_proc_vars): Removed.
1094 (scm_i_generalized_vector_creator): Removed.
1095 (scm_i_generalized_vector_type): New.
1096
1097 * unif.h, unif.c (scm_typed_array_p, scm_make_array,
1098 scm_make_typed_array, scm_array_type, scm_list_to_array,
1099 scm_list_to_typed_array, scm_is_array, scm_is_typed_array): New.
1100 (scm_array_creator): Removed.
1101 (scm_array_p): Deprecated second PROT argument.
1102 (scm_dimensions_to_uniform_array, scm_list_to_uniform_array):
1103 Deprecated, reimplemented in terms of scm_make_typed_array and
1104 scm_list_to_typed_array.
1105 (scm_i_proc_make_vector, scm_i_proc_make_string,
1106 scm_i_proc_make_bitvector): Removed.
1107 (type_creator_table, init_type_creator_table, type_to_creator,
1108 make_typed_vector): New.
1109 (scm_i_convert_old_prototype): Removed.
1110 (prototype_to_type): New.
1111 (scm_make_uve): Deprecated, reimplemented using make_typed_vector.
1112 (scm_array_dimensions): Use scm_list_1 instead of scm_cons for
1113 minor added clarity.
1114 (scm_make_shared_array, scm_ra2contig): Use make_typed_vector
1115 instead of scm_make_uve.
1116 (tag_creator_table, scm_i_tag_to_creator): Removed.
1117 (tag_to_type): New.
1118 (scm_i_read_array): Use scm_list_to_typed_array instead of
1119 scm_list_to_uniform_array.
1120
1121 2004-12-27 Marius Vollmer <mvo@zagadka.de>
1122
1123 * unif.h, unif.c (scm_bitvector_elements): Made return value "const".
1124 (scm_bitvector_writable_elements): New.
1125 (scm_bitvector_release, scm_bitvector_release_elements):
1126 Renamed former to latter. Added explicit call to
1127 scm_remember_upto_here_1.
1128 (scm_frame_bitvector_release,
1129 scm_frame_bitvector_release_elements): Renamed former to latter.
1130 (scm_bitvector_release_writable_elements,
1131 scm_bitvector_release_writable_elements): New.
1132 Changed all uses as required by the changes above.
1133
1134 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_uniform_vector_elements,
1135 scm_u8vector_elements, etc): Made return value "const".
1136 (scm_uniform_vector_writable_elements,
1137 scm_u8vector_writable_elements, etc): New.
1138 (scm_uniform_vector_release, scm_uniform_vector_release_elements):
1139 Renamed former to latter. Added explicit call to
1140 scm_remember_upto_here_1.
1141 (scm_frame_uniform_vector_release,
1142 scm_frame_uniform_vector_release_elements): Renamed former to latter.
1143 (scm_uniform_vector_release_writable_elements,
1144 scm_frame_uniform_vector_release_writable_elements): New. Takes
1145 crown of longest identifier yet.
1146 Changed all uses as required by the changes above.
1147
1148 * vectors.h, vectors.c (scm_c_vector_set_x): Make return type
1149 void.
1150 (scm_is_vector, scm_vector_p, scm_vector_length,
1151 scm_c_vector_length, scm_vector_ref, scm_c_vector_ref,
1152 scm_vector_set_x, scm_c_vector_set_x, scm_vector_to_list,
1153 scm_vector_move_left_x, scm_vector_move_right_x,
1154 scm_vector_fill_x): handle one-dimensional arrays.
1155 (scm_vector_elements, scm_vector_release_elements,
1156 scm_vector_frame_release_elements, scm_vector_writable_elements,
1157 scm_vector_release_writable_elements,
1158 scm_vector_frame_release_writable_elements): New.
1159 (scm_list_to_vector, scm_vector_to_list, scm_vector_fill,
1160 scm_vector_move_left_x, scm_vector_move_right_x): Use them.
1161
1162 * ramap.c (scm_ramapc, scm_raeql): Use
1163 scm_c_generalized_vector_length instead of
1164 scm_uniform_vector_length.
1165 (scm_ramap, rafe): Use scm_c_vector_ref instead of SCM_VELTS. use
1166 scm_c_generalized_vector_ref instead of scm_uniform_vector_ref.
1167
1168 2004-12-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1169
1170 * continuations.h, continuations.c (scm_t_contregs): New 'offset'
1171 member for relocating debug frames.
1172 (scm_make_continuation): Set it.
1173
1174 * stacks.c (read_frame, read_frames, scm_make_stack,
1175 scm_last_stack_frame, scm_stack_id): Use the new 'offset' member
1176 of continuations instead of calculating the offset ourselves.
1177 Relocate 'vect' member of scm_t_debug_frame.
1178
1179 2004-12-16 Kevin Ryde <user42@zip.com.au>
1180
1181 * ramap.c (scm_array_map_x): Check for at least one source argument.
1182
1183 2004-12-14 Kevin Ryde <user42@zip.com.au>
1184
1185 * srfi-13.c (string-any, string-every): Use a scheme wrapper around
1186 the C code so for the final call to the predicate procedure is a tail
1187 call, per SRFI-13 spec.
1188
1189 2004-12-10 Kevin Ryde <user42@zip.com.au>
1190
1191 * eq.c (scm_eq_p, scm_eqv_p, scm_equal_p): Update docstrings from
1192 recent revision to the reference manual.
1193
1194 * numbers.c (scm_modulo): Amend fixme comment about negative divisor
1195 with "%", C99 says it's well-defined.
1196
1197 * socket.c (scm_from_ipv6): Just use mpz_import. Don't bother trying
1198 to fit scm_from_ulong_long, since that uses mpz_import anyway. Don't
1199 bother trying to fit scm_from_ulong, not really worth the trouble if
1200 addresses are more than 4 bytes usually.
1201
1202 2004-11-30 Kevin Ryde <user42@zip.com.au>
1203
1204 * gc_os_dep.c (NetBSD): Test __m68k__ and __arm__ as well as m68k and
1205 arm32. Reported by Greg Troxel.
1206
1207 2004-11-14 mvo <mvo@zagadka.de>
1208
1209 * unif.c, unif.h (scm_i_cvref): Made non-static for ramap.c.
1210
1211 * Makefile.am (INCLUDES): It is "@LTDLINCL@", not "@LTDLINC@".
1212
1213 2004-11-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1214
1215 Enclosed arrays are now their own smob. This has been done to
1216 make the code more explicit about them and to prepare for the time
1217 when generalized vectors include arbitrary one-dimensional
1218 arrays. (Uptonow, enclosed arrays have been recognized by their
1219 use of an array as their storage 'vector'. When all generalized
1220 vectors are allowed as storage, including one-dimensional arrays,
1221 this will no longer work.)
1222
1223 * unif.h, unif.c: (scm_tc16_enclosed_array, SCM_ENCLOSED_ARRAYP):
1224 New.
1225 (exactly_one_third, singp): Removed.
1226 (scm_array_p, scm_array_dimensions, scm_shared_array_root,
1227 scm_shared_array_offset, scm_shared_array_increments): Handle
1228 enclosed arrays explicitely.
1229 (scm_array_rank): Likewise. Also, do not return zero for
1230 non-arrays, signal an error instead since arrays with rank zero do
1231 exist.
1232 (scm_i_make_ra): New, for specifying the tag of the new array.
1233 (scm_make_enclosed_array): Use it.
1234 (scm_make_ra): Reimplemented in terms of scm_i_make_ra.
1235 (scm_make_shared_array): Use scm_c_generalized_vector_length
1236 instead of scm_uniform_vector_length.
1237 (scm_array_in_bounds_p): Rewritten to be much cleaner.
1238 (scm_i_cvref): New, doing the job of scm_cvref.
1239 (scm_cvref): Use scm_i_cvref.
1240 (scm_array_ref): Do not accept non-arrays when no indices are
1241 given. Use scm_i_cvref to do the actual access.
1242 ("uniform-array-set1"): Do not register.
1243 (scm_array_set_x, scm_uniform_array_read_x,
1244 scm_uniform_array_write): Handle enclosed arrays explicitly.
1245 (ra2l): Use scm_i_cvref instead of scm_uniform_vector_ref to also
1246 handle enclosed arrays.
1247 (scm_array_to_list): Handle enclosed arrays explicitly.
1248 (rapr1): Removed.
1249 (scm_i_print_array_dimension): Use scm_i_cvref to also handle
1250 enclosed arrays.
1251 (scm_i_print_enclosed_array): New.
1252 (tag_proto_table, tag_creator_table): Renamed former to latter.
1253 Added "a" and "b" for strings and bitvectors, resp.
1254 (scm_i_tag_to_prototype, scm_i_tag_to_creator): Renamed former to
1255 latter. Tag "a" is in the table now, no need to handle it as a
1256 legacy tag.
1257 (scm_raprin1): Just call scm_iprin1.
1258 (scm_array_creator, scm_array_prototype): Handle enclosed arrays
1259 explicitly.
1260 (scm_init_unif): Initialize scm_tc16_enclosed_array smob.
1261 Use scm_i_print_array as printer for scm_tc16_array.
1262
1263 2004-11-10 Marius Vollmer <mvo@zagadka.de>
1264
1265 * ramap.c (cind): Changed second arg to be pointer to long instead
1266 of uniform vector.
1267 (scm_ramapc): Allocate index vector with scm_malloc and not as
1268 uniform vector. Wrap it in a frame so that it gets properly freed.
1269 (scm_array_index_map_x): Likewise.
1270
1271 * unif.c: Changed all uses of scm_array_prototype to
1272 scm_array_creator. (scm_i_get_old_prototype): Signal error when no
1273 prototype is known.
1274 (scm_uniform_array_read_x, scm_uniform_array_write): Reimplemented
1275 in terms of scm_uniform_vector_read_x and
1276 scm_uniform_vector_write, respectively. Strings and
1277 bitvector support has been dropped.
1278
1279 * srfi-4.h, srfi-4.c: Do not include <libguile.h>, include the
1280 needed files directly. Include config.h, <unistd.h> and <io.h>
1281 when available.
1282 (scm_uniform_vector_read_x, scm_uniform_vector_write): New.
1283
1284 2004-11-09 Marius Vollmer <mvo@zagadka.de>
1285
1286 * gh_data.c (gh_uniform_vector_length): Properly use
1287 scm_c_uniform_vector_length instead of scm_uniform_vector_length.
1288
1289 2004-11-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1290
1291 * srfi-4.h (scm_c_uniform_vector_ref, scm_c_uniform_vector_set_x):
1292 New.
1293 (scm_i_uniform_vector_creator): Removed.
1294 (scm_i_generalized_vector_creator): New.
1295 (scm_uniform_vector_length, scm_uniform_element_size): Do not
1296 handle generalized vectors, only uniform numeric vectors.
1297 (alloc_uvec): Do length check here...
1298 (make_uvec): ...but not here.
1299 (coerce_to_uvec): Use new generalized vector functions to handle
1300 all kinds of vectors in one go.
1301
1302 * tags.h (scm_tc7_bvect): Renamed to scm_tc7_unused7, renaming the
1303 remaining scm_tc7_unused tags to get a neatly ordered list.
1304
1305 * eq.c, evalext.c, gc-card.c, gc-mark.c, objects.c, print.c: Do no
1306 longer handle scm_tc7_bvect bitvectors.
1307
1308 * ramap.c: Use the new generalized vector functions to handle all
1309 vector like things.
1310
1311 * vectors.h, vectors.c (scm_is_vector, scm_c_vector_length,
1312 scm_c_vector_ref, scm_c_vector_set_x, scm_generalized_vector_p,
1313 scm_generalized_vector_length, scm_generalized_vector_ref,
1314 scm_generalized_vector_set_x, scm_generalized_vector_to_list,
1315 scm_is_generalized_vector, scm_c_generalized_vector_length,
1316 scm_c_generalized_vector_ref, scm_c_generalized_vector_set_x):
1317 New.
1318
1319 * unif.h, unif.c (scm_bitvector_p, scm_bitvector,
1320 scm_make_bitvector, scm_bitvector_length, scm_bitvector_ref,
1321 scm_bitvector_set_x, scm_list_to_bitvector, scm_bitvector_to_list,
1322 scm_bitvector_fill_x, scm_is_bitvector, scm_c_make_bitvector,
1323 scm_c_bitvector_length, scm_c_bitvector_ref,
1324 scm_c_bitvector_set_x, scm_bitvector_elements,
1325 scm_bitvector_release, scm_frame_bitvector_release,
1326 scm_tc16_bitvector, bitvector_free, bitvector_print,
1327 bitvector_equalp, count_ones, find_first_one): New.
1328 (scm_bit_count, scm_bit_position, scm_bit_set_star_x,
1329 scm_bit_count_star, scm_bit_invert_x, scm_istr2bve): Rewritten
1330 using the new C API for bitvectors and maybe count_ones or
1331 find_first_one, as appropriate.
1332 (SCM_I_MAX_LENGTH, SCM_BITVECTOR_P, SCM_BITVECTOR_BASE,
1333 SCM_SET_BITVECTOR_BASE, SCM_BITVECTOR_MAX_LENGTH,
1334 SCM_BITVECTOR_LENGTH, SCM_MAKE_BITVECTOR_TAG,
1335 SCM_SET_BITVECTOR_LENGTH): Removed. Replaced all uses with the
1336 new functions from above.
1337 (scm_i_proc_make_vector, scm_i_proc_make_string,
1338 scm_i_proc_make_bitvector): Made non-static for use in
1339 scm_i_generalized_vector_creator.
1340 (scm_make_u1vector): Removed, replaced by scm_make_bitvector.
1341 (scm_make_uve): Validate that the created object is a generalized
1342 vector.
1343 (scm_i_legacy_tag): Removed.
1344 (scm_i_print_array): Do it here.
1345 (scm_raprin1): Only print enclosed arrays.
1346
1347 * Makefile.am (DOT_DOC_FILES): Added srfi-4.doc.
1348
1349 2004-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1350
1351 * srfi-4.c (make_uvec): Use SCM_I_SIZE_MAX instead of SIZE_MAX for
1352 added portability.
1353
1354 * chars.c (scm_charnames, scm_charnums): Added "sp" as an alias
1355 for "space". Thanks to Bruce Korb!
1356
1357 * rw.c (scm_read_string_x_partial): Bugfix, apply offset to dest
1358 only after dest has been set. Thanks to Hyper Division!
1359
1360 * gh_data.c (gh_uniform_vector_length): Use
1361 scm_uniform_vector_length instead of SCM_UVECTOR_LENGTH.
1362
1363 2004-11-03 Marius Vollmer <mvo@zagadka.de>
1364
1365 * unif.h (SCM_UVECTOR_BASE, SCM_SET_UVECTOR_BASE,
1366 SCM_UVECTOR_MAXLENGTH, SCM_UVECTOR_LENGTH, SCM_MAKE_UVECTOR_TAG,
1367 SCM_SET_UVECTOR_LENGTH): Removed.
1368
1369 2004-11-02 Marius Vollmer <mvo@zagadka.de>
1370
1371 Mac OS X and OpenBSD compatibility patches from Andreas Vögele.
1372 Thanks!
1373
1374 * backtrace.c (scm_display_backtrace_with_highlights): Join the
1375 first and the second line of the SCM_DEFINE macro call, since old
1376 preprocessors cannot handle definitions that are split into two
1377 lines.
1378
1379 * inline.h (scm_cell, scm_double_cell): Don't use C99 variable
1380 declarations.
1381
1382 * pairs.c (scm_i_chase_pairs): Replace scm_t_bits with
1383 scm_t_uint32 to fix the mismatch between the function declaration
1384 and definition.
1385
1386 * sort.c (quicksort): Don't use C99 variable declarations.
1387
1388 * srfi-4.c (uvec_fast_ref): Avoid a compiler warning by returning
1389 SCM_BOOL_F if no type matches.
1390
1391 * threads.c (thread_print): Cast a pointer to size_t when printing
1392 with scm_uintprint.
1393
1394 * unif.c (scm_i_tag_to_prototype): Make sure that "instead" gets
1395 defined.
1396 (scm_array_prototype): Deprecated.
1397
1398 2004-11-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1399
1400 * srfi-4.h, srfi-4.c (scm_frame_uniform_vector_release): New.
1401 * unif.c (scm_bit_set_star_x, scm_bit_count_star_x): Use it to get
1402 more efficient access to the u32vector.
1403
1404 * tags.h (scm_tc7_llvect, scm_tc7_uvect, scm_tc7_fvect,
1405 scm_tc7_dvect, scm_tc7_cvect, scm_tc7_svect, scm_tc7_byvect,
1406 scm_tc7_ivect): Renamed to scm_tc7_unused_1 to scm_tc7_unused_8.
1407
1408 * validate.h (SCM_VALIDATE_VECTOR_OR_DVECTOR): Accept f64vectors
1409 instead of the old-style dvectors.
1410
1411 * gh_data.c: Use new-style uniform arrays in place of old-style
1412 ones.
1413
1414 * eq.c, evalext.c, gc-card.c, gc-mark.c, objects.c, print.c,
1415 ramap.c, unif.c: Do no longer handle old-style uniform vectors.
1416
1417 * unif.c (scm_bit_set_star_x, scm_bit_count_star_x): Use u32vectors
1418 instead of old-sytle uvectors.
1419
1420 * convert.c, convert.i.c: Rewritten completely, using
1421 scm_any_to_u8vector, etc and other new-style uniform vector
1422 functions.
1423
1424 * random.c (scm_random_solid_sphere_x,
1425 scm_random_hollow_sphere_x): Do not validate vector argument, this
1426 is already done elsewhere.
1427
1428 * srfi-4.h, srfi-4.i.c, srfi-4.c (coerce_to_uvec,
1429 scm_any_to_u8vector, etc): New.
1430 (scm_uniform_element_size, scm_uniform_vector_length): Do no
1431 longer handle old-style uniform vectors.
1432
1433 * read.c (scm_lreadr): Bugfix: include the last bit in the
1434 bit vector.
1435
1436 2004-10-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1437
1438 * unif.h, unif.c (scm_array_creator): New.
1439 (scm_i_get_old_prototype): New.
1440 (scm_array_prototype): use it to return old-style prototype, never
1441 return creators.
1442 (scm_make_uve): Use scm_call_1 instead of scm_call_2 with a second
1443 arg of SCM_UNDEFINED. The latter is wrong.
1444
1445 * unif.h, unif.c (scm_make_u1vector): New, but only temporary.
1446 (make_uve): Removed.
1447 (scm_i_proc_make_vector, scm_i_proc_make_string,
1448 scm_i_proc_make_u1vector): New.
1449 (scm_init_unif): Initialize them.
1450 (scm_i_convert_old_prototype): New.
1451 (scm_make_uve): Use it to get the creator procedure. Removed all
1452 old code that created old-style uniform vectors.
1453 (scm_array_p): Handle generic vectors.
1454 (scm_dimensions_to_uniform_array): Do not fill new array with
1455 prototype when that is a procedure.
1456 (scm_list_to_uniform_array): Also accept a list of lower bounds as
1457 the NDIM argument.
1458 (scm_i_print_array): Print rank for shared or non-zero-origin
1459 vectors.
1460 (tag_proto_table, scm_i_tag_to_prototype, scm_i_read_array): New.
1461 (scm_raprin1): Do not call scm_i_array_print for enclosed arrays,
1462 which I do not understand yet.
1463 (scm_array_prototype): Explicitely handle generic vectors.
1464
1465 * numbers.c, number.h (scm_i_print_complex, icmplx2str): New.
1466 (iflo2str): Use icmplx2str for complex numbers.
1467
1468 * srfi-4.c, srfi-4.h (scm_i_read_homogenous_vector,
1469 scm_i_uniform_vector_prototype): Removed.
1470 (scm_i_uniform_vector_creator): New.
1471 (SCM_UVEC_C32, scm_c32vector, scm_make_c32vector, etc,
1472 SCM_UVEC_C64, scm_c64vector, scm_make_c64vector, etc): New.
1473 Updated all tables and generic functions to support them.
1474 (scm_i_proc_make_u8vector, scm_i_proc_make_s8vector, etc): New.
1475 (scm_init_srfi_4): Initialize them.
1476
1477 * srfi-4.i.c (scm_take_u8vector, etc): use uvec_sizes instead of
1478 sizeof(CTYPE) as explained in the comment.
1479
1480 * read.c (scm_lreadr): Call scm_i_read_array for all characters
1481 following '#' that can start an array. Explicitely disambiguate
1482 'i' and 'e' between introducing numbers and uniform vectors. Do
1483 not call scm_i_read_homogenous_vector, since that is also handled
1484 by scm_i_read_array now.
1485
1486 2004-10-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1487
1488 First cut at integrating uniform vectors from srfi-4 with the rest
1489 of Guile. This change replaces scm_tc7_byvect with a s8 uniform
1490 vector. The plan is to gradually replace one type after the other
1491 until none is left and then to consider general cleanups and
1492 optimizations.
1493
1494 * srfi-4.h, srfi-4.i.c (scm_u8vector_elements, etc): New.
1495
1496 * srfi-4.h, srfi-4.c (scm_uniform_vector_p,
1497 scm_uniform_vector_ref, scm_uniform_vector_set_x,
1498 scm_uniform_vector_to_list, scm_is_uniform_vector,
1499 scm_c_uniform_vector_lengths, scm_c_uniform_vector_size,
1500 scm_uniform_vector_elements, scm_uniform_vector_element_size,
1501 scm_uniform_vector_release): New.
1502 (scm_i_uniform_vector_prototype, scm_i_uniform_vector_tag): New.
1503 (scm_uniform_element_size, scm_uniform_vector_length): Moved here
1504 from unif.h, unif.c and extended to handle both the old and new
1505 uniform vectors.
1506
1507 * tags.h (scm_tc7_byvect): Commented out.
1508
1509 * unif.h, unif.c (scm_uniform_vector_ref, scm_array_ref): Renamed
1510 the former to the latter.
1511 (scm_uniform_vector_length, scm_uniform_element_size): Moved to
1512 srfi-4.h, srfi-4.c.
1513 (scm_make_uve): Call scm_make_s8vector for #\nul prototype.
1514 (scm_array_p, scm_array_rank, scm_array_dimensions,
1515 scm_transpose_array, scm_enclose_array, scm_array_ref, scm_cvref,
1516 scm_array_set_x, scm_array_contents, scm_uniform_array_read_x,
1517 scm_array_to_list, scm_array_prototype): Handle srfi-4 uniform
1518 vectors. Removed code for scm_tc7_byvect.
1519 (scm_dimensions_to_uniform_array): Fill array with 0 when
1520 prototype is #\nul.
1521 (scm_i_print_array_dimension, scm_i_legacy_tag,
1522 scm_i_print_array): New.
1523 (scm_raprin1): Call scm_i_print_array for arrays. Removed code
1524 for scm_tc7_byvect.
1525
1526 * ramap.c (scm_ra_matchp, scm_array_fill_int, racp,
1527 scm_array_index_map_x, raeql_1, scm_array_equal_p): Handle srfi-4
1528 uniform vectors. Removed code for scm_tc7_byvect
1529
1530 * print.c (iprin1): Removed code for scm_tc7_byvect.
1531 * objects.c (scm_class_of): Likewise.
1532 * gc-mark.c (scm_gc_mark_dependencies): Likewise.
1533 * gc-card.c (scm_i_sweep_card): Likewise.
1534 * evalext.c (scm_self_evaluating_p): Likewise.
1535 * eq.c (scm_equal_p): Likewise.
1536
1537 * gh_data.c (gh_chars2byvect): Reimplemented with
1538 scm_make_s8vector.
1539 (gh_scm2chars): Handle s8vectors, removed code for scm_tc7_byvect.
1540
1541 * srfi-4.c (take_uvec): New.
1542 (alloc_uvec): Use it.
1543 * srfi-4.h, srfi-4.i.c (scm_take_u8vector, etc): New.
1544
1545 * random.c (vector_scale, vector_scale_x): Renamed former to the
1546 latter, since it modifies its argument.
1547 (vector_scale_x, vector_sum_squares, scm_random_normal_vector_x):
1548 Do not use scm_universal_vector_length for non-uniform vectors.
1549 Use scm_f64vector_elements to access innards of uniform vectors.
1550
1551 * convert.i.c: Convert srfi-4 style uniform vectors when
1552 requested.
1553 * convert.c (scm_c_scm2chars, scm_c_chars2scm,
1554 scm_c_chars2byvect): Use a s8vector instead of a scm_tc7_byvect.
1555
1556 2004-10-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1557
1558 * numbers.h, numbers.c (scm_i_print_double): New.
1559
1560 * srfi-4.c, srfi-4.h, srfi-4.i.c: New files, initially from
1561 ../srfi/ but heavily modified.
1562 * Makefile.am: Add them in all the right places.
1563 * init.c (scm_init_guile_1): Call scm_init_srfi_4.
1564 * read.c (scm_lreadr): Call scm_i_read_homogenous_vector for '#f',
1565 '#u', and '#s'.
1566
1567 * read.h, read.c (scm_i_input_error): Renamed from scm_input_error
1568 and made non-static. Changed all uses.
1569
1570 2004-10-22 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1571
1572 * variable.c, threads.c, struct.c, stackchk.c, smob.c, root.c,
1573 print.c, ports.c, mallocs.c, hooks.c, hashtab.c, fports.c,
1574 guardians.c, filesys.c, coop-pthreads.c, continuations.c: Use
1575 scm_uintprint to print unsigned integers, raw heap words, and
1576 adresses, using a cast to scm_t_bits to turn pointers into
1577 integers.
1578
1579 * unif.c: Include "libguile/print.h".
1580
1581 * numbers.h, numbers.c (SCM_T_INTBUFLEN): Increased to cover
1582 scm_t_intmax values.
1583 (scm_uint2str): New, for scm_t_uintmax.
1584 (scm_iint2str): Argument type changed to scm_t_intmax,
1585 reimplemented in terms of scm_uint2str.
1586
1587 * print.c, print.h (scm_uintprint): New, for printing
1588 scm_t_uintmax values.
1589 (scm_intprint): Argument type changed to scm_t_intmax.
1590
1591 * sort.c (quicksort, scm_merge, scm_merge_list_x,
1592 scm_merge_list_step, scm_merge_vector_step): Inserted SCM_TICKs at
1593 strategic places so that the loops can be interrupted.
1594
1595 * Makefile.am (INCLUDES): Use @LTDLINC@ instead of
1596 "-I$(top_srcdir)/libguile-ltdl".
1597 (libguile_la_LIBADD): Use @LIBLTDL@ instead of
1598 "../libguile-ltdl/libguile-ltdl.a".
1599
1600 * guile.c, dynl.c: Switched to using libltdl directly. Replaced
1601 all references to scm_lt_* with just lt_*. Include <ltdl.h>
1602 instead of <libguile-ltdl.h>.
1603
1604 2004-10-20 Marius Vollmer <mvo@zagadka.de>
1605
1606 * sort.c (quicksort): Copy pivot out of the array while
1607 constructing the partitions; it could get overwritten otherwise.
1608 Because of the ultimate insertion sort, this bug did not cause
1609 quicksort to fail, it just put all the burdon on the insertion
1610 sort and was thus very slow. Thanks to Rolan Orre for reporting
1611 the slowness!
1612
1613 2004-10-19 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1614
1615 * numbers.c (scm_i_range_error): New.
1616 * conv-integer.i.c, conv-uinteger.i.c: Use it instead of
1617 scm_out_of_range.
1618
1619 * sort.c (scm_restricted_vector_sort_x): Validate startpos <=
1620 endpos. State inclusiveness/exclusiveness of bounds in docstring.
1621
1622 * unif.c (scm_array_p): When no prototype is given, explicitely
1623 test for allowable types, do not simply return true. Thanks to
1624 Roland Orre for reporting this!
1625
1626 * private-gc.h (SCM_DEFAULT_MAX_SEGMENT_SIZE): Increase to 20 Mib.
1627
1628 * gc-segment.c (scm_i_get_new_heap_segment): Limit size of new
1629 segment to scm_max_segment_size.
1630
1631 2004-10-08 Han-Wen Nienhuys <hanwen@xs4all.nl>
1632
1633 * gc.c (scm_igc): put scm_gc_running-- before running hooks.
1634
1635 * inline.h (scm_double_cell): abort if GC running.
1636 (scm_cell): idem.
1637
1638 2004-10-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1639
1640 * error.c (scm_wrong_type_arg): Do not talk about "argument" for
1641 pos == 0.
1642
1643 Keywords no longer store a 'dash symbol'. Instead, they store a
1644 symbol with their real name.
1645
1646 * keywords.h, keywords.c, deprecated.h, deprecated.c
1647 (SCM_KEYWORDP, SCM_KEYWORDSYM): Deprecated and implemented in
1648 terms of scm_is_keyword and scm_keyword_dash_symbol.
1649
1650 * keywords.h, keywords.c, discouraged.h, discouraged.c
1651 (scm_make_keyword_from_dash_symbol, scm_keyword_dash_symbol,
1652 scm_c_make_keyword): Discouraged.
1653
1654 * keywords.h, keywords.c (scm_symbol_to_keyword,
1655 scm_keyword_to_symbol): Implemented in C.
1656 (scm_is_keyword, scm_from_locale_keyword,
1657 scm_from_locale_keywordn): New.
1658
1659 * goops.c: Replaced SCM_KEYWORDP with scm_is_keyword.
1660
1661 * snarf.h (SCM_KEYWORD, SCM_GLOBAL_KEYWORD): Use
1662 scm_from_locale_keyword instead of scm_c_make_keyword.
1663
1664 * keywords.c (scm_symbol_to_keyword): Use SCM_ASSERT_TYPE for a
1665 better error message.
1666
1667 * deprecated.c: Include discouraged.h and keywords.h.
1668
1669 * read.c (scm_lreadr): Simply do (symbol->keyword (read)) after
1670 reading '#:' or ':'. See NEWS for consequences.
1671
1672 2004-09-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1673
1674 * read.c (scm_lreadr): Revert change from 2004-09-22: string
1675 literals are now read-write again (until SCM_STRING_CHARS is
1676 removed).
1677
1678 * strings.c (SCM_STRING_CHARS): Explicitely reject read-only
1679 strings with an error message that blames SCM_STRING_CHARS.
1680
1681 * options.c (change_option_setting): Use scm_car instead of
1682 explicit type check plus SCM_CAR.
1683
1684 * print.h, print.c (SCM_PRINT_HIGHLIGHT_PREFIX,
1685 SCM_PRINT_HIGHLIGHT_SUFFIX): New printer options.
1686 (scm_iprin1): Use them instead of the previoulsy hardcoded
1687 strings.
1688 (scm_init_print): Initialize them.
1689
1690 * backtrace.c (display_frame_expr): Do not remove control
1691 characters from the final string. Print it directly using
1692 scm_display.
1693
1694 * ramap.c (scm_array_equal_p): Include scm_tc7_svect in switch.
1695 Thanks to Roland Orre!
1696
1697 2004-09-29 Kevin Ryde <user42@zip.com.au>
1698
1699 * regex-posix.c (scm_regexp_exec): Correction to last change, should
1700 be whole original string in match struct, not offsetted substring.
1701
1702 2004-09-24 Han-Wen Nienhuys <hanwen@xs4all.nl>
1703
1704 * gc.c (scm_gc_unprotect_object): abort if called during GC.
1705
1706 2004-09-24 Marius Vollmer <mvo@zagadka.de>
1707
1708 * Makefile.am (EXTRA_DIST): Added gettext.h.
1709
1710 * smob.c, smob.h (scm_assert_smob_type): New.
1711
1712 * Makefile.am (guile_CFLAGS, guile_LDFLAGS, libguile_la_CFLAGS):
1713 Include GUILE_CFLAGS.
1714 (libguile_la_LIBADD): Removed THREAD_LIBS_LOCAL, which is unused
1715 now.
1716 (libpath.h): Put GUILE_CFLAGS in the build-info.
1717
1718 2004-09-23 Marius Vollmer <mvo@zagadka.de>
1719
1720 * print.h (scm_print_state): Added highlight_objects.
1721 * print.c (make_print_state, scm_free_print_state): Initialize it
1722 to SCM_EOL.
1723 (scm_iprin1): Wrap output in '{...}' when object is contained in
1724 highlight_objects.
1725
1726 * backtrace.h, backtrace.c (scm_display_backtrace_with_highlights,
1727 scm_backtrace_with_highlights): New. Set highlight_objects of
1728 printstate.
1729
1730 * error.c (scm_error_scm): Document new meaning of data/rest
1731 argument for out-of-range and wrong-type-arg errors.
1732 (scm_out_of_range, scm_out_of_range_pos, scm_wrong_type_arg,
1733 scm_wrong_type_arg_msg): Pass bad_value in rest argument of
1734 exception so that it gets highlighted in the backtrace.
1735 Don't talk about "argument" when not giving a position.
1736
1737 * throw.c (handler_message): The rest argument is the fourth
1738 argument, not everything after the third. Call
1739 scm_display_backtrace_with_highlights, passing the rest argument
1740 when appropriate.
1741
1742 2004-09-22 Marius Vollmer <mvo@zagadka.de>
1743
1744 From Jan Nieuwenhuizen <janneke@gnu.org> and Bruno Haible
1745 <bruno@clisp.org>:
1746
1747 * i18n.c: Handle --disable-nls (thanks Bruno).
1748
1749 * posix.c (scm_init_posix): Add LC_PAPER, LC_NAME, LC_ADDRESS,
1750 LC_TELEPHONE, LC_MEASUREMENT, LC_IDENTIFICATION.
1751
1752 * i18n.c (scm_i_to_lc_category): New name and export. Support all
1753 LC categories.
1754 * posix.c (scm_setlocale): Use it.
1755
1756 * i18n.h, i18n.c (scm_textdomain, scm_bindtextdomain,
1757 scm_bind_textdomain_codeset): Make wrappers similar to C function
1758 they wrap.
1759
1760 * i18n.h: New file.
1761 * i18n.c: New file.
1762 * gettext.h: New file, taken from GNU gettext.
1763 * init.c: Include libguile/i18n.h.
1764 (scm_init_guile_1): Add call to scm_init_i18n().
1765 * Makefile.am (libguile_la_SOURCES): Add i18n.c.
1766 (DOT_X_FILES): Add i18n.x.
1767 (DOT_DOC_FILES): Add i18n.doc.
1768 (libguile_la_LDFLAGS): Add @LTLIBINTL@.
1769 (modinclude_HEADERS): Add i18n.h.
1770
1771 2004-09-22 Marius Vollmer <mvo@zagadka.de>
1772
1773 * gh_list.c: Replaced SCM_CAR, etc with scm_car, etc.
1774
1775 * discouraged.h, tags.h (SCM_CONSP, SCM_NCONSP): Moved to
1776 discouraged.h. Replaced all uses with scm_is_pair.
1777 (SCM_I_CONSP): New name for SCM_CONSP.
1778
1779 * pairs.h, pairs.c (scm_is_pair, scm_is_null, scm_car, scm_cdr,
1780 scm_i_chase_pairs, SCM_I_A_PAT, SCM_I_D_PAT, etc, scm_caar,
1781 scm_cadr, etc): New.
1782 (SCM_NULLP, SCM_NNULLP): Moved to discouraged.h. Replaced all
1783 uses with scm_is_null.
1784
1785 * eval.c (scm_eval, scm_apply, call_cxr_1): Use scm_i_chase_pairs
1786 instead of explicit code.
1787
1788 2004-09-22 Marius Vollmer <mvo@zagadka.de>
1789
1790 * srfi-13.c (scm_string_contains, scm_string_contains_ci):
1791 Reworded logic a bit so that #f is returned immediately when s1 is
1792 too short to contain s2.
1793
1794 * regex-posix.c (scm_regexp_exec): Convert string to
1795 zero-terminated locale string before matching against it.
1796
1797 * strings.h, strings.c (scm_substring_read_only,
1798 scm_c_substring_read_only, scm_i_substring_read_only): New.
1799 (RO_STRING_TAG, IS_RO_STRING): New.
1800 (scm_i_string_writable_chars): Bail on read-only strings.
1801
1802 * read.c (scm_lreadr): use scm_c_substring_read_only for string
1803 literals, thus making them read-only as specified by R5RS.
1804
1805 2004-09-22 Marius Vollmer <mvo@zagadka.de>
1806
1807 * eq.c (scm_equal_p): Allow smobs with different flags to be equal
1808 by testing for smobs before insisting on equal SCM_CELL_TYPES.
1809
1810 2004-09-21 Marius Vollmer <mvo@zagadka.de>
1811
1812 * numbers.h, numbers.c: Include <gmp.h> in numbers.h, not in
1813 numbers.c.
1814 (scm_to_mpz, scm_from_mpz): New.
1815 Thanks to Andreas Vögele!
1816
1817 * read.c (skip_scsh_block_comment): Recognize "!#" everywhere, not
1818 just on a line of its own.
1819
1820 * srfi-13.c (scm_string_any, scm_string_every,
1821 scm_string_tabulate, string_upcase_x, string_down_case_x,
1822 string_titlecase_x, string_reverse_x, scm_string_tokenize): Use
1823 size_t instead of int for indices into strings. Make sure that no
1824 over- or underflow occurs. Thanks to Andreas Vögele!
1825 (scm_xsubstring, scm_string_xcopy_x): Use ints for 'extended'
1826 indices, which can also be negative.
1827
1828 2004-09-20 Marius Vollmer <mvo@zagadka.de>
1829
1830 * gc-mark.c (SCM_MARK_BACKING_STORE): Removed, it was unused.
1831
1832 * threads.c (scm_threads_mark_stacks): Call
1833 SCM_MARK_BACKING_STORE. Also, do not use stack_len local, it was
1834 only used once.
1835
1836 2004-09-13 Jan Nieuwenhuizen <janneke@gnu.org>
1837
1838 * srfi-13.c (scm_string_contains, scm_string_contains_ci):
1839 Bugfix: when subtracting unsigned values, make sure that result
1840 does not wrap.
1841
1842 2004-09-09 Kevin Ryde <user42@zip.com.au>
1843
1844 * filesys.c, stime.c (_POSIX_C_SOURCE): Use this only on hpux, it
1845 causes too many problems elsewhere (glibc, freebsd, mingw). Reported
1846 by Andreas Vögele.
1847
1848 2004-09-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1849
1850 * Makefile.am (EXTRA_libguile_la_SOURCES): Removed "alloca.c".
1851
1852 * eq.c (real_eqv): Pretend that all NaNs are equal.
1853
1854 * numbers.c (scm_integer_expt): Do not accept inexact integers.
1855
1856 2004-09-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1857
1858 * srfi-13.c (scm_string_trim_right, scm_string_xcopy_x): Correctly
1859 use size_t for some locals instead of int.
1860
1861 * read.c (scm_flush_ws): Detect "#!"-style comments here.
1862 (scm_lreadr): Abort on seeing "#!", which should no longer happen.
1863 (skip_scsh_block_comment): Use scm_input_error instead of
1864 scm_misc_error in case of EOF.
1865
1866 2004-09-07 Kevin Ryde <user42@zip.com.au>
1867
1868 * numbers.c (scm_integer_expt): Reject exponent +/-inf.
1869 Bug report by Bill Schottstaedt.
1870
1871 * ports.c (scm_getc, scm_lfwrite): Recognise \a \b and \r for port
1872 column.
1873 * ports.h (SCM_ZEROCOL, SCM_DECCOL): New macros.
1874
1875 * posix.c (scm_access): Update docstring per manual.
1876
1877 * posix.c (scm_nice): Correction to error detection. Reported by
1878 Matthias Koeppe.
1879
1880 * stime.c (scm_current_time, scm_gettimeofday, scm_strptime): Don't
1881 throw error before unlocking mutex with SCM_ALLOW_INTS.
1882
1883 2004-09-06 Kevin Ryde <user42@zip.com.au>
1884
1885 * stime.h (SCM_TIME_UNITS_PER_SECOND): Use sysconf(_SC_CLK_TCK) when
1886 available. This also gets around CLK_TCK being absent when
1887 _GNU_SOURCE and _POSIX_C_SOURCE are defined in stime.c.
1888
1889 2004-09-03 Stefan Jahn <stefan@lkcc.org>
1890
1891 * threads.c (scm_threads_mark_stacks): Fixed local variable
1892 definitions.
1893
1894 * strings.c (scm_i_substring_copy, scm_string_append): Fixed
1895 local variable definitions.
1896
1897 * stime.c (_POSIX_C_SOURCE): Do not define this item on
1898 MinGW32 because it conflicts with its pthread headers.
1899 (scm_mktime): Consider the HAVE_STRUCT_TM_TM_ZONE define.
1900 (scm_strftime): Using scm_from_locale_string() instead of
1901 scm_makfrom0str().
1902
1903 * posix.c (scm_putenv): Fixed typo in the !HAVE_UNSETENV
1904 part.
1905
1906 * numbers.c (scm_init_numbers): Removed check_sanity() call
1907 inside GUILE_DEBUG. The function has been removed somewhen...
1908
1909 * filesys.c (_POSIX_C_SOURCE): Do not define this item on
1910 MinGW32 because it conflicts with its pthread headers.
1911
1912 2004-08-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1913
1914 * strings.c (SCM_STRINGP): Accept all strings.
1915 (SCM_STRING_CHARS): Reject shared substrings here.
1916
1917 * script.c (scm_compile_shell_switches): Added 2003 and 2004 to
1918 the Copyright years.
1919
1920 2004-08-27 Kevin Ryde <user42@zip.com.au>
1921
1922 * socket.c (scm_fill_sockaddr): Use HAVE_STRUCT_SOCKADDR_SIN_LEN and
1923 HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN for sockaddr fields, SIN_LEN and
1924 SIN_LEN6 are not defined on all systems. Reported by Michael Tuexen.
1925
1926 2004-08-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1927
1928 * strings.h, strings.c (scm_i_make_symbol): Added FLAGS parameter.
1929 * symbols.h, symbols.c (SCM_I_F_SYMBOL_UNINTERNED,
1930 scm_i_symbol_is_interned, scm_i_mem2symbol,
1931 scm_i_mem2uninternedsymbol): Use it to store uninternedness flag.
1932
1933 2004-08-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1934
1935 * srfi-13.c: First cut at thread-safeness and proper use of
1936 scm_i_string_chars et al. Copious scm_remember_upto_heres have
1937 been inserted. Made sure that no internal string pointer is used
1938 across a SCM_TICK or a possible GC.
1939
1940 * script.c (scm_compile_shell_switches): Use
1941 scm_from_locale_string instead of scm_makfrom0str.
1942
1943 * srfi-13.c (scm_string_rindex): Export to Scheme, as it has
1944 always been.
1945
1946 2004-08-25 Marius Vollmer <mvo@zagadka.de>
1947
1948 Moved SRFI-13 and SRFI-14 into the core, taking over the role of
1949 strop.c.
1950
1951 * srfi-13.c, srfi-13.h, srfi-14.c, srfi-14.h: New files.
1952 * strop.h, strop.c: Removed, they are now empty.
1953 * Makefile.am: Updated for new and removed files.
1954
1955 * symbols.h, symbols.c (scm_string_ci_to_symbol): Moved here, next
1956 to scm_string_to_symbol.
1957
1958 * chars.c (scm_char_alphabetic_p, scm_char_numeric_p,
1959 scm_char_whitespace_p, scm_upper_case_p, scm_lower_case_p,
1960 scm_char_is_both_p): Use scm_char_set_contains_p with the proper
1961 charset instead of libc functions.
1962
1963 * strorder.c (scm_string_equal_p, scm_string_ci_equal_p,
1964 scm_string_less_p, scm_string_leq_p, scm_string_gr_p,
1965 scm_string_geq_p, scm_string_ci_less_p, scm_string_ci_leq_p,
1966 scm_string_ci_gr_p, scm_string_ci_geq_p): Use scm_string_eq, etc
1967 instead of explicit code.
1968
1969 * deprecated.c, load.c, posix.c, unif.c, symbols.c: Include
1970 "srfi-13.h" instead of "strop.h".
1971
1972 * init.c (scm_init_guile_1): Call scm_init_srfi_13 and
1973 scm_init_srfi_14. Do not call scm_init_strop.
1974
1975 2004-08-24 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1976
1977 * numbers.c (scm_inf_p): Synced docstring back from manual.
1978
1979 2004-08-22 Marius Vollmer <mvo@zagadka.de>
1980
1981 * strings.c (get_str_buf_start): New helper function.
1982 (scm_i_substring, scm_i_substring_copy, scm_i_substring_shared,
1983 scm_i_string_char, scm_i_string_writable_chars): Use it.
1984 (scm_i_substring_copy): Make START argument optional for C
1985 callers, for upcoming SRFI-13 integration.
1986
1987 2004-08-21 Marius Vollmer <mvo@zagadka.de>
1988
1989 From Richard Todd, Thanks!
1990
1991 * script.c (scm_compile_shell_switches): added '-L' switch to add
1992 to the %load-path.
1993
1994 2004-08-21 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
1995
1996 * eval.c (unmemoize_exprs): When dropping internal body markers
1997 from the output during unmemoization, also drop those that are not
1998 immediately at the beginning of a body.
1999
2000 2004-08-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2001
2002 * eval.c (scm_lookupcar1): Report "Variable used before given a
2003 value" insetad of an "Unbound" one for variables that are found
2004 but still contain SCM_UNDEFINED.
2005
2006 * posix.c (scm_mkstemp): Correction to the correction, mkstemp
2007 expects a null-terminated string in the locale encoding, but
2008 scm_i_string_writable_chars doesn't give that. Fixed by letting
2009 mkstemp modify a locale version of the tmpl argument and copying
2010 the result back into tmpl.
2011
2012 * strop.c (scm_substring_move_x): Store into str2, not str1.
2013
2014 2004-08-20 Kevin Ryde <user42@zip.com.au>
2015
2016 * posix.c (scm_mkstemp): Correction to new locale_string stuff, need
2017 to modify the input string.
2018
2019 2004-08-19 Marius Vollmer <mvo@zagadka.de>
2020
2021 * deprecated.c (SCM_SYMBOL_CHARS): Cast away const in return.
2022 (SCM_SYMBOL_LENGTH): It's scm_i_symbol_length, not
2023 scm_c_symbol_length.
2024
2025 2004-08-19 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2026
2027 New string implementation, with copy-on-write strings and
2028 mutation-sharing substrings, and a new internal string API.
2029 Symbols can now share memory with strings.
2030
2031 * tags.h (scm_tc7_stringbuf): New tag.
2032
2033 * strings.h, strings.c: (scm_i_string_chars, scm_i_string_length,
2034 scm_i_string_writable_chars, scm_i_string_stop_writing): New, to
2035 replace SCM_I_STRING_CHARS and SCM_I_STRING_LENGTH. Updated all
2036 uses.
2037 (scm_i_make_string, scm_c_make_string): New, to replace
2038 scm_allocate_string. Updated all uses.
2039 (SCM_STRINGP, SCM_STRING_CHARS, SCM_STRING_UCHARS,
2040 SCM_STRING_LENGTH): Deprecated.
2041 (scm_allocate_string, scm_take_str, scm_take0str, scm_mem2string,
2042 scm_str2string, scm_makfrom0str, scm_makfrom0str_opt):
2043 Discouraged. Replaced all uses with scm_from_locale_string or
2044 similar, as appropriate.
2045 (scm_c_string_length, scm_c_string_ref, scm_c_string_set_x,
2046 scm_c_substring, scm_c_substring_shared, scm_c_substring_copy,
2047 scm_substring_shared, scm_substring_copy): New.
2048
2049 * symbols.c, symbols.h (SCM_SYMBOLP, SCM_SYMBOL_FUNC,
2050 SCM_SET_SYMBOL_FUNC, SCM_SYMBOL_PROPS, SCM_SET_SYMBOL_PROPS,
2051 SCM_SYMBOL_HASH, SCM_SYMBOL_INTERNED_P, scm_mem2symbol,
2052 scm_str2symbol, scm_mem2uninterned_symbol): Discouraged.
2053 (SCM_SYMBOL_LENGTH, SCM_SYMBOL_CHARS, scm_c_symbol2str):
2054 Deprecated.
2055 (SCM_MAKE_SYMBOL_TAG, SCM_SET_SYMBOL_LENGTH, SCM_SET_SYMBOL_CHARS,
2056 SCM_PROP_SLOTS, SCM_SET_PROP_SLOTS): Removed.
2057 (scm_is_symbol, scm_from_locale_symbol, scm_from_locale_symboln):
2058 New, to replace scm_str2symbol and scm_mem2symbol, respectively.
2059 Updated all uses.
2060 (scm_gensym): Generate only the number suffix in the buffer, just
2061 string-append the prefix.
2062
2063 * error.c (scm_memory_error): Do not try to throw, just abort.
2064 Throwing will not work anyway.
2065
2066 * gh.h, gh-data.c (gh_set_substr): Made src const.
2067
2068 * ports.c (scm_i_mode_bits_n): New, for counted strings.
2069 (scm_mode_bits): Use it.
2070 (scm_c_port_for_each): Blocking GC does not seem to work, allocate
2071 a vector normally and fill that instead of consing a list with a
2072 blocked GC.
2073
2074 * read.c (scm_i_casei_streq): New, for counted strings.
2075
2076 * threads.c (gc_section_count): Removed, thread-sleeping can not
2077 be nested.
2078 (scm_i_thread_put_to_sleep): Call scm_i_leave_guile before locking
2079 admin mutex so that we can be put to sleep by other threads while
2080 blocking on that mutex. Lock all the heap mutex of all threads,
2081 including ourselves.
2082 (scm_i_thread_wake_up): Unlock all threads, including ourselves,
2083 call scm_i_enter_guile.
2084 (scm_thread_mark_stacks): Expect all threads to be suspended.
2085
2086 * gc.h, gc.c (scm_i_gc_admin_mutex): New, to protect
2087 scm_gc_mallocated, for now.
2088 (scm_init_storage): Initialize it.
2089 * gc-malloc.c (descrease_mtrigger, increase_mtrigger): Use it.
2090
2091 * gc-mark.c (scm_gc_mark_dependencies): Call scm_i_string_mark,
2092 scm_i_stringbuf_mark and scm_i_symbol_mark, as appropriate.
2093 * gc-card.c (scm_i_sweep_card): Call scm_i_string_free,
2094 scm_i_stringbuf_free and scm_i_symbol_free, as appropriate.
2095
2096 * strop.c (scm_string_copy): Use scm_c_substring to get a
2097 copy-on-write string.
2098
2099 2004-08-18 Kevin Ryde <user42@zip.com.au>
2100
2101 * arbiters.c (FETCH_STORE): New macro.
2102 (SCM_LOCK_VAL, SCM_UNLOCK_VAL): New constants.
2103 (SCM_LOCK_ARB, SCM_UNLOCK_ARB): Remove, effectively absorbed into
2104 scm_try_arbiter and scm_release_arbiter.
2105 (scm_try_arbiter, scm_release_arbiter): Use FETCH_STORE to get xchg
2106 for speed on i386, otherwise using mutex.
2107
2108 * eq.c (scm_equal_p): Remove real==fraction and fraction==real, they
2109 must be #f according to R5RS. (equal? follows eqv?, and for eqv? an
2110 exact and inexact is #f.)
2111
2112 * fports.c (fport_print): Use scm_ttyname instead of ttyname directly,
2113 to get thread safety of scm_ttyname.
2114
2115 * ports.c (ttyname): Remove prototype, unused.
2116
2117 * socket.c (scm_init_socket): Add SOCK_SEQPACKET and SOCK_RDM.
2118 Reported by Michael Tuexen.
2119
2120 2004-08-13 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2121
2122 * load.c (scm_init_load_path): Do not pass NULL to
2123 scm_to_locale_string, which would happen when GUILE_LOAD_PATH is
2124 not set. Thanks to Bill Schottstaedt.
2125
2126 2004-08-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2127
2128 * socket.c (scm_inet_aton, scm_inet_pton): Convert SCM strings to
2129 locale strings instead of accessing their internals.
2130 (scm_recv, scm_send, scm_recvfrom, scm_sendto): Use
2131 SCM_I_STRING_CHARS and SCM_I_STRING_LENGTH instead of
2132 SCM_STRING_CHARS and SCM_STRING_LENGTH.
2133
2134 * simpos.c (scm_system): Convert SCM strings to locale strings
2135 instead of accessing their internals.
2136
2137 * script.c (scm_compile_shell_switches): Convert version to locale
2138 string before printing it.
2139
2140 * rdelim.c (scm_read_delimited_x): Avoid
2141 SCM_VALIDATE_SUBSTRING_SPEC_COPY and use scm_from_size_t instead
2142 of scm_from_long for the returned number of read characters.
2143
2144 * ioext.c (scm_fdopen): Use scm_i_fdes_to_port together with
2145 scm_i_mode_bits to avoid accessing internals of SCM string from C.
2146
2147 * filesys.c (STRING_SYSCALL, STRING2_SYSCALL): New helper macros.
2148 Use them instead of SCM_SYSCALL when one or two strings need to be
2149 converted into locale strings.
2150 (my_rename): New, gathers platform dependent code for renaming.
2151 (scm_rename): Use it.
2152 (scm_readlink, scm_copy_file): Convert SCM strings to locale
2153 strings instead of accessing their internals.
2154 (scm_basename, scm_dirname): Use SCM_I_STRING_CHARS and
2155 SCM_I_STRING_LENGTH instead of SCM_STRING_CHARS and
2156 SCM_STRING_LENGTH.
2157
2158 * extensions.c (load_extension): Convert lib and init to locale
2159 strings instead of accessing the internals directly.
2160 (scm_c_load_extension): Use scm_from_locale_string instead of
2161 scm_makfrom0str.
2162
2163 * fports.h, fports.c (scm_i_fdes_to_port): New, like
2164 scm_fdes_to_port, but take mode bits directly instead of as a C
2165 string.
2166 (scm_i_fdes_to_port): Implement using above.
2167 (scm_open_file): Use scm_i_fdes_to_port together with
2168 scm_i_mode_bits to avoid accessing internals of SCM string from C.
2169 * vports.c (scm_make_soft_port): Use scm_i_fdes_to_port together
2170 with scm_i_mode_bits to avoid accessing internals of SCM string
2171 from C.
2172
2173 * ports.h (scm_i_mode_bits): New, same as scm_mode_bits but with a
2174 SCM string as argument.
2175
2176 * ports.c (scm_i_void_port): New, like scm_void_port but take mode
2177 bits directly instead of C string.
2178 (scm_void_port): Implement using above.
2179 (scm_sys_make_void_port): Use scm_i_void_port together with
2180 scm_i_mode_bits to avoid accessing internals of SCM string.
2181
2182 * strings.h, strings.c (scm_i_get_substring_spec): New.
2183
2184 * socket.c, rw.c, deprecated.h, validate.h
2185 (SCM_VALIDATE_STRING_COPY): Deprecated. Replaced all uses with
2186 SCM_VALIDATE_STRING plus SCM_I_STRING_CHARS or
2187 scm_to_locale_string, etc.
2188 (SCM_VALIDATE_SUBSTRING_SPEC_COPY): Deprecated. Replaced as
2189 above, plus scm_i_get_substring_spec.
2190
2191 * regex-posix.c, read.c, random.c, ramap.c, print.c, numbers.c,
2192 hash.c, gc.c, gc-card.c, convert.i.c, backtrace.c, strop.c,
2193 strorder.c, strports.c, struct.c, symbols.c, unif.c, ports.c: Use
2194 SCM_I_STRING_CHARS, SCM_I_STRING_UCHARS, and SCM_I_STRING_LENGTH
2195 instead of SCM_STRING_CHARS, SCM_STRING_UCHARS, and
2196 SCM_STRING_LENGTH, respectively. Also, replaced scm_return_first
2197 with more explicit scm_remember_upto_here_1, etc, or introduced
2198 them in the first place.
2199
2200 * posix.c (WITH_STRING): New helper macro. Use it where one
2201 locale string is needed for a short piece of code.
2202 (STRING_SYSCALL): New helper macro. Use it instead of SCM_SYSCALL
2203 when one locale string is needed.
2204 (scm_mkstemp): Convert tmpl to a locale string.
2205 (scm_putenv): Rewritten to use only C strings.
2206 (scm_setlocale, scm_crpt): Convert argument strings to locale
2207 strings.
2208
2209 2004-08-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2210
2211 * load.c (scm_primitive_load_path): Do not check for absolute
2212 filenames when scm_sys_search_load_path returns false, which will
2213 return absolute filenames unchanged.
2214
2215 2004-08-11 Marius Vollmer <mvo@zagadka.de>
2216
2217 * gc.c, procprop.c (scm_init_storage, scm_stand_in_procs,
2218 scm_stand_in_proc): Use a hastable for scm_stand_in_procs instead
2219 of an alist. Thanks to Matthias Koeppe!
2220
2221 2004-08-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2222
2223 * strings.h, deprecated.h (SCM_STRING_COERCE_0TERMINATION_X):
2224 Moved from string.h to deprecated.h.
2225
2226 * deprecated.c, deprecated.h (SCM_CHARS, SCM_LENGTH): Removed.
2227
2228 * strings.h, strings.c (SCM_MAKE_STRING_TAG): Renamed to
2229 SCM_I_MAKE_STRING_TAG, changed all uses.
2230 (SCM_STRING_CHARS, SCM_STRING_UCHARS, SCM_STRING_LENGTH): Renamed
2231 to SCM_I_STRING_CHARS, SCM_I_STRING_UCHARS, and SCM_I_LENGTH
2232 respectively. For a short time, the old names are still there as
2233 aliases. Not all uses have been changed yet, but the ones in
2234 strings.c have.
2235 (SCM_STRING_MAX_LEN): Do not hardcode to 24 bits, compute from
2236 SCM_T_BITS_MAX.
2237 (scm_is_string, scm_from_locale_string, scm_from_locale_stringn,
2238 scm_take_locale_string, scm_take_locale_stringn,
2239 scm_to_locale_string, scm_to_locale_stringn,
2240 scm_to_locale_stringbuf): New.
2241 (scm_c_string2str, scm_c_substring2str): Deprecated by moving to
2242 deprecated.[hc]. Implemented in terms of the new functions above.
2243 (scm_take_str, scm_take0str, scm_mem2string, scm_str2string,
2244 scm_makfrom0str): Reimplemented in terms of the new functions from
2245 above. They will be discouraged shortly.
2246 (scm_substring): Do not use scm_mem2string.
2247 (scm_i_allocate_string_pointers, scm_i_free_string_pointers): New,
2248 to replace similar code from posix.c, simpos.c, and dynl.c.
2249 (scm_string_append): Use memcpy instead of explicit loop. Do not
2250 use register keyword. Use plain 'char' instead of 'unsigned
2251 char'.
2252
2253 * strports.c (scm_mkstrport): Use SCM_I_STRING_UCHARS instead of
2254 SCM_STRING_UCHARS. Use SCM_I_STRINGP instead of SCM_STRINGP.
2255
2256 * strop.c (scm_i_index): Replaced SCM_STRINGP, SCM_STRING_CHARS,
2257 and SCM_STRING_LENGTH with SCM_I_STRINGP, SCM_I_STRING_CHARS, and
2258 SCM_I_STRING_LENGTH, respectively. Pass string object directly,
2259 not as a pointer. Use scm_remember_upto_here_1 to protect it.
2260
2261 * read.c (scm_input_error): Use a SCM value for 'fn', not a C
2262 string. This avoids a conversion round-trip.
2263
2264 * gh_data.c: Replaced SCM_STRINGP, SCM_STRING_CHARS, and
2265 SCM_STRING_LENGTH with SCM_I_STRINGP, SCM_I_STRING_CHARS, and
2266 SCM_I_STRING_LENGTH, respectively.
2267 (gh_scm2newstr): Implement in terms of scm_to_locale_string.
2268
2269 * environments.c: Instead calling scm_puts on the SCM_STRING_CHARS
2270 of a string, call scm_display on the string itself.
2271
2272 * dynwind.c, dynwind.h (scm_frame_free): New.
2273
2274 * stime.c, socket.c, simpos.c, procs.c, posix.c, ports.c,
2275 net_db.c, fports.c, filesys.c, eval.c, deprecation.c, dynl.c:
2276 Replaced uses of SCM_STRING_CHARS with proper uses of
2277 scm_to_locale_string. Replaced SCM_STRINGP with scm_is_string.
2278 Replaced scm_mem2string with scm_from_locale_string.
2279
2280 * simpos.c, posix.c (allocate_string_pointers, environ_list_to_c):
2281 Removed, replaced all uses with scm_i_allocate_string_pointers.
2282
2283 * load.h, load.c (scm_internal_parse_path): Removed.
2284 (scm_parse_path): Use scm_string_split to do the work.
2285 (scm_init_load_path): Use scm_parse_path instead of
2286 scm_internal_parse_path.
2287 (scm_search_path): Rewritten string handling part of the code in
2288 terms of scm_to_locale_stringbuf and so that it is thread safe.
2289
2290 * error.c (scm_error_scm): Throw directly instead of calling
2291 scm_error, this avoids the back and forth conversion of SUBR and
2292 MESSAGE and also plugs a memory leak.
2293 (scm_error): Call scm_error_scm.
2294
2295 * backtrace.c: Replaced SCM_STRINGP with scm_is_string.
2296 (display_header): Print FNAME when it is true, not
2297 merely when it is a string.
2298
2299 * strings.h (SCM_SET_STRING_LENGTH, SCM_SET_STRING_CHARS): Removed
2300 unceremoniously. They were unused by Guile itself, and external
2301 use should stop immediately.
2302
2303
2304 2004-08-10 Marius Vollmer <mvo@zagadka.de>
2305
2306 * numbers.h, number.c, deprecated.h, deprecated.c (scm_round,
2307 scm_truncate): Renamed to scm_c_round and scm_c_truncate;
2308 deprecated versions installed in deprecated.h and deprecated.c.
2309 Changed all uses.
2310
2311 2004-08-06 Rob Browning <rlb@defaultvalue.org>
2312
2313 * net_db.c (scm_resolv_error): don't cause an exception while
2314 trying to throw an exception -- call scm_misc_error with correct
2315 arguments. The previous arguments needed a format escape that
2316 wasn't in any of the format strings.
2317
2318 2004-08-06 Kevin Ryde <user42@zip.com.au>
2319
2320 * ramap.c (scm_array_fill_x): For byvect char fill, force signed char
2321 so as not to depend on signedness of plain char. For byvect range
2322 check, throw out-of-range rather than wrong-type-arg.
2323
2324 * unif.c (scm_uniform_vector_ref, scm_array_set_x): For byvect, force
2325 signed byte range checks by using scm_to_schar and scm_from_schar,
2326 don't want to depend on signedness of C char.
2327
2328 2004-08-05 Kevin Ryde <user42@zip.com.au>
2329
2330 * arbiters.c (scm_try_arbiter): Use scm_i_misc_mutex instead of
2331 SCM_DEFER_INTS.
2332 (scm_release_arbiter): Use scm_i_misc_mutex so return value can be
2333 guaranteed if multiple threads compete to unlock.
2334 Update docstrings per doc/ref/api-scheduling.texi.
2335
2336 * filesys.c (scm_copy_file): Use fstat on the input fd rather than
2337 stat on the filename, to be certain a file rename can't mean we get
2338 info on one filesystem object but open another. This fstat usage is
2339 similar to Emacs copy-file.
2340
2341 * posix.c (scm_setgroups): Enhance docstring, per doc/ref/posix.texi.
2342
2343 * simpos.c (scm_system_star): Change scm_from_long to scm_from_int on
2344 SIGINT and SIGQUIT, since those values are ints.
2345
2346 2004-08-03 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2347
2348 * num2integral.i.c, num2float.i.c: Removed.
2349 * Makefile.am (noinst_HEADERS): Updated.
2350
2351 * numbers.h. numbers.c (scm_make_ratio): Renamed to
2352 scm_i_make_ratio and made static, replaced uses with scm_divide.
2353 (scm_complex_p): New, export as "complex?" to Scheme.
2354 (scm_number_p): Export as "number?" to Scheme.
2355 (scm_is_complex, scm_is_number): New.
2356 (scm_c_make_rectangular, scm_c_make_polar): New.
2357 (scm_make_rectangular, scm_make_polar): Use above.
2358 (scm_c_real_part, scm_c_imag_part, scm_c_magnitude, scm_c_angle):
2359 New.
2360 (scm_make_complex): Discouraged by moving to discouraged.h and
2361 discouraged.c. Replaced all uses with scm_c_make_rectangular.
2362
2363 * discouraged.h, discouraged.c, numbers.c, numbers.h
2364 (scm_is_rational): New.
2365 (scm_i_short2big, scm_i_int2big, scm_i_uint2big, scm_i_size2big,
2366 scm_i_ptrdiff2big, scm_i_long_long2big, scm_i_ulong_long2big):
2367 Removed prototypes.
2368 (scm_make_real, scm_num2dbl, scm_float2num, scm_double2num):
2369 Discouraged by moving to discouraged.h and discouraged.c.
2370 Replaced all uses with scm_from_double.
2371 (scm_num2float, scm_num2double): Discouraged by moving prototype
2372 to discouraged.h and rewriting in terms of scm_to_double.
2373 Replaced all uses with scm_to_double.
2374 (scm_to_double): Do not implement in terms of scm_num2dbl, use
2375 explicit code.
2376 (scm_from_double): Do not implement in terms of scm_make_real, use
2377 explicit code.
2378
2379 2004-08-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2380
2381 * init.c (scm_init_guile_1): Call scm_i_init_discouraged.
2382
2383 * gen-scmconfig.h.in (SCM_I_GSC_ENABLE_DISCOURAGED): New.
2384 * gen-scmconfig.c (SCM_ENABLE_DISCOURAGED): Emit based on above.
2385
2386 * eval.c (SCM_EVALIM, SCM_EVALIM2, SCM_XEVAL, SCM_XEVALCAR):
2387 Renamed to SCM_I_* in order to avoid collisions with the versions
2388 defined in deprecated.h.
2389
2390 * discouraged.h, discouraged.c: New files.
2391
2392 * deprecated.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_EQ_P,
2393 SCM_NEGATE_BOOL, SCM_BOOL, SCM_BOOT_NOT): Promoted from being
2394 deprecated to being discouraged by moving to discouraged.h.
2395
2396 * numbers.h, numbers.c, discouraged.h, discouraged.c
2397 (scm_short2num, scm_ushort2num, scm_int2num, scm_uint2num,
2398 scm_long2num, scm_ulong2num, scm_size2num, scm_ptrdiff2num,
2399 scm_num2short, scm_num2ushort, scm_num2int, scm_num2uint,
2400 scm_num2long, scm_num2ulong, scm_num2size, scm_num2ptrdiff,
2401 scm_long_long2num, scm_ulong_long2num, scm_num2long_long,
2402 scm_num2ulong_long): Discouraged by moving to discouraged.h and
2403 discouraged.c and reimplementing in terms of scm_from_* and
2404 scm_to_*. Changed all uses to the new scm_from_* and scm_to_*
2405 functions.
2406
2407 * numbers.h, numbers.c: Removed GUILE_DEBUG code.
2408 (scm_i_short2big, scm_i_ushort2big, scm_i_int2big, scm_i_uint2big,
2409 scm_i_size2big, scm_i_ptrdiff2big): Removed.
2410 (scm_i_long2big, scm_i_ulong2big): New, explicit definitions.
2411 * conv-integer.i.c, conv-uinteger.i.c: Use them instead of
2412 explicit code.
2413
2414 2004-08-02 Kevin Ryde <user42@zip.com.au>
2415
2416 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Add comments about past
2417 and current usage and migration.
2418
2419 2004-07-31 Kevin Ryde <user42@zip.com.au>
2420
2421 * error.c (scm_strerror): Use scm_i_misc_mutex around strerror since
2422 it's not thread safe.
2423 (scm_syserror): Use scm_strerror rather than SCM_I_STRERROR, to take
2424 advantage of this.
2425 * fports.c (scm_open_file): Use scm_strerror likewise.
2426 * filesys.c (scm_stat, scm_lstat): Ditto.
2427
2428 * filesys.c (scm_copy_file): Avoid fd leak when destination file
2429 cannot be opened.
2430
2431 * symbols.c (scm_gensym): Use scm_i_misc_mutex around gensym_counter
2432 update, for thread safety.
2433 (gensym_counter): Move into scm_gensym which is its only user.
2434 (scm_init_symbols): No need to explicitly initialize gensym_counter.
2435
2436 2004-07-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2437
2438 * numbers.h (scm_to_schar, scm_to_uchar, scm_to_char,
2439 scm_to_short, scm_to_ushort, scm_to_int, scm_to_uint, scm_to_long,
2440 scm_to_ulong, scm_to_long_long, scm_to_ulong_long, scm_to_intmax,
2441 scm_to_uintmax, scm_to_size_t, scm_to_ssize_t scm_from_schar,
2442 scm_from_uchar, scm_from_char, scm_from_short, scm_from_ushort,
2443 scm_from_int, scm_from_uint, scm_from_long, scm_from_ulong,
2444 scm_from_long_long, scm_from_ulong_long, scm_from_intmax,
2445 scm_from_uintmax, scm_from_size_t, scm_from_ssize_t): No longer
2446 defined in terms of scm_to_signed_integer, etc, but in terms of
2447 scm_to_int8, etc.
2448
2449 * gen-scmconfig.c (SCM_SIZEOF_INTMAX, SCM_SIZEOF_SIZE_T): New.
2450
2451 * gen-scmconfig.h.in: Removed SCM_I_GSC_*_LIMITS macros, they are
2452 no longer used.
2453
2454 * __scm.h (SCM_I_UTYPE_MAX, SCM_I_TYPE_MAX, SCM_I_TYPE_MIN,
2455 SCM_I_SIZE_MAX, SCM_I_SSIZE_MIN, SCM_I_SSIZE_MAX): New.
2456
2457 * __scm.h, gen-scmconfig.c (SCM_I_LLONG_MAX, SCM_I_LLONG_MIN,
2458 SCM_I_ULLONG_MAX, SCM_T_INT8_MIN, SCM_T_INT8_MAX, SCM_T_UINT8_MAX,
2459 SCM_T_INT16_MIN, SCM_T_INT16_MAX, SCM_T_UINT16_MAX,
2460 SCM_T_INT32_MIN, SCM_T_INT32_MAX, SCM_T_UINT32_MAX,
2461 SCM_T_INT64_MIN, SCM_T_INT64_MAX, SCM_T_UINT64_MAX,
2462 SCM_T_INTMAX_MIN, SCM_T_INTMAX_MAX, SCM_T_UINTMAX_MAX): Moved
2463 definition into __scm.h, using new SCM_I_TYPE_MIN, etc.
2464
2465 * conv-integer.i.c, conv-uinteger.i.c: New files, used to generate
2466 the functions below.
2467
2468 * Makefile.am (noinst_HEADERS): Added conv-integer.i.c and
2469 conv-uinteger.i.c.
2470
2471 * numbers.c, numbers.h (scm_to_int8, scm_to_uint8, scm_to_int16,
2472 scm_to_uint16, scm_to_int32, scm_to_uint32, scm_to_int64,
2473 scm_to_uint64, scm_from_int8, scm_from_uint8, scm_from_int16,
2474 scm_from_uint16, scm_from_int32, scm_from_uint32, scm_from_int64,
2475 scm_from_uint64): Turned from macros into proper functions.
2476 (scm_to_signed_integer, scm_to_unsigned_integer,
2477 scm_from_signed_integer, scm_from_unsigned_integer): Generate via
2478 conv-integer.i.c and conv-uinteger.i.c, as well.
2479
2480 * number.h (scm_to_ssize_t, scm_to_size_t): Use the new
2481 SCM_I_SSIZE_MIN, SCM_I_SSIZE_MAX, and SCM_I_SIZE_MAX macros for
2482 the limits. Those are always defined.
2483
2484 2004-07-29 Kevin Ryde <user42@zip.com.au>
2485
2486 * posix.c (scm_ttyname): Use scm_i_misc_mutex for thread safety.
2487
2488 2004-07-28 Kevin Ryde <user42@zip.com.au>
2489
2490 * posix.c (scm_ctermid): Use an L_ctermid buf on the stack, for thread
2491 safety.
2492
2493 * unif.c (scm_array_set_x): For svect, use scm_num2short for
2494 consistency with other vector types and to get arg and func name into
2495 error message.
2496
2497 2004-07-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2498
2499 * deprecated.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_BOOL):
2500 Reimplement using scm_is_false, scm_is_true, scm_is_bool, and
2501 scm_from_bool, respectively.
2502 (SCM_NINUMP): Added.
2503
2504 * tags.h, deprecated.h (SCM_EQ_P): Deprecated by moving it into
2505 deprecated.h. Replaced all uses with scm_is_eq.
2506
2507 2004-07-24 Kevin Ryde <user42@zip.com.au>
2508
2509 * threads.c, threads.h (scm_i_misc_mutex): New SCM_GLOBAL_MUTEX.
2510 * posix.c (scm_crypt): Use it to protect static data in crypt().
2511
2512 2004-07-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2513
2514 * deprecated.h, deprecated.c, numbers.h (SCM_INUMP, SCM_NINUMP,
2515 SCM_INUM): Deprecated by renaming them to SCM_I_INUMP,
2516 SCM_I_NINUMP and SCM_I_INUM, respectively and adding deprecated
2517 versions to deprecated.h and deprecated.c. Changed all uses to
2518 either use the SCM_I_ variants or scm_is_*, scm_to_*, or
2519 scm_from_*, as appropriate.
2520
2521 * dynwind.c (scm_i_dowinds): Removed unused code that would call
2522 the unexisting scm_cross_dynwind_binding_scope for inums on the
2523 windlist.
2524
2525 2004-07-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2526
2527 * socket.c (ipv6_net_to_num, scm_from_ipv6): Renamed
2528 ipv6_net_to_num to scm_from_ipv6, for converting from an IPv6
2529 byte-wise address to a SCM integer. Changed all uses.
2530 (ipv6_num_to_net, scm_to_ipv6): Renamed ipv6_num_to_net to
2531 scm_to_ipv6 and added type and range checking, for converting from
2532 an IPv& byte-wise address to a SCM integer. Changed all uses.
2533 (bignum_in_ipv6_range_p, VALIDATE_INET6): Removed, their function
2534 is now done by scm_to_ipv6.
2535
2536 * numbers.c (scm_to_signed_integer, scm_to_unsigned_integer): dot
2537 not accept inexact integers.
2538
2539 * validate.h, deprecated.h (SCM_VALIDATE_INUM,
2540 SCM_VALIDATE_INUM_COPY, SCM_VALIDATE_BIGINT,
2541 SCM_VALIDATE_INUM_MIN, SCM_VALIDATE_INUM_MIN_COPY,
2542 SCM_VALIDATE_INUM_MIN_DEF_COPY,SCM_VALIDATE_INUM_DEF,
2543 SCM_VALIDATE_INUM_DEF_COPY, SCM_VALIDATE_INUM_RANGE,
2544 SCM_VALIDATE_INUM_RANGE_COPY): Deprecated because they make the
2545 fixnum/bignum distinction visible. Changed all uses to
2546 scm_to_size_t or similar.
2547
2548 2004-07-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2549
2550 * cpp_cnvt.awk: Use scm_from_int instead of SCM_MAKINUM.
2551
2552 2004-07-10 Kevin Ryde <user42@zip.com.au>
2553
2554 * hash.c (scm_hashq, scm_hashv, scm_hash): Restrict to size>=1 rather
2555 than size>=0, since 0<=hash<size cannot be satisfied for size==0, and
2556 such a size causes divide-by-zeros in scm_hasher.
2557
2558 * regex-posix.c (scm_make_regexp): Free rx on error, to avoid memory
2559 leak.
2560
2561 2004-07-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2562
2563 * numbers.c (scm_is_signed_integer, scm_is_unsigned_integer):
2564 Rewritten using the same logic as scm_to_signed_integer and
2565 scm_to_unsigned_integer, respectively, which is better(tm). Also,
2566 use CHAR_BIT instead of hardcoding 8.
2567 (LLONG_MIN, LLONG_MAX, ULLONG_MAX): Removed and used
2568 SCM_I_LLONG_MIN etc. instead.
2569
2570 * numbers.h (SCM_MAKINUM, SCM_I_MAKINUM): Renamed SCM_MAKINUM to
2571 SCM_I_MAKINUM and changed all uses.
2572 * deprecated.h, deprecated.c (SCM_MAKINUM): Newly deprecated.
2573
2574 * gen-scmconfig.c (SCM_I_LLONG_MIN, SCM_I_LLONG_MAX,
2575 SCM_I_ULLONG_MAX): Instead of hard-coding the numbers, compute
2576 them by assuming twos-complement.
2577
2578 2004-07-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2579
2580 * gen-scmconfig.h.in: Added all the new SCM_I_GSC_*_LIMITS that
2581 configure now produces.
2582 * gen-scmconfig.c: Use them to output SCM_T_INT8_MIN, etc
2583 definitions, giving the limits of the integer types defined by
2584 Guile. Also, output a hard coded SCM_I_LLONG_MIN, etc since
2585 LLONG_MIN or LONG_LONG_MIN is hard to get at.
2586
2587 * numbers.h (scm_to_short, scm_to_ushort): It's SHRT_MIN, etc, not
2588 SHORT_MIN.
2589 (scm_to_size_t): Use SIZE_MAX instead of cooking our own.
2590 (scm_to_long_long, scm_to_ulong_long, scm_to_int8, scm_to_uint8,
2591 scm_to_int16, scm_to_uint16, scm_to_int32, scm_to_uint32,
2592 scm_to_int64, scm_to_uint64, scm_to_intmax, scm_to_uintmax,
2593 scm_from_long_long, scm_from_ulong_long, scm_from_int8,
2594 scm_from_uint8, scm_from_int16, scm_from_uint16, scm_from_int32,
2595 scm_from_uint32, scm_from_int64, scm_from_uint64, scm_from_intmax,
2596 scm_from_uintmax): New.
2597
2598 2004-07-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2599
2600 * tags.h (scm_is_eq): New.
2601
2602 * deprecated.h, boolean.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOL,
2603 SCM_NEGATE_BOOL, SCM_BOOLP): Deprecated by moving into
2604 "deprecated.h". Replaced all uses with scm_is_false, scm_is_true,
2605 scm_from_bool, and scm_is_bool, respectively.
2606
2607 * boolean.h (scm_is_bool): Fix bug in prototype.
2608 (scm_from_bool): The argument is "x" not "f", stupid.
2609
2610 * boolean.c (scm_is_bool): Fix typo.
2611
2612 * numbers.h, numbers.c (scm_is_integer, scm_is_signed_integer,
2613 scm_is_unsigned_integer, scm_to_signed_integer,
2614 scm_to_unsigned_integer, scm_to_schar, scm_to_uchar, scm_to_char,
2615 scm_to_short, scm_to_ushort, scm_to_long, scm_to_ulong,
2616 scm_to_size_t, scm_to_ssize_t, scm_from_schar, scm_from_uchar,
2617 scm_from_char, scm_from_short, scm_from_ushort, scm_from_int,
2618 scm_from_uint, scm_from_long, scm_from_ulong, scm_from_size_t,
2619 scm_from_ssize_t, scm_is_real, scm_to_double, scm_from_double):
2620 New.
2621
2622 2004-07-05 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2623
2624 * boolean.h, boolean.c (scm_is_true, scm_is_false, scm_from_bool,
2625 scm_to_bool): New.
2626
2627 2004-06-27 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2628
2629 * backtrace.c (display_expression, display_frame): Call
2630 scm_i_unmemoize_expr for unmemoizing a memoized object holding a
2631 single memoized expression.
2632
2633 * debug.c (memoized_print): Don't try to unmemoize the memoized
2634 object, since we can't know whether it holds a single expression
2635 or a body.
2636
2637 (scm_mem_to_proc): Removed check for lambda expression, since it
2638 was moot anyway. Whoever uses these functions for debugging
2639 purposes should know what they do: Creating invalid memoized code
2640 will cause crashes, independent of whether this check is present
2641 or not.
2642
2643 (scm_proc_to_mem): Take the closure's code as it is and don't
2644 append a SCM_IM_LAMBDA isym. To allow easier debugging, the
2645 memoized code should not be modified.
2646
2647 * debug.[ch] (scm_unmemoize, scm_i_unmemoize_expr): Removed
2648 scm_unmemoize from public use, but made scm_i_unmemoize_expr
2649 available as a guile internal function instead. However,
2650 scm_i_unmemoize_expr will only work on memoized objects that hold
2651 a single memoized expression. It won't work with bodies.
2652
2653 * debug.c (scm_procedure_source), macros.c (macro_print), print.c
2654 (scm_iprin1): Call scm_i_unmemocopy_body for unmemoizing a body,
2655 i. e. a list of expressions.
2656
2657 * eval.c (unmemoize_exprs): Drop internal body markers from the
2658 output during unmemoization.
2659
2660 * eval.[ch] (scm_unmemocopy, scm_i_unmemocopy_expr,
2661 scm_i_unmemocopy_body): Removed scm_unmemocopy from public use,
2662 but made scm_i_unmemocopy_expr and scm_i_unmemocopy_body available
2663 as guile internal functions instead. scm_i_unmemoize_expr will
2664 only work on a single memoized expression, while
2665 scm_i_unmemocopy_body will only work on bodies.
2666
2667 2004-06-21 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2668
2669 * eval.c (unmemoize_exprs): Handle semi-memoized code.
2670
2671 (scm_cons_source, scm_primitive_eval): Prefer higher level
2672 predicate SCM_FALSEP over SCM_IMP.
2673
2674 2004-06-15 Rob Browning <rlb@defaultvalue.org>
2675
2676 * script.c (scm_shell_usage): minor phrasing change.
2677
2678 * gc_os_dep.c: update ifdefery for macosx.
2679 (scm_get_stack_base): separate result initialization from
2680 declaration to slience warnings with macosx and hp-ux using gcc
2681 3.3. Thanks to Andreas Vögele.
2682
2683 2004-06-13 Han-Wen Nienhuys <hanwen@xs4all.nl>
2684
2685 * eval.c (unmemoize_exprs): use SCM_CONSP for the loop condition.
2686
2687 2004-06-06 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2688
2689 * list.[ch] (scm_i_finite_list_copy): New internal function to
2690 copy lists that are known to be finite (though not necessarily
2691 proper).
2692
2693 * debug.c (scm_procedure_source): Don't have scm_unmemocopy treat
2694 a closure's argument list like an expression of a body.
2695
2696 * eval.c (unmemoize_expression, unmemoize_exprs, unmemoize_and,
2697 unmemoize_begin, unmemoize_case, unmemoize_cond, unmemoize_delay,
2698 unmemoize_do, unmemoize_if, unmemoize_lambda, unmemoize_let,
2699 unmemoize_letrec, unmemoize_letstar, unmemoize_or,
2700 unmemoize_set_x, unmemoize_apply, unmemoize_atcall_cc,
2701 unmemoize_at_call_with_values, unmemoize_future, sym_atslot_ref,
2702 unmemoize_atslot_ref, sym_atslot_set_x, unmemoize_atslot_set_x,
2703 unmemoize_builtin_macro): New static functions and symbols.
2704
2705 (scm_unmemocopy): Rewritten in terms of the above. scm_unmemocopy
2706 now has a slightly different meaning: The memoized form that is
2707 receives as its argument is now interpreted as a sequence of
2708 expressions from a body.
2709
2710 (unmemocar, scm_unmemocar): Since the whole functionality of
2711 unmemocar and scm_unmemocar is not needed any more, scm_unmemocar
2712 has its old content back and is deprecated, while unmemocar has
2713 been removed.
2714
2715 (SCM_BIT7): Removed.
2716
2717 (CEVAL): For unmemoizing a single expression, call
2718 unmemoize_expression instead of scm_unmemocopy, which now expects
2719 a sequence of body expressions. Eliminated unnecessary empty
2720 environment frame when executing let* forms. Eliminated
2721 unmemoization step from evaluator.
2722
2723 2004-06-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2724
2725 * eval.c (scm_macroexp, macroexp): Renamed scm_macroexp to
2726 macroexp and made static. Added new version of scm_macroexp that
2727 emits a deprecation warning and then calls macroexp.
2728 (scm_m_undefine): Issue deprecation warning.
2729
2730 2004-05-30 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2731
2732 * eval.c (lookup_global_symbol, literal_p, try_macro_lookup):
2733 Modified to make set! work on symbols that represent syntactic
2734 keywords.
2735
2736 2004-05-26 Han-Wen Nienhuys <hanwen@xs4all.nl>
2737
2738 * gc.h (SCM_CELL_OBJECT_LOC): use SCM_GC_CELL_OBJECT to prevent
2739 compound expression as lvalue errors.
2740
2741 2004-05-24 Marius Vollmer <mvo@zagadka.de>
2742
2743 * dynwind.c (winder_mark): Use SCM_PACK to correctly convert the
2744 WINDER_DATA to a SCM.
2745
2746 2004-05-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2747
2748 * goops.c (compute_getters_n_setters, create_standard_classes,
2749 scm_add_slot): Compute closures by calling scm_i_eval_x on a
2750 lambda expression rather than creating them with scm_closure.
2751
2752 2004-05-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2753
2754 * eval.c (s_macro_keyword, scm_m_set_x): Remove checking for
2755 misplaced syntactic keywords. This will not work unless guile's
2756 defmacro feature is deprecated.
2757
2758 (scm_m_case): Fixed a bug that caused the list of labels to grow
2759 with every case form.
2760
2761 2004-05-19 Kevin Ryde <user42@zip.com.au>
2762
2763 * numbers.c (scm_round_number): For inum and big, just return x. For
2764 real, use scm_round for 2^54-1 etc problems covered there.
2765
2766 * numbers.c (trunc): Remove #define to scm_truncate when the C library
2767 doesn't provide trunc. This was for when `truncate' was done as a
2768 scm_tc7_dsubr, no longer required.
2769
2770 * threads.c (scm_threads_mark_stacks) [SCM_STACK_GROWS_UP]: Correction
2771 to stack marking call, two parameters and no cast on t->base.
2772
2773 2004-05-18 Marius Vollmer <mvo@zagadka.de>
2774
2775 * hashtab.c (rehash_after_gc): Bug fix: properly link the
2776 processed hashtables back into the weak_hashtables list. Thanks
2777 to Bill Schottstaedt!
2778
2779 2004-05-16 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2780
2781 * eval.c (unmemoize_quote): New static function.
2782
2783 (scm_m_quote, scm_m_atslot_ref, SCM_CEVAL): Changed the byte code
2784 representation of 'quote' and '@slot-ref' to an improper list.
2785 This reduces execution time, the number of cells used to hold the
2786 memoized code, and thus also reduces garbage collection time.
2787
2788 (scm_unmemocopy): Use unmemoize_quote for quote expressions.
2789
2790 (SCM_CEVAL): Changed macro handling to also work with macros that
2791 return improper lists. Added an assertion, that the code returned
2792 by a macro transformer will not lead to cycles in the memoized
2793 code.
2794
2795 2004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2796
2797 No functional change, just rearrangements of functions within the
2798 file.
2799
2800 * eval.c (scm_ilookup, scm_unbound_variable_key,
2801 error_unbound_variable, scm_lookupcar1, scm_lookupcar): Moved to
2802 the definitions used for execution, since that's where they will
2803 belong to later.
2804
2805 2004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2806
2807 * numbers.h (SCM_SLOPPY_FRACTIONP): Removed. It was not used
2808 throughout guile, has not been part of an official release yet,
2809 and the concept of sloppy predicates has never been a good idea.
2810
2811 (SCM_FRACTION_NUMERATOR, SCM_FRACTION_DENOMINATOR,
2812 SCM_FRACTION_SET_NUMERATOR, SCM_FRACTION_SET_DENOMINATOR):
2813 Simplified.
2814
2815 2004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2816
2817 * throw.c (SETJBJMPBUF, SCM_SETJBDFRAME): Add cast to scm_t_bits
2818 to make explicit what happens.
2819
2820 2004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2821
2822 * dynl.c (SET_DYNL_HANDLE): Add cast to scm_t_bits to make
2823 explicit what happens.
2824
2825 * guardians.c (TCONC_IN): Use SCM_SET_CELL_OBJECT_x rather than
2826 SCM_SET_CELL_WORD_x when writing scheme objets to cell elements.
2827
2828 2004-05-11 Marius Vollmer <mvo@zagadka.de>
2829
2830 * scmsigs.c (scm_sigaction_for_thread): Validate that the handler
2831 is indeed a procedure when it isn't a number.
2832
2833 2004-05-10 Marius Vollmer <mvo@zagadka.de>
2834
2835 Convert floating point numbers into strings with an arbitrary
2836 radix. Thanks to Richard Todd!
2837
2838 * numbers.c (FLOBUFLEN): Increase so that radix 2 strings will
2839 fit.
2840 (fx): Removed.
2841 (scm_dblprec, fx_per_radix, init_dblprec, init_fx_radix,
2842 number_chars): New, to support variable radices.
2843 (idbl2str): Use above instead of the old base-10 only tables.
2844 (iflo2str): Pass on new RADIX argument to idbl2str.
2845 (scm_number_to_string): Pass radix to iflo2str.
2846 (scm_print_real, scm_print_complex): Explicitly pass radix 10 to
2847 iflo2str.
2848 (scm_init_numbers): Call init_dblprec and init_fx_radix for all
2849 possible radices.
2850
2851 2004-05-10 Kevin Ryde <user42@zip.com.au>
2852
2853 * numbers.c (scm_logbit_p): Correction to test above the end of an
2854 inum. Reported by Jan Konecny.
2855
2856 2004-05-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2857
2858 * gc.h (scm_t_cell): Fields are now of type SCM instead of
2859 scm_t_bits. Updated all users.
2860 (SCM_GC_CARD_SIZE_MASK): Use SCM_GC_SIZEOF_CARD instead of
2861 duplicating the code.
2862 (SCM_CELL_OBJECT_LOC): New.
2863 (SCM_CARLOC, SCM_CDRLOC): Use it instead of SCM_CELL_WORD_LOC.
2864 (SCM_CELL_WORD_LOC): Moved to "deprecated.h".
2865
2866 * smob.h (SCM_SMOB_DATA_2, SCM_SMOB_DATA_3, SCM_SMOB_FLAGS,
2867 SCM_SET_SMOB_DATA_2, SCM_SET_SMOB_DATA_3, SCM_SET_SMOB_FLAGS,
2868 SCM_SMOB_OBJECT, SCM_SMOB_OBJECT_2, SCM_SMOB_OBJECT_3,
2869 SCM_SET_SMOB_OBJECT, SCM_SET_SMOB_OBJECT_2, SCM_SET_SMOB_OBJECT_3,
2870 SCM_SMOB_OBJECT_LOC, SCM_SMOB_OBJECT_2_LOC,
2871 SCM_SMOB_OBJECT_3_LOC): New.
2872 * smob.c (scm_i_set_smob_flags): New function.
2873
2874 * dynl.c, dynwind.c, eval.h, fluids.h, futures.h, hashtab.h,
2875 hooks.h, keywords.h, macros.h, macros.c, mallocs.c, mallocs.h,
2876 random.h, regex-posix.h, root.h, srcprop.h, srcprop.c, threads.h:
2877 Use SCM_SMOB_* instead of SCM_CELL_* as appropriate. Use
2878 SCM_SMOB_FLAGS and SCM_SET_SMOB_FLAGS instead of accessing the
2879 zeroth word directly. Use SCM_SMOB_PREDICATE as appropriate.
2880
2881 * numbers.h (SCM_I_BIG_MPZ): Use SCM_CELL_OBJECT_LOC instead of
2882 taking the address of SCM_CELL_WORD_1, the latter being no longer
2883 an lvalue.
2884
2885 * variable.h (SCM_VARIABLE_LOC): Use SCM_CELL_OBJECT_LOC instead
2886 of casting SCM_CELL_WORD_LOC.
2887
2888 2004-05-02 Kevin Ryde <user42@zip.com.au>
2889
2890 * eval.c (scm_macroexp): Add prototype, since it's not in eval.h under
2891 --disable-deprecated. Reported by Andreas Vögele.
2892
2893 * filesys.c (_POSIX_C_SOURCE): Define to 199506L to get readdir_r (in
2894 particular on HP-UX). Reported by Andreas Vögele.
2895
2896 * list.c (varargs.h): Remove, leave just stdarg.h which is all the
2897 code has support for. Fixes building with AIX cc, which is ansi but
2898 doesn't define __STDC__. Reported by Keith Crane.
2899 (var_start): Remove macro, this variation no longer required.
2900 (scm_list_n): Use va_start directly.
2901
2902 2004-05-01 Kevin Ryde <user42@zip.com.au>
2903
2904 * continuations.c (scm_dynthrow): Use >= instead of SCM_PTR_GE which
2905 is now gone. Reported by Andreas Vögele.
2906
2907 2004-04-28 Kevin Ryde <user42@zip.com.au>
2908
2909 * backtrace.c (display_frame_expr), numbers.c (XDIGIT2UINT,
2910 mem2uinteger, mem2decimal_from_point, mem2ureal): Cast char to int for
2911 ctype.h tests, to avoid warnings from gcc on HP-UX about char as array
2912 subscript. Reported by Andreas Vögele.
2913 Also cast through unsigned char to avoid passing negatives to those
2914 macros if input contains 8-bit values.
2915
2916 * num2integral.i.c (NUM2INTEGRAL): Under non-BIGMPZ_FITSP case,
2917 corrections to range check for signed numbers. Remove
2918 scm_remember_upto_here_1(num) from these checks, since num is used
2919 subsequently anyway.
2920
2921 * num2integral.i.c (NUM2INTEGRAL): Test BIGMPZ_FITSP with "!= 0" to
2922 avoid warning from gcc 3.4. Reported by Hyperdivision.
2923
2924 * numbers.c (scm_bit_extract): Use min instead of MIN.
2925 (MIN): Remove, this conflicts with similar macro defined by limits.h
2926 on HP-UX. Reported by Andreas Vögele.
2927
2928 * stime.c (_POSIX_C_SOURCE): Define to 199506L to get gmtime_r (in
2929 particular on HP-UX). Reported by Andreas Vögele.
2930
2931 * threads.c (scm_threads_mark_stacks): Correction sizet -> size_t.
2932 Reported by Andreas Vögele.
2933
2934 * threads-plugin.h (SCM_MUTEX_MAXSIZE): Increase to 25*sizeof(long),
2935 for the benefit of hpux11 where pthread_mutex_t is 88 bytes. Reported
2936 by Andreas Vögele.
2937
2938 2004-04-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2939
2940 * eval.c (s_macro_keyword): New static identifier.
2941
2942 (scm_m_define): Change order to first create binding and
2943 evaluating the expression afterwards.
2944
2945 (scm_m_set_x): Memoize complete set! expression. Only leave
2946 symbols if no binding exists at memoization time. Throw error if
2947 assigning to a syntactic keyword.
2948
2949 (lazy_memoize_variable): New function.
2950
2951 (CEVAL): When execution set!, perform lazy memoization if
2952 unmemoized symbol is detected.
2953
2954 * modules.c (module_variable): Return variables with unbound
2955 value.
2956
2957 * tags.h: Fix comment.
2958
2959 2004-04-25 Kevin Ryde <user42@zip.com.au>
2960
2961 * chars.c (scm_char_upcase, scm_char_downcase, scm_c_upcase,
2962 scm_c_downcase): Use ctype.h toupper and tolower. This will be useful
2963 in 8-bit locales, and ensures consistency with char-upper-case? and
2964 char-lower-case? which already use ctype.h.
2965 (scm_c_upcase_table, scm_c_downcase_table, scm_lowers, scm_uppers):
2966 Remove.
2967 * chars.c, chars.h, init.c (scm_tables_prehistory): Remove.
2968
2969 * socket.c (VALIDATE_INET6): Correction to bignum_in_ipv6_range_p
2970 call. Reported by Hyperdivision.
2971
2972 * threads.c (scm_yield): Correction, actually call scm_thread_yield.
2973 Reported by Hyperdivision.
2974
2975 * unif.c (s_scm_make_uve): Remove unused local variable. Reported by
2976 Hyperdivision.
2977
2978 2004-04-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2979
2980 Hide the implementation of ilocs and isyms in eval.c.
2981
2982 * deprecated.h (SCM_IFRINC, SCM_ICDR, SCM_IFRAME, SCM_IDIST,
2983 SCM_ICDRP), eval.c (SCM_IFRINC, SCM_ICDR, SCM_IFRAME, SCM_IDIST,
2984 SCM_ICDRP), eval.h (SCM_ICDR, SCM_IFRINC, SCM_IFRAME, SCM_IDIST,
2985 SCM_ICDRP): Deprecated and added to deprecated.h. Moved from
2986 eval.h to eval.c.
2987
2988 * deprecated.c (scm_isymnames), deprecated.h (scm_isymnames,
2989 SCM_ISYMNUM, SCM_ISYMCHARS), eval.c (SCM_ISYMNUM, isymnames,
2990 scm_unmemocopy, CEVAL), print.c (scm_isymnames), tags.h
2991 (SCM_ISYMNUM, scm_isymnames, SCM_ISYMCHARS): Deprecated
2992 scm_isymnames, SCM_ISYMNUM and SCM_ISYMCHARS and added to
2993 deprecated.[hc]. Moved scm_isymnames from print.c to eval.c and
2994 renamed to isymnames. Moved SCM_ISYMNUM from tags.h to eval.c and
2995 renamed to ISYMNUM.
2996
2997 * eval.c (scm_i_print_iloc, scm_i_print_isym), eval.h
2998 (scm_i_print_iloc, scm_i_print_isym), print.c (scm_iprin1):
2999 Extracted printing of ilocs and isyms to guile internal functions
3000 scm_i_print_iloc, scm_i_print_isym of eval.c.
3001
3002 2004-04-22 Kevin Ryde <user42@zip.com.au>
3003
3004 * numbers.c (scm_bit_extract): Use SCM_SRS for signed right shift.
3005
3006 * numbers.c (scm_round): Test for x already an integer, to avoid bad
3007 rounding in x+0.5 when x is a big value already an integer. In
3008 certain hardware rounding cases x+0.5 can give an adjacent integer,
3009 leading to that as the result, when we really just wanted x itself.
3010
3011 2004-04-19 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3012
3013 * eval.c (scm_unmemocopy): Fixed unmemoization of let*.
3014
3015 (deval_args, CEVAL): Minor improvements: Reduced variable scopes,
3016 added const qualifiers, cast intentionally unused expressions to
3017 void for emphasis, improved comment.
3018
3019 2004-04-18 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3020
3021 * tags.h (scm_tags, scm_tc8_tags, scm_tc9_flag, scm_tc8_flag,
3022 scm_tc8_isym): Renamed scm_tags to scm_tc8_tags. Renamed
3023 scm_tc9_flag to scm_tc8_flag. Introduced new identifier
3024 scm_tc8_isym. Defined tc8-tags relative to scm_tc3_imm24.
3025 Defined the tc8-tag for flags to be 0x04, which will mean that
3026 SCM_BOOL_F will also have the value 0x04 instead of 0x013c. Due
3027 to the reduced number of bits and the simpler bit pattern for
3028 SCM_BOOL_F, certain machines may be able to use more efficient
3029 processor instructions to deal with SCM_BOOL_F.
3030
3031 (SCM_ITAG9, SCM_MAKE_ITAG9, SCM_ITAG9_DATA): Removed. These have
3032 never been defined in a released version, thus no need to
3033 deprecate them.
3034
3035 (SCM_IFLAGP, SCM_MAKIFLAG, SCM_IFLAGNUM): Flags now use tc8
3036 instead of tc9 tags.
3037
3038 (SCM_ISYMP, SCM_MAKISYM, SCM_ISYMNUM): Isyms now use tc8 instead
3039 of tc9 tags.
3040
3041 (SCM_MAKSPCSYM): Removed. It is almost impossible that user code
3042 could have used this definition.
3043
3044 (SCM_IM_AND, SCM_IM_BEGIN, SCM_IM_CASE, SCM_IM_COND, SCM_IM_DO,
3045 SCM_IM_IF, SCM_IM_LAMBDA, SCM_IM_LET, SCM_IM_LETSTAR,
3046 SCM_IM_LETREC, SCM_IM_OR, SCM_IM_QUOTE, SCM_IM_SET_X): Now encoded
3047 as isyms, as special isyms don't exist any more.
3048
3049 2004-04-18 Kevin Ryde <user42@zip.com.au>
3050
3051 * filesys.c (scm_readdir): Use readdir_r when available, for thread
3052 safety.
3053
3054 * numbers.c (scm_max, scm_min): For big/real, use SCM_SWAP rather than
3055 explicit swapping code.
3056
3057 2004-04-15 Kevin Ryde <user42@zip.com.au>
3058
3059 * cpp_sig_symbols.in: Add SIGSYS.
3060
3061 * list.c (scm_append_x): Use iterative style, to avoid non-tail
3062 recursion.
3063
3064 * numbers.c (scm_max, scm_min): For inum/frac, frac/inum, big/frac,
3065 frac/big and frac/frac, use scm_less_p for exact comparison.
3066
3067 * numbers.c (scm_gcd): For inum/big, use mpz_gcd_ui by sharing code
3068 with big/inum.
3069
3070 * numbers.c (xisinf): Add a comment about solaris 7 lacking isinf.
3071
3072 2004-04-06 Han-Wen Nienhuys <hanwen@xs4all.nl>
3073
3074 * inline.h (scm_cell): use SCM_GC_CELL_WORD for checking tag.
3075
3076 * chars.h (scm_init_chars): change scm_{upcase,downcase} to
3077 scm_c_{up,down}case.
3078 (SCM_MAKE_CHAR): add (unsigned char) cast. This prevents havoc
3079 when hi-bit ASCII is subjected to SCM_MAKE_CHAR().
3080
3081 2004-04-06 Kevin Ryde <user42@zip.com.au>
3082
3083 * numbers.c (scm_ash): Remove stray "}" in docstring.
3084
3085 * numbers.c (scm_make_ratio): For inum/bignum integer detection, use
3086 x==SCM_MOST_NEGATIVE_FIXNUM explicitly, for clarity and to avoid
3087 calling mpz_cmp_ui in most cases.
3088
3089 * numbers.c (scm_quotient, scm_remainder): In inum/big, use mpz_cmp_ui
3090 for big == abs(most-negative-fixnum) special case.
3091 (abs_most_negative_fixnum): Remove, no longer used.
3092
3093 * scmsigs.c (scm_sigaction_for_thread): Correction to signum range
3094 test, avoids SCM_VECTOR_REF outside bounds of signal_handlers on
3095 calling (sigaction NSIG).
3096
3097 * simpos.c (scm_system_star): Fix execargv memory leak, merge parent
3098 and fork error cases to do this.
3099
3100 2004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3101
3102 * eval.c (CEVAL): Don't distinguish between short and long
3103 instructions when dispatching - just always dispatch on the
3104 instruction code, which is common for short and long instructions.
3105 Further, removed unnecessary goto statements and added comment.
3106
3107 2004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3108
3109 * eval.c (scm_unmemocopy): Don't distinguish between short and
3110 long instructions when dispatching - just always dispatch on the
3111 instruction code, which is common for short and long instructions.
3112 Further, removed unnecessary goto statements, fixed indentation
3113 and replaced SCM_IMP predicates by SCM_NULLP.
3114
3115 2004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3116
3117 * eval.c (scm_lookupcar1, CEVAL): Use SCM_ILOCP instead of
3118 comparison with SCM_ILOC00. In CEVAL, eliminate goto-label
3119 'checkmacro'.
3120
3121 2004-03-31 Kevin Ryde <user42@zip.com.au>
3122
3123 * simpos.c: Include <signal.h> for SIG_IGN and friends.
3124
3125 2004-03-29 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3126
3127 Introduce scm_debug_mode_p as a replacement for scm_debug_mode and
3128 SCM_DEBUGGINGP:
3129
3130 * debug.h (scm_debug_mode_p, scm_debug_mode, SCM_DEBUGGINGP),
3131 eval.c (scm_debug_mode_p): Deprecated scm_debug_mode and
3132 SCM_DEBUGGINGP. Provided scm_debug_mode_p instead, to have one
3133 single interface that also matches the naming conventions.
3134 Probably scm_debug_mode_p should be part of the private interface
3135 anyway.
3136
3137 * debug.h (scm_debug_mode_p), backtrace.c (display_error_body),
3138 eval.c (SCM_APPLY, scm_trampoline_0, scm_trampoline_1,
3139 scm_trampoline_2): Change uses of scm_debug_mode or SCM_DEBUGGINGP
3140 to scm_debug_mode_p.
3141
3142
3143 Deprecate direct access to scm_ceval, scm_deval and scm_ceval_ptr:
3144
3145 * eval.h (scm_ceval, scm_deval, scm_ceval_ptr), debug.h
3146 (scm_ceval_ptr): Deprecated. Moved declaration of scm_ceval_ptr
3147 from debug.h to eval.h.
3148
3149 * debug.h (SCM_RESET_DEBUG_MODE): Don't access scm_ceval_ptr any
3150 more, just leave it with setting scm_debug_mode_p, which is
3151 equivalent for practical purposes.
3152
3153 * deprecated.h (SCM_XEVAL, SCM_XEVALCAR): Call scm_i_eval_x
3154 instead of *scm_ceval_ptr. Leave all evaluating to scm_i_eval_x.
3155
3156 * gdbint.c (gdb_eval): Call scm_i_eval_x instead of scm_ceval.
3157
3158 * eval.c (ceval, deval, scm_ceval, scm_deval): Made scm_ceval
3159 static and renamed it to ceval throughout. Provide a new exported
3160 but deprecated function scm_ceval as a wrapper for backwards
3161 compatibility. The same is done for the deval/scm_deval pair of
3162 functions.
3163
3164 * eval.c (CEVAL, SCM_CEVAL): Renamed SCM_CEVAL to CEVAL
3165 throughout. Defined CEVAL to ceval or deval, based on compilation
3166 phase.
3167
3168 * eval.c (SCM_XEVAL, SCM_XEVALCAR): Dispatch on scm_debug_mode_p
3169 to ceval and deval instead of calling *scm_ceval_ptr.
3170
3171 * eval.c (dispatching_eval): New deprecated static function.
3172
3173 * eval.c (scm_ceval_ptr): Initialized to dispatching_eval in order
3174 to emulate its old behaviour as closely as possible.
3175
3176
3177 Change the evaluator such that only expressions for which pair? is
3178 true are passed to CEVAL, and such that all other expressions are
3179 evaluated outside of CEVAL:
3180
3181 * eval.c (EVAL): New, provided in analogy to EVALCAR. Evaluate an
3182 expression that is assumed to be memoized already. All but
3183 expressions of the form '(<form> <form> ...)' are evaluated inline
3184 without calling an evaluator.
3185
3186 * eval.c (SCM_XEVAL, SCM_XEVALCAR, EVALCAR): Evaluate all but
3187 expressions of the form '(<form> <form> ...)' inline without
3188 calling an evaluator.
3189
3190 * eval.c (scm_i_eval_x, scm_i_eval, scm_ceval, scm_deval): Handle
3191 the special case of unmemoized symbols passed on the top level.
3192
3193 * eval.c (CEVAL): Change calls to CEVAL to EVAL, except where it
3194 is known that the expression passed to CEVAL is of the form
3195 '(<form> <form> ...)'. Remove handling of the tc7-objects, since
3196 now it is known that the input expression of CEVAL is a pair.
3197
3198 2004-03-29 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3199
3200 * eval.c (is_self_quoting_p): New static function.
3201
3202 (scm_m_quote): Use is_self_quoting_p.
3203
3204 (copy_tree): Corrected typo in comment.
3205
3206 2004-03-28 Han-Wen Nienhuys <hanwen@xs4all.nl>
3207
3208 * eval.c (s_scm_copy_tree): idem.
3209
3210 * list.c (s_scm_filter): remove "pointer" from doc string.
3211
3212 * gc.h (SCM_GC_CELL_TYPE): SCM_GC_CELL_TYPE uses SCM_GC_CELL_OBJECT.
3213
3214 * goops.h (SCM_NUMBER_OF_SLOTS): don't SCM_UNPACK the result.
3215
3216 * backtrace.c ("display_backtrace_body"): SCM_PACK before SCM_EQ_P
3217 (display_frame): idem.
3218 (display_backtrace_file_and_line): idem.
3219
3220 * tags.h (SCM_UNPACK): stricter typechecking on SCM_UNPACK
3221 arguments.
3222
3223 2004-03-26 Kevin Ryde <user42@zip.com.au>
3224
3225 * filesys.c (scm_getcwd, scm_readlink): Avoid memory leak on errors.
3226
3227 * numbers.c (scm_modulo): For inum/big and big/big, remove test of
3228 big==0 since that never occurs.
3229
3230 * numbers.c, numbers.h (scm_modulo_expt): Renamed from
3231 scm_modular_expt, matching scheme level name `modulo-expt'.
3232
3233 * numbers.c (scm_modular_expt): Return a negative remainder for a
3234 negative divisor, the same as `modulo' does.
3235
3236 2004-03-26 Eric Hanchrow <offby1@blarg.net>
3237
3238 * numbers.c, numbers.h (scm_modular_expt): New function.
3239
3240 2004-03-25 Kevin Ryde <user42@zip.com.au>
3241
3242 * numbers.c (scm_min, scm_max): Correction to big/real and real/big,
3243 return inexact as required by r5rs.
3244
3245 2004-03-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3246
3247 * eval.c: Separated some definitions relevant for execution from
3248 the memoization part of the file.
3249
3250 (copy_tree): New static function
3251
3252 (scm_copy_tree): Rewritten to fix two kinds or bugs: First, cyclic
3253 structures are detected now and will lead to an exception instead
3254 of forcing guile to run in an endless loop, using up all the
3255 system's memory. Second, arrays in the cdr of an improper list
3256 are now copied. See the new test cases in eval.test.
3257
3258 2004-03-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
3259
3260 * posix.c (scm_gethostname): Make sure len is initialised before
3261 it is used. Restructured to (hopefully) represent possible
3262 configurations more clearly in the code. Added unwind handler.
3263
3264 2004-03-23 Kevin Ryde <user42@zip.com.au>
3265
3266 * posix.c (scm_gethostname): Use sysconf(_SC_HOST_NAME_MAX) and/or
3267 MAXHOSTNAMELEN when available.
3268
3269 2004-03-21 Marius Vollmer <mvo@zagadka.de>
3270
3271 * read.c (skip_scsh_block_comment): Also recognize '\r' as a line
3272 terminator. Rewritten the logic as a state machine, I must have
3273 been doing too much VHDL lately...
3274
3275 * eval.c (scm_ceval, scm_deval): Explicitely evaluate ports to
3276 themselves. Thanks to Han-Wen Nienhuys!
3277
3278 * list.c: Changed docstrings so that they no longer talk about
3279 returning 'pointers' to something.
3280
3281 2004-03-20 Han-Wen Nienhuys <hanwen@xs4all.nl>
3282
3283 * gc.c: remove set_debug_cell_accesses! when
3284 SCM_DEBUG_CELL_ACCESSES is not defined. Scheme source code should
3285 use (if (defined? 'set-debug-cell-accesses!) .. ) to switch on
3286 debugging conditionally.
3287
3288 2004-03-21 Kevin Ryde <user42@zip.com.au>
3289
3290 * stime.c (scm_gmtime): Use gmtime_r when available, for thread safety.
3291
3292 2004-03-20 Kevin Ryde <user42@zip.com.au>
3293
3294 * posix.c (scm_gethostname): Preserve errno across free() call.
3295
3296 2004-03-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
3297
3298 * gc-card.c (sweep_card): use SCM_GC_SET_CELL_WORD for setting
3299 free cells.
3300
3301 2004-03-14 Kevin Ryde <user42@zip.com.au>
3302
3303 * stime.c: Define _GNU_SOURCE for strptime prototype from glibc.
3304 (strptime): Use HAVE_DECL_STRPTIME for when to give own prototype.
3305
3306 2004-03-07 Kevin Ryde <user42@zip.com.au>
3307
3308 * stime.c (scm_gmtime): Return bd_time->tm_zone when available, rather
3309 than "GMT" always.
3310 (filltime): Make zname parameter "const".
3311
3312 2004-03-03 Mikael Djurfeldt <mdj@chunk.mit.edu>
3313
3314 * threads.c, threads.h (scm_c_scm2thread): New function.
3315
3316 2004-02-29 Kevin Ryde <user42@zip.com.au>
3317
3318 * numbers.c (guile_ieee_init): Use C99 INFINITY and NAN when
3319 available. Test HAVE_DINFINITY and HAVE_DQNAN for those globals, in
3320 particular don't assume "defined (__alpha__) && ! defined (linux)"
3321 means OSF. Remove "SCO" code, which was not really SCO specific and
3322 which John W. Eaton advises should be long past being needed.
3323
3324 * posix.c (scm_execl, scm_execlp, scm_execle): Avoid memory leak under
3325 error throw.
3326
3327 2004-02-24 Kevin Ryde <user42@zip.com.au>
3328
3329 * posix.c (scm_cuserid): Use a private result buffer, for thread safe.
3330
3331 2004-02-22 Kevin Ryde <user42@zip.com.au>
3332
3333 * numbers.c (scm_max, scm_min): For one arg, dispatch to generic for
3334 complex, same as for two args. (Handle only inum, big, real, frac).
3335
3336 2004-02-21 Kevin Ryde <user42@zip.com.au>
3337
3338 * posix.c (scm_crypt): Use new HAVE_CRYPT.
3339 (<crypt.h>): Remove HAVE_LIBCRYPT condition.
3340 Reported by Andreas Voegele.
3341
3342 2004-02-20 Neil Jerram <neil@ossau.uklinux.net>
3343
3344 * list.c (scm_list_n): Add #if SCM_DEBUG_CELL_ACCESSES_P around
3345 validation.
3346
3347 * read.c (scm_lreadparen): Removed.
3348 (scm_lreadparen1): Renamed scm_i_lreadparen.
3349
3350 2004-02-20 Han-Wen Nienhuys <hanwen@xs4all.nl>
3351
3352 * list.c (scm_list_n): validate non-immediate arguments;
3353 this will catch forgotten a SCM_UNDEFINED.
3354
3355 2004-02-18 Marius Vollmer <mvo@zagadka.de>
3356
3357 * gc.h (scm_gc_cells_collected): Removed duplicated declaration.
3358 Thanks to Bill Schottstaedt!
3359
3360 * socket.h (scm_gethost): Removed prototype it is already in
3361 "net_db.h". Thanks to Bill Schottstaedt!
3362
3363 2004-02-18 Kevin Ryde <user42@zip.com.au>
3364
3365 * num2integral.i.c (INTEGRAL2BIG): WORDS_BIGENDIAN not right for word
3366 order parameter to mpz_import, in fact with just one word there's no
3367 order to worry about at all.
3368
3369 * numbers.c (scm_num_eq_p): For real==frac, complex==frac, frac==real
3370 and frac==complex, make an exact comparison rather than converting
3371 with fraction2double.
3372
3373 * posix.c, putenv.c, stime.c (environ): Use _NSGetEnviron in Darwin
3374 shared library, since environ is not directly available there.
3375
3376 * script.c (scm_shell_usage): Print to stdout for --help, per GNU
3377 standard.
3378
3379 * stime.c (scm_localtime, scm_gmtime, scm_mktime): Provide a default
3380 errno EINVAL in case localtime and gmtime don't set it.
3381 (scm_mktime, scm_strptime): Forcibly use errno EINVAL for our
3382 SCM_SYSERROR, since mktime and strptime generally don't set errno.
3383
3384 2004-02-16 Kevin Ryde <kevin@swox.se>
3385
3386 * gc-malloc.c (scm_done_malloc, scm_done_free): Allow negative sizes,
3387 which were permitted in the past for these.
3388
3389 * num2float.i.c (NUM2FLOAT): Expand isfinite to !xisinf, as per
3390 previous change to numbers.c.
3391
3392 * script.c (scm_shell_usage): Print bug-guile email address, as per
3393 GNU standard. Reported by Han-Wen Nienhuys.
3394
3395 2004-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
3396
3397 * unif.c (scm_make_uve): Removed local variable and simplified
3398 code in order to avoid compiler used uninitialized warnings.
3399
3400 * hashtab.c, hashtab.h (scm_hash_map_to_list): Renamed from
3401 scm_hash_map.
3402 (scm_hash_fold): Use scm_call_3 directly in the call to
3403 scm_internal_hash_fold instead of going via fold_proc (which is
3404 now removed).
3405 (scm_hash_for_each): Use a trampoline +
3406 scm_internal_hash_for_each_handle.
3407 (scm_internal_hash_for_each_handle, scm_hash_for_each_handle): New
3408 functions.
3409
3410 2004-02-12 Kevin Ryde <user42@zip.com.au>
3411
3412 * ports.c (scm_port_line): In docstring, note first line is 0.
3413 (scm_set_port_line_x): In docstring, note first line is 0.
3414 (scm_port_column): In docstring, there's no default to current input
3415 port, and remove shared port-line @defun.
3416 (scm_set_port_column_x): In docstring, there's no default to current
3417 input port, note first column is 0, remove shared set-port-line!
3418 @defun.
3419
3420 * ramap.c (scm_array_fill_x): For fvect and dvect, use scm_num2dbl to
3421 convert args the same way that array-set! does.
3422
3423 * unif.c (scm_make_uve, scm_array_p): Allow fraction 1/3 as prototype
3424 for dvect.
3425 (scm_array_p): Add missing "break"s in switch, fix llvect test look
3426 for "l" not "s", fix dvect to be false for singp(prot) since such a
3427 value is for fvect.
3428 (scm_array_prototype): Return 1/3 for dvect, rather than 0.33..33.
3429 (exactly_one_third): New variable.
3430 (scm_init_unif): Initialize it.
3431
3432 2004-02-10 Neil Jerram <neil@ossau.uklinux.net>
3433
3434 * read.c (scm_read_opts): Change `escaped-parens' to
3435 `elisp-strings'.
3436
3437 2004-02-08 Neil Jerram <neil@ossau.uklinux.net>
3438
3439 * read.c (scm_read_opts): New opts `elisp-vectors' and
3440 `escaped-parens'.
3441 (s_vector): New.
3442 (scm_lreadr): Use scm_lreadparen1 instead of scm_lreadparen. Make
3443 handling of elisp vector syntax dependent on SCM_ENABLE_ELISP and
3444 `elisp-vectors' option instead of SCM_ELISP_READ_EXTENSIONS.
3445 Allow "\(" and "\)" in strings when SCM_ENABLE_ELISP defined and
3446 `escaped-parens' option set.
3447 (scm_read_token): If elisp vector syntax active, disallow [ and ]
3448 in tokens.
3449 (scm_lreadparen): Rewrite as interface to scm_lreadparen1.
3450 (scm_lreadparen1): New.
3451
3452 * read.h: Remove conditionally compiled last arg to
3453 scm_lreadparen.
3454 (SCM_ELISP_VECTORS_P, SCM_ESCAPED_PARENS_P): New.
3455
3456 2004-01-23 Han-Wen Nienhuys <hanwen@xs4all.nl>
3457
3458 * eval.c (m_expand_body): remove stray variable new_body.
3459
3460 2004-01-22 Marius Vollmer <mvo@zagadka.de>
3461
3462 * eval.c (m_expand_body): Rewrite the expression in place (by
3463 overwriting FORMS) also when a letrec is constructed, not only
3464 when no definitions are found. Do not return rewritten expression
3465 to emphasize the in-place rewriting. Changed all users.
3466
3467 2004-01-19 Han-Wen Nienhuys <hanwen@xs4all.nl>
3468
3469 * gc.c: add protected_object_count, a number that is dumped from
3470 gc_stats()
3471
3472 2004-01-11 Marius Vollmer <mvo@zagadka.de>
3473
3474 * dynwind.h, dynwind.c (scm_frame_unwind,
3475 scm_frame_unwind_handler): Renamed and changed all uses.
3476 (scm_frame_rewind, scm_frame_rewind_handler): Likewise.
3477
3478 2004-01-11 Kevin Ryde <user42@zip.com.au>
3479
3480 * unif.c (scm_bit_count, scm_bit_position, s_scm_bit_set_star_x,
3481 s_scm_bit_count_star, s_scm_bit_invert_x): Clarify docstrings, as per
3482 changes made to scheme-compound.texi.
3483
3484 2004-01-10 Marius Vollmer <mvo@zagadka.de>
3485
3486 * print.c (scm_print_symbol_name): Handle #{`foo}#, #{,foo}#,
3487 #{.}#, and all numeric strings specially. Thanks to Paul Jarc!
3488
3489 * guile-snarf.in: Use mkdir to create a unique temporary directory
3490 that we can safely use. Thanks to Stefan Nordhausen!
3491
3492 2004-01-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3493
3494 * dynwind.h, dynwind.c (scm_i_dowinds): Removed 'explicit'
3495 argument since it is always zero now. Changed all callers.
3496 Removed code for handling fluids.
3497
3498 * fluids.c (scm_c_with_fluids): Use frames instead of adding to
3499 the wind chain explicitely. Use scm_c_with_fluid for the common
3500 case of only one fluid.
3501 (scm_with_fluid): New.
3502 (scm_c_with_fluid): Use frames instead of scm_c_with_fluids.
3503
3504 * fluids.h, fluids.c (scm_frame_fluid): New.
3505 (scm_with_fluid): New.
3506 (scm_i_swap_fluids, scm_i_swap_fluids_reverse): Removed.
3507
3508 * dynwind.c (scm_frame_end): Do not use scm_i_dowinds. Instead,
3509 do the unwinding directly. It is simple enough.
3510
3511 * dynwind.h, dynwind.c: Did the following renamings:
3512 scm_begin_frame -> scm_frame_begin,
3513 scm_end_frame -> scm_frame_end,
3514 scm_on_unwind -> scm_frame_unwind,
3515 scm_on_rewind -> scm_frame_rewind,
3516 scm_on_unwind_with_scm -> scm_frame_unwind_with_scm,
3517 scm_on_rewind_with_scm -> scm_frame_rewind_with_scm.
3518 Changed all uses.
3519
3520 * aync.h, async.c: Did the follwing renamings:
3521 scm_with_blocked_asyncs -> scm_frame_block_asyncs,
3522 scm_with_unblocked_asyncs -> scm_frame_unblock_asyncs.
3523 Changed all uses.
3524
3525 * ports.h, ports.c: Did the follwing renamings:
3526 scm_with_current_input_port -> scm_frame_current_input_port,
3527 scm_with_current_output_port -> scm_frame_current_output_port,
3528 scm_with_current_error_port -> scm_frame_current_error_port.
3529 Changed all uses.
3530
3531 2004-01-07 Kevin Ryde <user42@zip.com.au>
3532
3533 * numbers.c (s_bignum): Remove, not used since gmp bignums.
3534 Reported by Richard Todd.
3535
3536 * threads-plugin.h (SCM_MUTEX_MAXSIZE): Increase to 12*sizeof(long),
3537 for the benefit of powerpc-apple-darwin5.5. Reported by Richard Todd.
3538
3539 * unif.c (scm_aind): Test SCM_CONSP rather than !SCM_NULLP while
3540 traversing the args list, fixes segv if an improper list is given.
3541 Reported by Rouben Rostamian.
3542
3543 2004-01-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3544
3545 * ports.c (swap_ports, scm_with_current_foo_port): Do not allocate
3546 swap_data on stack, use a 'malloc obj'.
3547
3548 * fluids.h, fluids.c (scm_make_initial_fluids, scm_copy_fluids,
3549 scm_swap_fluids, scm_swap_fluids_reverse): Renamed to
3550 scm_i_... since they are internal. Changed all uses.
3551
3552 * dynwind.c (frame_print): Removed, use the default printer.
3553 (WINDER_F_MARK, WINDER_MARK_P, winder_mark): New.
3554 (scm_on_unwind_with_scm, scm_on_rewind_with_scm): New. Use above
3555 to protect SCM values.
3556
3557 * dynwind.h (SCM_F_WIND_EXPLICITELY,
3558 SCM_F_WIND_EXPLICITLY): It's "explicitly" not "explicitely", damn.
3559 Changed all uses.
3560 (scm_on_unwind_with_scm, scm_on_rewind_with_scm): New.
3561
3562 2004-01-05 Marius Vollmer <mvo@zagadka.de>
3563
3564 * ports.h, ports.c (scm_with_current_input_port,
3565 scm_with_current_output_port, scm_with_current_error_port): New.
3566
3567 * async.h, async.c (scm_with_blocked_asyncs,
3568 scm_with_unblocked_asyncs): New.
3569
3570 2004-01-03 Marius Vollmer <mvo@zagadka.de>
3571
3572 * dynwind.h, scm_dynwind.c (scm_t_frame_flags, scm_t_wind_flags,
3573 scm_begin_frame, scm_end_frame, scm_on_unwind, scm_on_rewind):
3574 New.
3575 (scm_dowinds, scm_i_dowinds): scm_dowinds has been renamed to
3576 scm_i_dowinds and extended to handle frames and to invoke a 'turn'
3577 function when the outermost wind point has been reached. The
3578 latter is used to copy a continuation stack at the right time.
3579 scm_dowinds remains available.
3580 (SCM_GUARDSP, SCM_BEFORE_GUARD, SCM_AFTER_GUARD, SCM_GUARD_DATA,
3581 tc16_guard, guards_print): Removed.
3582 (scm_internal_dynamic_wind): Reimplemented using frames.
3583
3584 * continuations.c (copy_stack): New, do only the stack copying
3585 part of copy_stack_and_call.
3586 (copy_stack_and_call): Copy the stack after unwinding and before
3587 rewinding.
3588 (scm_dynthrow): Do not call scm_dowinds, this is now done by
3589 copy_stack_and_call.
3590
3591 2004-01-04 Kevin Ryde <user42@zip.com.au>
3592
3593 * numbers.c (scm_less_p): Don't convert frac to float for compares,
3594 can give bad results due to rounding.
3595
3596 * stime.c (scm_current_time, scm_gettimeofday): Add a comment about
3597 setzone/restorezone protection for DOS.
3598
3599 2003-12-26 Marius Vollmer <mvo@zagadka.de>
3600
3601 * gen-scmconfig.h.in, gen-scmconfig.c: Arrange for scm_t_intmax
3602 and scm_t_uintmax to be defined in scmconfig.h
3603
3604 2003-12-03 Kevin Ryde <user42@zip.com.au>
3605
3606 * numbers.c (scm_less_p): Remove spurious xisnan from frac+big case.
3607
3608 * numbers.c (scm_make_ratio): Check for numerator equal to
3609 SCM_MOST_NEGATIVE_FIXNUM and bignum denominator the negative of that,
3610 giving integer -1.
3611
3612 * numbers.c (scm_real_part): Return fraction unchanged rather than
3613 converting to flonum.
3614
3615 2003-11-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
3616
3617 * modules.c (module_variable): Fixed (and thus simplified) the
3618 definition of SCM_BOUND_THING_P to reflect the fact that since
3619 after the 1.4 series of guile, obarrays only hold variable
3620 objects.
3621
3622 2003-11-30 Marius Vollmer <mvo@zagadka.de>
3623
3624 * numbers.c (scm_logand): It's "#b...", not "#\b...".
3625
3626 From Paul Jarc:
3627
3628 * read.c (scm_lreadr): Signal an error for invalid escape
3629 sequences in strings. Code cleanups too.
3630
3631 * print.c (scm_iprin1): use \xNN hexadecimal sequences when
3632 writing control characters in strings.
3633
3634 2003-11-21 Marius Vollmer <mvo@zagadka.de>
3635
3636 * ports.c (scm_drain_input): Bug fix: only access the port after
3637 checking that it indeed is one.
3638
3639 2003-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
3640
3641 * eval.c (s_bad_define): New static identifier.
3642
3643 (m_body): Fixed comment.
3644
3645 (scm_m_define): Don't generate memoized code for definitions that
3646 are not on the top level. As a consequence, no memoized code at
3647 all is generated for definitions any more: Top level definitions
3648 are executed immediately during memoization and internal
3649 definitions are handled separately in m_expand_body.
3650
3651 (scm_unmemocopy, unmemocopy): Removed code for unmemoizing
3652 definitions. Consequently, there is no unmemoizing code any more
3653 that might modify the environment. Thus, the old scm_unmemocopy
3654 is removed and the old unmemocopy is renamed to scm_unmemocopy.
3655
3656 (SCM_CEVAL): The SCM_IM_DEFINE keyword can no longer occur in
3657 memoized code. Call EVALCAR for continuations. Prefer !SCM_NULLP
3658 over SCM_NIMP in places, where the argument is known to be part of
3659 a proper list.
3660
3661 2003-11-21 Kevin Ryde <user42@zip.com.au>
3662
3663 * numbers.c (scm_abs): Allocate a new real only for negatives, as done
3664 for bignums.
3665
3666 * numbers.c (scm_bit_extract): Use mpz functions, rearrange inum case
3667 to share some shifting.
3668
3669 * numbers.c (scm_integer_expt): Don't mpz_init after scm_i_clonebig or
3670 scm_i_mkbig, since they do so already. Don't mpz_clear a bignum SCM,
3671 since gc does this.
3672
3673 2003-11-19 Marius Vollmer <mvo@zagadka.de>
3674
3675 * numbers.c (scm_make_ratio): Rewritten to have a simpler
3676 structure. Previously, not all cases with a negative denominator
3677 were covered.
3678
3679 * numbers.c (mem2decimal_from_point): use scm_divide instead of
3680 scm_divide2real when forming the fractional part. This allows
3681 "#e1.2" to yield 6/5.
3682
3683 * numbers.c (scm_i_fraction_equalp): Do not treat the return value
3684 of scm_equal_p as a C boolean, use SCM_FALSEP. Previously, all
3685 fractions were equal to each other regardless of value. Ooops.
3686
3687 * numbers.c (scm_rationalize): Return an inexact result when given
3688 inexact arguments.
3689
3690 * numbers.c (scm_exact_p, scm_inexact_p): Throw error for
3691 non-numbers.
3692
3693 2003-11-18 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3694
3695 Support for exact fractions from Bill Schottstaedt! Thanks!
3696
3697 * print.c (scm_iprin1): Handle fractions.
3698
3699 * objects.h (scm_class_fraction): New.
3700 * objects.c (scm_class_fraction): New.
3701 (scm_class_of): Handle fractions.
3702
3703 * hash.c (scm_hasher): Handle fractions.
3704
3705 * numbers.c: New code for handling fraction all over the place.
3706 (scm_odd_p, scm_even_p): Handle inexact integers.
3707 (scm_rational_p): New function, same as scm_real_p.
3708 (scm_round_number, scm_truncate_number, scm_ceiling, scm_floor):
3709 New exact functions that replace the inexact 'dsubr'
3710 implementations.
3711 (scm_numerator, scm_denominator): New.
3712
3713 * numbers.h (SCM_NUMP): Recognize fractions.
3714 (SCM_FRACTIONP, SCM_SLOPPY_FRACTIONP, SCM_FRACTION_NUMERATOR,
3715 SCM_FRACTION_DENOMINATOR, SCM_FRACTION_SET_NUMERATOR,
3716 SCM_FRACTION_SET_DENOMINATOR, SCM_FRACTION_REDUCED_BIT,
3717 SCM_FRACTION_REDUCED_SET, SCM_FRACTION_REDUCED_CLEAR,
3718 SCM_FRACTION_REDUCED): New.
3719 (scm_floor, scm_ceiling, scm_truncate_number, scm_round_number):
3720 New prototypes.
3721 (scm_make_ratio, scm_rationalize, scm_numerator, scm_denominator,
3722 scm_rational_p): New prototypes.
3723 (scm_i_dbl2num, scm_i_fraction2double, scm_i_fraction_equalp,
3724 scm_i_print_fraction): New prototypes.
3725
3726 * goops.c (create_standard_classes): Create "<fraction>" class.
3727
3728 * gc-mark.c (scm_gc_mark_dependencies): Handle fractions.
3729
3730 * gc-card.c (scm_i_sweep_card): Include scm_tc16_fraction as a
3731 case in the switch, but do nothing for now.
3732
3733 * eval.c (SCM_CEVAL, SCM_APPLY, call_dsubr_1): Convert fractions
3734 to doubles when calling 'dsubr' functions.
3735
3736 * eq.c (scm_eqv_p, scm_equal_p): Handle fractions.
3737
3738 2003-11-18 Rob Browning <rlb@defaultvalue.org>
3739
3740 * gen-scmconfig.c (main): remove public definition of
3741 SCM_SIZEOF___INT64 and SCM_SIZEOF_UNSIGNED___INT64 and add
3742 direct typedef of long_long and ulong_long inside deprecated block
3743 when appropriate.
3744
3745 * deprecated.h: move long_long and ulong_long definitions to
3746 gen-scmconfig.c so that we don't need to add SCM_SIZEOF___INT64
3747 and SCM_SIZEOF_UNSIGNED___INT64 to the public namespace.
3748
3749 2003-11-17 Marius Vollmer <mvo@zagadka.de>
3750
3751 * hash.c (scm_string_hash): New hashing algorithm that takes the
3752 complete string into account.
3753
3754 * eval.c (scm_m_generalized_set_x): Macroexpand the target when it
3755 is a list. This allows (@ ...) to work with set!.
3756 (scm_m_generalized_set_x): Use ASSERT_SYNTAX_2 instead of
3757 SCM_ASSYNT.
3758
3759 * script.c (scm_compile_shell_switches): Use scm_c_read_string for
3760 the "-e" option instead of scm_str2symbol. This allows things
3761 like (@ ...) to be specified for the entry point.
3762
3763 2003-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
3764
3765 * eval.c (scm_m_letstar): Create memoized code in place to
3766 minimize consing.
3767
3768 2003-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
3769
3770 * eval.c (s_splicing): Commented and reformulated.
3771
3772 (lookup_global_symbol, lookup_symbol): New static functions.
3773
3774 (s_test, s_bindings, s_duplicate_bindings, s_variable): Removed.
3775
3776 (try_macro_lookup, literal_p): Use lookup_symbol instead of
3777 creating a temporary pair for scm_lookupcar.
3778
3779 (scm_unmemocar, unmemocar): Renamed scm_unmemocar to unmemocar,
3780 created deprecated wrapper function scm_unmemocar.
3781
3782 (SCM_VALIDATE_NON_EMPTY_COMBINATION, scm_sym_else,
3783 scm_sym_unquote, scm_sym_uq_splicing, scm_sym_enter_frame,
3784 scm_sym_apply_frame, scm_sym_exit_frame, scm_sym_trace, f_apply,
3785 undefineds, sym_three_question_marks): Moved around without
3786 modifications.
3787
3788 * eval.c, eval.h (scm_macroexp, scm_unmemocar): Deprecated.
3789
3790 2003-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
3791
3792 * eval.c (try_macro_lookup, expand_user_macros, is_system_macro_p,
3793 m_expand_body, scm_m_expand_body): Grouped together with m_body.
3794 No further modifications.
3795
3796 2003-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
3797
3798 * eval.c (s_mixed_body_forms): New static identifier.
3799
3800 (canonicalize_define, scm_m_define): The check for a bad
3801 expression is performed in canonicalize_define now.
3802
3803 (try_macro_lookup, expand_user_macros, is_system_macro_p): New
3804 static helper functions for m_expand_body.
3805
3806 (m_expand_body): Use ASSERT_SYNTAX to signal syntax errors. Only
3807 expand user defined macros. Fixed handling of the definition/
3808 expression boundary. Fixed handling of definitions grouped with
3809 'begin. Use canonicalize_define to expand definitions.
3810
3811 2003-11-13 Marius Vollmer <mvo@zagadka.de>
3812
3813 * read.c (scm_lreadr): detect EOF after backslash, and interpret
3814 \xNN hexadecimal sequences. From Paul Jarc, thanks!
3815
3816 * snarf.h (SCM_SMOB, SCM_GLOBAL_SMOB, SCM_SMOB_MARK,
3817 SCM_GLOBAL_SMOB_MARK, SCM_SMOB_FREE, SCM_GLOBAL_SMOB_FREE,
3818 SCM_SMOB_PRINT, SCM_GLOBAL_SMOB_PRINT, SCM_SMOB_EQUALP,
3819 SCM_GLOBAL_SMOB_EQUALP, SCM_SMOB_APPLY, SCM_GLOBAL_SMOB_APPLY):
3820 New macros from Paul Jarc. Thanks!
3821
3822 * gc_os_dep.c (scm_get_stack_base): Provide a definition that
3823 return NULL when the machine type is unknown. Previously,
3824 gc_os_dep.c would refuse to compile.
3825
3826 2003-11-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
3827
3828 * eval.c (scm_m_body, m_body, scm_m_lambda, memoize_named_let,
3829 scm_m_let, scm_m_letrec, m_expand_body): Renamed static function
3830 scm_m_body to m_body.
3831
3832 2003-11-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
3833
3834 * eval.c, eval.h (scm_m_expand_body, m_expand_body): Deprecated
3835 public use of scm_m_expand_body in eval.h. In eval.c, renamed
3836 scm_m_expand_body to m_expand_body and made it static. Added
3837 deprecated wrapper scm_m_expand_body.
3838
3839 (scm_eval_body, SCM_CEVAL, SCM_APPLY): Use m_expand_body instead
3840 of scm_m_expand_body.
3841
3842 2003-11-09 Kevin Ryde <user42@zip.com.au>
3843
3844 * dynl.c (scm_dynamic_unlink): Need scm_list_1 on error message
3845 argument. Reported by Mike Gran.
3846
3847 2003-11-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
3848
3849 * eval.c (s_missing_body_expression): New static identifier.
3850
3851 (s_body): Removed.
3852
3853 (scm_m_expand_body): Fixed core dump when passing a body with
3854 defines, but without expressions (see additions to syntax.test).
3855 Use ASSERT_SYNTAX to signal syntax errors.
3856
3857 2003-11-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
3858
3859 * eval.c (canonicalize_define): New static helper function.
3860
3861 (memoize_define, canonicalize_define): Extract handling of
3862 function currying to canonicalize_define.
3863
3864 2003-11-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
3865
3866 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
3867 Make sure that error checking in debug mode is not worse than in
3868 standard mode.
3869
3870 2003-11-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
3871
3872 * eval.c (scm_m_body, scm_m_lambda): Documentation strings are not
3873 handled in scm_m_body any more, but rather in scm_m_lambda.
3874
3875 (scm_m_body, memoize_named_let, scm_m_let, scm_m_letstar,
3876 scm_m_letrec, scm_m_expand_body): Check for validity is done by
3877 calling functions of scm_m_body.
3878
3879 (scm_m_lambda): Avoid unnecessary consing when creating the
3880 memoized code.
3881
3882 2003-11-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
3883
3884 * eval.c (s_expression): Added comment.
3885
3886 (s_empty_combination, error_unbound_variable): New static
3887 identifiers.
3888
3889 (SCM_VALIDATE_NON_EMPTY_COMBINATION, SCM_EVALIM2, scm_lookupcar1):
3890 Use ASSERT_SYNTAX, syntax_error or error_unbound_variable to
3891 signal syntax errors.
3892
3893 (SCM_CEVAL): Separated handling of evaluator bytecodes and other
3894 scheme objects.
3895
3896 2003-10-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
3897
3898 * eval.c (unmemocar, sym_three_question_marks, scm_unmemocar):
3899 Grouped together with unmemocopy, without modifications.
3900
3901 (build_binding_list, unmemocopy): Renamed names of list arguments
3902 and variables to reflect the actual order of the list elements.
3903
3904 2003-10-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
3905
3906 * eval.c (s_defun): New static identifier.
3907
3908 (scm_m_nil_cond, scm_m_atfop, scm_m_undefine): Add comments. Use
3909 ASSERT_SYNTAX to signal syntax errors. Avoid unnecessary consing
3910 when creating the memoized code.
3911
3912 2003-10-19 Kevin Ryde <user42@zip.com.au>
3913
3914 * numbers.c (scm_ash): Revise docstring as per recent update to manual.
3915
3916 * numbers.c (scm_i_big2dbl): Rewrite, carefully rounding to "closest"
3917 in accordance with R5RS, which just mpz_get_d doesn't really give.
3918
3919 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
3920
3921 * eval.c (s_bad_slot_number): New static identifier.
3922
3923 (scm_m_atslot_ref, scm_m_atslot_set_x): Use ASSERT_SYNTAX to
3924 signal syntax errors. Avoid unnecessary consing when creating the
3925 memoized code.
3926
3927 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
3928
3929 * eval.c (scm_m_cont, scm_m_at_call_with_values,
3930 scm_m_generalized_set_x): Use ASSERT_SYNTAX to signal syntax
3931 errors. Avoid unnecessary consing when creating the memoized
3932 code.
3933
3934 (scm_m_generalized_set_x): Let scm_m_set_x handle the R5RS
3935 standard case. Make sure line and file information are copied to
3936 every created expression.
3937
3938 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
3939
3940 * eval.c (scm_m_set_x, scm_m_apply, scm_m_atbind): Use
3941 ASSERT_SYNTAX to signal syntax errors. Avoid unnecessary consing
3942 when creating the memoized code.
3943
3944 (scm_m_atbind): Reversed the order, in which the init expressions
3945 are stored and executed. The order of execution is now equal to
3946 the order in which the initializers of the let-forms are executed.
3947 Use check_bindings and transform_bindings.
3948
3949 (SCM_CEVAL): Eliminated SCM_NIMP in favor of more appropriate
3950 !SCM_NULLP. Added some comments.
3951
3952 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
3953
3954 * eval.c: Sorted include files alphabetically.
3955
3956 (scm_m_begin): Added comment.
3957
3958 (scm_m_or): Use ASSERT_SYNTAX to signal syntax errors. Avoid
3959 unnecessary consing when creating the memoized code.
3960
3961 (iqq, scm_m_quasiquote, scm_m_quote): Use ASSERT_SYNTAX to signal
3962 syntax errors. Be more specific about the kind of error that was
3963 detected.
3964
3965 (scm_m_quote, unmemocopy): As an optimization, vector constants
3966 are now inserted unquoted into the memoized code. During
3967 unmemoization the quotes are added again to provide syntactically
3968 correct code.
3969
3970 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
3971
3972 * eval.c (scm_m_let, scm_m_letstar, scm_m_letrec,
3973 scm_m_expand_body, check_bindings): Extracted syntax checking of
3974 bindings to new static function check_bindings.
3975
3976 (scm_m_let, memoize_named_let): Extracted handling of named let to
3977 new static function memoize_named_let.
3978
3979 (transform_bindings, scm_m_let, scm_m_letstar, scm_m_letrec): Use
3980 ASSERT_SYNTAX to signal syntax errors. Be more specific about the
3981 kind of error that was detected. Avoid use of SCM_CDRLOC. Avoid
3982 unnecessary consing when creating the memoized code.
3983
3984 2003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
3985
3986 * eval.c (s_bad_formals, s_bad_formal, s_duplicate_formal): New
3987 static identifiers.
3988
3989 (s_clauses, s_formals, s_duplicate_formals): Removed.
3990
3991 (scm_m_lambda): Use ASSERT_SYNTAX to signal syntax errors. Be more
3992 specific about the kind of error that was detected. Prepare for
3993 easier integration of changes for separated memoization.
3994
3995 2003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
3996
3997 * eval.c (s_duplicate_binding): New static identifier.
3998
3999 (scm_m_case): Call scm_c_memq instead of implementing it inline.
4000
4001 (scm_m_define): Added comment about how we check for duplicate
4002 formals.
4003
4004 (scm_m_do): Added check for duplicate bindings.
4005
4006 (scm_m_if): Use ASSERT_SYNTAX to signal syntax errors. Avoid
4007 unnecessary consing when creating the memoized code.
4008
4009 (scm_c_improper_memq, c_improper_memq, scm_m_lambda): Renamed
4010 scm_c_improper_memq to c_improper_memq, since it is not exported.
4011
4012 (transform_bindings): Call scm_c_memq rather than
4013 scm_c_improper_memq.
4014
4015 (SCM_CEVAL): Simplified handling of SCM_IM_IF forms.
4016
4017 2003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
4018
4019 * eval.c (s_bad_bindings, s_bad_binding, s_bad_exit_clause): New
4020 static identifiers.
4021
4022 (scm_m_do): Use ASSERT_SYNTAX to signal syntax errors. Be more
4023 specific about the kind of error that was detected. Avoid use of
4024 SCM_CDRLOC. Avoid unnecessary consing when creating the memoized
4025 code, this way also making sure that file name, line number
4026 information etc. remain available.
4027
4028 2003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
4029
4030 * eval.c (memoize_as_thunk_prototype): New static function.
4031
4032 (scm_m_delay, scm_m_future): Use memoize_as_thunk_prototype.
4033 Avoid unnecessary consing when creating the memoized code.
4034
4035 2003-10-12 Kevin Ryde <user42@zip.com.au>
4036
4037 * list.c (scm_append): Track argument number and use in error.
4038
4039 2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
4040
4041 * eval.c (s_missing_expression, s_bad_variable): New static
4042 identifiers.
4043
4044 (scm_m_define): Use ASSERT_SYNTAX to signal syntax errors. Prefer
4045 R5RS terminology for the naming of variables. Be more specific
4046 about the kind of error that was detected. Make sure file name,
4047 line number etc. are added to all freshly created expressions.
4048 Avoid unnecessary consing when creating the memoized code.
4049
4050 2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
4051
4052 * eval.c (s_extra_expression, s_misplaced_else_clause,
4053 s_bad_cond_clause, s_missing_recipient): New static identifiers.
4054
4055 (s_extra_case_clause): Removed.
4056
4057 (scm_m_case, scm_m_cond): If a clause appears after an else
4058 clause, report a misplaced else clause.
4059
4060 (scm_m_cond): Use ASSERT_SYNTAX to signal syntax errors. Be more
4061 specific about the kind of error that was detected. Handle bound
4062 'else and '=>. Avoid unnecessary consing when creating the
4063 memoized code.
4064
4065 (scm_m_cond, unmemocopy, SCM_CEVAL): Use SCM_IM_ELSE to memoize
4066 the syntactic keyword 'else and SCM_IM_ARROW to memoize the
4067 syntactic keyword '=>.
4068
4069 2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
4070
4071 * eval.c (scm_m_case): Allow empty lists of case labels.
4072
4073 2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
4074
4075 * tags.h (SCM_IM_ELSE, SCM_IM_ARROW): New memoizer codes.
4076
4077 * print.c (scm_isymnames): Add names for the new memoizer codes.
4078
4079 * eval.c (s_missing_clauses, s_bad_case_clause,
4080 s_extra_case_clause, s_bad_case_labels, s_duplicate_case_label,
4081 literal_p): New static identifiers.
4082
4083 (scm_m_case): Use ASSERT_SYNTAX to signal syntax errors. Be more
4084 specific about the kind of error that was detected. Check for
4085 duplicate case labels. Handle bound 'else. Avoid unnecessary
4086 consing when creating the memoized code.
4087
4088 (scm_m_case, unmemocopy, SCM_CEVAL): Use SCM_IM_ELSE to memoize
4089 the syntactic keyword 'else.
4090
4091 2003-10-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
4092
4093 * eval.c (s_bad_expression, syntax_error_key, syntax_error,
4094 ASSERT_SYNTAX, ASSERT_SYNTAX_2): New static identifiers.
4095
4096 (scm_m_and): Use ASSERT_SYNTAX to signal syntax errors. Avoid
4097 unnecessary consing when creating the memoized code.
4098
4099 2003-10-09 Kevin Ryde <user42@zip.com.au>
4100
4101 * numbers.c (scm_inexact_to_exact): Don't depend on what double->long
4102 cast gives for values bigger than a long, or for nan or inf.
4103
4104 2003-10-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
4105
4106 * smob.h (scm_make_smob_type): Made the declaration match the
4107 definition.
4108
4109 2003-10-07 Marius Vollmer <mvo@zagadka.de>
4110
4111 * goops.c, objects.h, smob.c, smob.h: Make type names char
4112 const * instead of char *. Thanks to Paul Jarc!
4113
4114 2003-10-02 Kevin Ryde <user42@zip.com.au>
4115
4116 * strports.c (scm_call_with_output_string): scm_get_output_string
4117 rather than scm_strport_to_string, so as to guard against the port
4118 having been closed by the called procedure. Reported by Nic Ferrier.
4119
4120 2003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
4121
4122 * numbers.h (SCM_INEXACTP): Removed uses of SCM_TYP16S.
4123
4124 * tags.h, deprecated.h (SCM_TYP16S): Deprecated and moved from
4125 tags.h to deprecated.h.
4126
4127 2003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
4128
4129 This set of patches introduces a new tc7 code scm_tc7_number for
4130 numbers. Bignums, reals and complex numbers are turned from smobs
4131 into subtypes of scm_tc7_number.
4132
4133 * tags.h (scm_tc7_number): New.
4134
4135 * eq.c (scm_equal_p), eval.c (SCM_CEVAL), evalext.c
4136 (scm_self_evaluating_p), gc-card.c (scm_i_sweep_card), gc-mark.c
4137 (scm_gc_mark_dependencies), goops.c (create_smob_classes), hash.c
4138 (scm_hasher), numbers.c, numbers.h (SCM_NUMP), objects.c
4139 (scm_class_of), print.c (scm_iprin1), smob.c
4140 (scm_smob_prehistory): Don't handle bignums, reals and complex
4141 numbers as subtypes of scm_tc7_smob any more.
4142
4143 * numbers.h, tags.h (scm_tc16_big, scm_tc16_real,
4144 scm_tc16_complex): Moved definitions from tags.h to numbers.h.
4145
4146 2003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
4147
4148 * numbers.c (scm_make_complex), gc-card.c (scm_i_sweep_card): Use
4149 sizeof (scm_t_complex) to determine the memory size of the
4150 malloc'd area for complex numbers.
4151
4152 2003-09-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
4153
4154 * numbers.c (scm_bigequal): Fixed.
4155
4156 2003-09-16 Marius Vollmer <mvo@zagadka.de>
4157
4158 * stime.c (scm_current_time): 'time' does not set errno so don't
4159 use SCM_SYSERROR for reporting errors.
4160
4161 2003-09-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
4162
4163 This set of patches eliminates the dependency between the
4164 implementation of evaluator specific memoization codes and special
4165 constants like #f, '() etc. ('flags'), which are not evaluator
4166 specific. The goal is to remove definitions of evaluator
4167 memoization codes completely from the public interface. This will
4168 make it possible to experiment more freely with optimizations of
4169 guile's internal representation of memoized code.
4170
4171 * objects.c (scm_class_of): Eliminate dependency on SCM_ISYMNUM.
4172
4173 * print.c (iflagnames): New array, holding the printed names of
4174 guile's special constants ('flags').
4175
4176 (scm_isymnames): Now holds only the printed names of the
4177 memoization codes.
4178
4179 (scm_iprin1): Separate the handling of memoization codes and
4180 guile's special constants.
4181
4182 * tags.h (scm_tc9_flag, SCM_ITAG9, SCM_MAKE_ITAG9, SCM_ITAG9_DATA,
4183 SCM_IFLAGNUM): new
4184
4185 (scm_tc8_char, scm_tc8_iloc, SCM_BOOL_F, SCM_BOOL_T,
4186 SCM_UNDEFINED, SCM_EOF_VAL, SCM_EOL, SCM_UNSPECIFIED, SCM_UNBOUND,
4187 SCM_ELISP_NIL, SCM_IM_DISPATCH, SCM_IM_SLOT_REF,
4188 SCM_IM_SLOT_SET_X, SCM_IM_DELAY, SCM_IM_FUTURE,
4189 SCM_IM_CALL_WITH_VALUES, SCM_IM_NIL_COND, SCM_IM_BIND): Changed
4190 values.
4191
4192 (SCM_IFLAGP): SCM_IFLAGP now only tests for flags.
4193
4194 (SCM_IFLAGP, SCM_MAKIFLAG, SCM_IFLAGNUM): Generalized to use the
4195 tc9 macros and scm_tc9_flag.
4196
4197 2003-09-15 Marius Vollmer <mvo@zagadka.de>
4198
4199 * posix.c (scm_setgroups): Check that the gid list is not too
4200 long. Thanks to Paul Jarc!
4201
4202 2003-09-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
4203
4204 * tags.h: Reduced the number of short instructions from 14 to 13.
4205 The typecode of the former 14th short instruction is now used to
4206 represent long instructions. Changed some comments to reflect
4207 this fact.
4208
4209 (SCM_MAKISYM): ISYMs get a new tc7 code, namely the one that was
4210 previously used by SCM_IM_DEFINE.
4211
4212 (SCM_IM_DEFINE): Turned into a long instruction.
4213
4214 * eval.c (unmemocopy, SCM_CEVAL): Treat SCM_IM_DEFINE as a long
4215 instruction.
4216
4217 * eval.c (SCM_CEVAL): Since characters and iflags have now a tc7
4218 code that is separate from all instructions, one level of dispatch
4219 for long instructions can be eliminated.
4220
4221 * print.c (scm_isymnames): Removed some commented code.
4222
4223 2003-09-12 Marius Vollmer <mvo@zagadka.de>
4224
4225 * __scm.h (SCM_FENCE): Use __memory_barrier with the Intel
4226 compiler on IA64.
4227
4228 * hashtab.h (scm_tc16_hashtable): Added "extern" declaration.
4229
4230 * modules.c (scm_module_reverse_lookup): Check that the obarray
4231 really is a hashtable and do nothing if not.
4232
4233 * inline.h: Use "extern inline" only with GCC. Use "static
4234 inline" else.
4235
4236 2003-09-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
4237
4238 * numbers.h (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Removed uses
4239 of SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
4240
4241 * numbers.h, deprecated.h (SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP,
4242 SCM_SLOPPY_COMPLEXP): Deprecated and moved from numbers.h to
4243 deprecated.h.
4244
4245 2003-09-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
4246
4247 * eq.c (scm_eqv_p, scm_equal_p): Removed uses of
4248 SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
4249
4250 * eq.c (scm_eqv_p, scm_equal_p): Reordered comparisons from
4251 0.0==some_expression to some_expression==0.0. The latter is
4252 better readable. The former is preferred by some people, since it
4253 leads to a compiler error when confusing == with =. However, when
4254 using gcc, a warning will be issued if in an if-statement an
4255 assigment appears. Since many Guile developers are using gcc,
4256 such errors will not remain unnoticed anyway. We can therefore
4257 focus on better readability.
4258
4259 2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
4260
4261 * tags.h: Added description of Guile's type system. Removed some
4262 old and misleading comments.
4263
4264 2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
4265
4266 * unit.c (scm_cvref): Eliminate unnecessary uses of SCM_NIMP,
4267 SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
4268
4269 2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
4270
4271 * numbers.h (SCM_MAKINUM): Define in terms of scm_tc2_int.
4272
4273 (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Define in terms of the
4274 respective SLOPPY macro.
4275
4276 2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
4277
4278 * eq.c (scm_equal_p): Use SCM_TYP7 to check if an object is of
4279 type string, not SCM_TYP7S.
4280
4281 2003-09-03 Kevin Ryde <user42@zip.com.au>
4282
4283 * numbers.c (scm_lognot): Correction to docstring, ones-complement not
4284 2s-complement.
4285
4286 * stime.c (scm_strptime): Add comment about glibc strptime %s and
4287 current timezone requiring SCM_DEFER_INTS.
4288
4289 2003-08-30 Neil Jerram <neil@ossau.uklinux.net>
4290
4291 * script.c (scm_compile_shell_switches): Make -s switch optional
4292 if file to be loaded does not begin with a `-'. (Thanks to Aaron
4293 VanDevender for the patch!)
4294
4295 2003-08-30 Kevin Ryde <user42@zip.com.au>
4296
4297 * numbers.c (scm_lognot): Rewrite using ~ and mpz_com, for directness
4298 and to have non-integer types rejected as per other logical funcs.
4299
4300 2003-08-28 Kevin Ryde <user42@zip.com.au>
4301
4302 * gc.h (scm_remember_upto_here_1): Revise comments on the asm form.
4303
4304 2003-08-23 Kevin Ryde <user42@zip.com.au>
4305
4306 * simpos.c (scm_system): Remove SCM_DEFER_INTS, system() should be
4307 thread safe, and could take a long time too.
4308
4309 2003-08-22 Kevin Ryde <user42@zip.com.au>
4310
4311 * numbers.c (scm_difference): Correction to bignum - negative inum.
4312
4313 2003-08-14 Kevin Ryde <user42@zip.com.au>
4314
4315 * gc.h (scm_remember_upto_here_1, scm_remember_upto_here_2)
4316 [__GNUC__]: Use volatile asm macros rather than a function call.
4317 * gc.c (scm_remember_upto_here_1, scm_remember_upto_here_2): Undefine
4318 macros while defining functions.
4319
4320 * simpos.c (getenv): Use <stdlib.h> for prototype.
4321 (scm_system): In docstring, refer to status:exit-val rather than
4322 "functions above".
4323
4324 2003-08-09 Kevin Ryde <user42@zip.com.au>
4325
4326 * srcprop.c (scm_source_properties): Return plist from hash if it's a
4327 list set by source-properties! rather than an SRCPROPS object,
4328
4329 2003-07-29 Kevin Ryde <user42@zip.com.au>
4330
4331 * properties.c (scm_primitive_property_ref): In docstring, note
4332 parameters to not-found-proc, use hyphens rather than underscores for
4333 that parameter name.
4334 (scm_primitive_property_set_x): In docstring, VAL is the value
4335 parameter not CODE.
4336
4337 2003-07-27 Marius Vollmer <mvo@zagadka.de>
4338
4339 * print.c (scm_print_symbol_name): handle more weird characters by
4340 escaping the symbol name properly. Thanks to Paul Jarc!
4341
4342 * posix.h (scm_setgroups): New prototype.
4343 * posix.c (scm_setgroups): New. Thanks to Paul Jarc!
4344 (scm_getgroups): Handle groups ids that don't fit into a fixnum.
4345 Don't use SCM_WRITABLE_VELTS.
4346
4347 * gc.h (SCM_GC_SET_CELL_BVEC): New.
4348 * gc-card.c (scm_i_init_card_freelist): Use it. Thanks to
4349 Matthias Koeppe!
4350
4351 * __scm.h (SCM_C_INLINE_KEYWORD): New.
4352 * numbers.c: Use it in place of SCM_C_INLINE so that the code
4353 compiles when SCM_C_INLINE is undefined.
4354
4355 2003-07-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
4356
4357 * __scm.h: Reformulated the architecture and compiler properties
4358 in terms of properties of scm_t_bits and SCM variables rather than
4359 in terms of c standard types. This is since it is not known which
4360 of the standard types scm_t_bits and SCM variables will be defined
4361 to.
4362
4363 2003-07-24 Kevin Ryde <user42@zip.com.au>
4364
4365 * numbers.c (scm_angle): Use scm_flo0 for non-negative inum, bignum
4366 and real.
4367
4368 2003-07-18 Kevin Ryde <user42@zip.com.au>
4369
4370 * numbers.c (scm_product): In complex * bignum, correction to
4371 REAL/IMAG fetch, x is the complex, not y.
4372
4373 2003-07-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4374
4375 * numbers.c (scm_odd_p, scm_even_p): Bugfix: Treat result of
4376 scm_inf_p test as Scheme values.
4377 (scm_sum): Bugfix: Normalize bignum created from a negative bignum
4378 and a positive inum.
4379 Use GNU indentation style.
4380
4381 2003-07-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
4382
4383 * values.c (scm_values): Build lists of length 1 by using
4384 scm_list_1 instead of using scm_cons.
4385
4386 2003-07-10 Kevin Ryde <user42@zip.com.au>
4387
4388 * deprecation.c (scm_c_issue_deprecation_warning_fmt): Add va_end.
4389 * list.c (scm_list_n): Ditto.
4390
4391 * gc-malloc.c (scm_gc_realloc): Define "ptr" at start of function.
4392
4393 2003-07-08 Matthias Koeppe <mkoeppe@merkur.math.uni-magdeburg.de>
4394
4395 * tags.h (scm_t_bits, scm_t_signed_bits, etc): Avoid solaris empty
4396 defines of INTPTR_MAX and UINTPTR_MAX, combine conditionals for
4397 scm_t_bits and scm_t_signed_bits to avoid any chance of one and not
4398 the other using intptr_t.
4399
4400 2003-07-08 Kevin Ryde <user42@zip.com.au>
4401
4402 * numbers.c (scm_make_polar): Use sincos, when available.
4403 (scm_magnitude): Use hypot.
4404
4405 * ports.c (scm_char_ready_p, scm_peek_char): In docstrings, don't use
4406 @footnote since it doesn't go through to guile-procedures.txt.
4407
4408 * threads.c (scm_call_with_new_thread): In docstring, use "( )"
4409 outside @var to quieten makeinfo, and use @code.
4410
4411 2003-07-06 Han-Wen Nienhuys <hanwen@cs.uu.nl>
4412
4413 * gc-malloc.c (decrease_mtrigger): new function
4414 (increase_mtrigger): new function, separate debug registering and
4415 mtrigger administration.
4416 (scm_gc_realloc): bugfix: do mtrigger administration before the
4417 actual realloc, for the realloc might invalidate a GC-d segment of
4418 memory. Thanks to Sam Hocevar for pointing this out.
4419 (scm_gc_realloc): use scm_malloc_reregister instead of
4420 unregistering and registering in sequence.
4421
4422 2003-07-03 Han-Wen Nienhuys <hanwen@cs.uu.nl>
4423
4424 * __scm.h (SCM_ASSERT): change "else" expansion to "do { } while (0)"
4425
4426 2003-07-02 Han-Wen Nienhuys <hanwen@cs.uu.nl>
4427
4428 * __scm.h (SCM_ASRTGO): add "else" to macro expansions with if
4429 clauses.
4430
4431 2003-06-29 Marius Vollmer <mvo@zagadka.de>
4432
4433 * deprecated.h (SCM_OPDIRP, scm_fport, scm_option, scm_srcprops,
4434 scm_srcprops_chunk, scm_info_frame, scm_stack, scm_array,
4435 scm_array_dim, SCM_ARRAY_CONTIGUOUS, SCM_FUNC_NAME, SCM_WTA,
4436 RETURN_SCM_WTA, SCM_VALIDATE_NUMBER_COPY,
4437 SCM_VALIDATE_NUMBER_DEF_COPY, SCM_VALIDATE_OPDIR): Re-added from
4438 the release_1_6 branch.
4439
4440 2003-06-25 Stefan Jahn <stefan@lkcc.org>
4441
4442 * continuations.c: Redeclaration of getcontext() via the
4443 __asm__ ("getcontext") directive.
4444
4445 * continuations.h: Include <ucontext.h> instead of
4446 <sys/ucontext.h>.
4447
4448 2003-06-21 Kevin Ryde <user42@zip.com.au>
4449
4450 * numbers.c (_GNU_SOURCE): #define, to get C99 things.
4451 (scm_asinh, scm_acosh, scm_atanh, scm_truncate, $asinh, $acosh,
4452 $atanh, truncate): Use C library asinh, acosh, atanh and trunc, when
4453 available.
4454 (scm_inexact_to_exact): Expand isfinite to its definition !xisinf.
4455 (isfinite): Remove, conflicts with C99 isfinite().
4456
4457 2003-06-19 Marius Vollmer <mvo@zagadka.de>
4458
4459 * deprecated.h, deprecated.c (scm_strhash, scm_sym2ovcell_soft,
4460 scm_sym2ovcell, scm_intern_obarray_soft, scm_intern_obarray,
4461 scm_symbol_value0, scm_string_to_obarray_symbol scm_intern_symbol,
4462 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned_p,
4463 scm_symbol_bound_p, scm_symbol_set_x, scm_gentemp): Re-added from
4464 the release_1_6 branch.
4465
4466 2003-06-14 Stefan Jahn <stefan@lkcc.org>
4467
4468 * threads.h: Redefined scm_getspecific() and scm_setspecific()
4469 to be functions instead of macros.
4470
4471 * threads.c: Conditionalized inclusion of <sys/time.h> and
4472 <unistd.h>.
4473 (scm_getspecific, scm_setspecific): Made these two function
4474 real part of the API.
4475
4476 * posix.c (s_scm_putenv): Added some code to make a
4477 (putenv "FOO="), i.e. setting an empty string, work also on
4478 Win32 systems. Thanks to Kevin Ryde for the proposal.
4479
4480 2003-06-12 Kevin Ryde <user42@zip.com.au>
4481
4482 * posix.c (scm_putenv): Free temporary ptr in mingw unset. Add
4483 freebsd to comment about need to use unsetenv.
4484
4485 2003-06-02 Marius Vollmer <mvo@zagadka.de>
4486
4487 * ports.c (scm_peek_char): Safe the column of the port around the
4488 getc/ungetc calls. Thanks to Dr. Peter Ivanyi!
4489
4490 2003-06-07 Kevin Ryde <user42@zip.com.au>
4491
4492 * tags.h: Use inttypes.h and stdint.h when available, for INTPTR_MAX
4493 and friends required by scm_t_bits setups.
4494
4495 2003-06-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
4496
4497 * tags.h (scm_tc2_int): Added.
4498
4499 * tags.h (scm_tc3_int_1, scm_tc3_int_2): Expressed in terms of
4500 scm_tc2_int.
4501
4502 * tags.h (scm_tcs_cons_imcar, scm_tcs_cons_nimcar, scm_tcs_struct,
4503 scm_tcs_closures): Hard coded values replaced by symbolic ones.
4504
4505 2003-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
4506
4507 * eval.c: Partially undid my patch from 2003-05-31. This patch
4508 caused the segfault referenced in the previous changelog entry.
4509
4510 2003-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
4511
4512 * tags.h: Fixed comment about the immediate type code layout.
4513
4514 * eval.c: Fixed handling of non-special instructions. Without
4515 this patch, guile will segfault on (#\0) and similar instructions.
4516
4517 2003-06-05 Kevin Ryde <user42@zip.com.au>
4518
4519 * numbers.c (scm_max, scm_min): For inum, bignum and real, if other
4520 operand is NaN, then return NaN. Also avoid passing NaN to mpz_cmp_d.
4521
4522 * read.c (scm_input_error): Pass arg list parameter to scm_error_scm,
4523 rather than SCM_EOL. Needed by "Unknown # object" case in scm_lreadr.
4524
4525 2003-06-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
4526
4527 * __scm.h, gc-card.c (SCM_DEBUG_DEBUGGER_SUPPORT,
4528 SCM_DEBUG_DEBUGGING_SUPPORT): Renamed macro
4529 SCM_DEBUG_DEBUGGER_SUPPORT to SCM_DEBUG_DEBUGGING_SUPPORT and
4530 generalized it to apply not only to C level functions but also to
4531 scheme level functions.
4532
4533 * debug.c, debug.h, eval.c (make-iloc, scm_make_iloc, iloc?,
4534 scm_iloc_p, dbg-make-iloc, scm_dbg_make_iloc, dbg-iloc?,
4535 scm_dbg_iloc_p): Moved functions scm_make_iloc, scm_iloc_p to
4536 eval.c, made them available under SCM_DEBUG_DEBUGGING_SUPPORT == 1
4537 only and renamed them to scm_dbg_make_iloc, scm_dbg_iloc_p,
4538 respectively.
4539
4540 * deprecated.h, eval.c, eval.h (SCM_ILOC00, SCM_IDINC,
4541 SCM_IDSTMSK): Deprecated. The macro definitions are moved from
4542 eval.h into eval.c and a copy is placed into deprecated.h.
4543
4544 * eval.c, eval.h (SCM_MAKE_ILOC): Removed from eval.h and placed
4545 into eval.c. This definition was not part of the API in any
4546 officially released version of guile and thus does not need to go
4547 through a phase of deprecation.
4548
4549 2003-06-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
4550
4551 * deprecated.c, deprecated.h, eval.c, eval.h (scm_s_expression,
4552 scm_s_test, scm_s_body, scm_s_bindings, scm_s_variable,
4553 scm_s_clauses, scm_s_formals): Deprecated. In eval.c the
4554 definitions are make static and renamed from scm_s_xxx to s_xxx.
4555 In deprecated.c the original definitions are copied.
4556
4557 * deprecated.h, eval.c, eval (SCM_EVALIM2, SCM_EVALIM, SCM_XEVAL,
4558 SCM_XEVALCAR): Deprecated. The macro definitions are moved from
4559 eval.h into eval.c and a copy (slightly modified to work in user
4560 code) is placed into deprecated.h.
4561
4562 * eval.c: Use the local static s_xxx definitions instead of the
4563 scm_s_xxx definitions throughout.
4564
4565 2003-06-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
4566
4567 This set of patches separates the representation of the cxr family
4568 of functions (car, cdr etc.) from the dsubr family of functions
4569 (i. e. functions that take a double precision floating point
4570 argument). Further, the algorithm for handling the cxr function
4571 is improved.
4572
4573 * eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_1), numbers.c
4574 (scm_asinh, scm_acosh, scm_atanh, scm_truncate, scm_round, floor,
4575 ceil, sqrt, fabs, exp, log, sin, cos, tan, asin, acos, atan, sinh,
4576 cosh, tanh), objects.c (scm_class_of), procprop.c
4577 (scm_i_procedure_arity), ramap.c (scm_array_map_x), tags.h
4578 (scm_tc7_dsubr, scm_tcs_subrs): Introduce scm_tc7_dsubr as new
4579 typecode for the dsubr family of functions.
4580
4581 * ramap.c (ramap_cxr, ramap_dsubr): Renamed ramap_cxr to
4582 ramap_dsubr.
4583
4584 * eval.c (SCM_CEVAL, SCM_APPLY, call_cxr_1), pairs.c
4585 (scm_init_pairs): Make use of the (now usable) second cell element
4586 of a scm_tc7_cxr function to implement the cxr family of functions
4587 more efficiently.
4588
4589 2003-05-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
4590
4591 * eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_0,
4592 scm_trampoline_1, scm_trampoline_2): Postpone error cases to the
4593 end of an if-else-if-sequence of checks.
4594
4595 2003-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
4596
4597 * eval.c (SCM_CEVAL): Improved readability of call-with-values
4598 execution. Generalize apply_closure to apply_proc and use that
4599 for call-with-values.
4600
4601 2003-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
4602
4603 * eval.c (SCM_CEVAL): Avoid one level of indirection when applying
4604 a non closure.
4605
4606 2003-05-30 Stefan Jahn <stefan@lkcc.org>
4607
4608 * posix.c (s_scm_putenv): Use the new HAVE_UNSETENV
4609 appropriately for mingw32 hosts.
4610
4611 * numbers.h: Defining copysign(), isnan() and finite() to
4612 be prefixed by a single '_' for mingw32 hosts.
4613
4614 2003-05-30 Kevin Ryde <user42@zip.com.au>
4615
4616 * numbers.c (z_negative_one): New variable.
4617 (scm_init_numbers): Initialize it.
4618 (scm_logcount): Use it and mpz_hamdist to count zeros for negatives.
4619
4620 2003-05-29 Stefan Jahn <stefan@lkcc.org>
4621
4622 * win32-dirent.c: Use malloc() instead of scm_malloc().
4623
4624 * stime.c (s_scm_strftime): Add a type cast to avoid compiler
4625 warning.
4626
4627 * posix.c (s_scm_putenv): Disable use of unsetenv() for the
4628 mingw32 build.
4629
4630 * modules.c (s_scm_module_import_interface): Renamed local
4631 variable interface to _interface. Seems like 'interface'
4632 is a special compiler directive for the mingw32 compiler.
4633
4634 * mkstemp.c: Provide prototype to avoid compiler warning.
4635
4636 * load.c (s_scm_search_path): Fixed absolute and relative
4637 path detections for native Windows platforms.
4638
4639 * gc.h, threads.h: Export some more symbols using SCM_API (necessary
4640 to build on mingw32).
4641
4642 * gc-freelist.c ("s_scm_map_free_list",
4643 "s_scm_gc_set_debug_check_freelist_x"): Fixed use of FUNC_NAME.
4644
4645 * fports.c (fport_fill_input): Disable use of
4646 fport_wait_for_input() on Win32 platforms.
4647
4648 * filesys.c (s_scm_basename): Fixed __MINGW32__ code.
4649
4650 * Makefile.am: Modified some rules for cross compiling.
4651
4652 2003-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
4653
4654 * eval.c (SCM_CEVAL): In case of an application, all checks for a
4655 proper function object and the correct number of arguments are now
4656 performed in the application part of SCM_CEVAL.
4657
4658 (scm_badformalsp): Removed.
4659
4660 2003-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
4661
4662 * deprecated.c (scm_read_and_eval_x): Fixed C99-ism.
4663
4664 2003-05-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4665
4666 * num2integral.i.c (NUM2INTEGRAL): Avoid warning about conditional
4667 always being false by inserting preprocessor conditional. (Thanks
4668 to Bruce Korb.)
4669
4670 * __scm.h (SCM_STACK_PTR): New macro. (Cast argument through
4671 (void *) in order to avoid an aliasing warning; thanks to Bruce
4672 Korb.)
4673
4674 * stackchk.h (SCM_STACK_OVERFLOW_P): Use SCM_STACK_PTR.
4675
4676 * threads.c (suspend, launch_thread, scm_threads_mark_stacks): Use
4677 SCM_STACK_PTR.
4678
4679 * threads.c (scm_threads_mark_stacks): Bugfix: Changed
4680 thread->base --> t->base.
4681
4682 * eval.c (SCM_CEVAL): Don't cast argument of SCM_STACK_OVERFLOW_P.
4683
4684 2003-05-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4685
4686 * deprecated.h, deprecated.c (scm_makstr, scm_makfromstr,
4687 scm_variable_set_name_hint, scm_builtin_variable,
4688 scm_internal_with_fluids, scm_make_gsubr,
4689 scm_make_gsubr_with_generic, scm_create_hook, SCM_LIST0,
4690 SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5, SCM_LIST6,
4691 SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify, scm_sloppy_memq,
4692 scm_sloppy_memv, scm_sloppy_member, scm_read_and_eval_x,
4693 scm_subr_entry, SCM_SUBR_DOC, scm_make_subr,
4694 scm_make_subr_with_generic, scm_make_subr_opt,
4695 scm_call_catching_errors, scm_make_smob_type_mfpe,
4696 scm_set_smob_mfpe, scm_strprint_obj, scm_read_0str, scm_eval_0str,
4697 SCM_CHARS, SCM_UCHARS, SCM_LENGTH): Re-added from the release_1_6
4698 branch. Some have been slightly rewritten.
4699 (scm_i_object_chars, scm_i_object_length): New, to support
4700 SCM_CHARS, SCM_UCHARS, and SCM_LENTH.
4701
4702 2003-05-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
4703
4704 * eval.c (scm_m_do, unmemocopy, SCM_CEVAL): Reversed order of
4705 names and inits in the memoized code of do.
4706
4707 2003-05-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4708
4709 * c-tokenize.lex (yyget_lineno, yyget_in, yyget_out, yyget_leng,
4710 yyget_text, yyset_lineno, yyset_in, yyset_out, yyget_debug,
4711 yyset_debug, yylex_destroy): Added prototypes (otherwise we'll get
4712 a compilation error if error-on-warning is enabled).
4713
4714 2003-05-17 Marius Vollmer <mvo@zagadka.de>
4715
4716 * c-tokenize.lex: Gobble up complete lines after a '#'. This
4717 removes preprocessor directives from the snarfage that might
4718 otherwise confuse us. These directives appear when compiling with
4719 "-g3", for example.
4720
4721 2003-05-16 Han-Wen Nienhuys <hanwen@cs.uu.nl>
4722
4723 * ChangeLog: add my surname
4724
4725 * srcprop.c (scm_finish_srcprop): use
4726 scm_gc_register_collectable_memory()
4727 (scm_make_srcprops): idem.
4728
4729 2003-05-14 Han-Wen Nienhuys <hanwen@cs.uu.nl>
4730
4731 * gc-malloc.c (scm_gc_register_collectable_memory): avoid
4732 wrap-around for scm_mtrigger
4733 (scm_gc_register_collectable_memory): abort on overflowing
4734 scm_mallocated().
4735
4736 2003-05-13 Kevin Ryde <user42@zip.com.au>
4737
4738 * numbers.c (xmpz_cmp_d): New macro, handling infs if gmp doesn't.
4739 (scm_num_eq_p, scm_less_p, scm_max, scm_min): Use it.
4740
4741 2003-05-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4742
4743 * backtrace.c (scm_display_error_message): Introduced fancy
4744 printing with max level 7 and length 10. (Purpose: avoid printing
4745 gigantic objects in error messages.)
4746
4747 * print.c, print.h (scm_i_port_with_print_state): New function.
4748
4749 * print.c (scm_iprin1, scm_printer_apply,
4750 scm_port_with_print_state): Use scm_i_port_with_print_state.
4751 (scm_simple_format): Modified not to destroy print states.
4752 (print_state_mutex): New mutex.
4753 (scm_make_print_state, scm_free_print_state, scm_prin1):
4754 Lock/unlock print_state_mutex.
4755
4756 * deprecated.h (SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK):
4757 Use current names in definitions.
4758
4759 2003-05-10 Kevin Ryde <user42@zip.com.au>
4760
4761 * numbers.c (scm_num_eq_p, scm_less_p): Don't pass NaN to mpz_cmp_d.
4762
4763 * numbers.c (scm_integer_length): On negative bignums, adjust
4764 mpz_sizeinbase to account for it looking at absolute value where we
4765 want ones-complement.
4766
4767 * numbers.c (scm_gcd): In bignum/inum, don't pass yy==0 to mpz_gcd_ui
4768 since we're only using the ulong return value, and x might not fit.
4769
4770 2003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
4771
4772 * eval.c, eval.h, read.c, read.h (scm_sym_dot): Moved from eval to
4773 read. This will allow to make the definition in read.c static.
4774
4775 2003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
4776
4777 * eval.c, eval.h, evalext.c, evalext.h (scm_m_undefine): Moved
4778 from evalext to eval. This will allow to make some of the
4779 definitions in eval.c static.
4780
4781 2003-05-06 Kevin Ryde <user42@zip.com.au>
4782
4783 * numbers.c (scm_difference): In inum - bignum, handle negative inum.
4784 (scm_logcount): Use mpz_com, not mpz_neg.
4785
4786 2003-05-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
4787
4788 The purpose of this patch is to make guile's internal memoizers
4789 distinguishable from memoizing macros created on the scheme level
4790 or from user provided primitive memoizing macros. The reason is,
4791 that the internal memoizers are the only ones that are allowed to
4792 transform their scheme input into memoizer byte code, while all
4793 other memoizing macros may only transform scheme code into new
4794 scheme code.
4795
4796 To achieve this, a new macro type 'builtin-macro!' is introduced.
4797 Currently, 'builtin-macro!'s are handled as memoizing macros, but
4798 this will change when the memoizer and executor are separated.
4799
4800 * macros.[ch] (scm_i_makbimacro): New.
4801
4802 * macros.h (SCM_BUILTIN_MACRO_P): New.
4803
4804 * macros.c (macro_print, scm_macro_type): Support builtin-macro!s.
4805
4806 * eval.c, goops.c: All of guile's primitive memoizing macros are
4807 primitive builtin-macros now.
4808
4809 * eval.c (scm_macroexp, SCM_CEVAL): Make sure the primitive
4810 builtin-macros are handled equally to memoizing macros.
4811
4812 2003-05-04 Marius Vollmer <mvo@zagadka.de>
4813
4814 * throw.c (scm_ithrow): Remove "asm volatile" hack. It used to
4815 work around a bug in GCC 2.95.2 but is now a bug in itself.
4816
4817 2003-05-02 Marius Vollmer <mvo@zagadka.de>
4818
4819 * deprecated.h (scm_rstate, scm_rng, SCM_SLOPPY_CONSP,
4820 SCM_SLOPPY_NCONSP, scm_tc7_ssymbol, scm_tc7_msymbol,
4821 scm_tcs_symbols): New.
4822
4823 2003-04-30 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4824
4825 * deprecated.h, deprecated.c (scm_protect_object,
4826 scm_unprotect_object, SCM_SETAND_CAR, SCM_SETOR_CAR,
4827 SCM_SET_AND_CDR, SCM_SET_OR_CDR, SCM_FREEP, SCM_NFREEP,
4828 SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16,
4829 SCM_GCCDR, scm_remember, scm_the_root_module, scm_make_module,
4830 scm_ensure_user_module, scm_load_scheme_module, scm_port,
4831 scm_ptob_descriptor, scm_port_rw_active,
4832 scm_close_all_ports_except): New.
4833
4834 * ports.c (scm_c_port_for_each): New function, mostly copied from
4835 scm_port_for_each.
4836 (scm_port_for_each): Reimplemented using scm_c_port_for_each.
4837 * ports.h (scm_c_port_for_each): New prototype.
4838
4839 2003-04-28 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4840
4841 * eval.c (scm_m_atdispatch): Removed until actually needed. (This
4842 macro was introduced in anticipation of GOOPS method compilation
4843 code.)
4844
4845 * goops.c: Removed binding of @dispatch.
4846
4847 2003-04-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
4848
4849 * eval.c, goops.c (@dispatch, @slot-ref, @slot-set!): Move the
4850 instructions that bind the macros on the scheme level back to
4851 goops.c in order to make sure again that the bindings go into the
4852 (oop goops) module and are not visible from the outside.
4853
4854 2003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
4855
4856 * eval.c: Non functional change: Separated R5RS and non-R5RS
4857 macros into different sections of the file and ordered the
4858 memoizers alphabetically.
4859
4860 2003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
4861
4862 * eval.c (scm_ilookup): Rewritten to improve readability.
4863
4864 2003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
4865
4866 * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2):
4867 Partially reverted patch from 2003-04-23 in oder to find a better
4868 compromise between readability and debuggability.
4869
4870 2003-04-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
4871
4872 * eval.c, eval.h, goops.c, goops.h (scm_m_atslot_ref,
4873 scm_m_atslot_set_x, scm_m_atdispatch): Move the declarations and
4874 definitions of the special goops memoizers from goops.[ch] to
4875 eval.[ch]. Hmm... it seems that scm_m_atdispatch is not used
4876 throughout guile.
4877
4878 2003-04-24 Mikael Djurfeldt <mdj@kvast.blakulla.net>
4879
4880 * ports.c, ports.h (scm_i_port_table_mutex): New mutex.
4881
4882 * fports.c (scm_evict_ports): Lock/unlock scm_i_port_table_mutex.
4883
4884 * ports.c (scm_close_port, scm_flush_all_ports): Ditto.
4885
4886 * ioext.c (scm_fdes_to_ports): Ditto.
4887
4888 * vports.c (scm_make_soft_port): Changed SCM_DEFER/ALLOW_INTS into
4889 lock/unlock scm_i_port_table_mutex.
4890
4891 * strports.c (scm_mkstrport): Ditto.
4892
4893 * ports.c (scm_void_port, scm_port_for_each): Ditto.
4894
4895 * fports.c (scm_fdes_to_port): Ditto.
4896
4897 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
4898
4899 This set of patches contains no functional changes, only debatable
4900 minor stylistic ones. Still, in order to prepare a patch between
4901 my local copy and the CVS version, I decided to submit the changes
4902 below. Then, the patch will hopefully only contain relevant
4903 modifications :-)
4904
4905 * eval.c (iqq): Added const specifier.
4906
4907 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
4908 Use NULL instead of 0 to indicate that a pointer is returned.
4909 Removed some misleading 'fall through' comments.
4910
4911 * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2):
4912 Split up long expressions into smaller ones to be more debugging
4913 friendly.
4914
4915 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
4916
4917 * eval.h (SCM_ENTER_FRAME_HDLR, SCM_APPLY_FRAME_HDLR,
4918 SCM_EXIT_FRAME_HDLR): Use SCM_PACK to convert data to a SCM value
4919 rather than casting to SCM.
4920
4921 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
4922
4923 * sort.c, pairs.h: Removed unnecessary includes.
4924
4925 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
4926
4927 * sort.c: Replaced hand-made trampline code by the new official
4928 mechanism from eval.c. This fixes a segfault in the new test file
4929 sort.test.
4930
4931 (quicksort, compare_function, scm_restricted_vector_sort_x,
4932 scm_sorted_p, scm_merge, scm_merge_list_x, scm_merge_x,
4933 scm_merge_list_step, scm_sort_x, scm_sort, scm_merge_vector_x,
4934 scm_merge_vector_step, scm_stable_sort_x, scm_stable_sort,
4935 scm_sort_list_x, scm_sort_list): Use trampoline mechanism from
4936 eval.c.
4937
4938 (subr2less, lsubrless, closureless, applyless, scm_cmp_function,
4939 cmp_fun_t): Removed.
4940
4941 (compare_function): Added.
4942
4943 * sort.c (quicksort, SWAP, stack_node): Replaced pointer
4944 arithmetics with index arithmetics. Changed quicksort to work on
4945 an array of SCM values instead of an array of characters. Avoid
4946 bytewise copying of SCM elements. Avoid allocating memory on the
4947 stack with alloca. Fixed some comments.
4948
4949 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
4950
4951 * eval.c (EXTEND_ENV): Eliminated.
4952
4953 (unmemocopy, SCM_CEVAL, SCM_APPLY): Use SCM_EXTEND_ENV instead of
4954 EXTEND_ENV.
4955
4956 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
4957
4958 * __scm.h (SCM_DEBUG_DEBUGGER_SUPPORT): New compile-time option.
4959
4960 * gc.card.c (scm_gc_marked_p): Fixed compiler warning when
4961 compiling with SCM_DEBUG==1 by moving definition behind prototype.
4962
4963 * gc.card.c (scm_dbg_t_list_cell, scm_dbg_t_double_cell,
4964 scm_dbg_gc_marked_p, scm_dbg_gc_get_card, scm_dbg_gc_get_bvec,
4965 scm_t_list_cell_struct, scm_t_list_cell, scm_t_double_cell,
4966 scm_gc_marked_p, scm_gc_get_card, scm_gc_get_bvec): Fixed
4967 functions such that they check if the object is a non-immediate.
4968 Further, renamed identifiers to use the scm_dbg_ prefix and made
4969 their inclusion into the lib dependent of the
4970 SCM_DEBUG_DEBUGGER_SUPPORT compile time option.
4971
4972 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
4973
4974 * __scm.h: Fixed comment about the SCM_DEBUG_TYPING_STRICTNESS
4975 debug option.
4976
4977 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
4978
4979 * list.c (scm_ilength, scm_last_pair), unif.c (l2ra): Prefer
4980 !SCM_CONSP over SCM_NCONSP. Now, guile itself does not include
4981 any calls to SCM_NCONSP any more.
4982
4983 * unif.c (l2ra): Eliminate redundant check.
4984
4985 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
4986
4987 * list.c (scm_cons_star), ramap.c (scm_ra_sum, scm_ra_product,
4988 scm_array_map_x), unif.c (l2ra): Prefer !SCM_NULLP over
4989 SCM_NNULLP. Now, guile itself does not include any calls to
4990 SCM_NNULLP any more.
4991
4992 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
4993
4994 * eval.c (unmemocopy, SCM_APPLY, scm_map, scm_for_each,
4995 scm_copy_tree): Place assignment expressions which are part of
4996 other expressions into an expression of their own.
4997
4998 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
4999
5000 * goops.c (TEST_CHANGE_CLASS, scm_sys_initialize_object): Don't
5001 compare SCM values with !=.
5002
5003 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
5004
5005 * eval.c, eval.h, evalext.c, evalext.h (scm_sym_setter,
5006 scm_m_generalized_set_x, scm_init_evalext): Move the declaration
5007 and definition of the memoizer for the generalized set! macro from
5008 evalext.[ch] to eval.[ch]. Use the SCM_SYNTAX snarfer macro to
5009 define the macro object.
5010
5011 * eval.c, eval.h (s_set_x, scm_s_set_x, scm_m_set_x,
5012 scm_m_generalized_set_x): Since now scm_s_set_x is only used in
5013 eval.c, it is made static and renamed to s_set_x.
5014
5015 * evalext.c (scm_defined_p, scm_m_undefine): Prefer !SCM_<foo>
5016 over SCM_N<foo>.
5017
5018 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
5019
5020 * eval.c, root.h (scm_undefineds, SCM_NUM_PROTECTS, undefineds,
5021 scm_init_eval): Made scm_undefineds static in eval.c, renamed it
5022 to undefineds and registered the object as a permanent object.
5023
5024 * eval.c, eval.h (scm_f_apply, scm_init_eval): Made scm_f_apply
5025 static in eval.c, renamed it to f_apply and registered the object
5026 as a permanent object.
5027
5028 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
5029
5030 * eval.c (SCM_BIT7, SCM_BIT8, unmemocopy, SCM_CEVAL): Renamed
5031 file-local macro SCM_BIT8 to SCM_BIT7, which is more appropriate.
5032
5033 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
5034
5035 * numbers.c (scm_logtest): Fixed argument bug in the call to
5036 mpz_and, which showed up when compiling with SCM_DEBUG defined.
5037
5038 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
5039
5040 * gc-card.c (scm_i_sweep_card, scm_i_init_card_freelist): Fixed
5041 type errors that showed up when compiling with SCM_DEBUG defined.
5042
5043 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
5044
5045 * continuations.c, continuations.h, eval.c, eval.h, extensions.c,
5046 gsubr.c, guile.c, init.c, read.c, root.c, root.h, stackchk.h,
5047 throw.c: Removed uses of DEBUG_EXTENSIONS and DYNAMIC_LINKING to
5048 fix compile errors with --disable-deprecated.
5049
5050 2003-04-17 Rob Browning <rlb@defaultvalue.org>
5051
5052 * numbers.c (scm_integer_expt): fix case where we were declaring
5053 vars in the middle of a statement block. Thanks to Thamer
5054 Al-Harbash.
5055
5056 2003-04-17 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5057
5058 * goops.c (TEST_CHANGE_CLASS): Update variable class after class
5059 change.
5060
5061 * eq.c (scm_eqv_p): Turned into a primitive generic.
5062
5063 2003-04-16 Rob Browning <rlb@defaultvalue.org>
5064
5065 * gc_os_dep.c: Added patch for UnixWare and OpenUNIX support.
5066 Thanks to Boyd Gerber.
5067 Added check for __arm__ in addition to arm for LINUX and copied
5068 __s390__ defines from upstream libgc. Thanks to James Treacy for
5069 reporting the problems.
5070
5071 * numbers.c (PTRDIFF_MIN): use SCM_CHAR_BIT.
5072
5073 * socket.c: use SCM_CHAR_BIT.
5074
5075 * random.c (scm_c_random_bignum): use SCM_CHAR_BIT.
5076
5077 * num2integral.i.c (NUM2INTEGRAL): use SCM_CHAR_BIT.
5078
5079 2003-04-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
5080
5081 * feature.c (scm_init_feature): Always add threads feature.
5082
5083 2003-04-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5084
5085 * goops.c (scm_sys_fast_slot_ref): Use SCM_SLOT instead of
5086 scm_at_assert_bound_ref. (We don't want the unbound check. See
5087 oop/goops/active-slot.scm.)
5088
5089 2003-04-14 Rob Browning <rlb@defaultvalue.org>
5090
5091 * tags.h: scm_t_intptr should have been intptr_t.
5092
5093 2003-04-13 Rob Browning <rlb@defaultvalue.org>
5094
5095 * __scm.h (SCM_FLUSH_REGISTER_WINDOWS): don't just rely on "sparc"
5096 test. Instead use
5097 #if defined (sparc) || defined (__sparc__) || defined (__sparc)
5098 as gc_os_dep.c suggests is appropriate.
5099
5100 * goops.c (prep_hashsets): make static to match prototype.
5101 (scm_sym_args): SCM_SYMBOL -> SCM_GLOBAL_SYMBOL. Thanks to Albert
5102 Chin.
5103
5104 * c-tokenize.lex: remove trailing comma from enum. Thanks to
5105 Albert Chin.
5106
5107 * gc_os_dep.c: add NetBSD powerpc config info. Thanks to Thomas
5108 Klausner.
5109
5110 2003-04-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5111
5112 * goops.c (scm_sys_prep_layout_x): Instance allocation is now
5113 indicated through extra fields in getters-n-setters.
5114 (scm_add_slot): Adapted to new format of getters_n_setters slot.
5115 (Thanks to Andy Wingo.)
5116
5117 2003-02-25 Han-Wen Nienhuys <hanwen@cs.uu.nl>
5118
5119 * gc-segment.c: add comment
5120
5121 2003-04-07 Rob Browning <rlb@defaultvalue.org>
5122
5123 * debug.h: change "id" arg name to "info_id" to avoid objective-c
5124 clash.
5125
5126 * num2integral.i.c (NUM2INTEGRAL): fix bug pointed out by Mikael
5127 and add regression test to standalone/.
5128
5129 2003-04-06 Rob Browning <rlb@defaultvalue.org>
5130
5131 * strings.c (scm_mem2string): use memcpy rather than by-hand loop.
5132 Thanks to Dale P. Smith.
5133
5134 * random.c: #include gmp.h.
5135 (scm_c_random_bignum): normalize result on return.
5136
5137 * init.c: #include gmp.h.
5138
5139 * numbers.h: remove the gmp.h #include (not needed now).
5140
5141 * posix.h: change occurences of "id" to something else so we don't
5142 cause trouble when included via objective-c (can't hurt, might
5143 help). Still have usage in debug.h, though.
5144
5145 2003-04-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5146
5147 * random.c (scm_c_random_bignum): Don't generate a random number
5148 equal to m (the second argument of scm_c_random_bignum); only
5149 generate numbers in the range 0 <= r < m.
5150 (scm_c_default_rstate): Use SCM_VARIABLE_REF to access
5151 scm_var_random_state.
5152
5153 * num2integral.i.c (INTEGRAL2BIG): Put negation of n inside then
5154 clause.
5155
5156 2003-04-05 Rob Browning <rlb@defaultvalue.org>
5157
5158 * modules.c (scm_module_import_interface): move declaration of
5159 uses before any code.
5160
5161 2003-04-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5162
5163 * Makefile.am (scmconfig.h): Look for config.h in top_builddir,
5164 not top_srcdir.
5165
5166 * hashtab.c (rehash_after_gc): Clear to_rehash list before
5167 processing it in order to avoid an infinite loop.
5168
5169 * print.c (scm_prin1): Remember old state of pstate->writingp.
5170
5171 2003-04-05 Marius Vollmer <mvo@zagadka.de>
5172
5173 * Changed license terms to the plain LGPL thru-out.
5174
5175 2003-04-04 Rob Browning <rlb@defaultvalue.org>
5176
5177 * socket.c (FLIPCPY_NET_HOST_128): new macro.
5178 (ipv6_net_to_num, ipv6_num_to_net, bignum_in_ipv6_range_p):
5179 rewrite to handle GMP bignums.
5180
5181
5182 * random.c (scm_c_random_bignum): rewrite to handle GMP bignums.
5183
5184 * ports.c (scm_getc): minor tweak.
5185
5186 * numbers.h: remove SCM_BIGDIG conditionals, reorganize, and
5187 rewrite to handle GMP bignums.
5188
5189 * numbers.c: rewrite *many* functions to handle GMP bignums.
5190
5191 * num2integral.i.c (NUM2INTEGRAL, INTEGRAL2NUM, INTEGRAL2BIG):
5192 handle GMP bignums.
5193
5194 * num2float.i.c (NUM2FLOAT): handle GMP bignums.
5195
5196 * init.c (check_config): remove SCM_BIGDIG conditionals.
5197 (scm_init_guile_1): test to make sure mpz_t fits in a double_cell.
5198
5199 * gc-card.c ("sweep_card"): handle new mpz_t bignums.
5200
5201 * eval.c: remove SCM_BIGDIG conditionals.
5202
5203 * eq.c (s_scm_eqv_p): scm_i_bigcomp -> scm_i_bigcmp.
5204
5205 2003-03-31 Rob Browning <rlb@defaultvalue.org>
5206
5207 * Makefile.am (scmconfig.h): change srcdir to builddir. (Thanks
5208 to Kevin Ryde.)
5209
5210 2003-03-27 Rob Browning <rlb@defaultvalue.org>
5211
5212 * threads.h: 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 * threads.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 * tags.h: 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 * stacks.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 * stackchk.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 * stackchk.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 * sort.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 * read.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 * random.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 * print.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 * objects.c: 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 * numbers.h: 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 * null-threads.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 * lang.c: fix various preprocessor usages of new public
5265 symbols to expect 0 or 1 values rather than 1 or undefined.
5266 i.e. change #ifdef to #if, etc.
5267
5268 * lang.h: fix various preprocessor usages of new public
5269 symbols to expect 0 or 1 values rather than 1 or undefined.
5270 i.e. change #ifdef to #if, etc.
5271
5272 * iselect.h: fix various preprocessor usages of new public
5273 symbols to expect 0 or 1 values rather than 1 or undefined.
5274 i.e. change #ifdef to #if, etc.
5275
5276 * init.c: fix various preprocessor usages of new public
5277 symbols to expect 0 or 1 values rather than 1 or undefined.
5278 i.e. change #ifdef to #if, etc.
5279
5280 * gh_data.c: fix various preprocessor usages of new public
5281 symbols to expect 0 or 1 values rather than 1 or undefined.
5282 i.e. change #ifdef to #if, etc.
5283
5284 * gh.h: fix various preprocessor usages of new public
5285 symbols to expect 0 or 1 values rather than 1 or undefined.
5286 i.e. change #ifdef to #if, etc.
5287
5288 * gen-scmconfig.c: change most new public symbols to be defined to
5289 0 or 1 rather than being either 1 or undefined.
5290
5291 * gc_os_dep.c: fix various preprocessor usages of new public
5292 symbols to expect 0 or 1 values rather than 1 or undefined.
5293 i.e. change #ifdef to #if, etc.
5294 (STACK_GROWS_DOWN): define to 0 or 1 rather than 1 or undef.
5295
5296 * gc.h: fix various preprocessor usages of new public
5297 symbols to expect 0 or 1 values rather than 1 or undefined.
5298 i.e. change #ifdef to #if, etc.
5299
5300 * gc-card.c: fix various preprocessor usages of new public
5301 symbols to expect 0 or 1 values rather than 1 or undefined.
5302 i.e. change #ifdef to #if, etc.
5303
5304 * gc-mark.c: fix various preprocessor usages of new public
5305 symbols to expect 0 or 1 values rather than 1 or undefined.
5306 i.e. change #ifdef to #if, etc.
5307
5308 * feature.c: fix various preprocessor usages of new public
5309 symbols to expect 0 or 1 values rather than 1 or undefined.
5310 i.e. change #ifdef to #if, etc.
5311
5312 * evalext.c: fix various preprocessor usages of new public
5313 symbols to expect 0 or 1 values rather than 1 or undefined.
5314 i.e. change #ifdef to #if, etc.
5315
5316 * eval.h: fix various preprocessor usages of new public
5317 symbols to expect 0 or 1 values rather than 1 or undefined.
5318 i.e. change #ifdef to #if, etc.
5319
5320 * eval.c: fix various preprocessor usages of new public
5321 symbols to expect 0 or 1 values rather than 1 or undefined.
5322 i.e. change #ifdef to #if, etc.
5323
5324 * eq.c: fix various preprocessor usages of new public
5325 symbols to expect 0 or 1 values rather than 1 or undefined.
5326 i.e. change #ifdef to #if, etc.
5327
5328 * coop.c: fix various preprocessor usages of new public
5329 symbols to expect 0 or 1 values rather than 1 or undefined.
5330 i.e. change #ifdef to #if, etc.
5331
5332 * coop-threads.c: fix various preprocessor usages of new public
5333 symbols to expect 0 or 1 values rather than 1 or undefined.
5334 i.e. change #ifdef to #if, etc.
5335
5336 * coop-pthreads.c: fix various preprocessor usages of new public
5337 symbols to expect 0 or 1 values rather than 1 or undefined.
5338 i.e. change #ifdef to #if, etc.
5339
5340 * coop-defs.h: fix various preprocessor usages of new public
5341 symbols to expect 0 or 1 values rather than 1 or undefined.
5342 i.e. change #ifdef to #if, etc.
5343
5344 * convert.i.c: fix various preprocessor usages of new public
5345 symbols to expect 0 or 1 values rather than 1 or undefined.
5346 i.e. change #ifdef to #if, etc.
5347
5348 * continuations.c: fix various preprocessor usages of new public
5349 symbols to expect 0 or 1 values rather than 1 or undefined.
5350 i.e. change #ifdef to #if, etc.
5351
5352 * _scm.h: fix various preprocessor usages of new public symbols to
5353 expect 0 or 1 values rather than 1 or undefined. i.e. change
5354 #ifdef to #if, etc.
5355
5356 2003-03-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
5357
5358 * init.c (scm_init_guile_1): Call scm_i_init_deprecated.
5359
5360 * deprecated.c, deprecated.h: New files, to collect deprecated
5361 things in one place.
5362 * Makefile.am: Added them in all the right places.
5363
5364 * Makefile.am (EXTRA_DIST): Added "scmconfig.h.top".
5365 (scmconfig.h): Get "scmconfig.h.top" from $(srcdir) so that VPATH
5366 builds work.
5367 (DOT_X_FILES): Removed "iselect.x".
5368 (DOT_DOC_FILES): Removed "iselect.doc".
5369
5370 2003-03-25 Rob Browning <rlb@defaultvalue.org>
5371
5372 * win32-socket.h: #include "libguile/__scm.h". Replace usage of
5373 HAVE_WINSOCK2_H with SCM_HAVE_WINSOCK2_H.
5374
5375 * win32-socket.c: #include <config.h> if HAVE_CONFIG_H.
5376
5377 * vports.c: #include <config.h> if HAVE_CONFIG_H.
5378
5379 * unif.c: #include <config.h> if HAVE_CONFIG_H. Replace usage of
5380 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
5381
5382 * threads.h: replace usage of struct timespect with
5383 scm_t_timespec. Replace usage of USE_PTHREAD_THREADS with
5384 SCM_USE_PTHREAD_THREADS. Remove typedef for struct timespec in
5385 favor of scm_t_timespec from scmconfig.h.
5386
5387 * threads.c: move libguile/_scm.h include to the top so we pick up
5388 any critical defines like _GNU_SOURCE early. Replace usage of
5389 struct timespect with scm_t_timespec. Replace usage of
5390 STACK_GROWS_UP with SCM_STACK_GROWS_UP. Replace usage of
5391 USE_PTHREAD_THREADS with SCM_USE_PTHREAD_THREADS.
5392
5393 * threads-plugin.h: replace usage of struct timespect with
5394 scm_t_timespec.
5395
5396 * threads-plugin.c: #include <config.h> if HAVE_CONFIG_H. Replace
5397 usage of struct timespect with scm_t_timespec.
5398
5399 * tags.h: move HAVE_STDINT_H handling to scmconfig.h. Move
5400 HAVE_INTTYPES_H handling to scmconfig.h. #include
5401 "libguile/__scm.h". Rework handling for scm_t_bits,
5402 scm_t_signed_bits, SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
5403 SCM_T_SIGNED_BITS_MIN, and SIZEOF_SCM_T_BITS to use scm_t_intptr,
5404 scm_t_uintptr, SCM_SIZEOF_INTPTR_T, and SCM_SIZEOF_UINTPTR_T, and
5405 SCM_SIZEOF_UNSIGNED_LONG. Rename usage of HAVE_ARRAYS to
5406 SCM_HAVE_ARRAYS.
5407
5408 * symbols.c: #include <config.h> if HAVE_CONFIG_H.
5409
5410 * struct.c: #include <config.h> if HAVE_CONFIG_H.
5411
5412 * strports.c: #include <config.h> if HAVE_CONFIG_H.
5413
5414 * strop.c: #include <config.h> if HAVE_CONFIG_H.
5415
5416 * stime.h: move handling of time related headers to scmconfig.h.
5417
5418 * stime.c: #include <config.h> if HAVE_CONFIG_H.
5419
5420 * stacks.c: replace usage of STACK_GROWS_UP with
5421 SCM_STACK_GROWS_UP.
5422
5423 * sort.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
5424 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5425
5426 * socket.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
5427 of uint32 and HAVE_UINT_32 with scm_t_int32.
5428
5429 * smob.c: #include <config.h> if HAVE_CONFIG_H.
5430
5431 * simpos.c: #include <config.h> if HAVE_CONFIG_H.
5432
5433 * script.c: #include <config.h> if HAVE_CONFIG_H.
5434
5435 * scmsigs.c: #include <config.h> if HAVE_CONFIG_H.
5436
5437 * scmconfig.h.top: new file -- preamble for scmconfig.h.
5438
5439 * rw.c: #include <config.h> if HAVE_CONFIG_H.
5440
5441 * regex-posix.c: #include <config.h> if HAVE_CONFIG_H.
5442
5443 * read.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5444
5445 * rdelim.c: #include <config.h> if HAVE_CONFIG_H.
5446
5447 * random.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
5448 of LONG32, LONG64, SIZEOF_LONG, and HAVE_LONG_LONGS with
5449 scm_t_int32, scm_t_int64, and SCM_HAVE_T_INT64. Rename usage of
5450 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5451
5452 * ramap.c: replace usage of HAVE_LONG_LONGS with
5453 "SCM_SIZEOF_LONG_LONG != 0".
5454
5455 * putenv.c: #include <config.h> if HAVE_CONFIG_H. #include
5456 "libguile/scmconfig.h".
5457
5458 * pthread-threads.c: #include <config.h> if HAVE_CONFIG_H.
5459
5460 * print.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5461 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
5462
5463 * posix.c: #include <config.h> if HAVE_CONFIG_H.
5464
5465 * ports.c: #include <config.h> if HAVE_CONFIG_H.
5466
5467 * objects.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5468
5469 * numbers.h: replace usage of HAVE_FLOATINGPOINT_H with
5470 SCM_HAVE_FLOATINGPOINT_H. Replace usage of HAVE_IEEEFP_H with
5471 SCM_HAVE_IEEEFP_H. Replace usage of HAVE_NAN_H with
5472 SCM_HAVE_NAN_H. Replace usage of STDC_HEADERS with
5473 SCM_HAVE_STDC_HEADERS. Replace usage of ptrdiff_t with
5474 scm_t_ptrdiff. Replace usage of HAVE_LONG_LONGS with
5475 "SCM_SIZEOF_LONG_LONG != 0".
5476
5477 * numbers.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
5478 of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0". Replace
5479 usage of ptrdiff_t with scm_t_ptrdiff. Replace usage of
5480 SIZEOF_PTRDIFF_T with SCM_SIZEOF_SCM_T_PTRDIFF.
5481
5482 * num2integral.i.c: #include <config.h> if HAVE_CONFIG_H.
5483
5484 * null-threads.h: replace usage of struct timespect with
5485 scm_t_timespec.
5486
5487 * net_db.c: #include <config.h> if HAVE_CONFIG_H.
5488
5489 * mkstemp.c: #include <config.h> if HAVE_CONFIG_H. #include
5490 "libguile/__scm.h". Remove definition of gcc_uint64_t in favor of
5491 scm_t_uint64 and rename usages.
5492
5493 * mallocs.c: #include <config.h> if HAVE_CONFIG_H.
5494
5495 * load.c: #include <config.h> if HAVE_CONFIG_H.
5496
5497 * iselect.h: move handling of time related headers to scmconfig.h.
5498 Rename usage of HAVE_SYS_SELECT_H to SCM_HAVE_SYS_SELECT_H.
5499 Rename usage of HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Rename
5500 usage of USE_COOP_THREADS to SCM_USE_COOP_THREADS.
5501
5502 * iselect.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
5503 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
5504 USE_NULL_THREADS to SCM_USE_NULL_THREADS.
5505
5506 * ioext.c: #include <config.h> if HAVE_CONFIG_H.
5507
5508 * inline.h: #include "libguile/__scm.h" at the top. Change code
5509 to use SCM_C_INLINE and SCM_INLINE_C_INCLUDINT_INLINE_H to decide
5510 what to do instead of creating a new public #define. Rename usage
5511 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
5512 USE_NULL_THREADS to SCM_USE_NULL_THREADS. Rename usage of
5513 USE_COPT_THREADS to SCM_USE_COPT_THREADS.
5514
5515 * inline.c: rearrange handling -- now we just #define
5516 SCM_INLINE_C_INCLUDING_INLINE_H to 1 and #include
5517 "libguile/inline.h". scmconfig.h will define SCM_C_INLINE as
5518 appropriate, and we use that in inline.h along with the above
5519 define to determine how to respond.
5520
5521 * init.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
5522 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5523
5524 * guile.c: #include <config.h> if HAVE_CONFIG_H.
5525
5526 * gh_data.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
5527 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5528
5529 * gh.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5530
5531 * gen-scmconfig.h.in: new file -- see gen-scmconfig.c for details.
5532
5533 * gen-scmconfig.c: new file -- see comments in file for details.
5534
5535 * gdbinit.c: #include <config.h> if HAVE_CONFIG_H.
5536
5537 * gc_os_dep.c: #include <config.h> if HAVE_CONFIG_H. Replace
5538 usage of STACK_GROWS_UP with SCM_STACK_GROWS_UP.
5539
5540 * gc.h: replace usage of SIZEOF_LONG with
5541 SCM_SIZEOF_UNSIGNED_LONG. Replace usage of USE_PTHREAD_THREADS
5542 with SCM_USE_PTHREAD_THREADS. Remove SCM_SIZEOF_LONG definition
5543 since we handle that in scmconfig.h now.
5544
5545 * gc.c: #include <config.h> if HAVE_CONFIG_H.
5546
5547 * gc-mark.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
5548 of HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of
5549 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
5550
5551 * gc-malloc.c: #include <config.h> if HAVE_CONFIG_H.
5552
5553 * gc-card.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5554 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
5555
5556 * fports.c: #include <config.h> if HAVE_CONFIG_H.
5557
5558 * filesys.c: #include <config.h> if HAVE_CONFIG_H.
5559
5560 * feature.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
5561 of USE_NULL_THREADS to SCM_USE_NULL_THREADS.
5562
5563 * extensions.c: #include <config.h> if HAVE_CONFIG_H.
5564
5565 * evalext.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5566 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
5567
5568 * eval.c: #include <config.h> if HAVE_CONFIG_H. #include
5569 "libguile/__scm.h" rather than scmconfig.h. Rename usage of
5570 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
5571 with "SCM_SIZEOF_LONG_LONG != 0".
5572
5573 * error.c: #include <config.h> if HAVE_CONFIG_H.
5574
5575 * eq.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
5576 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
5577 with "SCM_SIZEOF_LONG_LONG != 0".
5578
5579 * deprecation.c: #include <config.h> if HAVE_CONFIG_H.
5580
5581 * coop.c: replace usage of struct timespect with scm_t_timespec.
5582 #include <config.h> if HAVE_CONFIG_H.
5583
5584 * coop-threads.c: #include "libguile/_scm.h" early. Replace
5585 usage of struct timespect with scm_t_timespec. Replace usage of
5586 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
5587
5588 * coop-pthreads.c: #include "libguile/_scm.h" early. Replace
5589 usage of struct timespect with scm_t_timespec. Replace usage of
5590 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
5591
5592 * coop-defs.h: move handling of time related headers to
5593 scmconfig.h. Add #include "libguile/__scm.h". Rename usage of
5594 HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Replace usage of struct
5595 timespect with scm_t_timespec.
5596
5597 * convert.i.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5598
5599 * convert.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5600
5601 * convert.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
5602 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5603
5604 * continuations.c: move libguile/_scm.h include to the top so we
5605 pick up any critical defines like _GNU_SOURCE early.
5606
5607 * backtrace.c: #include <config.h> if HAVE_CONFIG_H.
5608
5609 * async.c: #include <config.h> if HAVE_CONFIG_H.
5610
5611 * alloca.c: #include <config.h> if HAVE_CONFIG_H.
5612
5613 * _scm.h: #include <config.h> if HAVE_CONFIG_H.
5614 Rename usage of USE_PTHREAD_THREADS to SCM_USE_PTHREAD_THREADS.
5615
5616 * __scm.h: move libguile/scmconfig.h include up to the top, so
5617 we're sure to pick up any critical defines like _GNU_SOURCE early.
5618 #include <limits.h> removed in favor of scmconfig.h inclusion when
5619 appropriate. STDC_HEADERS based inclusion of stdlib.h,
5620 sys/types.h, stddef.h, and sys/stdtypes.h removed in favor of
5621 scmconfig.h inclusion when appropriate. Various Win32 related
5622 definitions removed in favor of scmconfig.h inclusion when
5623 appropriate.
5624 (HAVE_UINTPTR_T): definition removed (see NEWS).
5625 (SIZEOF_PTRDIFF_T): definition removed (see NEWS).
5626 (HAVE_LONG_LONGS): definition removed (see NEWS).
5627 (HAVE_LONG_LONG): definition removed (see NEWS).
5628 (HAVE_PTRDIFF_T): definition removed (see NEWS).
5629
5630 * Makefile.am: scmconfig.h is now generated by building and
5631 running gen-scmconfig.h and capturing its output. gen-scmconfig
5632 uses config.h and the configure.in generated gen-scmconfig.h to
5633 decide what to output. See gen-scmconfig.c for details.
5634 (noinst_PROGRAMS): add gen-scmconfig.
5635 (gen_scmconfig_SOURCES): new variable.
5636 (gen-scmconfig.$(OBJEXT)): new target - be careful to handle
5637 cross-compiling right.
5638 (scmconfig.h): build scmconfig.h from gen-scmconfig's output.
5639 (BUILT_SOURCES): add scmconfig.h.
5640
5641 2003-03-19 Marius Vollmer <mvo@zagadka.de>
5642
5643 * gc_os_dep.c: Added defines for sparc-unknown-netbsdelf1.5 from
5644 Adrian Bunk. Thanks!
5645
5646 2003-03-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5647
5648 * goops.c (make_class_from_template): New fourth arg:
5649 applicablep.
5650 (scm_class_extended_generic_with_setter, scm_class_self): Fixed
5651 cpls.
5652
5653 * smob.c (scm_set_smob_apply): Call scm_i_inherit_applicable.
5654
5655 * goops.c, objects.c, objects.h (scm_make_extended_class): New
5656 second arg: applicablep.
5657 (scm_i_inherit_applicable): New function.
5658
5659 * goops.c, goops.h (scm_class_applicable,
5660 scm_class_extended_accessor): New classes.
5661
5662 2003-03-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5663
5664 * procs.c (scm_procedure_documentation): Removed redundant
5665 SCM_NIMP test and replaced other calls to SCM_IMP by more explicit
5666 predicates.
5667
5668 2003-03-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5669
5670 * list.c, list.h (scm_filter, scm_filter_x): New functions.
5671
5672 * modules.c (scm_module_import_interface): New function.
5673
5674 * goops.c, goops.h (scm_class_accessor_method): Renamed from
5675 scm_class_accessor.
5676 (scm_class_accessor): New class.
5677
5678 2003-03-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5679
5680 * goops.c (scm_primitive_generic_generic): Enable primitive
5681 generic if not enabled.
5682 (scm_sys_goops_loaded): Setup unextended primitive generics.
5683
5684 * goops.c, goops.h (scm_c_extend_primitive_generic): New function.
5685
5686 * snarf.h (SCM_PRIMITIVE_GENERIC, SCM_PRIMITIVE_GENERIC_1): New
5687 snarf macros.
5688
5689 * numbers.c (scm_abs): Use SCM_PRIMITIVE_GENERIC. (This is only a
5690 testing example. All uses of SCM_GPROC should be converted.)
5691
5692 * procprop.c (scm_stand_in_scm_proc): Use scm_assq instead of
5693 scm_assoc.
5694
5695 * eq.c (scm_equal_p): Turned into a primitive generic.
5696
5697 2003-02-27 Rob Browning <rlb@defaultvalue.org>
5698
5699 * Makefile.am (scmconfig.h): new target -- generate file from
5700 ../config.h.
5701 (modinclude_HEADERS): remove version.h.
5702 (nodist_modinclude_HEADERS): add version.h.
5703
5704 2003-02-24 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5705
5706 This fixes a serious GC bug, introduced during the latest
5707 reorganization of the GC, which disabled freeing of structs and
5708 GOOPS objects:
5709
5710 * struct.c (scm_struct_prehistory): Init scm_i_structs_to_free to
5711 SCM_EOL.
5712 (scm_struct_prehistory): Move scm_free_structs to
5713 scm_before_mark_c_hook.
5714
5715 * gc-card.c (sweep_card): Check that we haven't swept structs on
5716 this card before. That can happen if scm_i_sweep_all_segments has
5717 been called from some other place than scm_igc.
5718
5719 2003-02-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5720
5721 * environments.c (DEFAULT_OBARRAY_SIZE): Changed from 137 to 31
5722 (since hash tables now adapt their size).
5723
5724 * modules.c (scm_modules_prehistory): Changed from 2001 to 1533
5725 (current number of prehistory bindings; hashtable code will select
5726 a prime which is greater than this value).
5727
5728 * symbols.c (scm_symbols_prehistory): Changed from 1009 to 2139
5729 (current number of initial symbols).
5730
5731 * properties.c (scm_init_properties): Don't specify size of
5732 scm_properties_whash.
5733
5734 * objprop.c (scm_init_objprop): Don't specify size of
5735 scm_object_whash.
5736
5737 * keywords.c (scm_init_keywords): Don't specify a hash table size.
5738
5739 * hooks.c (scm_c_hook_add): Fixed bug in append mode.
5740
5741 The following changes introduce the use of resizable hash tables
5742 throughout Guile. It also renames the old *-hash-table* functions
5743 to *-alist-vector* and places them, together with the rest of the
5744 weak vector support, in the module (ice-9 weak-vector). We should
5745 probably introduce a new, better, API for weak references, for
5746 example "weak pairs" a la MIT-Scheme. (In Chez scheme, they even
5747 look like and are used like ordinary pairs.)
5748
5749 * environments.c (obarray_enter, obarray_retrieve, obarray_remove,
5750 leaf_environment_fold, obarray_remove_all): Use hashtable
5751 accessors.
5752
5753 * gc.c (scm_init_storage): Moved hook initialization to
5754 scm_storage_prehistory.
5755 (scm_storage_prehistory): New function.
5756 (scm_igc): Added commentary about placement of
5757 scm_after_sweep_c_hook.
5758
5759 * gc-mark.c (scm_mark_all): Use hashtable accessors.
5760 (scm_gc_mark_dependencies): Use SCM_WVECT_WEAK_KEY_P and
5761 SCM_WVECT_WEAK_VALUE_P.
5762
5763 * hashtab.c, hashtab.h (scm_hash_for_each, scm_hash_map): New
5764 functions.
5765 (scm_vector_to_hash_table, scm_c_make_resizing_hash_table):
5766 Removed.
5767 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table,
5768 scm_make_doubly_weak_hash_table): Moved here from weaks.c.
5769
5770 * init.c (scm_init_guile_1): Removed call to scm_init_weaks; Added
5771 calls to scm_storage_prehistory and scm_hashtab_prehistory.
5772
5773 * modules.c (module-reverse-lookup): Use hashtable accessors.
5774
5775 * symbols.c, symbols.h (scm_i_hash_symbol): New function.
5776
5777 * weaks.c, weaks.h (scm_make_weak_key_alist_vector,
5778 scm_make_weak_value_alist_vector,
5779 scm_make_doubly_weak_alist_vector): New functions.
5780
5781 * weaks.c (scm_init_weaks_builtins): New function.
5782
5783 * weaks.h (SCM_WVECTF_WEAK_KEY, SCM_WVECTF_WEAK_VALUE,
5784 SCM_WVECTF_NOSCAN, SCM_WVECT_WEAK_KEY_P, SCM_WVECT_WEAK_VALUE_P,
5785 SCM_WVECT_NOSCAN_P): New macros.
5786
5787 * weaks.c (scm_scan_weak_vectors): Use SCM_WVECT_WEAK_KEY_P
5788 and SCM_WVECT_WEAK_VALUE_P.
5789
5790 * weaks.c, weaks.h (scm_i_allocate_weak_vector): Renamed from
5791 allocate_weak_vector and exported.
5792
5793 2003-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5794
5795 * hashtab.c: Undid thread safety. (We decided that it's better to
5796 let the user explicitly protect the tables (or not) according what
5797 is suitable for the application.)
5798
5799 2003-02-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5800
5801 * hashtab.c (scm_hash_fn_remove_x, scm_internal_hash_fold): Made
5802 thread safe and handle resizing tables.
5803 (scm_ihashx, scm_sloppy_assx, scm_delx_x): Removed
5804 SCM_DEFER/ALLOW_INTS.
5805
5806 2003-02-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5807
5808 * hashtab.c (scm_vector_to_hash_table,
5809 scm_c_make_resizing_hash_table, scm_make_hash_table): New
5810 functions.
5811 (scm_hash_fn_get_handle, scm_hash_fn_create_handle_x): Made thread
5812 safe and handle resizing tables.
5813
5814 * weaks.c (scm_make_weak_key_hash_table,
5815 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
5816 Size argument made optional. Return resizable table if not
5817 specified.
5818
5819 2003-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5820
5821 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
5822 Fixed formals tests for closures. (Thanks to Kevin Ryde.)
5823
5824 2003-02-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5825
5826 * debug.c (scm_procedure_source): Handle all objects for which
5827 procedure? is #t. (Thanks to Bill Schottstaedt.)
5828
5829 2003-01-23 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5830
5831 * futures.c (mark_futures): Don't need to mark data of recycled
5832 futures.
5833 (scan_futures, cleanup_undead): Be smarter about marking
5834 futures---avoid unnecessary passes through future lists.
5835
5836 * futures.h, futures.c: New files; Introduced recycling of
5837 futures. For fine-grained threading this lifts performance to
5838 another level. We can now use parallelization in inner loops of
5839 Guile programs without impossible overhead.
5840
5841 * threads.h, threads.c: Moved futures to their own file.
5842
5843 * Makefile.am (libguile_la_SOURCES): Added futures.c.
5844 (DOT_X_FILES): Added futures.x.
5845 (DOT_DOC_FILES): Added futures.doc.
5846 (modinclude_HEADERS): Added futures.h.
5847
5848 * threads.c, threads.h (scm_i_create_thread): Renamed from
5849 create_thread and made global.
5850
5851 * futures.c (scm_make_future): New procedure.
5852
5853 * eval.c: #include "libguile/futures.h".
5854
5855 * init.c: #include "futures.h"
5856 (scm_init_guile_1): Call scm_init_futures.
5857
5858 * stime.c (SCM_TIME_UNITS_PER_SECOND): Renamed from CLKTCK.
5859
5860 * stime.h (SCM_TIME_UNITS_PER_SECOND): Definition moved here.
5861
5862 * eval.c, eval.h (scm_trampoline_0, scm_i_call_closure_0): New
5863 functions.
5864
5865 * eval.c (scm_trampoline_1): Fixed arguments test for closures.
5866
5867 2003-01-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5868
5869 * threads.c (create_thread): Don't unwind dynwind chain of parent
5870 thread before creation. Just start the new thread with an empty
5871 dynwind chain.
5872
5873 2003-01-20 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5874
5875 * evalext.c, evalext.h (scm_self_evaluating_p): New function.
5876
5877 2003-01-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5878
5879 * threads.c (scm_timed_wait_condition_variable): Support timed
5880 waiting also for simple condition variables.
5881
5882 * goops.c (TEST_CHANGE_CLASS): Use scm_change_object_class instead
5883 of calling the procedure change-object-class.
5884
5885 2003-01-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5886
5887 * ramap.c (scm_ramapc): Typo in error message.
5888
5889 2003-01-08 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5890
5891 * goops.c (scm_sys_prep_layout_x): Bugfix: Only create layout for
5892 slots with instance allocation.
5893
5894 * goops.c, goops.h (scm_class_extended_generic_with_setter): New
5895 class.
5896 (scm_compute_applicable_methods): Use scm_generic_function_methods.
5897
5898 * goops.c (scm_generic_function_methods): Support extended
5899 generic functions.
5900
5901 2002-12-29 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5902
5903 * eval.c (unmemocopy): Bugfix: scm_sym_delay --> scm_sym_future.
5904 Thanks to Neil for pointing this out!
5905
5906 2002-12-29 Neil Jerram <neil@ossau.uklinux.net>
5907
5908 * lang.h: Remove declarations matching definitions removed from
5909 lang.c (just below).
5910
5911 2002-12-28 Neil Jerram <neil@ossau.uklinux.net>
5912
5913 * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null,
5914 scm_m_while, scm_nil_eq): Remove definitions that were superfluous
5915 and already commented out.
5916
5917 * read.h (scm_lreadparen), read.c (scm_lreadr, scm_read_token,
5918 scm_lreadparen): Support reading vectors with Elisp syntax if
5919 SCM_ELISP_READ_EXTENSIONS is defined. (SCM_ELISP_READ_EXTENSIONS
5920 is not currently defined, and there isn't even a configure switch
5921 to enable it yet.)
5922
5923 2002-12-26 Marius Vollmer <mvo@zagadka.ping.de>
5924
5925 * Makefile.am (c-tokenize.o): Refer to source via $< so that vpath
5926 builds work.
5927 (EXTRA_DIST): Added version.h.in.
5928
5929 2002-12-21 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5930
5931 This change makes it possible for one thread to do lazy sweeping
5932 while other threads are running. Now only the mark phase need to
5933 have all threads asleep. We should look further into this issue.
5934 Presently, I've put the locking of scm_i_sweep_mutex at
5935 "conservative" places due to my current lack of knowledge about
5936 the garbage collector. Please feel free to restrict these regions
5937 further to allow for maximal parallelism!
5938
5939 * gc.c, gc.h (scm_i_sweep_mutex): New mutex.
5940
5941 * gc.c (scm_gc_for_newcell), gc-malloc.c (scm_realloc,
5942 scm_gc_register_collectable_memory): Substitute locking of
5943 scm_i_sweep_mutex for calls to scm_i_thread_put_to_sleep.
5944 (scm_igc): Lock sweep mutex here instead of in callers; Calls to
5945 scm_i_thread_put_to_sleep/scm_i_thread_wake_up used to demarkate
5946 the single-thread section (which now only contains the mark
5947 phase).
5948 (scm_gc): Don't lock sweeo mutex here since scm_igc locks it;
5949 Removed SCM_DEFER/ALLOW_INTS. Simply call scm_igc directly.
5950
5951 * threads.c (gc_section_mutex): Removed.
5952
5953 2002-12-19 Mikael Djurfeldt <mdj@kvast.blakulla.net>
5954
5955 * threads.c (create_thread): Clear parent field in root state in
5956 order not to unnecessarily remember dead threads.
5957
5958 * eval.c (call_subr2o_1, call_lsubr2_2): New functions.
5959 (scm_trampoline_1, scm_trampoline_2): Use them.
5960
5961 2002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
5962
5963 Partial introduction of real plugin interface.
5964
5965 * Makefile.am (modinclude_HEADERS): Added threads-plugin.h.
5966 (EXTRA_DIST): Added threads-plugin.c.
5967
5968 * threads-plugin.h, threads-plugin.c: New files.
5969
5970 * threads.h: #include "libguile/threads-plugin.h".
5971
5972 * threads.c: #include "libguile/threads-plugin.c".
5973
5974 * pthread-threads.c: Temporarily remove debugging functions.
5975
5976 * threads.c, threads.h (scm_yield): Added back.
5977
5978 2002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
5979
5980 * threads.c (really_launch): Detach before unlocking
5981 thread_admin_mutex in order not to risk being joined.
5982 (scm_i_thread_put_to_sleep, scm_i_thread_wake_up): Keep
5983 thread_admin_mutex locked during GC.
5984
5985 * pthread-threads.c, pthread-threads.h: Improvements to debugging
5986 functions.
5987
5988 2002-12-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
5989
5990 * pthread-threads.c, pthread-threads.h (SCM_DEBUG_THREADS): Added
5991 support for debugging mutex operations.
5992
5993 * threads.c (scm_thread): Removed filed joining_threads.
5994 (thread_print): Print thread number as well as address of thread
5995 structure.
5996 (scm_join_thread): Bugfix.
5997 (scm_lock_mutex, scm_try_mutex, scm_unlock_mutex,
5998 scm_timed_wait_condition_variable, scm_signal_condition_variable,
5999 scm_broadcast_condition_variable): Use the low-level API.
6000 (scm_all_threads): Return copy of thread list (to prevent
6001 unintended destruction).
6002 (scm_threads_prehistory): Initialize heap_mutex of fake thread.
6003
6004 * pthread-threads.c, pthread-threads.h, threads.c: Fixes to
6005 pthread "native" recursive mutex support.
6006
6007 2002-12-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6008
6009 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): New definitions.
6010 Simply lock a thread C API recursive mutex.
6011 (SCM_NONREC_CRITICAL_SECTION_START,
6012 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
6013 SCM_REC_CRITICAL_SECTION_END): Removed.
6014
6015 * eval.c: Replaced SOURCE_SECTION_START / SOURCE_SECTION_END with
6016 direct calls to scm_rec_mutex_lock / unlock around the three calls
6017 to scm_m_expand_body.
6018
6019 * eval.c, eval.h (promise_free): New function.
6020 (scm_force): Rewritten; Now thread-safe; Removed
6021 SCM_DEFER/ALLOW_INTS.
6022
6023 * pthread-threads.h: Added partially implemented plugin interface
6024 for recursive mutexes. These are, for now, only intended to be
6025 used internally within the Guile implementation.
6026
6027 * pthread-threads.c: New file.
6028
6029 * threads.c: Conditionally #include "pthread-threads.c".
6030
6031 * eval.c, eval.h (scm_makprom, scm_force): Rewritten to be
6032 thread-safe;
6033
6034 * snarf.h (SCM_MUTEX, SCM_GLOBAL_MUTEX, SCM_REC_MUTEX,
6035 SCM_GLOBAL_REC_MUTEX): New macros.
6036
6037 * eval.c, threads.c, threads.h, snarf.h: Rewrote critical section
6038 macros---use mutexes instead.
6039
6040 * tags.h (SCM_IM_FUTURE): New tag.
6041
6042 * eval.c (scm_m_future): New primitive macro.
6043 (SCM_CEVAL): Support futures.
6044 (unmemocopy): Support unmemoization of futures.
6045
6046 * print.c (scm_isymnames): Name of future isym.
6047
6048 * version.c: Unmade some changes to my private copy that got
6049 committed by mistake.
6050
6051 2002-12-11 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6052
6053 * gc-malloc.c, gc.h, init.c: Reverted gc-malloc change of
6054 2002-12-10.
6055
6056 * gc.c (scm_igc): Don't call scm_i_thread_invalidate_freelists.
6057
6058 * gc.c (scm_gc_sweep): Call it here instead, which is a more
6059 logical place.
6060
6061 * threads.c (create_thread): Remember root object until the handle
6062 of the new thread is on all_threads list.
6063
6064 * root.c (scm_make_root): Moved copying of fluids until after
6065 creation of root handle so that the fluids are GC protected. Also
6066 removed the critical section.
6067
6068 2002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6069
6070 * gc-malloc.c, gc.h (scm_gc_malloc_prehistory): New function.
6071
6072 * gc-malloc.c (malloc_mutex): New mutex.
6073 (scm_gc_malloc_prehistory): Initialize it.
6074 (scm_realloc): Serialize call to realloc
6075 (scm_calloc): Same for calloc.
6076 Thanks to Wolfgang Jaehrling!
6077 (Now we have to make sure all calls to malloc/realloc are made
6078 through scm_malloc.)
6079
6080 * init.c (scm_init_guile_1): Call scm_gc_malloc_prehistory.
6081
6082 * threads.c (really_launch): Release heap (to prevent deadlock).
6083 (create_thread): Release heap before locking thread admin mutex.
6084
6085 2002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6086
6087 * threads.c (scm_i_thread_invalidate_freelists): New
6088 function.
6089
6090 * gc.c (scm_igc): Call scm_i_thread_invalidate_freelists.
6091
6092 * modules.c (scm_export): Inserted a return statement.
6093
6094 2002-12-10 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6095
6096 * modules.c (scm_export): new function
6097
6098 * gc-card.c: add a note about malloc()/free() overhead.
6099
6100 2002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
6101
6102 * Makefile.am (c-tokenize.$(OBJEXT)): Don't look for c-tokenize.c
6103 in srcdir.
6104
6105 2002-12-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6106
6107 These changes remove scm_ints_disabled (which hasn't has any
6108 effect in Guile for quite some time).
6109
6110 * async.c, error.h (scm_ints_disabled): Removed.
6111
6112 * gc.c (scm_gc_for_newcell), init.c (scm_init_guile_1),
6113 root.c (scm_internal_cwdr), gdbint.c (SCM_BEGIN_FOREIGN_BLOCK,
6114 SCM_END_FOREIGN_BLOCK): Don't touch scm_ints_disabled.
6115 (old_ints): Removed.
6116
6117 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Define as a recursive
6118 critical section.
6119 (SCM_REDEFER_INTS, SCM_ALLOW_INTS): Define as SCM_DEFER_INTS and
6120 SCM_ALLOW_INTS.
6121
6122 2002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6123
6124 * threads.c (scm_mutex_lock, scm_cond_wait, scm_cond_timedwait):
6125 Removed accidental #if 0 around these functions.
6126
6127 These changes are the start of support for preemptive
6128 multithreading. Marius and I have agreed that I commit this code
6129 into the repository although it isn't thoroughly tested and surely
6130 introduces many bugs. The bugs should only be exposed when using
6131 threads, though. Signalling and error handling for threads is
6132 very likely broken. Work on making the implementation cleaner and
6133 more efficient is needed.
6134
6135 * __scm.h (SCM_ALLOW_INTS_ONLY): Removed.
6136 (SCM_NONREC_CRITICAL_SECTION_START,
6137 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
6138 SCM_REC_CRITICAL_SECTION_END): New macros.
6139 (SCM_CRITICAL_SECTION_START/END): Defined here.
6140
6141 * eval.c: Insert SOURCE_SECTION_START / SOURCE_SECTION_END around
6142 the three calls to scm_m_expand_body.
6143
6144 * gc.h: #include "libguile/pthread-threads.h";
6145 (SCM_FREELIST_CREATE, SCM_FREELIST_LOC): New macros.
6146
6147 * gc.c (scm_i_freelist, scm_i_freelist2): Defined to be of type
6148 scm_t_key;
6149
6150 * gc.c, gc-freelist.c, inline.h: Use SCM_FREELIST_LOC for freelist
6151 access.
6152
6153 * gc-freelist.c (scm_gc_init_freelist): Create freelist keys.
6154
6155 * gc-freelist.c, threads.c (really_launch): Use
6156 SCM_FREELIST_CREATE.
6157
6158 * gc-malloc.c (scm_realloc, scm_gc_register_collectable_memory):
6159
6160 * gc.c (scm_i_expensive_validation_check, scm_gc,
6161 scm_gc_for_newcell): Put threads to sleep before doing GC-related
6162 heap administration so that those pieces of code are executed
6163 single-threaded. We might consider rewriting these code sections
6164 in terms of a "call_gc_code_singly_threaded" construct instead of
6165 calling the pair of scm_i_thread_put_to_sleep () and
6166 scm_i_thread_wake_up (). Also, we would want to have as many of
6167 these sections eleminated.
6168
6169 * init.c (scm_init_guile_1): Call scm_threads_prehistory.
6170
6171 * inline.h: #include "libguile/threads.h"
6172
6173 * pthread-threads.h: Macros now conform more closely to the
6174 pthreads interface. Some of them now take a second argument.
6175
6176 * threads.c, threads.h: Many changes.
6177
6178 2002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
6179
6180 * Makefile.am (version.h): Changed $^ --> $< in rule for
6181 version.h.
6182
6183 2002-12-08 Rob Browning <rlb@defaultvalue.org>
6184
6185 * version.h.in (SCM_MICRO_VERSION): use @--@ substitution now.
6186 (SCM_MINOR_VERSION): use @--@ substitution now.
6187 (SCM_MICRO_VERSION): use @--@ substitution now.
6188 (scm_effective_version): new function prototype.
6189
6190 * version.c (scm_effective_version): new function, also add
6191 effective-version.
6192
6193 * Makefile.am (schemelibdir): VERSION -> GUILE_EFFECTIVE_VERSION.
6194 (libpath.h): use GUILE_EFFECTIVE_VERSION to compute
6195 SCM_LIBRARY_DIR.
6196 (version.h): generate this here rather than configure.in. This
6197 approach tracks source edits better (i.e. more immediately).
6198 Might be worth considering for other .in files too.
6199
6200 2002-12-02 Marius Vollmer <mvo@zagadka.ping.de>
6201
6202 Reorganized thread package selection. A thread package now only
6203 implements a small set of pthread like functions and Guile
6204 implements the rest on top of that. Guile's implementation is
6205 what the "coop-pthreads" package has been previously. Support for
6206 "coop" threads has been removed until I get time to add it again.
6207
6208 * Makefile.am (libguile_la_SOURCES): Removed iselect.c.
6209 (noinst_HEADERS): Removed coop-threads.c, coop-threads.h, coop.c,
6210 null-threads.c, coop-pthreads.c.
6211 (modinclude_HEADERS): Removed coop-defs.h, coop-pthreads.h. Added
6212 pthread-threads.h.
6213
6214 * validate.h (SCM_VALIDATE_THREAD): Moved to threads.h.
6215
6216 * threads.h: Do not include "libguile/coop-defs.h". Include
6217 "libguile/pthread-threads.h" for USE_COPT_THREADS. Removed
6218 (previously deprecated) C level thread API prototypes. They are
6219 now in the thread package specific headers, "null-threads.h" and
6220 "pthread-threads.h".
6221 (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR):
6222 New.
6223 (scm_threads_init): Removed.
6224 (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END,
6225 SCM_THREAD_SWITCHING_CODE, scm_i_switch_counter,
6226 SCM_I_THREAD_SWITCH_COUNT): Define here.
6227 (scm_single_thread_p): Removed.
6228 (scm_call_with_new_thread): Take two args directly instead of list
6229 of two args.
6230 (scm_i_thread_data, scm_i_set_thread_data, SCM_THREAD_LOCAL_DATA,
6231 SCM_SET_THREAD_LOCAL_DATA): Define here.
6232
6233 * threads.c: Merged with "coop-pthreads.c".
6234
6235 * null-threads.h: Implement pthread-like API as a set of macros.
6236
6237 * pthread-threads.h: New, implement pthread-like API by deferring
6238 to pthread itself.
6239
6240 * init.c (scm_init_guile_1): Do not call scm_init_iselect, which
6241 has been lost in the reorganization.
6242
6243 2002-12-01 Mikael Djurfeldt <mdj@linnaeus>
6244
6245 The following change makes it possible to move procedure
6246 application dispatch outside inner loops. The motivation was
6247 clean implementation of efficient replacements of R5RS primitives
6248 in SRFI-1.
6249
6250 The semantics is clear: scm_trampoline_N returns an optimized
6251 version of scm_call_N (or NULL if the procedure isn't applicable
6252 on N args).
6253
6254 Applying the optimization to map and for-each increases efficiency
6255 noticeably. For example, (map abs ls) is 8 times faster than
6256 before.
6257
6258 * eval.h (scm_t_trampoline_1, scm_t_trampoline_2): New types.
6259
6260 * eval.c, eval.h (scm_trampoline_1, scm_trampoline_2): New functions.
6261
6262 * eval.c (call_subr2_2, call_lsubr_2, call_closure_2): New functions;
6263 (map, for-each): Handle also application on two args as a special
6264 case; Use trampolines.
6265
6266 Other changes:
6267
6268 * sort.c (scm_cmp_function): Choose subr2less for scm_tc7_subr_2o;
6269 (subr2oless): Removed.
6270 (scm_restricted_vector_sort_x): Use scm_return_first to keep the
6271 vector GC protected.
6272
6273 * eval.c (check_map_args): Use scm_out_of_range_pos instead of
6274 scm_out_of_range.
6275
6276 2002-11-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
6277
6278 * evalext.[ch] (scm_m_undefine, undefine): Deprecated.
6279
6280 2002-11-17 Mikael Djurfeldt <mdj@linnaeus>
6281
6282 * debug.c (scm_make_iloc): Added missing "return".
6283
6284 2002-11-17 Marius Vollmer <mvo@zagadka.ping.de>
6285
6286 * strports.c (scm_eval_string_in_module): Validate second arg to
6287 be a module. Thanks to Arno Peters!
6288
6289 2002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
6290
6291 * .cvsignore: remove goops.c
6292
6293 2002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
6294
6295 * modules.c (scm_env_top_level, scm_lookup_closure_module,
6296 module_variable, scm_module_lookup_closure,
6297 scm_module_transformer, scm_sym2var, scm_module_reverse_lookup,
6298 scm_system_module_env_p): Don't compare SCM values with C
6299 operators == or !=. Avoid SCM_IMP predicates. Prefer !SCM_FALSEP
6300 over SCM_NFALSEP.
6301
6302 2002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
6303
6304 * eval.h (SCM_MAKE_ILOC): New macro.
6305
6306 * debug.c (scm_make_iloc): Use SCM_MAKE_ILOC instead of computing
6307 the iloc bitpattern here.
6308
6309 2002-11-14 Mikael Djurfeldt <mdj@linnaeus>
6310
6311 * coop-pthreads.c, coop-pthreads.h: scm_internal_select should be
6312 part of the API, otherwise it's difficult to write Guile
6313 extensions using non-blocking I/O => moved #include
6314 "libguile/iselect.h" from coop-pthreads.c --> coop-pthreads.h.
6315
6316 * coop-pthreads.c (scm_unlock_mutex): Changed s_lock_mutex -->
6317 s_unlock_mutex.
6318
6319 2002-11-10 Marius Vollmer <mvo@zagadka.ping.de>
6320
6321 * __scm.h (USE_THREADS, GUILE_ISELECT): Do not define here. They
6322 are defined in configure.in.
6323
6324 * threads.c: Removed SCM_API from function definitions. SCM_API
6325 is only for declarations.
6326
6327 2002-11-07 Mikael Djurfeldt <mdj@linnaeus>
6328
6329 * coop-pthreads.h: Added support for thread specific data to the
6330 generic C API for the coop-pthreads case.
6331
6332 * threads.c, threads.h (scm_cond_init): Undo unintentional API
6333 change.
6334 (scm_cond_broadcast): Added missing function.
6335
6336 2002-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6337
6338 * coop.c (coop_next_runnable_thread): Removed, wich should have
6339 happened when GUILE_ISELECT was hard-wired.
6340
6341 2002-11-03 Marius Vollmer <mvo@zagadka.ping.de>
6342
6343 * Makefile.am (libguile_la_SOURCES): Added threads.c
6344 (DOT_DOC_FILES): Added threads.doc.
6345 (DOT_X_FILES): Added threads.x.
6346 (EXTRA_libguile_la_SOURCES): Removed threads.c.
6347 (noinst_HEADERS): Added coop-pthreads.c.
6348 (modinclude_HEADERS): Added coop-pthreads.h.
6349
6350 * __scm.h (USE_THREADS, GUILE_ISELECT): Define when
6351 SCM_DEBUG_DEPRECATED. Removed their use thru-out Guile.
6352
6353 * iselect.c: Include "_scm.h" before testing HAVE_UNISTD_H.
6354 Thanks to Bill Schottstaedt!
6355
6356 * numbers.c (scm_integer_expt): Make 0^z == 0 for z != 0.
6357
6358 * _scm.h (HAVE_RESTARTABLE_SYSCALLS): Do define even when
6359 SCM_COPT_THREADS is defined.
6360 (SCM_SYSCALL): Use EINTR-expection version when SCM_COPT_THREADS
6361 is defined.
6362
6363 * coop-pthreads.c: Some harmless renamings of internal stuff.
6364 (create_thread): New, generalized version of
6365 scm_call_with_new_thread.
6366 (scm_call_with_new_thread): Use it.
6367 (scm_spawn_thread): New, use create_thread.
6368
6369 2002-11-02 Marius Vollmer <mvo@zagadka.ping.de>
6370
6371 * coop-pthreads.c, coop-pthreads.h: Redone completely, you might
6372 start testing it now.
6373
6374 * _scm.h: Include <errno.h< so that SCM_SYSCALL is correctly
6375 defined when HAVE_RESTARTABLE_SYSCALLS is not defined.
6376 (HAVE_RESTARTABLE_SYSCALLS): Do not define when USE_COPT_THREADS
6377 is defined.
6378
6379 2002-10-27 Marius Vollmer <mvo@zagadka.ping.de>
6380
6381 * scmsigs.c (signal_cell_handlers, install_handler_data,
6382 scm_delq_spine_x, really_install_handler, install_handler): New
6383 scheme for triggering signal handlers, to simplify take_signal.
6384 (take_signal): Simplified, to avoid race conditions.
6385 (scm_sigaction_for_thread): Use new Scheme. Validate that thread
6386 hasn't exited yet.
6387
6388 * async.c (scm_async_click): Reset pending_asyncs, handle
6389 signal_asyncs. Don't set cdr of a non-signal async to #f.
6390 (scm_i_queue_async_cell): Do not check cdr of cell for #f, queue
6391 always. Set pending_asyncs.
6392 (scm_system_async_mark_for_thread): Check that thread has not
6393 exited.
6394 (scm_unmask_signals, decrease_block): Call scm_async_click after
6395 block_asyncs becomes zero.
6396
6397 * __scm.h (SCM_ASYNC_CLICK): Check pending_asyncs instead of
6398 active_asyncs.
6399
6400 * root.h (scm_root_state): Added pending_asyncs and signal_asyncs
6401 fields.
6402 * root.c (root_mark): Mark them.
6403 (make_root): Initialize them.
6404
6405 * iselect.c, iselect.h: Replaced GUILE_ISELECT with
6406 USE_COOP_THREADS.
6407 (scm_internal_select): Define one version for USE_COOP_THREADS and
6408 one for USE_NULL_THREADS.
6409 (scm_init_iselect): Likewise.
6410
6411 * inline.h (scm_cell, scm_double_cell): Also allow
6412 USE_COPT_THREADS to not protect the slot initializers.
6413
6414 * init.c (scm_init_guile_1): Call scm_init_thread_procs. This is
6415 because threads need to be initialized before the stack, but
6416 gsubrs such as scm_timed_condition_variable_wait can only be
6417 created later.
6418
6419 * threads.h: Include "coop-pthreads.h" when requested.
6420 (scm_threads_make_mutex, scm_threads_lock_mutex,
6421 scm_threads_unlock_mutex, scm_threads_monitor): Removed, they were
6422 not implemented anyway.
6423 (scm_init_thread_procs, scm_try_mutex,
6424 scm_timed_condition_variable_wait,
6425 scm_broadcast_condition_variable, scm_c_thread_exited_p,
6426 scm_thread_exited_p): New prototypes.
6427 (struct timespec): Define if not already defined.
6428 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
6429 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
6430 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
6431 scm_cond_broadcast, scm_cond_destroy): Declarations moved here and
6432 deprecated.
6433
6434 * threads.c: Include <errno.h>. Include "coop-pthreads.c" when
6435 requested.
6436 (scm_thread_exited_p): New.
6437 (scm_try_mutex, scm_broadcast_condition_variable): Newly
6438 registered procedures.
6439 (scm_wait_condition_variable, scm_timed_wait_condition_variable):
6440 Use the latter as the procedure for "wait-condition-variable",
6441 thus offering a optional timeout parameter to Scheme.
6442 (scm_wait_condition_variable): Implement in terms of
6443 scm_timed_wait_condition_variable.
6444 (scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
6445 scm_mutex_unlock, scm_mutex_destroy, scm_cond_init,
6446 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
6447 scm_cond_broadcast, scm_cond_destroy): Implement in terms of
6448 scm_make_mutex, etc, and deprecate.
6449 (scm_init_threads): Do not create smobs, leave this to
6450 scm_threads_init. Do not include "threads.x" file.
6451 (scm_init_thread_procs): New, include "threads.x" here.
6452
6453 * null-threads.h (scm_null_mutex, scm_null_mutex_init,
6454 scm_null_mutex_lock, scm_null_mutex_unlock,
6455 scm_null_mutex_destroy, scm_null_condvar, scm_null_condvar_init,
6456 scm_null_condvar_wait, scm_null_condvar_signal,
6457 scm_null_condvar_destroy): Removed.
6458 (scm_mutex_init, scm_mutex_lock, scm_mutex_unlock, scm_cond_init,
6459 scm_cond_wait, scm_cond_signal, scm_cond_broadcast,
6460 scm_cond_destory): Do not define, they are now deprecated and
6461 handled by threads.{h,c}.
6462
6463 * null-threads.c (scm_null_mutex, scm_null_cond): Define here.
6464 (scm_threads_init): Create smobs here, using the appropriate
6465 sizes.
6466 (block): Removed, now unused.
6467 (scm_c_thread_exited_p): New.
6468 (scm_null_mutex_init, scm_null_mutex_lock, scm_null_mutex_unlock,
6469 scm_null_mutex_destroy, scm_null_condvar_init,
6470 scm_null_condvar_wait, scm_null_condvar_signal,
6471 scm_null_condvar_destroy): Removed and updated users to do their
6472 task directly.
6473 (scm_try_mutex, timeval_subtract,
6474 scm_timed_wait_condition_variable,
6475 scm_broadcast_condition_variable): New.
6476 (scm_wait_condition_variable): Removed.
6477
6478 * coop-defs.h (coop_m): Added 'level' field.
6479 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
6480 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
6481 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
6482 scm_cond_broadcast, scm_cond_destroy, struct timespec): Do not
6483 define.
6484 (coop_condition_variable_broadcast): New.
6485
6486 * coop-threads.c (scm_threads_init): Create smobs here, using the
6487 appropriate sizes.
6488 (scm_c_thread_exited_p, scm_try_mutex,
6489 scm_timed_wait_condition_variable,
6490 scm_broadcast_condition_variable): New.
6491 (scm_wait_condition_variable): Removed.
6492
6493 * coop.c (coop_new_mutex_init): Initialize level.
6494 (coop_mutex_trylock, coop_mutex_lock, coop_mutex_unlock): maintain
6495 level.
6496 (coop_condition_variable_signal): Renamed to
6497 coop_condition_variable_broadcast and reimplemented in terms of
6498 that. Thus...
6499 (coop_condition_variable_broadcast): New.
6500
6501 * goops.c (hell_mutex): Reimplemented using scm_make_mutex, etc.
6502
6503 * coop-pthreads.h, coop-pthreads.c: New, but unfinished.
6504
6505 2002-10-21 Marius Vollmer <mvo@zagadka.ping.de>
6506
6507 * null-threads.c: Include <time.h>. Also, use <...> for inclusion
6508 of system headers.
6509
6510 * async.c, goops.h, modules.h, validate.h (SCM_MAKE_VALIDATE_MSG):
6511 New. Use it instead of SCM_MAKE_VALIDATE in lots of places to
6512 give better error messages. Thanks to Bill Schottstaedt!
6513
6514 2002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
6515
6516 * evalext.h, evalext.c (scm_definedp, scm_defined_p): Renamed
6517 scm_definedp to scm_defined_p and deprecated scm_definedp.
6518
6519 2002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
6520
6521 * async.h, async.c (scm_system_async): Fixed deprecation to work
6522 correctly when deprecated features are excluded.
6523
6524 2002-10-16 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6525
6526 * async.c (scm_system_async_mark_for_thread): Validate thread
6527 argument.
6528
6529 * coop-threads.c (scm_i_thread_root): Do not validate argument.
6530
6531 * feature.c (scm_init_feature): Don't add 'threads' for
6532 USE_NULL_THREADS.
6533
6534 * inline.h (scm_cell, scm_double_cell): Also allow
6535 USE_NULL_THREADS to not protect the slot initializers.
6536
6537 * scmsigs.c (scm_sigaction_for_thread): It's "USE_THREADS" not
6538 "USE_THREAD".
6539
6540 * Makefile.am (noinst_HEADERS): Added null-threads.c.
6541 (modinclude_HEADERS): Added null-threads.h.
6542
6543 * threads.h: Include null-threads.h when !USE_COOP_THREADS.
6544 * threads.c: Include null-threads.c when !USE_COOP_THREADS.
6545 (scm_init_threads): Use generic type names scm_t_mutex and
6546 scm_t_cond instead of coop_m and coop_c.
6547
6548 * null-threads.c, null-threads.h: New files.
6549
6550 2002-10-15 Marius Vollmer <mvo@zagadka.ping.de>
6551
6552 * Makefile.am: Replaced "$<" in non-pattern rules with its value.
6553 This is to support makes that know about "$<" only in pattern
6554 rules, like Sun's make.
6555
6556 2002-10-13 Marius Vollmer <mvo@zagadka.ping.de>
6557
6558 * Makefile.am (libpath.h): Fixed typo in top_srcdir_absolute
6559 substitution. Thanks to David Allouche!
6560
6561 2002-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
6562
6563 * evalext.h: Replaced SCM_DEBUG_DEPRECATED with
6564 !SCM_ENABLE_DEPRECATED.
6565
6566 2002-10-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6567
6568 * async.c (scm_system_async_mark_for_thread): Only call
6569 scm_i_thread_root when USE_THREADS is defined. Use scm_root
6570 otherwise.
6571
6572 * scmsigs.c (take_signal): Only call scm_i_thread_root when
6573 USE_THREADS is defined. Use scm_root otherwise.
6574 (scm_sigaction_for_thread): Ignore THREAD argument when
6575 USE_THREADS is not defined. Also, move THREAD argument defaulting
6576 out of HAVE_SIGACTION section, which was a bug.
6577
6578 2002-10-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6579
6580 * scmsigs.c (scm_sigaction_for_thread): Store original handler in
6581 signal_handlers, not the closure that is used as the async.
6582 The closure is stored in signal_handler_cells, as previously.
6583
6584 2002-10-10 Marius Vollmer <mvo@zagadka.ping.de>
6585
6586 * root.h (scm_root_state): Added 'block_async' slot.
6587 (scm_active_asyncs): Removed abbrev.
6588 * root.c (scm_make_root): Initialize 'block_asyncs' slot.
6589
6590 * __scm.h (SCM_ASYNC_TICK): Do without the scm_active_asyncs
6591 abbrev.
6592
6593 * async.h (scm_call_with_blocked_asyncs,
6594 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
6595 scm_c_call_with_unblocked_asyncs): New prototypes.
6596 (scm_mask_signals, scm_unmask_signals): Deprecated.
6597 (scm_mask_ints): Turned into a macro.
6598 * async.c (scm_mask_ints): Removed.
6599 (scm_run_asyncs): Do not set scm_mask_ints while running an async.
6600 this should not be necessary.
6601 (scm_async_click): Test block_asyncs instead of scm_mask_ints.
6602 (scm_mask_signals, scm_unmask_signals): Deprecated. Emit
6603 deprecation warning and check for errornous use. Set block_asyncs
6604 instead of scm_mask_ints.
6605 (increase_block, decrease_block, scm_call_with_blocked_asyncs,
6606 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
6607 scm_c_call_with_unblocked_asyncs): New.
6608
6609 * script.c (scm_compile_shell_switches): Do not set scm_mask_ints.
6610 Asyncs are enabled by default.
6611
6612 2002-10-09 Neil Jerram <neil@ossau.uklinux.net>
6613
6614 * vports.c (scm_make_soft_port): Allow vector argument to carry a
6615 6th element: an input waiting thunk.
6616 (sf_input_waiting): New.
6617
6618 2002-10-05 Marius Vollmer <mvo@zagadka.ping.de>
6619
6620 * root.c (root_mark): Mark active_asyncs slot.
6621
6622 * async.c (scm_async_click): Set the cdr of a executed handler
6623 cell to SCM_BOOL_F, not SCM_EOL.
6624 (scm_i_queue_async_cell): Queue the cell at the end of the list,
6625 and only if the handler procedure is not already present.
6626 (scm_system_async_mark_for_thread): Initialize cdr of handler cell
6627 with SCM_BOOL_F.
6628 * scmsigs.c (scm_sigaction_for_thread): Likewise.
6629
6630 2002-10-04 Rob Browning <rlb@defaultvalue.org>
6631
6632 * guile.c (main): switch to scm_lt_dlset_preloaded_symbols;
6633
6634 * dynl.c (sysdep_dynl_link): switch to scm_lt_dlhandle,
6635 scm_lt_dlopenext, and scm_lt_dlerror.
6636 (sysdep_dynl_unlink): switch to scm_lt_dlhandle, scm_lt_dlclose,
6637 and scm_lt_dlerror.
6638 (sysdep_dynl_func): switch to scm_lt_dlhandle, scm_lt_dlsym,
6639 and scm_lt_dlerror.
6640 (sysdep_dynl_init): switch to scm_lt_dlinit();
6641
6642 * Makefile.am (libguile_la_LIBADD): switch to use
6643 libguile-ltdl.la.
6644
6645 * numbers.c (scm_integer_expt): (expt 0 1) should be 1.
6646
6647 2002-10-04 Marius Vollmer <mvo@zagadka.ping.de>
6648
6649 * scmsigs.h (scm_sigaction_for_thread): New prototype.
6650 * scmsigs.c (got_signal): Removed.
6651 (signal_handler_cells, signal_handler_threads): New.
6652 (take_signal): Queue the cell of the signal for the specified
6653 thread. Reset the signal handler on systems that don't have
6654 sigaction.
6655 (sys_deliver_signals): Removed.
6656 (close_1): New.
6657 (scm_sigaction_for_thread): Renamed from scm_sigaction and
6658 extended to also set the thread of a signal and allocate a cell
6659 for it. Keep the Scheme name "sigaction". Check that signum is
6660 within range. Also, use SCM_VECTOR_REF instead of SCM_VELTS.
6661 (scm_sigaction): Implement in terms of scm_sigaction_for_thread.
6662 (scm_init_scmsigs): Allocate signal_handler_cells and
6663 signal_handler_threads vectors.
6664
6665 * async.c: Removed GUILE_OLD_ASYNC_CLICK code. Reorganized so
6666 that system asnycs and user asyncs are separated. Reimplemented
6667 system asyncs to work per-thread.
6668
6669 * gc.c (scm_init_gc): Do not use scm_system_async.
6670
6671 * async.h (scm_asyncs_pending, scm_set_tick_rate,
6672 scm_set_switch_rate, scm_system_async_mark_from_signal_handler):
6673 Removed prototypes.
6674 (scm_i_queue_async_cell): New.
6675
6676 * __scm.h (scm_asyncs_pending_p): Removed.
6677 (SCM_ASYNC_CLICK): Check scm_active_asyncs instead of
6678 scm_asyncs_pending_p.
6679
6680 * async.h (scm_system_async_mark_for_thread): New prototype.
6681
6682 * __scm.h: Removed GUILE_OLD_ASYNC_CLICK code.
6683
6684 * root.h (scm_root_state): Added new "active_asyncs" slot.
6685 * root.c (scm_make_root): Initialize it to SCM_EOL.
6686
6687 * coop-defs.h (coop_t): Added new "handle" slot.
6688 * coop-threads.c (all_threads, scm_current_thread,
6689 scm_all_threads, scm_i_thread_root): New.
6690 (scm_threads_init): Add main thread to all_threads.
6691 (scheme_launch_thread): Remove thread from all_threads when it
6692 terminates.
6693 (scm_call_with_new_thread): Initialize handle slot of coop_t
6694 structure and add new thread to all_threads.
6695 (scm_spawn_thread): Likewise.
6696
6697 * threads.h (scm_current_thread, scm_all_threads): New prototypes.
6698 * threads.c (scm_current_thread, scm_all_threads): Register as
6699 primitives.
6700
6701 * dynl.c: Use scm_lt_ prefix for libltdl functions.
6702
6703 2002-09-29 Neil Jerram <neil@ossau.uklinux.net>
6704
6705 * script.c (scm_compile_shell_switches): Fix bad spelling of
6706 `explicitly' in comment.
6707
6708 2002-09-28 Neil Jerram <neil@ossau.uklinux.net>
6709
6710 * posix.c (scm_geteuid, scm_getegid, scm_seteuid, scm_setegid):
6711 Refer to provided? in doc string rather than deprecated feature?.
6712
6713 2002-09-24 Gary Houston <ghouston@arglist.com>
6714
6715 * inline.h (scm_double_cell): prevent reordering of statements
6716 with any following code (for GCC 3 strict-aliasing).
6717 * numbers.c (scm_make_real), num2float.i.c (FLOAT2NUM): removed
6718 the earlier version of the reordering prevention.
6719
6720 2002-09-19 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6721
6722 * inline.h (scm_double_cell): move SET_GCMARK set out of if body.
6723
6724 2002-09-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6725
6726 * gc-malloc.c (scm_gc_register_collectable_memory): more overflow
6727 protection.
6728
6729 2002-09-08 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6730
6731 * inline.h: include stdio.h
6732
6733 * smob.c (free_print): abort if scm_debug_cell_accesses_p is set
6734
6735 2002-09-05 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6736
6737 * gc-segment.c (scm_i_make_initial_segment): check user settings
6738 for sanity.
6739
6740 * gc-malloc.c (scm_gc_init_malloc): check user settings for
6741 sanity.
6742
6743 * gc-freelist.c (scm_init_freelist): check user settings for sanity.
6744
6745 * struct.h: change scm_structs_to_free to scm_i_structs_to_free
6746
6747 * gc-malloc.c (scm_gc_register_collectable_memory): use floats;
6748 these won't ever wrap around with high memory usage. Thanks to
6749 Sven Hartrumpf for finding this.
6750
6751 * gc-freelist.c: include <stdio.h>
6752
6753 * gc-malloc.c: add DEBUGINFO for mtrigger GCs.
6754
6755 2002-09-01 Marius Vollmer <mvo@zagadka.ping.de>
6756
6757 * vectors.h (SCM_VECTOR_REF): New.
6758
6759 * snarf.h (SCM_DEFINE_PUBLIC): New.
6760
6761 2002-08-30 Marius Vollmer <mvo@zagadka.ping.de>
6762
6763 * socket.c (scm_addr_vector): Added size of address to arguments.
6764 Use it to avoid accessing a non-existent path in a sockaddr_un.
6765 Changed all callers.
6766
6767 2002-08-29 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6768
6769 * gc.h: remove DOUBLECELL card flags.
6770
6771 * gc-malloc.c (scm_calloc): try to use calloc() before calling
6772 scm_realloc().
6773
6774 * gc-segment.c (scm_i_initialize_heap_segment_data): remove card
6775 init loop; handle this from scm_init_card_freelist()
6776
6777 * gc-card.c (scm_init_card_freelist): init bit vector here.
6778
6779 * numbers.c (scm_make_real): prevent reordering of statements
6780 num2float.i.c (FLOAT2NUM): idem
6781
6782 2002-08-27 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6783
6784 * eval.h: prepend libguile/ to include path
6785
6786 2002-08-26 Marius Vollmer <mvo@zagadka.ping.de>
6787
6788 * script.c (scm_compile_shell_switches): Added "2002" to Copyright
6789 years. Thanks to Martin Grabmüller!
6790
6791 2002-08-25 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6792
6793 * gc-segment.c (scm_i_get_new_heap_segment): use float in stead of
6794 unsigned numbers for computing minimum heap increment. This
6795 prevents weird results when a a negative minimum increment is
6796 computed.
6797
6798 2002-08-24 Marius Vollmer <mvo@zagadka.ping.de>
6799
6800 * gc_os_dep.c: When we have __libc_stack_end, use that directly
6801 instead of the old tricks.
6802
6803 * guile-snarf.in: Do not expect the input file to be the first
6804 argument after the optional "-o" option, just pass everything to
6805 the pre-processor without extracting the input file name.
6806
6807 2002-08-23 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6808
6809 * gc-segment.c (scm_i_get_new_heap_segment): Oops. We want segment
6810 length *at* least SCM_MIN_HEAP_SEG_SIZE, not at most.
6811
6812 2002-08-22 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6813
6814 * gc.h, gc.c: make scm_cells_allocated unsigned again. Thanks to
6815 Bill Schottstaedt for the bug report
6816
6817 2002-08-20 Marius Vollmer <mvo@zagadka.ping.de>
6818
6819 * print.c (scm_iprin1): Print primitives generics always as
6820 "primitive-generic" even when they have no primitive methods yet.
6821
6822 2002-08-17 Gary Houston <ghouston@arglist.com>
6823
6824 * coop.c (coop_create): removed bogus 2nd argument in scm_malloc
6825 call.
6826
6827 2002-08-17 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6828
6829 * ports.c (scm_add_to_port_table): small bugfix.
6830
6831 * mallocs.c (scm_malloc_obj): use scm_gc_malloc in stead of
6832 malloc.
6833
6834 * gc-segment.c (scm_i_get_new_heap_segment): remove cluster cruft:
6835 only use SCM_MIN_HEAP_SEG_SIZE.
6836
6837 * ports.c (scm_add_to_port_table): add backwards compatibility
6838 function
6839
6840 * ports.h: use scm_i_ prefix for port table and port table size.
6841
6842 2002-08-15 Mikael Djurfeldt <mdj@linnaeus>
6843
6844 * vports.c (scm_make_soft_port): Initialize pt variable.
6845
6846 2002-08-13 Marius Vollmer <mvo@zagadka.ping.de>
6847
6848 * strports.h (scm_c_eval_string_in_module,
6849 scm_eval_string_in_module): New prototypes.
6850 * strports.c (scm_eval_string_in_module): New, but use
6851 "eval-string" as the Scheme name and make second parameter
6852 optional.
6853 (scm_eval_string): Implement using scm_eval_string_in_module.
6854 (scm_c_eval_string_in_module): New.
6855 Thanks to Ralf Mattes for the suggestion!
6856
6857 2002-08-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6858
6859 * gc-card.c ("sweep_card"): remove SCM_MISC_ERROR messages: print
6860 message and abort.
6861
6862 * gc-mark.c ("scm_gc_mark_dependencies"): idem.
6863
6864 * ports.c ("scm_new_port_table_entry"): return a boxed SCM in
6865 stead of scm_t_port*. The function now takes a tag argument.
6866
6867 2002-08-08 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6868
6869 * gc.h: add scm_debug_cells_gc_interval to public interface
6870
6871 * gc-card.c ("sweep_card"): set scm_gc_running while sweeping.
6872
6873 * gc.c (scm_i_expensive_validation_check): separate expensive
6874 validation checks from cheap ones.
6875
6876 2002-08-06 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6877
6878 * read.c (scm_input_error): new function: give meaningful error
6879 messages, and throw read-error
6880
6881 * gc-malloc.c (scm_calloc): add scm_calloc.
6882
6883 2002-08-05 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6884
6885 * tags.h: remove GC bits documentation from the tags table.
6886
6887 * read.c (INPUT_ERROR): Prepare for file:line:column error
6888 messages for errors in scm_lreadr() and friends.
6889
6890 2002-08-04 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6891
6892 * gc-malloc.c (scm_malloc): use scm_realloc() (simplifies
6893 implementation).
6894 (scm_gc_calloc): new function
6895
6896 2002-08-04 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6897
6898 * ports.c (scm_new_port_table_entry): init port entry to 0
6899 completely.
6900
6901 * ports.c (scm_new_port_table_entry): change function from
6902 scm_add_to_port_table. This prevents cells with null-pointers from
6903 being exposed to GC.
6904
6905 * vports.c (scm_make_soft_port) strports.c (scm_mkstrport),
6906 fports.c (scm_fdes_to_port): Use scm_new_port_table_entry().
6907
6908 * gc.c (scm_gc_stats): add cell-yield and malloc-yield statistic
6909 to gc-stats.
6910
6911 * numbers.c (big2str): return "0" for 0 iso. ""
6912
6913 * gc-segment.c, gc-malloc.c gc-mark.c, gc-freelist.c, gc-card.c,
6914 private-gc.h: new file
6915
6916 * gc.c: completely revised and cleaned up the GC. It now uses lazy
6917 sweeping. More documentation in workbook/newgc.text
6918
6919 2002-07-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6920
6921 * random.c (rstate_free): Return zero.
6922
6923 2002-07-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
6924
6925 * environments.c (remove_key_from_alist): Removed.
6926
6927 (obarray_remove): Simplified.
6928
6929 2002-07-24 Stefan Jahn <stefan@lkcc.org>
6930
6931 * continuations.h: ia64: Include <signal.h> before
6932 <sys/ucontext.h>.
6933
6934 2002-07-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6935
6936 * modules.c (scm_sym2var): Don't compare SCM values with ==.
6937
6938 2002-07-21 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6939
6940 * goops.c (scm_compute_applicable_methods): use
6941 scm_remember_upto_here_1 iso scm_remember_upto_here
6942
6943 * macros.c: include deprecation.h
6944
6945 * vectors.c (scm_vector_move_right_x): remove side effect in
6946 macro arg.
6947 (scm_vector_move_left_x): idem.
6948
6949 * net_db.c, posix.c, socket.c: variable naming: change ans to
6950 result.
6951
6952 * sort.c (scm_merge_vector_x): accept vector as argument
6953 iso. SCM*. This is needed for full GC correctness.
6954
6955 * gc.h: undo previous undocumented changes related to #ifdef
6956 GENGC.
6957
6958 2002-07-20 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6959
6960 * *.c: add space after commas everywhere.
6961
6962 * *.c: use SCM_VECTOR_SET everywhere, where a vector is written.
6963 Document cases where SCM_WRITABLE_VELTS() is used.
6964
6965 * vectors.h (SCM_VELTS): prepare for write barrier, and let
6966 SCM_VELTS() return a const pointer
6967 (SCM_VECTOR_SET): add macro.
6968
6969 2002-07-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
6970
6971 * eval.c (SCM_CEVAL), macros.c (macro_print, scm_makmacro,
6972 scm_sym_macro, scm_macro_type), macros.h (scm_makmacro):
6973 Deprecated the special kind of built-in dynamic syntax transformer
6974 that was inaccurately named "macro". Note: The built-in syntax
6975 transformers that are named "mmacro" or "memoizing-macro" still
6976 exist, and it is these which come much closer to what one would
6977 call a macro.
6978
6979 2002-07-13 Neil Jerram <neil@ossau.uklinux.net>
6980
6981 * eval.c (unmemocopy): Fix for
6982 1001-local-eval-error-backtrace-segfaults (unmemoization crash
6983 with internal definitions and local-eval).
6984
6985 2002-07-12 Gary Houston <ghouston@arglist.com>
6986
6987 * dynl.c: Don't define stub procedures if DYNAMIC_LINKING is not
6988 defined. They don't do anything useful, especially since the
6989 only case where DYNAMIC_LINKING is undefined seems to be
6990 when --with-modules=no is given to configure, which is basically
6991 requesting that the "dynamic linking module" be omitted.
6992
6993 * Makefile.am (libguile_la_SOURCES): move dynl.c from
6994 libguile_la_SOURCES to EXTRA_libguile_la_SOURCES.
6995
6996 * extensions.c (load_extension): check DYNAMIC_LINKING for
6997 scm_dynamic_call.
6998 * init.c (scm_init_guile_1): check DYNAMIC_LINKING for
6999 scm_init_dynamic_linking.
7000
7001 2002-07-10 Marius Vollmer <mvo@zagadka.ping.de>
7002
7003 * guile.c, iselect.h, net_db.c, posix.c, socket.c: No need to
7004 check for Cygwin when including <winsock2.h>, this is already
7005 check for by configure. Thus, revert change from 2002-07-07.
7006
7007 2002-07-10 Gary Houston <ghouston@arglist.com>
7008
7009 * eq.c: include <string.h>
7010 * dynl.c: docstring editing.
7011
7012 2002-07-09 Gary Houston <ghouston@arglist.com>
7013
7014 * dynl.c (scm_dynamic_call): docstring editing.
7015
7016 2002-07-08 Rob Browning <rlb@defaultvalue.org>
7017
7018 * gc_os_dep.c: HURD fixes.
7019
7020 2002-07-07 Marius Vollmer <mvo@zagadka.ping.de>
7021
7022 Crosscompiling and Cygwin fixes by Jan Nieuwenhuizen. Thanks!
7023
7024 * Makefile.am: Override default rule for c-tokenize.$(OBJECT);
7025 this should be compiled for BUILD host.
7026 Override default rule for
7027 guile_filter_doc_snarfage$(EEXECT); this should run on BUILD host.
7028 Add missing $(EXEEXT) to guile_filter_doc_snarfage invocation.
7029 (snarf2checkedtexi): Use GUILE_FOR_BUILD instead of preinstguile.
7030
7031 * guile.c, iselect.h, net_db.c, posix.c, socket.c: Do not include
7032 <winsock2.h> on Cygwin even when we have it.
7033
7034 2002-07-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
7035
7036 * __scm.h (SCM_CAUTIOUS), eval.c (scm_eval_args, deval_args,
7037 SCM_CEVAL): Removed compile time option SCM_CAUTIOUS to clean up
7038 the code. Full number of arguments checking of closures is
7039 mandatory now. However, the option to disable the checking has
7040 most probably not been used anyway.
7041
7042 2002-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
7043
7044 * __scm.h (SCM_RECKLESS), backtrace.c (SCM_ASSERT), debug.c
7045 (scm_debug_options), eval.c (scm_lookupcar, scm_lookupcar1,
7046 scm_badargsp, SCM_CEVAL, SCM_APPLY, scm_map, scm_for_each),
7047 feature.c (scm_init_feature), gsubr.c (scm_gsubr_apply), numbers.c
7048 (scm_logand, scm_logior, scm_logxor, scm_i_dbl2big), srcprop.c
7049 (scm_source_properties, scm_set_source_properties_x,
7050 scm_source_property): Removed compile time option SCM_RECKLESS to
7051 clean up the code. Full number of arguments checking of closures
7052 is mandatory now. However, the option to disable the checking has
7053 most probably not been used anyway.
7054
7055 * srcprop.c (scm_source_properties, scm_set_source_properties_x,
7056 scm_source_property): Use !SCM_CONSP instead of SCM_NCONSP.
7057
7058 2002-06-30 Gary Houston <ghouston@arglist.com>
7059
7060 * dynl.c: Removed all SCM_DEFER_INTS/SCM_ALLOW_INTS, which won't
7061 do anything useful. Added a comment about need for a mutex if
7062 pre-emptive threading is supported.
7063
7064 * posix.c (scm_convert_exec_args), dynl.c
7065 (scm_make_argv_from_stringlist): static procs: 1) renamed both to
7066 allocate_string_pointers. 2) simplified: don't reallocate the
7067 strings, just make an array of pointers 3) avoid memory leaks on
7068 error 4) let the procedure report errors in its own name.
7069 Consequences: 1) the procedures now assume that SCM strings are
7070 nul-terminated, which should always be the case. 2) Since strings
7071 are not reallocated, it's now possible for strings passed to
7072 dynamic-args-call to be mutated.
7073
7074 2002-06-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
7075
7076 * __scm.h, eval.c, eval.h: Removed compile time option
7077 MEMOIZE_LOCALS to clean up the code. Now, caching of local
7078 variable positions during memoization is mandatory. However, the
7079 option to disable the caching has most probably not been used
7080 anyway.
7081
7082 2002-06-18 Marius Vollmer <mvo@zagadka.ping.de>
7083
7084 * print.c (scm_simple_format): Print missing part of format before
7085 ~% control. Thanks to Daniel Skarda!
7086
7087 2002-06-01 Marius Vollmer <mvo@zagadka.ping.de>
7088
7089 * mkstemp.c: Added exception notice to license statement.
7090
7091 2002-05-22 Marius Vollmer <mvo@zagadka.ping.de>
7092
7093 * numbers.c (mem2ureal): When returning an inexact zero, make sure
7094 it is represented as a floating point value so that we can change
7095 its sign.
7096
7097 From John W. Eaton <jwe@bevo.che.wisc.edu>
7098
7099 * numbers.c (idbl2str): Don't omit sign when printing negative zero.
7100
7101 2002-05-14 Thien-Thi Nguyen <ttn@giblet.glug.org>
7102
7103 * gc_os_dep.c: For I386/OPENBSD, allow for `__i386__'
7104 in addition to `i386'. Thanks to Dale P. Smith.
7105
7106 2002-05-08 Marius Vollmer <mvo@zagadka.ping.de>
7107
7108 * eq.c (real_eqv): New.
7109 (scm_eqv_p): Use it when comparing reals and complexes.
7110
7111 * numbers.c: Include <string.h>, for strncmp.
7112 (mem2complex): Do not create negative NaNs.
7113 (scm_leq_p, scm_geq_p): Explicitely return #f when comparing a
7114 NaN.
7115 (scm_inexact_to_exact): Signal error when converting a NaN.
7116
7117 2002-05-06 Marius Vollmer <mvo@zagadka.ping.de>
7118
7119 * posix.c (scm_putenv): Handle removing variables explicitely by
7120 calling unsetenv.
7121
7122 From John W. Eaton.
7123
7124 * numbers.h: Conditionally include floatingpoint.h, ieeefp.h, and
7125 nan.h. Provide declarations for scm_inf_p, scm_nan_p, scn_inf,
7126 and scm_nan.
7127 * numbers.c: [SCO && ! HAVE_ISNAN] (isnan): New function.
7128 [SCO && ! HAVE_ISINF] (isinf): New function.
7129 (xisinf, xisnan): New functions.
7130 (IS_INF): Delete.
7131 (isfinite): Define in terms of xisinf.
7132 (scm_inf_p, scm_nan_p): New functions.
7133 (guile_Inf, guile_NaN): New file-scope vars.
7134 (guile_ieee_init): New function.
7135 (scm_inf, scm_nan): New functions.
7136 (idbl2str): Handle Inf and NaN. Remove funny label and
7137 corresponding gotos.
7138 (ALLOW_DIVIDE_BY_ZERO): New macro.
7139 (scm_divide): Allow division by zero to occur if
7140 ALLOW_DIVIDE_BY_ZERO is defined.
7141 Handle bignums and ints as special cases.
7142
7143 Additional stuff by me:
7144
7145 numbers.c (mem2ureal): Recognize "inf.0" and "nan.xxx".
7146 (scm_even_p, scm_odd_p): Treat infinity as even and odd.
7147 (iflo2str): Don't output a '+' for negative numbers or for Inf and
7148 NaN. They will provide their own sign.
7149 (scm_divide): Only allow divides by inexact zeros. Dividing by
7150 exact zeros still signals an errors.
7151
7152 2002-04-22 Thien-Thi Nguyen <ttn@giblet.glug.org>
7153
7154 * goops.h (scm_slot_exists_p): Rename from scm_slots_exists_p.
7155 * goops.c (scm_slot_exists_p): Rename from scm_slots_exists_p.
7156 (scm_slot_exists_p): Rename from scm_slots_exists_p.
7157 Thanks to Andreas Rottmann.
7158
7159 2002-04-20 Gary Houston <ghouston@arglist.com>
7160
7161 * removal of unused fields in root state (thanks to Christopher
7162 Cramer for pointing out the disuse.)
7163 * root.h (scm_root_state): removed def_inp, def_outp, def_errp.
7164 (scm_def_inp, scm_def_outp, scm_def_errp): removed.
7165
7166 * root.c (root_mark): don't mark them.
7167 (scm_make_root): don't set them to #f.
7168 * init.c (scm_init_standard_ports): don't initialise with the
7169 default ports.
7170
7171 2002-04-17 Marius Vollmer <mvo@zagadka.ping.de>
7172
7173 * Makefile.am (EXTRA_DIST): Added cpp_err_symbols.c and
7174 cpp_sig_symbols.c.
7175
7176 2002-04-16 Marius Vollmer <mvo@zagadka.ping.de>
7177
7178 * guile-snarf.in: Do not clean input file. This would write to
7179 the $(srcdir) during a VPATH build, which is not allowed. It also
7180 isn't needed since it only works when an output filename has been
7181 specified and in that case we don't need to clean the input file
7182 because the output file will already exist.
7183
7184 2002-03-31 Marius Vollmer <mvo@zagadka.ping.de>
7185
7186 * guile-snarf: Install the trap for removing $cleanfile only when
7187 the value of $cleanfile is actually known.
7188
7189 2002-04-10 Rob Browning <rlb@defaultvalue.org>
7190
7191 * .cvsignore: add versiondat.h and *.c.clean.c.
7192
7193 2002-03-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
7194
7195 * srcprop.[ch] (scm_c_source_property_breakpoint_p): New
7196 function, replaces macro SRCBRKP.
7197
7198 (SRCBRKP): Deprecated.
7199
7200 * eval.c (SCM_CEVAL): Replaced use of SRCBRKP by call to
7201 scm_c_source_property_breakpoint_p. Removed some use of arg1 as
7202 temporary variable.
7203
7204 2002-03-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
7205
7206 * debug.h, eval.c: Deprecated CHECK_ENTRY, CHECK_APPLY and
7207 CHECK_EXIT and removed all references to them.
7208
7209 2002-03-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
7210
7211 * debug.h (scm_ready_p, debug_print): Removed declarations.
7212
7213 * eval.c (EVALCELLCAR): Removed.
7214
7215 (SCM_CEVAL): Eliminated label loopnoap. Removed side-effecting
7216 operation from condition.
7217
7218 2002-03-24 Marius Vollmer <mvo@zagadka.ping.de>
7219
7220 * guile-snarf.in: When the output filename is "-", write to
7221 stdout. When no "-o" option is given, use "-" as the output
7222 filename (i.e., stdout). Only 'clean' the inputfile or remove the
7223 output file on error when the output file name is not "-". Define
7224 the preprocessor macro SCM_MAGIC_SNARFER while snarfing.
7225
7226 * Makefile.am (.c.x): Pass "-o $@" to guile-snarf.
7227
7228 2002-03-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
7229
7230 * eval.c (SCM_CEVAL, SCM_APPLY): Eliminated labels wrongnumargs
7231 and the corresponding goto statements. Removed redundant code.
7232
7233 2002-03-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
7234
7235 * eval.c (SCM_CEVAL): Minimized scope of variable arg2.
7236 Eliminated redundant SCM_IMP check. Exlined call to EVALCAR.
7237 Re-enabled handing of rpsubrs and asubrs.
7238
7239 2002-03-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
7240
7241 * eval.c (SIDEVAL): Removed.
7242
7243 (SCM_CEVAL): Minimized scope of variable orig_sym. Eliminated
7244 goto-labels cdrxnoap, cdrxbegin and nontoplevel_cdrxnoap. Changed
7245 argument checking order for set! to locals, variables and symbols.
7246 Improvements to control structure. Removed some uses of arg1 and
7247 arg2 as temporary variables.
7248
7249 2002-03-15 Thien-Thi Nguyen <ttn@giblet.glug.org>
7250
7251 * guile-snarf.in: Remove "--compat=1.4" support.
7252 Add "-d" and "-D" support.
7253
7254 (deprecated_list): New var.
7255 (compat_mode_clean_xxx): Delete.
7256 (grep_deprecated): New func.
7257 ("main"): If "-d" or "-D", call `grep_deprecated'.
7258
7259 2002-03-15 Neil Jerram <neil@ossau.uklinux.net>
7260
7261 * hooks.h: Change scm_t_c_hookype_t everywhere to
7262 scm_t_c_hook_type.
7263
7264 Docstring fixes:
7265
7266 * strings.c (scm_string_p): Change unnecessary `iff' to `if'.
7267
7268 * ports.c (scm_sys_make_void_port): Use `@file'.
7269
7270 * numbers.c (scm_number_p, scm_real_p): Use `otherwise' rather
7271 than `else'.
7272
7273 * macros.c (scm_makmacro): Don't say that the form replaces its
7274 source, because it doesn't.
7275 (scm_makmmacro): Clarify difference between this and scm_makmacro.
7276
7277 * backtrace.c (scm_display_error), filesys.c (scm_umask,
7278 scm_select, scm_basename), goops.c (scm_method_generic_function),
7279 numbers.c (scm_integer_length), posix.c (scm_getgroups, scm_execl,
7280 scm_setlocale, scm_flock), socket.c (scm_shutdown): Correct
7281 spelling mistakes.
7282
7283 * debug.c (scm_debug_options), eval.c
7284 (scm_eval_options_interface), read.c (scm_read_options): Change
7285 incorrect @var in docstring to @code.
7286
7287 2002-03-14 Marius Vollmer <mvo@zagadka.ping.de>
7288
7289 * unif.c (singp): Use SCM_REALP instead of SCM_SLOPPY_REALP.
7290
7291 * snarf.h (SCM_SNARF_INIT): Add "^:^" after code so that
7292 guile-snarf can remove trailing non-init code.
7293
7294 * guile-snarf.in (modern_snarf): Remove everything following and
7295 including "^:^" from the output.
7296
7297 2002-03-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
7298
7299 * eval.c (SCM_CEVAL), srcprop.h (SRCBRKP): Eliminated union 't'.
7300
7301 * eval.c (SCM_CEVAL): Exlined call to EVALCAR.
7302
7303 2002-03-13 Thien-Thi Nguyen <ttn@giblet.glug.org>
7304
7305 * guile-snarf.in: Update copyright.
7306 Rewrite to internalize error handling.
7307 Add "--compat=1.4" handling.
7308 Add commentary.
7309
7310 * Makefile.am (libpath.h): Use @top_srcdir_absolute@.
7311 (snarfcppopts): New var.
7312 (.c.x): Use $(snarfcppopts). Rework guile-snarf usage.
7313 (.c.doc): Use $(snarfcppopts).
7314
7315 * alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,
7316 continuations.c, debug-malloc.c, debug.c, deprecation.c, dynl.c,
7317 dynwind.c, environments.c, eq.c, error.c, eval.c, evalext.c,
7318 extensions.c, feature.c, filesys.c, fluids.c, fports.c, gc.c,
7319 goops.c, gsubr.c, guardians.c, hash.c, hashtab.c, hooks.c,
7320 ioext.c, iselect.c, keywords.c, lang.c, list.c, load.c, macros.c,
7321 modules.c, net_db.c, numbers.c, objects.c, objprop.c, options.c,
7322 pairs.c, ports.c, posix.c, print.c, procprop.c, procs.c,
7323 properties.c, ramap.c, random.c, rdelim.c, read.c, regex-posix.c,
7324 root.c, rw.c, scmsigs.c, script.c, simpos.c, socket.c, sort.c,
7325 srcprop.c, stackchk.c, stacks.c, stime.c, strings.c, strop.c,
7326 strorder.c, strports.c, struct.c, symbols.c, threads.c, throw.c,
7327 unif.c, values.c, variable.c, vectors.c, version.c, vports.c,
7328 weaks.c: Retire inclusion guard macro SCM_MAGIC_SNARFER.
7329
7330 2002-03-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
7331
7332 * eval.c (SCM_CEVAL): Got rid of the last reference to t.lloc.
7333 The next step will be to remove the union 't' and simplify the
7334 code of SCM_CEVAL that way.
7335
7336 2002-03-12 Neil Jerram <neil@ossau.uklinux.net>
7337
7338 * iselect.c (collisionp, gnfds, greadfds, gwritefds, gexceptfds,
7339 rreadfds, rwritefds, rexceptfds): Made static.
7340
7341 * gc.c (terminating), fports.c (terminating): Renamed
7342 scm_i_terminating.
7343
7344 2002-03-11 Marius Vollmer <mvo@zagadka.ping.de>
7345
7346 * numbers.c (scm_divide): Adapt code from libstdc++/f2c to void
7347 potential overflow problems. Thanks to John W Eaton!
7348
7349 * strop.c (string_capitalize_x): Treat characters as unsigned so
7350 that 8-bit chars work. Thanks to David Pirotte!
7351
7352 2002-03-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
7353
7354 * eval.c (SCM_CEVAL): Cleaned up the handling of 'slot-ref',
7355 'slot-set!' and 'nil-cond'. Removed some uses of t.arg1, arg2 and
7356 proc as temporary variables. Introduced temporary variables with
7357 hopefully descriptive names for clarification. Replaced SCM_N?IMP
7358 by a more explicit predicate in some places.
7359
7360 2002-03-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
7361
7362 * eval.c (SCM_CEVAL): Cleaned up the handling of #@dispatch.
7363 Added lots of comments regarding the implementation of #@dispatch.
7364 Changed intra-procedure communication to use t.arg1 instead of
7365 arg2. Removed some uses of t.arg1, t.lloc and proc as temporary
7366 variables. Introduced temporary variables with hopefully
7367 descriptive names for clarification. Replaced SCM_N?IMP by a more
7368 explicit predicate in some places. Use SCM_INSTANCE_HASH instead
7369 of computing the expression explicitly. Eliminate now unused
7370 label nontoplevel_cdrxbegin.
7371
7372 * goops.h (SCM_INSTANCE_HASH): New macro.
7373
7374 * objects.h (SCM_CMETHOD_FORMALS, SCM_CMETHOD_BODY): New macros.
7375
7376 2002-03-08 Thien-Thi Nguyen <ttn@giblet.glug.org>
7377
7378 * Makefile.am (bin_SCRIPTS): Revive this decl, w/ initial element
7379 "guile-snarf" moved back from `noinst_SCRIPTS'.
7380
7381 2002-03-08 Neil Jerram <neil@ossau.uklinux.net>
7382
7383 * srcprop.c (scm_set_source_property_x): If SRCPROPS obj already
7384 exists when adding a source property other than those that are
7385 handled explicitly, add the new property to the SRCPROPS obj's
7386 plist.
7387
7388 * debug.h (SCM_MAX_FRAME_SIZE): Remove incorrect comment about use
7389 of SCM_MAX_FRAME_SIZE as a bit mask; it isn't used like this.
7390
7391 * eval.c (SCM_CEVAL): Don't store scm_debug_eframe_size in
7392 debug.status. It isn't needed, and it can overflow the bits
7393 reserved for it (which may lead to a segv or a GC abort).
7394
7395 2002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
7396
7397 * eval.c (SCM_CEVAL): Cleaned up the handling of 'apply'. Removed
7398 side-effecting operations from conditions and macro calls.
7399 Replaced SCM_N?IMP by a more explicit predicate in some places.
7400 Minimized the scope of some variables.
7401
7402 2002-03-02 Stefan Jahn <stefan@lkcc.org>
7403
7404 * convert.i.c: Fixed int <-> long conversions which would have
7405 failed if their sizes were different.
7406
7407 2002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
7408
7409 * eval.c (SCM_CEVAL): Cleaned up the handling of 'if', 'let',
7410 'letrec' and 'set*': Removed some uses of t.arg1, t.lloc and proc
7411 as temporary variables. Removed side-effecting operations from
7412 conditions and macro calls. Introduced temporary variables with
7413 hopefully descriptive names for clarification. Replaced SCM_N?IMP
7414 by a more explicit predicate in some places. Removed code that
7415 was conditionally compiled if SICP was defined - which it never
7416 is.
7417
7418 2002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
7419
7420 * eval.c (SCM_CEVAL): Cleaned up the handling of 'cons' and 'do':
7421 Removed some uses of t.arg1 and proc as temporary variables.
7422 Removed side-effecting operations from conditions and macro calls.
7423 Introduced temporary variables with hopefully descriptive names
7424 for clarification. Replaced SCM_N?IMP by a more explicit
7425 predicate in some places.
7426
7427 2002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
7428
7429 * eval.c (scm_badargsp, SCM_CEVAL): Replaced SCM_N?IMP by a more
7430 explicit predicate in some places.
7431
7432 (CHECK_EQVISH): Removed.
7433
7434 (SCM_CEVAL): Removed some uses of t.arg1 and proc as temporary
7435 variables. Removed side-effecting operations from conditions and
7436 macro calls. Introduced temporary variables for clarification.
7437 Sorted if-else-if check for the type of the last form in a list by
7438 frequency. Avoided some unnecessary tail-recursion calls.
7439
7440 2002-03-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
7441
7442 * gc.c (SCM_HEAP_SEG_SIZE, CELL_UP, CELL_DN, NEXT_DATA_CELL,
7443 init_heap_seg, alloc_some_heap), gc.h (struct scm_cell, struct
7444 scm_t_cell, SCM_CELLPTR, SCM_GC_CARD_SIZE,
7445 SCM_GC_IN_CARD_HEADERP), tags.h (SCM_CELLP): Renamed the struct
7446 scm_cell and all its uses to scm_t_cell in accordance to Guile's
7447 naming scheme for types.
7448
7449 * alist.c (scm_acons), convert.i.c (CTYPES2UVECT,
7450 CTYPES2UVECT_OPTIONAL), coop-threads.c (scm_call_with_new_thread,
7451 scm_spawn_thread), debug.c (scm_make_debugobj), environments.c
7452 (scm_make_environment), eval.c (scm_closure), fports.c
7453 (scm_fdes_to_port), gc.c (scm_deprecated_newcell,
7454 scm_deprecated_newcell2), inline.h (scm_alloc_cell, scm_cell),
7455 list.c (SCM_I_CONS), numbers.c (scm_i_mkbig), pairs.c (scm_cons),
7456 ports.c (scm_void_port), procs.c (scm_c_make_subr, scm_makcclo),
7457 smob.c (scm_make_smob), smob.h (SCM_NEWSMOB), strings.c
7458 (scm_take_str, scm_allocate_string), strports.c (scm_mkstrport),
7459 unif.c (scm_make_uve), variable.c (make_variable), vectors.c
7460 (scm_c_make_vector), vports.c (scm_make_soft_port): Renamed
7461 scm_alloc_cell to scm_cell.
7462
7463 * environments.c (core_environments_observe), gc.c
7464 (scm_deprecated_newcell2), goops.c (wrap_init, scm_wrap_object),
7465 inline.h (scm_alloc_double_cell, scm_double_cell), num2float.i.c
7466 (FLOAT2NUM), numbers.c (scm_make_real), procs.c
7467 (scm_make_procedure_with_setter), smob.h (SCM_NEWSMOB2,
7468 SCM_NEWSMOB3), struct.c (scm_make_struct, scm_make_vtable_vtable),
7469 symbols.c (scm_mem2symbol, scm_mem2uninterned_symbol), weaks.c
7470 (allocate_weak_vector): Renamed scm_alloc_double_cell to
7471 scm_double_cell.
7472
7473 2002-02-27 Stefan Jahn <stefan@lkcc.org>
7474
7475 * convert.i.c, convert.c: Better range checking.
7476
7477 * inet_aton.c, fports.c: Commented the inclusion of <winsock2.h>.
7478
7479 * deprecation.c (vsnprintf): Define to `_vsnprintf' for
7480 Windows (MinGW).
7481
7482 2002-02-26 Thien-Thi Nguyen <ttn@giblet.glug.org>
7483
7484 * Makefile.am: Update path to pre-inst-guile automake frag.
7485
7486 2002-02-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
7487
7488 * gc.c (scm_gc_sweep): Make it compile even when deprecated
7489 features are excluded.
7490
7491 2002-02-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
7492
7493 * num2integral.i.c (NUM2INTEGRAL): Fixed signedness problem.
7494
7495 2002-02-25 Gary Houston <ghouston@arglist.com>
7496
7497 * convert.c: include <string.h> for convert_i.c.
7498
7499 2002-02-24 Rob Browning <rlb@defaultvalue.org>
7500
7501 * .cvsignore: add stamp-h1.
7502
7503 2002-02-21 Neil Jerram <neil@ossau.uklinux.net>
7504
7505 * unif.c (scm_array_to_list): Correct name, which had been
7506 accidentally changed to scm_t_arrayo_list!
7507
7508 2002-02-20 Mikael Djurfeldt <mdj@linnaeus>
7509
7510 * gc.c (scm_gc_sweep): Print an error message when aborting due to
7511 underflowing scm_mallocated.
7512
7513 2002-02-14 Marius Vollmer <marius.vollmer@uni-dortmund.de>
7514
7515 * gc.h, gc.c (scm_must_malloc, scm_must_realloc, scm_must_strdup,
7516 scm_must_strndup, scm_done_malloc, scm_done_free, scm_must_free):
7517 Reimplemented using the new scm_gc_malloc, etc., functions and
7518 deprecated.
7519
7520 2002-02-11 Thien-Thi Nguyen <ttn@giblet.glug.org>
7521
7522 * Makefile.am (bin_PROGRAMS): Move `guile_filter_doc_snarfage'
7523 to `noinst_PROGRAMS'.
7524 (bin_SCRIPTS): Move all values to `noinst_SCRIPTS'; delete.
7525 (noinst_PROGRAMS, noinst_SCRIPTS): New.
7526
7527 2002-02-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
7528
7529 * gc.h, gc.c (scm_gc_sweep): Issue deprecation warning when
7530 non-zero is returned from a port or smob free function.
7531 (scm_malloc, scm_realloc, scm_strndup, scm_strdup,
7532 scm_gc_register_collectable_memory,
7533 scm_gc_unregister_collectable_memory, scm_gc_malloc,
7534 scm_gc_realloc, scm_gc_free, scm_gc_strndup, scm_gc_strdup): New.
7535
7536 * backtrace.c, continuations.c, convert.i.c, coop-threads.c,
7537 debug-malloc.c, dynl.c, environments.c, environments.h,
7538 extensions.c, filesys.c, fports.c, gc.c, gc.h, gh_data.c, goops.c,
7539 guardians.c, hooks.c, init.c, keywords.c, load.c, numbers.c,
7540 ports.c, posix.c, procs.c, rdelim.c, regex-posix.c, root.c,
7541 smob.c, stime.c, strings.c, struct.c, struct.h, symbols.c, unif.c,
7542 vectors.c, weaks.c: Use scm_gc_malloc/scm_malloc and
7543 scm_gc_free/free instead of scm_must_malloc and scm_must_free, as
7544 appropriate. Return zero from smob and port free functions.
7545
7546 * debug-malloc.c (scm_malloc_reregister): Handle "old == NULL".
7547
7548 * deprecation.h, deprecation.c: Reimplemented to allow deprecation
7549 messages while the GC is running.
7550 (scm_c_issue_deprecation_warning_fmt): New.
7551
7552 * fports.c (scm_setvbuf): Reset read buffer to saved values when
7553 it is pointing to the putback buffer.
7554
7555 2002-02-08 Thien-Thi Nguyen <ttn@giblet.glug.org>
7556
7557 * gsubr.c (create_gsubr): On "too many args" error,
7558 also display arg count and name. Thanks to Bill Schottstaedt.
7559
7560 2002-02-05 Thien-Thi Nguyen <ttn@giblet.glug.org>
7561
7562 * Makefile.am: Include $(top_srcdir)/pre-inst-guile.am.
7563
7564 (bin_SCRIPTS): Remove guile-snarf-docs-texi.
7565 (alldotdocfiles, snarf2checkedtexi, dotdoc2texi): New vars.
7566 (guile.texi, guile-procedures.texi): Use $(dotdoc2texi).
7567
7568 * guile-snarf-docs-texi.in: Bye bye.
7569
7570 2002-02-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
7571
7572 * symbols.c (scm_make_symbol): Fix typo in docstring.
7573
7574 * symbols.h (scm_mem2uninterned_symbol, scm_symbol_interned_p,
7575 scm_make_symbol): New prototypes.
7576
7577 2002-02-03 Marius Vollmer <mvo@zagadka.ping.de>
7578
7579 * symbols.h (SCM_SET_SYMBOL_HASH): Removed.
7580 (SCM_SYMBOL_INTERNED_P): New.
7581 * symbols.c (scm_symbol_hash): Use scm_ulong2num instead of
7582 SCM_MAKINUM since hash values can well be bignums.
7583 (scm_mem2symbol): Only use hash values below SCM_T_BITS_MAX/2.
7584 This signals a interned symbol.
7585 (scm_mem2uninterned_symbol, scm_symbol_interned_p,
7586 scm_make_symbol): New.
7587
7588 * print.c (scm_iprin1): Print uninterned symbols unreadably.
7589
7590 2002-02-02 Thien-Thi Nguyen <ttn@giblet.glug.org>
7591
7592 * __scm.h (HAVE_UINTPTR_T): Only define if UINTPTR_T attributes
7593 are defined: UINTPTR_MAX, INTPTR_MAX, INTPTR_MIN.
7594 Thanks to Dave Love.
7595
7596 2002-01-31 Marius Vollmer <mvo@zagadka.ping.de>
7597
7598 * symbols.c (scm_gensym): Use " g" as default prefix, not "g".
7599 This might help to make unintended clashes less likely.
7600 (scm_string_to_symbol): Protect the string until the symbols is
7601 created.
7602
7603 2002-01-31 Stefan Jahn <stefan@lkcc.org>
7604
7605 * convert.c, convert.h, convert.i.c: New files containing C
7606 array to Scheme conversion helpers meant to be replacement
7607 functions for the deprecated gh interface.
7608
7609 * Makefile.am: Setup rules for new `convert.*' files.
7610
7611 2002-01-28 Stefan Jahn <stefan@lkcc.org>
7612
7613 * symbols.c (scm_c_symbol2str): New function, replacement for
7614 `gh_scm2newsymbol()'.
7615
7616 * strings.c (scm_c_substring2str): New function. Proper
7617 replacement for `gh_get_substr()'.
7618
7619 * socket.c: Include `stdint.h' if available for the `uint32_t'
7620 declaration.
7621
7622 * scmsigs.c (scm_sigaction): Initialize `chandler' (inhibits
7623 compiler warning).
7624
7625 * backtrace.c: Include `lang.h' for GUILE_DEBUG conditional.
7626
7627 2002-01-22 Neil Jerram <neil@ossau.uklinux.net>
7628
7629 Other changes unrelated to Elisp...
7630
7631 * eval.c (scm_m_if): Use s_if rather than repeating string literal
7632 "if".
7633 (comments): Fix a few typos.
7634 (scm_for_each): Add parentheses around oddly unparenthesized
7635 if/while conditions.
7636
7637 * read.c (scm_read_opts): Add full stop at end of doc for
7638 `keywords' option.
7639
7640 * script.c (scm_compile_shell_switches): Use scm_str2symbol
7641 instead of gh_symbol2scm.
7642
7643 * srcprop.h (SRCPROPBRK): Return C type rather than SCM.
7644 (SRCBRKP): Use SRCPROPBRK rather than duplicating its logic.
7645
7646 * srcprop.c (scm_srcprops_to_plist, scm_source_property): Change
7647 SRCPROPBRK (x) to SCM_BOOL (SRCPROPBRK (x)).
7648
7649 First batch of changes for Elisp support...
7650
7651 * alist.c, async.c, boolean.c, dynl.c, eval.c, filesys.c,
7652 fluids.c, list.c, load.c, options.c, posix.c, print.c, sort.c,
7653 throw.c, vectors.c, weaks.c: Add #include for lang.h.
7654
7655 * eval.c, eval.h, init.c, lang.c, lang.h: Use SCM_ENABLE_ELISP to
7656 conditionalize compilation and initialization of Elisp support
7657 function.
7658
7659 * alist.c (scm_assq, scm_assv, scm_assoc), async.c
7660 (scm_asyncs_pending, scm_run_asyncs, noop), backtrace.c
7661 (scm_set_print_params_x), dynl.c (scm_make_argv_from_stringlist),
7662 filesys.c (fill_select_type, retrieve_select_type), fluids.c
7663 (scm_swap_fluids, scm_swap_fluids_reverse), list.c (scm_null_p,
7664 scm_ilength, scm_append_x, scm_last_pair, scm_reverse,
7665 scm_reverse_x, scm_list_ref, scm_list_set_x, scm_list_cdr_set_x,
7666 scm_c_memq, scm_memv, scm_member), load.c (scm_search_path),
7667 options.c (change_option_setting, scm_options), posix.c
7668 (environ_list_to_c), print.c (scm_iprlist), throw.c
7669 (scm_exit_status), vectors.c (scm_vector), weaks.c
7670 (scm_weak_vector): Use SCM_NULL_OR_NIL_P instead of SCM_NULLP.
7671
7672 * boolean.c (scm_not): Use `SCM_FALSEP || SCM_NILP' instead of
7673 just SCM_FALSEP.
7674
7675 * boolean.c (scm_boolean_p): Use `SCM_BOOLP || SCM_NILP' instead
7676 of just SCM_BOOLP.
7677
7678 * eval.c (scm_lisp_nil, scm_lisp_t, s_nil_ify, scm_m_nil_ify,
7679 s_t_ify, scm_m_t_ify, s_0_cond, scm_m_0_cond, s_0_ify,
7680 scm_m_0_ify, s_1_ify, scm_m_1_ify): Removed.
7681 (scm_m_atfop): Support function aliasing. Support both function
7682 args, which need transformation, and macro args, which do not.
7683 Add explanatory comments.
7684 (SCM_CEVAL): In switch cases for SCM_IM_AND, SCM_IM_COND,
7685 SCM_IM_DO, SCM_IM_IF and SCM_IM_OR, add `|| SCM_NILP' to existing
7686 checks for SCM_FALSEP. In switch case for SCM_IM_NIL_COND, use
7687 SCM_NULLP || SCM_NILP instead of checks against (removed)
7688 scm_lisp_nil. Removed switch cases for SCM_IM_NIL_IFY,
7689 SCM_IM_T_IFY, SCM_IM_0_COND, SCM_IM_0_IFY, SCM_IM_1_IFY.
7690
7691 * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null,
7692 scm_m_while, scm_nil_eq): Commented out; I don't think we need
7693 these, but I don't want to remove them yet, just in case.
7694 (scm_init_lang): Define `%nil' variable on Scheme level to hold
7695 Elisp nil value.
7696
7697 * lang.h (SCM_NILP): Test against Elisp nil value instead of
7698 against (removed) scm_lisp_nil.
7699 (SCM_NILNULLP, SCM_NIL2EOL, SCM_EOL2NIL): Commented out.
7700 (SCM_NULL_OR_NIL_P): New.
7701
7702 * list.c (scm_append): Use SCM_VALIDATE_NULL_OR_NIL instead of
7703 SCM_VALIDATE_NULL.
7704
7705 * print.c (scm_isymnames): Fix comment. Remove #@nil-ify,
7706 #@t-ify, #@0-cond, #@0-ify, #@1-ify. Add #nil (for SCM_ELISP_NIL
7707 value).
7708
7709 * sort.c (scm_sorted_p, scm_merge, scm_merge_list_x, scm_merge_x,
7710 scm_sort_x, scm_sort, scm_stable_sort_x, scm_stable_sort): Use
7711 SCM_NULL_OR_NIL_P instead of SCM_NULLP. In constructions like `if
7712 (SCM_NULLP (x)) return SCM_EOL;', return x rather than SCM_EOL.
7713
7714 * tags.h (SCM_IM_NIL_IFY, SCM_IM_T_IFY, SCM_IM_0_COND,
7715 SCM_IM_0_IFY, SCM_IM_1_IFY): Removed.
7716 (SCM_IM_BIND, SCM_IM_DELAY, SCM_IM_CALL_WITH_VALUES, SCM_UNBOUND):
7717 Numbering shifted down accordingly.
7718 (SCM_ELISP_NIL): New IFLAG.
7719
7720 * validate.h (SCM_VALIDATE_NULL_OR_NIL): New.
7721
7722 2002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
7723
7724 * eval.c: Removed outdated references to "everr". Improved some
7725 comments.
7726
7727 (scm_deval_args, deval_args): Renamed scm_deval_args to
7728 deval_args, since it is not part of the interface.
7729
7730 (SCM_CEVAL): Added (maybe somewhat verbose) comment. Avoid to
7731 use references to debug.vect[0] before it exists. Add parentheses
7732 to switch statement.
7733
7734 * goops.h: Added local emacs variables.
7735
7736 2002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
7737
7738 * eval.[ch] (scm_deval_args): Made static.
7739
7740 * srcprop.c (scm_source_property): Remove redundant SCM_IMP
7741 test.
7742
7743 * strings.c (scm_c_string2str): Clarified comment. Replaced
7744 THINKME by FIXME for uniformness. Removed question about whether
7745 arguments need to be protected from garbage collection: Arguments
7746 must be protected as any other variable.
7747
7748 2002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
7749
7750 * procs.h (SCM_CLOSURE_BODY): New Macro.
7751
7752 * debug.c (scm_procedure_name, scm_procedure_source), eval.c
7753 (SCM_CEVAL, SCM_APPLY), goops.c (scm_sys_initialize_object,
7754 get_slot_value, set_slot_value), procs.c
7755 (scm_procedure_documentation), sort.c (closureless), stacks.c
7756 (get_applybody): Replace SCM_CDR (SCM_CODE (...)) by
7757 SCM_CLOSURE_BODY.
7758
7759 * sort.c (closureless): Prefer !SCM_FOOP over SCM_NFOOP.
7760
7761 2001-12-26 Marius Vollmer <mvo@zagadka.ping.de>
7762
7763 * Makefile.am (guile-procedures.txt): When we don't have makeinfo,
7764 use "cp" instead.
7765
7766 2001-12-16 Marius Vollmer <mvo@zagadka.ping.de>
7767
7768 * stacks.c, stacks.h (scm_t_stackype): Renamed to scm_stack_type
7769 everywhere.
7770
7771 * continuations.c (scm_make_continuation): Do not retain the
7772 throw_value when the continuation is invoked.
7773
7774 2001-12-08 Stefan Jahn <stefan@lkcc.org>
7775
7776 * strings.c (scm_c_string2str): New function. Converts a
7777 given Scheme string into a C string. Also put in two
7778 THINKME's regarding the malloc policy for the missing converter
7779 routines.
7780
7781 2001-12-01 Neil Jerram <neil@ossau.uklinux.net>
7782
7783 * gh_data.c (gh_module_lookup): Use scm_str2symbol rather than
7784 gh_symbol2scm.
7785
7786 2001-11-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
7787
7788 * gc.h (SCM_GC_CELL_WORD, SCM_GC_CELL_OBJECT,
7789 SCM_GC_SET_CELL_WORD, SCM_GC_SET_CELL_OBJECT): New macros.
7790
7791 (SCM_GC_CELL_TYPE, SCM_CELL_WORD, SCM_CELL_OBJECT,
7792 SCM_SET_CELL_WORD, SCM_SET_CELL_OBJECT, SCM_FREE_CELL_CDR,
7793 SCM_GC_SET_CELL_OBJECT): Express in terms of SCM_GC_CELL_*
7794 macros.
7795
7796 (SCM_FREE_CELL_P): Express in terms of SCM_GC_CELL_TYPE.
7797
7798 * inline.h (scm_alloc_cell, scm_alloc_double_cell): Use
7799 SCM_GC_CELL_* macros when accessing free cells.
7800
7801 2001-11-25 Marius Vollmer <mvo@zagadka.ping.de>
7802
7803 * vectors.h (SCM_MAKE_VECTOR_TAG): New.
7804 * unif.h (SCM_MAKE_BITVECTOR_TAG, SCM_MAKE_UVECTOR_TAG): New.
7805 * symbols.h (SCM_MAKE_SYMBOL_TAG): New.
7806 * strings.h (SCM_MAKE_STRING_TAG): New.
7807 * procs.h (SCM_MAKE_CCLO_TAG): New.
7808 * numbers.h (SCM_MAKE_BIGNUM_TAG): New.
7809
7810 * goops.h: Replaced SCM_DEBUG_DEPRECATED with
7811 !SCM_ENABLE_DEPRECATED.
7812
7813 * async.c, async.h (scm_system_async_mark_from_signal_handler):
7814 New.
7815
7816 * scmsigs.c (scm_take_signal): Removed all code that assumes that
7817 signal handlers are allowed to divert the flow of control. Call
7818 scm_system_async_mark_from_signal_handler instead of
7819 scm_system_async_mark.
7820
7821
7822 Deprecated SCM_NEWCELL and SCM_NEWCELL2. Added scm_alloc_cell and
7823 scm_alloc_double_cell in their place.
7824
7825 * gc.h (SCM_GC_SET_ALLOCATED, scm_debug_newcell,
7826 scm_debug_newcell2, scm_tc16_allocated): Removed from header.
7827 (scm_deprecated_newcell, scm_deprecated_newcell2): New.
7828 (SCM_NEWCELL, SCM_NEWCELL2): Implement in terms of
7829 scm_deprecated_newcell and scm_deprecated_newcell2.
7830
7831 gc.c (scm_tc16_allocated): Only define when including deprecated
7832 features.
7833 (scm_debug_newcell, scm_debug_newcell2): Removed.
7834 (scm_init_storage): Do not initialize scm_tc16_allocated.
7835 (scm_init_gc): Do it here.
7836 (allocated_mark): New, from old code.
7837 (scm_deprecated_newcell, scm_deprecated_newcell2): New.
7838
7839 * inline.c, inline.h: New files.
7840 * Makefile.am: Added them in all the right places.
7841
7842 * _scm.h: Include "libguile/inline.h".
7843
7844 * alist.c, coop-threads.c, debug.c, environments.c, eval.c,
7845 fports.c, gh_data.c, goops.c, guardians.c, lang.c, list.c,
7846 num2float.i.c, numbers.c, pairs.c, ports.c, print.c, procs.c,
7847 smob.c, smob.h, strings.c, strports.c, struct.c, symbols.c,
7848 unif.c, variable.c, vectors.c, vports.c, weaks.c: Replaced
7849 SCM_NEWCELL and SCM_NEWCELL2 with scm_alloc_cell and
7850 scm_alloc_double_cell, respectively.
7851
7852 2001-11-23 Marius Vollmer <mvo@zagadka.ping.de>
7853
7854 * modules.c (scm_c_use_module): Adapt to changes to
7855 `process-use-modules'.
7856
7857 2001-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
7858
7859 * numbers.c (scm_divide): Fix more division by zero errors.
7860
7861 2001-11-21 Gary Houston <ghouston@arglist.com>
7862
7863 * Makefile.am (OMIT_DEPENDENCIES): removed, since it seems to be
7864 obsolete. autogen.sh says:
7865 invalid unused variable name: `OMIT_DEPENDENCIES'
7866
7867 2001-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
7868
7869 * numbers.c (scm_divide): Fix (/ 0). Thanks to Keith Wright for
7870 reporting the bug.
7871
7872 2001-11-21 Marius Vollmer <mvo@zagadka.ping.de>
7873
7874 * Makefile.am (install-exec-hook): Prepend $(DESTDIR) to filename.
7875 Thanks to Eric Gillespie, Jr!
7876
7877 2001-11-21 Stefan Jahn <stefan@lkcc.org>
7878
7879 * win32-socket.c (getservent, setservent, endservent,
7880 getprotoent, setprotoent, endprotoent): New functions.
7881 Appropriate replacements for M$-Windows.
7882
7883 * numbers.c (SIZE_MAX, PTRDIFF_MAX, PTRDIFF_MIN): Reintroduced
7884 these definitions for GUILE_DEBUG.
7885
7886 * net_db.c: Include "win32-socket.h" if compiling with a native
7887 M$-Windows compiler. Include some pieces of code (protoent and
7888 servent interface) protected by HAVE_* macros when using a
7889 native M$-Windows compiler.
7890
7891 2001-11-20 Marius Vollmer <mvo@zagadka.ping.de>
7892
7893 * modules.c (scm_c_export): Do nothing when the first argument is
7894 already the terminating NULL. Thanks to Han-Wen Nienhuys!
7895
7896 2001-11-20 Thien-Thi Nguyen <ttn@glug.org>
7897
7898 * Makefile.am (libpath.h): In SCM_BUILD_INFO,
7899 also include `buildstamp'.
7900
7901 2001-11-18 Rob Browning <rlb@defaultvalue.org>
7902
7903 * version.c
7904 (s_scm_major_version): use SCM_MAJOR_VERSION.
7905 (s_scm_minor_version): use SCM_MINOR_VERSION.
7906 (s_scm_micro_version): use SCM_MICRO_VERSION.
7907 (s_scm_version): use SCM_MAJOR_VERSION, SCM_MINOR_VERSION, and
7908 SCM_MICRO_VERSION.
7909
7910 * version.h.in
7911 (SCM_MAJOR_VERSION): renamed from SCM_GUILE_MAJOR_VERSION.
7912 (SCM_MINOR_VERSION): renamed from SCM_GUILE_MINOR_VERSION.
7913 (SCM_MICRO_VERSION): renamed from SCM_GUILE_MICRO_VERSION.
7914
7915 2001-11-18 Neil Jerram <neil@ossau.uklinux.net>
7916
7917 * vectors.c (scm_vector_move_left_x, scm_vector_move_right_x):
7918 Rewrite docstrings without reference to substring-move-left/right,
7919 since the latter no longer exist.
7920
7921 2001-11-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
7922
7923 * eval.c: Removed bogus comment about acros.
7924
7925 (scm_unmemocar): Use !SCM_CONSP instead of SCM_IMP.
7926 Minimize scope of local variable. Eliminate dependency on
7927 macro DEBUG_EXTENSIONS.
7928
7929 (s_splicing): New error message string.
7930
7931 (scm_m_body): Issue 'bad body' message rather than 'missing
7932 expression' message.
7933
7934 (scm_m_quote): Eliminate unnecessary copying.
7935
7936 (scm_m_lambda, scm_m_letstar, scm_m_letrec, scm_m_let): Leave the
7937 checking of the body to scm_m_body.
7938
7939 (scm_m_do): Move comment to function header. Rename arg1 to
7940 binding. Made the code a bit easier to read.
7941
7942 (evalcar): Removed.
7943
7944 (iqq): Added a comment. Changed the depth parameter to
7945 unsigned. Use size_t for vector lengths. Make sure vector object
7946 is gc protected as long as its contents are read. Add some syntax
7947 checks. Get rid of unnecessary SCM_IMP test. Clean up the
7948 control structure a bit.
7949
7950 (scm_m_delay): Added comment about the implementation of
7951 scm_m_delay.
7952
7953 (scm_m_define): Add comment about guile's currying define
7954 syntax. Renamed 'proc' to 'name'. Eliminate dependency on macro
7955 DEBUG_EXTENSIONS. Simplified code a bit. Eliminate SICP code.
7956
7957 (scm_m_letrec1): Removed. Part of the functionality is taken
7958 over by the new function 'transform_bindings'.
7959
7960 (transform_bindings): New function. Takes over some of the
7961 functionality of removed function 'scm_m_letrec1', namely to split
7962 a list of bindings into a reversed list of variables and a list of
7963 initializers.
7964
7965 (scm_m_letrec): Call 'transform_bindings'.
7966
7967 (scm_m_let): Minimized scope of local variables. Renamed 'proc'
7968 to 'temp' and 'arg1' to 'binding'. Eliminated redundant SCM_NIMP
7969 test. Use 'transform_bindings'. Fixed scoping error with named
7970 let (Thanks to Aubrey Jaffer for reporting the bug and to Neil
7971 Jerram for suggesting the fix). Cleaned up the control structure
7972 a bit.
7973
7974 (scm_m_expand_body): Use 'transform_bindings'. Eliminated
7975 unnecessary consing. Eliminated unnecessary
7976 SCM_DEFER/ALLOW_INTS.
7977
7978 (SCM_CEVAL): Un-obfuscated some loops.
7979
7980 2001-11-16 Neil Jerram <neil@ossau.uklinux.net>
7981
7982 * gc.h (scm_unhash_name): Old declaration removed.
7983
7984 * eval.c (s_scm_eval): Change @var{primitive-eval} to
7985 @code{primitive-eval}.
7986
7987 * feature.c, vectors.c, net_db.c, unif.c, weaks.c, struct.c,
7988 version.c, alist.c, ports.c, ramap.c, unif.c, strings.c, list.c:
7989 Change @deffnx lines in docstrings to say {Scheme Procedure}
7990 rather than primitive or procedure.
7991
7992 * posix.c (scm_execl), filesys.c (scm_close), unif.c
7993 (scm_array_set_x, scm_array_contents, scm_uniform_array_read_x,
7994 scm_bit_set_star_x, scm_bit_invert_x), ramap.c (scm_array_fill_x,
7995 scm_array_for_each, scm_array_index_map_x), vectors.c (scm_vector,
7996 scm_make_vector, scm_vector_to_list, scm_vector_fill_x), strop.c
7997 (scm_string_split, scm_string_ci_to_symbol), strings.c
7998 (scm_string_p), sort.c (scm_merge), print.c (scm_newline),
7999 macros.c (scm_macro_type), alist.c (scm_acons, scm_assq):
8000 Docstring fixes and improvements reflecting edits that have been
8001 made in the reference manual source.
8002
8003 * objprop.c (scm_object_properties, scm_set_object_properties_x,
8004 scm_object_property, scm_set_object_property_x): Remove invalid
8005 @deffnx lines for corresponding procedure property primitives.
8006
8007 These changes add a @deffnx C function declaration and function
8008 index entries for each Guile primitive to the copy of the doc
8009 snarf output that is used for reference manual synchronization.
8010 Online help is unchanged.
8011
8012 * snarf.h (SCM_SNARF_DOCS): Output primitive's C function name.
8013 (SCM_DEFINE, SCM_DEFINE1, SCM_REGISTER_PROC): Supply to C function
8014 name to SCM_SNARF_DOCS.
8015
8016 * guile-snarf-docs-texi.in: Pass the shell script's arguments into
8017 snarf-check-and-output-texi.
8018
8019 * Makefile.am (guile-procedures.texi): New rule.
8020 (BUILT_SOURCES, guile.texi, guile-procedures.txt, CLEANFILES):
8021 Changed so that the last stage of doc snarfing is now performed
8022 twice, once to produce guile-procedures.txt for online help, and
8023 once to produce guile.texi for reference manual synchronization.
8024
8025 2001-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
8026
8027 * eval.c (RETURN): Wrap in do{}while(0) in order to make it
8028 safely usable as a single statement followed by a ';', for example
8029 in an if statement.
8030
8031 (SCM_CEVAL, SCM_APPLY): Clean up code using 'RETURN'.
8032
8033 2001-11-13 Neil Jerram <neil@ossau.uklinux.net>
8034
8035 * random.c (scm_random_solid_sphere_x,
8036 scm_random_hollow_sphere_x): Correct "shere" typos.
8037
8038 * hashtab.c (scm_hash_fold): Add missing apostrophe to docstring.
8039
8040 * version.c (scm_version): Update docstring to include
8041 `micro-version'.
8042
8043 2001-11-13 Marius Vollmer <mvo@zagadka.ping.de>
8044
8045 * modules.c (scm_c_export): Call va_end after collecting the
8046 symbols.
8047
8048 * strop.h, strop.c (scm_substring_move_left_x,
8049 scm_substring_move_right_x): Removed.
8050
8051 * __scm.h (HAVE_UINTPTR_T, HAVE_PTRDIFF_T, HAVE_LONG_LONG,
8052 HAVE_LONG_LONGS): Define to "1" when defining them, to mirror what
8053 configure does.
8054
8055 2001-11-12 Marius Vollmer <mvo@zagadka.ping.de>
8056
8057 * numbers.c: Document macros to define when including
8058 num2integral.i.c. MAX_VALUE and MIN_VALU are no longer used, we
8059 now rely on SIZEOF_ macros that have been figured out at
8060 configure time.
8061
8062 * num2integral.i.c: Adapt to new interface.
8063 (NUM2INTEGRAL): Test whether a fixnum can be represented in the
8064 target type by casting it and checking whether it is still the
8065 same. Do not try to handle bignums for integral types that are
8066 smaller than fixnums. When handling bignums, collect the
8067 magnituse first into a unsigned type, and correctly check for
8068 overflow.
8069 (INTEGRAL2BIG): Do not use MIN_VALUE explicitely by observing that
8070 only -MIN_VALUE can still be negative of all negative numbers (in
8071 twos-complement).
8072
8073 * tags.h (SIZEOF_SCM_T_BITS): Define it appropriately.
8074
8075 * __scm.h: Define HAVE_UINTPTR_T, HAVE_PTRDIFF_T and
8076 HAVE_LONG_LONG depending on whether their size is non-zero.
8077
8078 2001-11-11 Thien-Thi Nguyen <ttn@glug.org>
8079
8080 * strop.c (scm_string_null_p): Docfix; nfc.
8081 Thanks to Scott Lenser.
8082
8083 2001-11-07 Neil Jerram <neil@ossau.uklinux.net>
8084
8085 * extensions.c (scm_load_extension): Canonicalize docstring
8086 whitespace.
8087
8088 * unif.c (scm_uniform_array_write), ports.c
8089 (scm_current_output_port, scm_force_output), dynwind.c
8090 (scm_dynamic_wind), scmsigs.c (scm_setitimer, scm_getitimer),
8091 filesys.c (scm_open, scm_lstat), struct.c
8092 (scm_make_struct_layout), random.c (scm_random,
8093 scm_random_solid_sphere_x, scm_random_hollow_sphere_x, strop.c
8094 (scm_i_index): Remove superfluous whitespace from end of docstring
8095 lines.
8096
8097 * filesys.c (scm_select), guardians.c (scm_guardian_greedy_p),
8098 strings.c (scm_make_string), variable.c (scm_make_variable,
8099 scm_make_undefined_variable, scm_variable_p, scm_variable_set_x,
8100 scm_variable_bound_p), scmsigs.c (scm_setitimer, scm_getitimer),
8101 posix.c (scm_crypt), struct.c (scm_make_vtable_vtable), hashtab.c
8102 (scm_hash_fold), ports.c (scm_port_for_each): Remove superfluous
8103 newline at end of docstrings.
8104
8105 * modules.c (scm_set_current_module): Add missing newline to
8106 docstring.
8107
8108 2001-11-07 Stefan Jahn <stefan@lkcc.org>
8109
8110 * win32-socket.[ch]: New files. Defines Winsock-API error codes
8111 and makes them available through Guile. That is because the
8112 Winsock-API does not store its errors in `errno' and thus cannot
8113 return error messages via `strerror (errno)'.
8114
8115 * socket.c (scm_init_socket): Initialize `win32-socket' part
8116 here under M$-Windows.
8117
8118 * numbers.h: Added missing declaration of
8119 `scm_sys_check_number_conversions()'.
8120
8121 * error.c: Local definition of SCM_I_STRERROR and SCM_I_ERRNO
8122 and use in `(strerror)' and `(system-error)'.
8123
8124 * Makefile.am (EXTRA_libguile_la_SOURCES): Added
8125 `win32-socket.[ch]' to extra source and header files.
8126
8127 2001-11-06 Marius Vollmer <mvo@zagadka.ping.de>
8128
8129 * script.c (scm_shell_usage, scm_compile_shell_switches): Prepend
8130 a call to turn-on-debugging when --debug has been given instead of
8131 turning it on directly. Also, handle new `--no-debug' option,
8132 which might suppress the call to turn-on-debugging.
8133
8134 2001-11-05 Stefan Jahn <stefan@lkcc.org>
8135
8136 * struct.c (s_scm_struct_vtable_p): Corrected docstring.
8137
8138 2001-11-04 Stefan Jahn <stefan@lkcc.org>
8139
8140 * Makefile.am (libguile_la_LIBADD): Added $(THREAD_LIBS_LOCAL)
8141 here (was at guile_LDADD) which describes the dependency
8142 correctly and allows a clean build on Win32.
8143
8144 * __scm.h (SCM_API): Follow-up patch. Renamed __FOO__ macros
8145 into FOO.
8146
8147 * __scm.h: USE_DLL_IMPORT indicates the usage of the DLL
8148 import macros for external libraries (libcrypt, libqthreads,
8149 libreadline and libregex).
8150
8151 * coop-defs.h: Include <winsock2.h> for `struct timeval'.
8152
8153 * posix.c (flock): Added support for flock() in M$-Windows.
8154
8155 * guile.c (SCM_IMPORT): Follow-up patch. Use SCM_IMPORT instead
8156 of __SCM_IMPORT__.
8157
8158 * fports.c (getflags): Differentiate reading and writing pipes
8159 descriptors.
8160
8161 * filesys.c (S_IS*): Redefine all of the S_IS*() macros for
8162 M$-Windows.
8163
8164 * coop.c (coop_condition_variable_timed_wait_mutex): Use
8165 conditionalized error code if `ETIMEDOUT' is not available.
8166 (scm_thread_usleep): Remove bogus declaration of `struct timeval
8167 timeout'.
8168
8169 * numbers.c (PTRDIFF_MIN): Moved this definition where it actually
8170 belongs. That is because NO_PREPRO_MAGIC gets undefined after
8171 each inclusion of `num2integral.i.c'.
8172 (SIZE_MAX): Define NO_PREPRO_MAGIC if SIZE_MAX is undefined.
8173
8174 2001-11-03 Marius Vollmer <mvo@zagadka.ping.de>
8175
8176 * eval.c (scm_m_begin): Allow `(begin)`, with no subforms.
8177 (SCM_CEVAL): Evaluate an empty `begin' to SCM_UNSPECIFIED.
8178
8179 2001-11-02 Mikael Djurfeldt <mdj@linnaeus>
8180
8181 * print.c (scm_iprin1): Mark print state as revealed when
8182 dispatching to generic write or display.
8183
8184 * unif.c (scm_ra2contig): Fixed memory overwrite bug.
8185
8186 2001-11-02 Marius Vollmer <mvo@zagadka.ping.de>
8187
8188 Support for native Win32. Thanks to Stefan Jahn!
8189
8190 * Makefile.am: Add win32-uname.c, win32-uname.h, win32-dirent.c
8191 and win32-dirent.h to extra source and header files. These
8192 include the uname() and the POSIX dirent interface implementation
8193 for M$-Windows. Put `-no-undefined' into LDFLAGS to support
8194 linkers which do not allow unresolved symbols inside shared
8195 libraries. Corrected `guile_filter_doc_snarfage$(EXEEXT)'
8196 dependency.
8197
8198 * __scm.h: Defined SCM_API. This macro gets prepended to all
8199 function and data definitions which should be exported or imported
8200 in the resulting dynamic link library in the Win32 port.
8201
8202 * __scm.h, alist.h, arbiters.h, async.h, backtrace.h, boolean.h,
8203 chars.h, continuations.h, coop-defs.h, coop-threads.h,
8204 debug-malloc.h, debug.h, deprecation.h, dynl.h, dynwind.h,
8205 environments.h, eq.h, error.h, eval.h, evalext.h, extensions.h,
8206 feature.h, filesys.h, fluids.h, fports.h, gc.h, gdb_interface.h,
8207 gdbint.h, gh.h, goops.h, gsubr.h, guardians.h, hash.h, hashtab.h,
8208 hooks.h, init.h, ioext.h, iselect.h, keywords.h, lang.h, list.h,
8209 load.h, macros.h, mallocs.h, modules.h, net_db.h, numbers.h,
8210 objects.h, objprop.h, options.h, pairs.h, ports.h, posix.h, print.h,
8211 procprop.h, procs.h, properties.h, ramap.h, random.h, rdelim.h,
8212 read.h, regex-posix.h, root.h, rw.h, scmsigs.h, script.h, simpos.h,
8213 smob.h, socket.h, sort.h, srcprop.h, stackchk.h, stacks.h, stime.h,
8214 strings.h, strop.h, strorder.h, strports.h, struct.h, symbols.h,
8215 tags.h, threads.h, throw.h, unif.h, values.h, variable.h, vectors.h,
8216 vports.h, weaks.h:
8217 Prefixed each each exported symbol with SCM_API.
8218
8219 * continuations.c: Added comment about the use of the extern
8220 declarations of {get,set}context() functions used in the ia64 port.
8221
8222 * continuations.h, gc.c: `__libc_ia64_register_backing_store_base'
8223 is meant to be a `unsigned long *'.
8224
8225 * filesys.c: Include `direct.h' if possible. Use local
8226 `win32-dirent.h' for the native M$-Windows port. Define S_IS*()
8227 macros for M$-Windows. Implementation of `fstat_Win32()' which is
8228 able to differentiate between sockets and other file descriptors.
8229 Use this function as wrapper in `scm_fstat()'. Fixed typo in
8230 `scm_dirname()'.
8231
8232 * fports.c: Include `io.h' is possible. Put `*fp' into referring
8233 statement block in `scm_fport_buffer_add()'.
8234 Some corrections in `getflags()'.
8235
8236 * gdb_interface.h (GDB_INTERFACE): Also support __CYGWIN__.
8237
8238 * guile.c: Make sure to define __SCM_IMPORT__ for shared library
8239 build on Win32. Disable preloaded symbols on Win2 platforms.
8240
8241 * ioext.c, ports.c: Include `io.h' is possible.
8242
8243 * mkstemp.c: Include `process.h' is possible.
8244
8245 * net_db.c: Disable extern declaration of `h_errno' for __CYGWIN__,
8246 too.
8247 Put `scm_return_entry()' into HAVE_GETSERVENT conditional.
8248
8249 * posix.c: Remove unnecessary dirent includes and defines. Include
8250 local `win32-uname.h' for MinGW. Extern declaration of
8251 `mkstemp()' for systems where it does not exists. Make
8252 `getlogin()' available on M$-Windows.
8253
8254 * scmsigs.c: Made `usleep()' avalable on MinGW.
8255
8256 * stime.c: On M$-Windows `tzname[]' is known to be `_tzname[]'.
8257
8258 * win32-dirent.c: Include "win32-dirent.h", not "dirent.h".
8259
8260 * win32-uname.c: Include "win32-uname.h", not "uname.h".
8261
8262 2001-10-28 Mikael Djurfeldt <mdj@linnaeus>
8263
8264 * unif.c (scm_uniform_array_read_x, scm_uniform_array_write):
8265 Don't apply scm_uniform_vector_length on arrays.
8266
8267 2001-10-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
8268
8269 * eval.c (scm_lookupcar, scm_m_letstar, scm_m_do, iqq,
8270 scm_m_define, scm_m_letrec1, scm_m_let, scm_m_expand_body,
8271 scm_macroexp, unmemocopy, scm_eval_args, scm_deval_args,
8272 SCM_CEVAL, scm_map, scm_init_eval): When building lists, prefer
8273 scm_list_<n> over scm_cons[2]?.
8274
8275 (scm_unmemocar, scm_m_cond, scm_m_letstar, scm_m_letrec1,
8276 scm_m_let, scm_m_atbind, unmemocopy, SCM_CEVAL, SCM_APPLY): Use
8277 SCM_C[AD][AD]R instead of explicit form.
8278
8279 (scm_m_set_x, scm_m_cond, scm_m_letstar, scm_m_do): Reordered
8280 comparison parameters.
8281
8282 (scm_m_case, scm_m_cond, scm_m_letstar, scm_m_do, SCM_CEVAL): Use
8283 !SCM_NULLP instead of SCM_NIMP.
8284
8285 (scm_m_case): Don't copy the form. Renamed proc to clause and
8286 minimized its scope. Renamed x to clauses. Removed side
8287 effecting operation from macro call.
8288
8289 (scm_m_cond): Don't copy the form. Renamed arg1 to clause and
8290 minimized its scope. Renamed x to clauses. Minimized the scope
8291 of variable 'len'. Make sure the else clause is treated specially
8292 even in case of '=>' occurences. Don't change the else to #t in
8293 order to be able to distinguish this case in the evaluator. Leave
8294 type checking of the recipient to the evaluator.
8295
8296 (scm_c_improper_memq): Made the comment somewhat clearer.
8297
8298 (scm_m_lambda): Renamed proc to formals. Removed unnecessary
8299 test for SCM_IM_LET at the place of the formal parameters.
8300 Simplified the formal parameter checking.
8301
8302 (scm_m_letstar): Added Comment. Renamed proc to bindings.
8303 Renamed arg1 to binding and minimized its scope. Eliminated
8304 unnecessary consing.
8305
8306 (scm_m_do): Renamed proc to bindings. Minimized the scope of
8307 variable 'len'.
8308
8309 (build_binding_list): New static function.
8310
8311 (unmemocopy): Don't use SCM_TYP7 on pairs (it's unclean).
8312 Further, split up the 'letrec' unmemoizing code to the
8313 corresponding parts for 'do', 'let' and 'letrec', adding comments
8314 to each form. Cleanup the handling of the do form (This removes
8315 some *real* code :-).
8316
8317 (SCM_CEVAL): Removed side effecting operation from macro call.
8318 Handle the 'else clause of the 'cond form specially - the symbol
8319 'else is not replaced with #t any more.
8320
8321 2001-10-14 Gary Houston <ghouston@arglist.com>
8322
8323 * version.c (scm_version): use sprintf instead of snprintf,
8324 for portability. thanks to Bill Schottstaedt.
8325
8326 2001-10-14 Mikael Djurfeldt <mdj@linnaeus>
8327
8328 * read.c (scm_lreadr): When user-defined hash procedure returns
8329 SCM_UNSPECIFIED: Fall back to standard handling instead of raising
8330 an exception. (This prevents parsing of uniform vectors from
8331 interfering with parsing of numbers.)
8332
8333 2001-10-13 Marius Vollmer <mvo@zagadka.ping.de>
8334
8335 * numbers.c: Set NO_PREPRO_MAGIC when defining our version of
8336 PTRDIFF_MIN. Thanks to Ken Raeburn.
8337
8338 2001-10-07 Marius Vollmer <mvo@zagadka.ping.de>
8339
8340 * Makefile.am (EXTRA_libguile_la_SOURCES): Added "mkstemp.c".
8341
8342 * eval.c (scm_m_atbind): First try to find the variable without
8343 defining it locally; when it has not been found, define it
8344 locally.
8345
8346 * modules.c (module_variable): Pass over variables that exist but
8347 are unbound.
8348
8349 2001-10-06 Marius Vollmer <mvo@zagadka.ping.de>
8350
8351 * backtrace.c (display_backtrace_file_and_line): Only use
8352 scm_basename when POSIX support is compiled in. Thanks to Chris
8353 Cramer.
8354
8355 2001-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
8356
8357 * numbers.c (mem2uinteger): Return number read so far when coming
8358 across a hexdigit after having read a # or if not reading a hex
8359 value. This will enable the calling code to correctly handle
8360 forms like 1e2. (The background is, that the exponent markers d,
8361 e and f are also hexdigits.) Thanks to Mikael Djurfeldt for
8362 providing this patch.
8363
8364 (mem2complex): Fix erroneous double-negation. Now, numbers like
8365 1-i will be read correctly.
8366
8367 2001-10-12 Mikael Djurfeldt <mdj@linnaeus>
8368
8369 * debug.c (scm_mem_to_proc): Fixed typo in previous change.
8370
8371 * validate.h (SCM_VALIDATE_DOUBLE_DEF_COPY): New macro.
8372
8373 2001-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
8374
8375 * print.c (scm_print_state_vtable, print_state_pool):
8376 Initialize. These variables are now registered as gc roots.
8377
8378 (scm_current_pstate): Update documentation.
8379
8380 (scm_current_pstate, scm_make_print_state, scm_free_print_state,
8381 scm_prin1, scm_init_print): print_state_pool is registered as a
8382 gc root and thus does not need to be protected by a surrounding
8383 pair any more.
8384
8385 (make_print_state): The car of print_state_pool no longer holds
8386 the scm_print_state_vtable.
8387
8388 (scm_current_pstate, scm_make_print_state, print_circref,
8389 scm_iprin1, scm_prin1, scm_iprlist): Prefer !SCM_<foo> over
8390 SCM_N<foo>.
8391
8392 (scm_prin1): When building lists, prefer scm_list_<n> over
8393 scm_cons[2]?.
8394
8395 (scm_iprlist): Removed a redundant SCM_IMP test.
8396
8397 (scm_simple_format): Use SCM_EQ_P to compare SCM values.
8398
8399 2001-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
8400
8401 * debug.c (scm_make_iloc): Prefer !SCM_<foo> over SCM_N<foo>.
8402
8403 (scm_memcons, scm_mem_to_proc): When building lists, prefer
8404 scm_list_<n> over scm_cons[2]?.
8405
8406 (scm_mem_to_proc): Prefer SCM_CONSP over SCM_NIMP.
8407
8408 (scm_procedure_name): Use SCM_CADR instead of explicit form.
8409
8410 (debugobj_print): Coerce scm_intprint arg 1 to long, not int.
8411 Thanks to Rob Browning for the patch (see log entry 2001-09-21) -
8412 for some reason his patch didn't make it into the cvs.
8413
8414 2001-10-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
8415
8416 * numbers.c (mem2decimal_from_point): Cleaned up the parsing a
8417 little bit - should even be somewhat more accurate now.
8418
8419 2001-10-08 Rob Browning <rlb@defaultvalue.org>
8420
8421 * gc.c: support ia64 register backing store.
8422 (SCM_MARK_BACKING_STORE): new macro.
8423
8424 * continuations.h: support ia64 register backing store.
8425 (struct scm_t_contregs): add ia64 register backing store.
8426
8427 * continuations.c: support ia64 register backing store.
8428 (continuation_mark): mark ia64 register backing store.
8429 (continuation_free): free ia64 register backing store.
8430 (scm_make_continuation): capture ia64 register backing store.
8431 (copy_stack_and_call): copy ia64 register backing store.
8432
8433 2001-10-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
8434
8435 * hashtab.c (scm_hash_fn_create_handle_x): The result of assoc_fn
8436 is known to be #f if no entry is found. Thus, use !SCM_FALSEP
8437 instead of SCM_NIMP to test for that case.
8438
8439 * strings.h (SCM_SET_STRING_LENGTH): Cast the length to
8440 scm_t_bits instead of long.
8441
8442 2001-10-06 Marius Vollmer <mvo@zagadka.ping.de>
8443
8444 * tags.h (SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
8445 SCM_T_SIGNED_BITS_MIN): New.
8446 * numbers.h (SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM):
8447 Use them to make these macros computable by the preprocessor.
8448
8449 * num2integral.i.c (INTEGRAL2NUM): Let the preprocessor test
8450 whether the integral type fits in a fixnum, not the compiler.
8451 This removes a spurious compiler warning. Also, honor the
8452 NO_PREPRO_MAGIC flag to suppress any preprocessor tests. This is
8453 needed for `long long's.
8454
8455 * numbers.c: Define NO_PREPRO_MAGOC when including
8456 num2integral.c.i for `long long' and `signed long long'.
8457
8458 2001-10-06 Mikael Djurfeldt <mdj@linnaeus>
8459
8460 These changes fixes a race condition in the Guile coop - pthread
8461 compatibility code.
8462
8463 * coop.c (mother_awake_p): New variable.
8464 (coop_create): Set mother_awake_p before creating or signalling
8465 mother; wait until mother is going to sleep before returning.
8466 (mother): Reset mother_awake_p before going to sleep.
8467
8468 2001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
8469
8470 * options.c (protected_objects, scm_init_options): The content of
8471 protected_objects is now protected from garbage collection using
8472 scm_gc_register_root instead of scm_permanent_object.
8473
8474 (get_option_setting): New static function that computes an option
8475 setting as it was formerly done in the function scm_options.
8476
8477 (get_documented_option_setting): New static function that
8478 returns option documentation as it was formerly done in the
8479 function scm_options. Note that documentation C strings are no
8480 longer precomputed into SCM objects. Instead, they are converted
8481 into SCM strings every time get_documented_option_setting is
8482 called.
8483
8484 (change_option_setting): New static functions that modifies the
8485 option setting as it was formerly done in the function
8486 scm_options. The function is now exception safe, i. e. won't
8487 cause a memory leak when interrupted. Further, only non-immediate
8488 option values are added to the protection list.
8489
8490 (scm_options): This function now has only the purpose to dispatch
8491 to to get_option_setting, get_documented_option_setting or
8492 change_option_setting, depending on the arguments given to
8493 scm_options.
8494
8495 (scm_init_opts): Don't convert documentation C strings into SCM
8496 strings. Further, don't protect any object values: They _must_
8497 be immediate values, otherwise there is no guarantee that they
8498 have not been collected before anyway.
8499
8500 * options.[ch] (scm_t_option): Made type unsigned, name into a
8501 constant char* and val into a scm_t_bits type.
8502
8503 (scm_options, scm_init_opts): The number of options is guaranteed
8504 to be larger or equal to zero. Thus, the type is changed to
8505 unsigned.
8506
8507 2001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
8508
8509 * num2integral.i.c (NUM2INTEGRAL): Eliminated some warnings about
8510 testing an unsigned value for being >= 0.
8511
8512 2001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
8513
8514 * numbers.h: Removed old comment about using SCM_CAR to access
8515 non-pair cells.
8516
8517 (SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM): Make sure
8518 the return value is signed. Thanks to Brian Crowder for the bug
8519 report.
8520
8521 (SCM_SRS): Avoid unnecessary casting and don't unpack input
8522 values. With this patch, SCM_SRS can be safely used for other
8523 types than scm_t_signed_bits. However, it should still better be
8524 an internal macro and thus be renamed to SCM_I_SRS.
8525
8526 (SCM_MAKINUM, SCM_INUM): Use proper casting.
8527
8528 2001-10-03 Gary Houston <ghouston@arglist.com>
8529
8530 * continuations.h, unif.h: in the descriptions of the bit patterns
8531 of the heap cells, make bit 0 the least significant.
8532
8533 2001-09-25 Thien-Thi Nguyen <ttn@glug.org>
8534
8535 * chars.h (SCM_MAKE_CHAR): Use `scm_t_bits' instead of `intptr_t'.
8536 Thanks to Golubev I. N.
8537
8538 2001-09-25 Gary Houston <ghouston@arglist.com>
8539
8540 * ports.c (scm_drain_input): extended the docstring. thanks to
8541 Alex Schroeder and Thien-Thi Nguyen.
8542
8543 2001-09-23 Mikael Djurfeldt <mdj@linnaeus>
8544
8545 * validate.h (SCM_NUM2FLOAT, SCM_NUM2DOUBLE,
8546 SCM_VALIDATE_FLOAT_COPY, SCM_VALIDATE_DOUBLE_COPY): New
8547 macros. (The NUM names might soon change.)
8548
8549 * numbers.h: Added missing declarations.
8550
8551 2001-09-22 Mikael Djurfeldt <mdj@linnaeus>
8552
8553 * Makefile.am: Distribute num2float.i.c.
8554
8555 * num2float.i.c: New file, multiply included by numbers.c, used
8556 to "templatize" the float <-> num conversion routines.
8557
8558 * numbers.c: New functions: scm_num2float, scm_float2num,
8559 scm_num2double, scm_double2num.
8560
8561 2001-09-21 Rob Browning <rlb@defaultvalue.org>
8562
8563 * .cvsignore: really add version.h
8564
8565 * strings.h (SCM_SET_STRING_LENGTH): coerce "l" to a long.
8566 Otherwise it fails on the alpha. However, we might rather choose
8567 this size conditionally.
8568
8569 * numbers.c (scm_gcd): change "k" to a long from an int.
8570 Otherwise it fails on the alpha. However, we might rather choose
8571 this size conditionally.
8572
8573 * error.c (scm_wta): coerce char* to intptr_t before int
8574 assignment.
8575
8576 * debug.c (debugobj_print): coerce scm_intprint arg 1 to long, not
8577 int.
8578
8579 * chars.h (SCM_MAKE_CHAR): coerce value to intptr_t.
8580
8581 2001-09-20 Mikael Djurfeldt <mdj@linnaeus>
8582
8583 * numbers.c (scm_integer_expt): Accept inexact integer in second
8584 argument. (Thanks to Bill Schottstaedt.)
8585
8586 2001-09-20 Rob Browning <rlb@defaultvalue.org>
8587
8588 * .cvsignore: add version.h
8589
8590 * versiondat.h.in: removed (obsolete).
8591
8592 * version.h.in: renamed from version.h.
8593 (SCM_GUILE_MAJOR_VERSION): new public macro.
8594 (SCM_GUILE_MINOR_VERSION): new public macro.
8595 (SCM_GUILE_MICRO_VERSION): new public macro.
8596
8597 * version.h: renamed to version.h.in.
8598
8599 * version.c
8600 (scm_major_version): support integer *_VERSION macros.
8601 (scm_minor_version): support integer *_VERSION macros.
8602 (scm_micro_version): support integer *_VERSION macros.
8603 (scm_version): support integer *_VERSION macros.
8604
8605 2001-09-20 Mikael Djurfeldt <mdj@linnaeus>
8606
8607 * error.c, error.h: Made error keys globally accessible.
8608 Applications might want to test for these or use them in a direct
8609 call to scm_error.
8610
8611 * num2integral.i.c (NUM2INTEGRAL): Report an error when these
8612 routines are passed an inexact. This change in behavior is
8613 motivated by concordance with R5RS: It is more common that a
8614 primitive doesn't want to accept an inexact for an exact.
8615
8616 2001-09-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
8617
8618 The following patch partially undoes my patch from 2001-06-30,
8619 where I added the function scm_gc_mark_cell_conservatively. The
8620 function is buggy, since it breaks guile during conservative
8621 marking if a pointer on the stack points directly into the list of
8622 free cells on the heap: With conservative cell marking this will
8623 cause the whole free list to be scanned and marked - boom!
8624
8625 * gc.c (allocated_mark, MARK, heap_segment,
8626 scm_gc_mark_cell_conservatively, scm_init_storage), gc.h
8627 (scm_gc_mark_cell_conservatively): Remove function
8628 scm_gc_mark_cell_conservatively and update the corresponding
8629 comments and uses accordingly. Thanks to Christopher Cramer for
8630 the patch. (Minor corrections by me.)
8631
8632 2001-09-15 Gary Houston <ghouston@arglist.com>
8633
8634 * root.h (scm_root_state): removed the continuation_stack and
8635 continuation_stack_ptr members, which have no apparent purpose.
8636 (scm_continuation_stack, scm_continuation_stack_ptr): #defines
8637 removed.
8638
8639 * root.c (root_mark), init.c (restart_stack, start_stack), gc
8640 (scm_igc): remove all references to contination_stack and
8641 continuation_stack_ptr, avoiding allocation of a vector and
8642 useless processing during gc.
8643
8644 2001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
8645
8646 * guardians.c (tconc_t, t_tconc): Renamed tconc_t to t_tconc.
8647
8648 (TCONC_IN): Make sure that the cell word 0 is initialized last.
8649
8650 (guardians_t, t_guardians): Renamed guardians_t to t_guardians.
8651
8652 (GUARDIAN, GUARDIAN_DATA): Renamed GUARDIAN to GUARDIAN_DATA.
8653
8654 (guardian_apply, scm_get_one_zombie, scm_make_guardian,
8655 mark_and_zombify): Prefer !SCM_<foo> over SCM_N<foo>.
8656
8657 2001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
8658
8659 * guardians.c (mark_dependencies_in_tconc,
8660 whine_about_self_centered_zombies, scm_init_guardians): Register
8661 the static global variable `self_centered_zombies' via
8662 scm_gc_register_root, to make some cdr-ing unnecessary.
8663
8664 2001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
8665
8666 * backtrace.c (display_backtrace_file,
8667 display_backtrace_file_and_line): Use SCM_EQ_P when comparing SCM
8668 values, use SCM_FALSEP when comparing SCM values against #f.
8669 Thanks to Rob Browning for the bug report.
8670
8671 2001-09-12 Martin Baulig <martin@home-of-linux.org>
8672
8673 * strings.[ch] (scm_str2string): New function.
8674
8675 2001-09-06 Marius Vollmer <mvo@zagadka.ping.de>
8676
8677 * gc.c (scm_done_free): Always subtract size from scm_mallocated
8678 when computing nm, even if it's negative.
8679 (scm_must_malloc): Abort on overflow of scm_mtrigger.
8680 (scm_must_realloc): Likewise.
8681
8682 2001-09-01 Michael Livshin <mlivshin@bigfoot.com>
8683
8684 * numbers.c (scm_sys_check_number_conversions): new function,
8685 defined if Guile is compiled in debugging mode. currently checks
8686 `scm_num2ulong', should check much much more.
8687
8688 * num2integral.i.c (NUM2INTEGRAL): when converting a bignum to
8689 unsigned, ensure that it's positive. thanks to Martin Baulig!
8690
8691 2001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
8692
8693 * __scm.h: Added new section about compile time selectable
8694 features.
8695
8696 (long_long, ulong_long, scm_sizet, SCM_WNA, SCM_OUTOFRANGE,
8697 SCM_NALLOC, SCM_HUP_SIGNAL, SCM_INT_SIGNAL, SCM_FPE_SIGNAL,
8698 SCM_BUS_SIGNAL, SCM_SEGV_SIGNAL, SCM_ALRM_SIGNAL, SCM_GC_SIGNAL,
8699 SCM_TICK_SIGNAL, SCM_SIG_ORD, SCM_ORD_SIG, SCM_NUM_SIGS):
8700 Removed.
8701
8702 * deprecation.c (scm_include_deprecated_features): Simplified.
8703
8704 * eval.c (EVALCAR, unmemocopy), eval.h (SCM_XEVALCAR): Use
8705 `SCM_IMP´ instead of `!SCM_CELLP´.
8706
8707 * eval.c (unmemocopy): Eliminate redundant SCM_CELLP tests.
8708 Extract side-effecting operations from macros.
8709
8710 (scm_init_eval): Don't initialize *top-level-lookup-closure*,
8711 scm_top_level_lookup_closure_var and scm_system_transformer.
8712
8713 * gc.c (CELL_P): New local definition to replace SCM_CELLP.
8714
8715 (heap_segment): Use CELL_P instead of SCM_CELLP.
8716
8717 * init.c (start_stack): Don't initialize
8718 scm_top_level_lookup_closure_var and scm_system_transformer.
8719
8720 * modules.c (scm_set_current_module): Don't access
8721 scm_top_level_lookup_closure_var and scm_system_transformer.
8722
8723 (scm_sym2var): Don't call scm_variable_set_name_hint.
8724
8725 (scm_post_boot_init_modules): Removed deprecated initializations.
8726
8727 * print.c (scm_ipruk): Don't access cell contents of non cells.
8728
8729 * strings.c (scm_string_set_x): All strings are writable.
8730
8731 * strings.h (SCM_STRINGP): Use SCM_TYP7 to determine the string
8732 type. There is only one string type now.
8733
8734 (SCM_STRING_COERCE_0TERMINATION_X): Deprecated.
8735
8736 * tags.h: Remove comments about two different string types.
8737
8738 (SCM_CELLP, SCM_NCELLP): Deprecated.
8739
8740 * variable.c (make_variable): Remove code variant for vcells.
8741
8742 * variable.h (SCM_VARIABLE_REF, SCM_VARIABLE_SET,
8743 SCM_VARIABLE_LOC): Remove code variant for vcells.
8744
8745 * __scm.h, deprecation.[ch]: Renamed SCM_DEBUG_DEPRECATED to
8746 SCM_ENABLE_DEPRECATED with the logic reversed.
8747
8748 * dynl.c (moddata, registered_mods), dynl.[ch]
8749 (scm_register_module_xxx, scm_registered_modules,
8750 scm_clear_registered_modules), error.[ch] (scm_wta), eval.c
8751 (*top-level-lookup-closure*), eval.[ch]
8752 (scm_top_level_lookup_closure_var, scm_system_transformer,
8753 scm_eval_3, scm_eval2), gc.h (SCM_SETAND_CAR, SCM_SETOR_CAR,
8754 SCM_SETAND_CDR, SCM_SETOR_CDR, SCM_FREEP, SCM_NFREEP,
8755 SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16,
8756 SCM_GCCDR), gc.[ch] (scm_remember, scm_protect_object,
8757 scm_unprotect_object), modules.c (root_module_lookup_closure,
8758 scm_sym_app, scm_sym_modules, module_prefix, make_modules_in_var,
8759 beautify_user_module_x_var, try_module_autoload_var,
8760 scm_module_full_name), modules.[ch] (scm_the_root_module,
8761 scm_make_module, scm_ensure_user_module, scm_load_scheme_module),
8762 ports.h (scm_port, scm_ptob_descriptor, scm_port_rw_active),
8763 ports.[ch] (scm_close_all_ports_except), random.h (scm_rstate,
8764 scm_rng, scm_i_rstate), strings.h (SCM_SLOPPY_STRINGP,
8765 SCM_RWSTRINGP, SCM_STRING_UCHARS, SCM_STRING_CHARS), strings.[ch]
8766 (scm_read_only_string_p, scm_makstr, scm_makfromstr,
8767 scm_make_shared_substring), tags.h (scm_tc7_substring,
8768 SCM_SLOPPY_CONSP, SCM_SLOPPY_NCONSP, scm_tc7_ssymbol,
8769 scm_tc7_msymbol, scm_tcs_symbols), variable.c (sym_huh),
8770 variable.[ch] (scm_variable_set_name_hint, scm_builtin_variable),
8771 variable.h (SCM_VARVCELL, SCM_UDVARIABLEP, SCM_DEFVARIABLEP):
8772 Removed.
8773
8774 * dynl.c (scm_dynamic_link, scm_dynamic_func), error.c
8775 (scm_error_scm), filesys.c (scm_chown, scm_chmod, scm_open_fdes,
8776 scm_stat, scm_link, scm_rename, scm_delete_file, scm_mkdir,
8777 scm_rmdir, scm_opendir, scm_chdir, scm_symlink, scm_readlink,
8778 scm_lstat, scm_copy_file), fports.c (scm_open_file), ioext.c
8779 (scm_fdopen), net_db.c (scm_gethost, scm_getnet, scm_getproto,
8780 scm_getserv), ports.c (scm_truncate_file, scm_sys_make_void_port),
8781 posix.c (scm_getpwuid, scm_getgrgid, scm_execl, scm_execlp,
8782 scm_execle, scm_mkstemp, scm_utime, scm_access, scm_setlocale,
8783 scm_mknod, scm_crypt, scm_chroot, scm_getpass, scm_sethostname),
8784 regex-posix.c (scm_make_regexp, scm_regexp_exec), simpos.c
8785 (scm_system, scm_getenv), socket.c (scm_inet_aton), stime.c
8786 (setzone, scm_strftime, scm_strptime), vports.c
8787 (scm_make_soft_port): Remove calls to
8788 SCM_STRING_COERCE_0TERMINATION_X. Since the substring type is
8789 gone, all strings are 0-terminated anyway.
8790
8791 * dynl.h (LIBGUILE_DYNL_H, SCM_DYNL_H), random.h (RANDOMH,
8792 SCM_RANDOM_H): Renamed the macros that are defined to inhibit
8793 double inclusion of the same headers to the SCM_<filename>_H
8794 format.
8795
8796 * eval.c (SCM_CEVAL), gc.c (MARK, scm_gc_sweep), gh_data.c
8797 (gh_scm2chars), hash.c (scm_hasher), objects.c (scm_class_of),
8798 print.c (scm_iprin1): The type scm_tc7_substring does not exist
8799 any more.
8800
8801 * ports.h (SCM_PORTP, SCM_OPPORTP, SCM_OPINPORTP, SCM_OPOUTPORTP,
8802 SCM_INPUT_PORT_P, SCM_OUTPUT_PORT_P, SCM_OPENP), tags.h
8803 (SCM_TYP16_PREDICATE), variable.h (SCM_VARIABLEP): Prefer
8804 !SCM_<foo> over SCM_N<foo>.
8805
8806 2001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
8807
8808 * Makefile.am: Remove references to symbols-deprecated.c.
8809
8810 * symbols.c (scm_init_symbols): Don't initialize deprecated
8811 symbol functions.
8812
8813 * symbols-deprecated.c: Removed.
8814
8815 * fluids.[ch] (scm_internal_with_fluids), gsubr.[ch]
8816 (scm_make_gsubr, scm_make_gsubr_with_generic), hooks.[ch]
8817 (scm_create_hook), list.c (list*), list.h (SCM_LIST[0-9],
8818 scm_listify), list.[ch] (scm_sloppy_memq, scm_sloppy_memv,
8819 scm_sloppy_member), load.c (scm_end_of_file_key), load.[ch]
8820 (scm_read_and_eval_x), numbers.[ch] (scm_mkbig, scm_big2inum,
8821 scm_adjbig, scm_normbig, scm_copybig, scm_2ulong2big, scm_dbl2big,
8822 scm_big2dbl), numbers.h (SCM_FIXNUM_BIT), procs.h
8823 (scm_subr_entry, SCM_SUBR_DOC), procs.[ch] (scm_make_subr_opt,
8824 scm_make_subr, scm_make_subr_with_generic), root.c (setjmp_type,
8825 setjmp_type), root.[ch] (scm_call_catching_errors), smob.[ch]
8826 (scm_make_smob_type_mfpe, scm_set_smob_mfpe), strports.[ch]
8827 (scm_strprint_obj, scm_read_0str, scm_eval_0str), symbols.h
8828 (SCM_CHARS, SCM_UCHARS, SCM_SETCHARS, SCM_SLOPPY_SUBSTRP,
8829 SCM_SUBSTR_STR, SCM_SUBSTR_OFFSET, SCM_LENGTH_MAX, SCM_LENGTH,
8830 SCM_SETLENGTH, SCM_ROSTRINGP, SCM_ROLENGTH, SCM_ROCHARS,
8831 SCM_ROUCHARS, SCM_SUBSTRP, SCM_COERCE_SUBSTR, scm_strhash,
8832 scm_sym2vcell, scm_sym2ovcell_soft, scm_sym2ovcell,
8833 scm_intern_obarray_soft, scm_intern_obarray, scm_intern,
8834 scm_intern0, scm_sysintern, scm_sysintern0,
8835 scm_sysintern0_no_module_lookup, scm_symbol_value0,
8836 scm_string_to_obarray_symbol, scm_intern_symbol,
8837 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned_p,
8838 scm_symbol_bound_p, scm_symbol_set_x, scm_gentemp,
8839 scm_init_symbols_deprecated), vectors.c (s_vector_set_length_x),
8840 vectors.[ch] (scm_vector_set_length_x): Removed.
8841
8842 * fluids.h (FLUIDSH, SCM_FLUIDS_H), gsubr.c (GSUBRH, SCM_GSUBR_H),
8843 list.h (LISTH, SCM_LIST_H), load.h (LOADH, SCM_LOAD_H), root.h
8844 (ROOTH, SCM_ROOT_H), strports.h (STRPORTSH, SCM_STRPORTS_H):
8845 Renamed the macros that are defined to inhibit double inclusion of
8846 the same headers to the SCM_<filename>_H format.
8847
8848 * procs.h (SCM_CLOSUREP, SCM_PROCEDURE_WITH_SETTER_P), symbols.h
8849 (SCM_SYMBOLP), vectors.h (SCM_VECTORP): Prefer !SCM_<foo> over
8850 SCM_N<foo>.
8851
8852 2001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
8853
8854 * continuations.h (scm_contregs), debug.h (scm_debug_info,
8855 scm_debug_frame, SCM_DSIDEVAL), filesys.h (SCM_OPDIRP), fports.h
8856 (scm_fport), options.h (scm_option), snarf.h (SCM_CONST_LONG,
8857 SCM_VCELL, SCM_GLOBAL_VCELL, SCM_VCELL_INIT,
8858 SCM_GLOBAL_VCELL_INIT), srcprop.h (scm_srcprops,
8859 scm_srcprops_chunk), stacks.h (scm_info_frame, scm_stack), unif.h
8860 (scm_array, scm_array_dim, SCM_ARRAY_CONTIGUOUS, SCM_HUGE_LENGTH),
8861 validate.h (SCM_FUNC_NAME, SCM_WTA, RETURN_SCM_WTA,
8862 SCM_VALIDATE_NUMBER_COPY, SCM_VALIDATE_NUMBER_DEF_COPY,
8863 SCM_VALIDATE_STRINGORSUBSTR, SCM_VALIDATE_ROSTRING,
8864 SCM_VALIDATE_ROSTRING_COPY, SCM_VALIDATE_NULLORROSTRING_COPY,
8865 SCM_VALIDATE_RWSTRING, SCM_VALIDATE_OPDIR): Removed.
8866
8867 * continuations.h (CONTINUATIONSH, SCM_CONTINUATIONS_H), filesys.h
8868 (FILESYSH, SCM_FILESYS_H), fports.h (FPORTSH, SCM_FPORTS_H),
8869 options.h (OPTIONSH, SCM_OPTIONS_H), regex-posix.h (REGEXPOSIXH,
8870 SCM_REGEX_POSIX_H), snarf.h (LIBGUILE_SNARF_H, SCM_SNARF_H),
8871 srcprop.h (SCM_SOURCE_PROPERTIES_H, SCM_SRCPROP_H), unif.h
8872 (SCM_UNIFORM_VECTORS_H, SCM_UNIF_H), validate.h (SCM_VALIDATE_H__,
8873 SCM_VALIDATE_H): Renamed the macros that are defined to inhibit
8874 double inclusion of the same headers to the SCM_<filename>_H
8875 format.
8876
8877 * debug.h (SCM_RESET_DEBUG_MODE), regex-posix.h (SCM_RGXP),
8878 srcprop.h (SRCBRKP, PROCTRACEP), struct.h (SCM_STRUCTP),
8879 validate.h (SCM_VALIDATE_THUNK, SCM_VALIDATE_ARRAY,
8880 SCM_VALIDATE_VECTOR_OR_DVECTOR, SCM_VALIDATE_VTABLE): Prefer
8881 !SCM_<foo> over SCM_N<foo>.
8882
8883 2001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
8884
8885 * _scm.h (_SCMH, SCM__SCM_H), alist.h (ALISTH, SCM_ALIST_H),
8886 arbiters.h (ARBITERSH, SCM_ARBITERS_H), backtrace.h (BACKTRACEH,
8887 SCM_BACKTRACE_H), boolean.h (BOOLEANH, SCM_BOOLEAN_H), chars.h
8888 (SCM_CHARSH, SCM_CHARS_H), coop-defs.h (COOP_DEFSH,
8889 SCM_COOP_DEFS_H), coop-threads.h (COOP_THREADSH,
8890 SCM_COOP_THREADS_H), debug-malloc.h (DEBUGMALLOCH,
8891 SCM_DEBUG_MALLOC_H), dynwind.h (DYNWINDH, SCM_DYNWIND_H),
8892 environments.h (ENVIRONMENTS_H, SCM_ENVIRONMENTS_H), eq.h (EQH,
8893 SCM_EQ_H), evalext.h (EVALEXTH, SCM_EVALEXT_H), extensions.h
8894 (LIBGUILE_EXTENSIONS_H, SCM_EXTENSIONS_H), feature.h (FEATUREH,
8895 SCM_FEATURE_H), gdbint.h (GDBINTH, SCM_GDBINT_H), guardians.h
8896 (SCM_GUARDIANH, SCM_GUARDIANS_H), hash.h (HASHH, SCM_HASH_H),
8897 hashtab.h (HASHTABH, SCM_HASHTAB_H), init.h (INITH, SCM_INIT_H),
8898 ioext.h (IOEXTH, SCM_IOEXT_H), iselect.h (ISELECTH,
8899 SCM_ISELECT_H), keywords.h (KEYWORDSH, SCM_KEYWORDS_H), lang.h
8900 (LANGH, SCM_LANG_H), mallocs.h (MALLOCSH, SCM_MALLOCS_H), net_db.h
8901 (SCM_NETDBH, SCM_NET_DB_H), objprop.h (OBJPROPH, SCM_OBJPROP_H),
8902 posix.h (POSIXH, SCM_POSIX_H), procprop.h (PROCPROPH,
8903 SCM_PROCPROP_H), properties.h (PROPERTIES_H, SCM_PROPERTIES_H),
8904 ramap.h (RAMAPH, SCM_RAMAP_H), rdelim.h (SCM_RDELIM,
8905 SCM_RDELIM_H), read.h (READH, SCM_READ_H), rw.h (SCM_RW,
8906 SCM_RW_H), scmsigs.h (SCMSIGSH, SCM_SCMSIGS_H), script.h (SCRIPTH,
8907 SCM_SCRIPT_H), simpos.h (SIMPOSH, SCM_SIMPOS_H), socket.h
8908 (SCM_SOCKETH, SCM_SOCKET_H), sort.h (SORTH, SCM_SORT_H),
8909 stackchk.h (STACKCHKH, SCM_STACKCHK_H), stime.h (STIMEH,
8910 SCM_STIME_H), strop.h (STROPH, SCM_STROP_H), strorder.h
8911 (STRORDERH, SCM_STRORDER_H), threads.h (THREADSH, SCM_THREADS_H),
8912 throw.h (THROWH, SCM_THROW_H), version.h (VERSIONH,
8913 SCM_VERSION_H), vports.h (VPORTSH, SCM_VPORTS_H): Renamed
8914 the macros that are defined to inhibit double inclusion of the
8915 same headers to the SCM_<filename>_H format.
8916
8917 2001-08-27 Marius Vollmer <mvo@zagadka.ping.de>
8918
8919 * ports.c, ports.h, fprots.c, gc.c, ioext.c: Replaced
8920 "scm_t_portable" with "scm_port_table" which was an artifact from
8921 the great "scm_*_t -> scm_t_" renaming.
8922
8923 2001-08-25 Thien-Thi Nguyen <ttn@revel.glug.org>
8924
8925 * gc_os_dep.c (GC_noop1): Move before `GC_find_limit' where it is
8926 used; nfc. Thanks to Bill Schottstaedt.
8927
8928 * validate.h (SCM_VALIDATE_USHORT_COPY, SCM_VALIDATE_SHORT_COPY,
8929 SCM_VALIDATE_UINT_COPY, SCM_VALIDATE_INT_COPY): New macros.
8930 Thanks to Chris Cramer.
8931
8932 2001-08-25 Marius Vollmer <mvo@zagadka.ping.de>
8933
8934 * Makefile.am (AUTOMAKE_OPTIONS): Change "foreign" to "gnu".
8935
8936 * eval.c (scm_m_atbind): Redesigned to behvae like `let', but with
8937 dynamic scope.
8938 * dynwind.h (scm_swap_bindings): Declare.
8939 * dynwind.c (scm_swap_bindings): Make non-static.
8940
8941 2001-08-25 Michael Livshin <mlivshin@bigfoot.com>
8942
8943 * gc.c (scm_gc_sweep): now can sweep unreachable variables (by
8944 doing exactly nothing about them). thanks Neil!
8945
8946 2001-08-18 Neil Jerram <neil@ossau.uklinux.net>
8947
8948 * __scm.h (SCM_ENABLE_VCELLS): Fix spelling mistake in comment.
8949
8950 2001-08-17 Thien-Thi Nguyen <ttn@revel.glug.org>
8951
8952 * gc.c: Fix omission bug: Add `heap_segment' forward decl
8953 (proto) in the case when either `GUILE_DEBUG' or
8954 `GUILE_DEBUG_FREELIST' preprocessor symbols are defined.
8955
8956 (map_free_list): Fix typo: Ref `f' correctly.
8957
8958 Thanks to Chris Cramer.
8959
8960 2001-08-15 Rob Browning <rlb@defaultvalue.org>
8961
8962 * Makefile.am (libguile_la_LDFLAGS): use libtool interface version
8963 variables.
8964 (libpath.h): change libguileversion to libguileinterface.
8965
8966 2001-08-07 Marius Vollmer <mvo@zagadka.ping.de>
8967
8968 * Makefile.am (EXTRA_DIST): Distribute ChangeLog-1996-1999 and
8969 ChangeLog-2000. Thanks to Daniel Skarda!
8970
8971 2001-08-07 Michael Livshin <mlivshin@bigfoot.com>
8972
8973 * guile-snarf-docs-texi.in: don't call the tokenizer here, we now
8974 do it from the Makefile.
8975
8976 * Makefile.am: rearrange the snarfing slightly, so that .doc files
8977 are of a reasonable size.
8978
8979 2001-08-02 Neil Jerram <neil@ossau.uklinux.net>
8980
8981 * stacks.c (scm_make_stack): Improve docstring by explaining use
8982 of cutting args.
8983
8984 2001-08-01 Marius Vollmer <mvo@zagadka.ping.de>
8985
8986 * chars.c (scm_char_alphabetic_p, scm_char_numeric_p,
8987 scm_char_whitespace_p, scm_char_upper_case_p,
8988 scm_char_lower_case_p, scm_char_is_both_p): Do not require
8989 characters to fulfill isascii in addition to the primary
8990 predicate.
8991
8992 2001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
8993
8994 * numbers.c (DIGITS, scm_small_istr2int, scm_istr2int,
8995 scm_istr2flo, scm_istring2number): Removed.
8996
8997 (iflo2str, scm_real_p, scm_integer_p): Use SCM_<foo> instead of
8998 SCM_SLOPPY_<foo>.
8999
9000 (t_exactness, t_radix, DIGIT2UINT, XDIGIT2UINT, mem2uinteger,
9001 mem2decimal_from_point, mem2ureal, mem2complex, scm_i_mem2number):
9002 Added.
9003
9004 (scm_string_to_number): Use new number parser.
9005
9006 (scm_exact_to_inexact): Replace dummy by a GPROC, which also
9007 handles complex numbers.
9008
9009 * numbers.h (NUMBERSH, SCM_NUMBERS_H): Rename <foo>H to
9010 SCM_<foo>_H.
9011
9012 (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Prefer !SCM_<pred> over
9013 SCM_N<pred>.
9014
9015 (scm_istr2int, scm_istr2flo, scm_istring2number): Removed.
9016
9017 (scm_i_mem2number): Added.
9018
9019 (scm_exact_to_inexact): Changed signature.
9020
9021 * read.c (scm_lreadr): Perform the shortcut test for '+ and '-
9022 here instead of within scm_i_mem2number. Call scm_i_mem2number
9023 instead of scm_istr2int and scm_istring2number.
9024
9025 2001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
9026
9027 * eval.c (scm_lookupcar, scm_m_body, scm_m_lambda, unmemocopy,
9028 scm_unmemocopy, scm_badargsp, scm_eval_body, CHECK_EQVISH,
9029 SCM_CEVAL, scm_nconc2last, SCM_APPLY, scm_copy_tree): Prefer
9030 !SCM_<pred> over SCM_N<pred>.
9031
9032 (scm_eval_body): Remove side effecting code from macro call.
9033
9034 (SCM_CEVAL, SCM_APPLY): Remove goto statement and redundant
9035 SCM_NIMP test.
9036
9037 2001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
9038
9039 * pairs.h (SCM_VALIDATE_PAIR): Use SCM_CONSP, not SCM_ECONSP.
9040
9041 2001-07-29 Marius Vollmer <mvo@zagadka.ping.de>
9042
9043 Removed vcell slot from structs.
9044
9045 * struct.h (scm_vtable_index_vcell): Removed. Renumbered
9046 subsequent indices.
9047
9048 * struct.c (scm_struct_vtable_p): Do not check vcell slot for
9049 zero. Use scm_vtable_index_layout instead of "0" when accessing
9050 said slot.
9051 (scm_init_struct): Remove vcell slot layout code from
9052 required_vtable_fields.
9053
9054 * objects.h (scm_si_redefined, scm_si_hashsets): Renumbered.
9055
9056 * goops.c (build_class_class_slots): Removed vcell slot
9057 definition.
9058
9059 * goops.h: Renumbered slot indices. (SCM_CLASS_CLASS_LAYOUT):
9060 Removed vcell slot layout code.
9061 (scm_si_vcell): Removed.
9062
9063 2001-07-26 Marius Vollmer <mvo@zagadka.ping.de>
9064
9065 "Glocs" have been removed.
9066
9067 * tags.h: Update tag system docs.
9068 (scm_tc3_cons_gloc): Renamed to scm_tc3_struct. Changed all uses.
9069 (scm_tcs_cons_gloc): Renamed to scm_tcs_struct. Changed all uses.
9070 (SCM_ECONSP, SCM_NECONSP): Removed. Changed all uses to SCM_CONSP
9071 or SCM_NCONSP, respectively.
9072
9073 * struct.c, struct.h, srcprop.c, procs.c, procprop.c, print.c,
9074 objects.c. modules.c, goops.c, eval.c, debug.c: Changed all uses
9075 of scm_tc3_cond_gloc and scm_tcs_cons_gloc. See above.
9076
9077 * print.c (scm_iprin1): Remove printing of glocs. Do not try to
9078 tell glocs from structs.
9079
9080 * gc.c (scm_gc_mark, scm_gc_sweep): Remove handling of glocs.
9081
9082 * eval.c (scm_m_atbind): Make a list of variables, not glocs.
9083 (scm_ceval, scm_deval): For SCM_IM_BIND, fiddle with variables
9084 instead of with glocs.
9085 (EVALCAR): Do not test for glocs.
9086 (scm_lookupcar, scm_lookupcar1): Do not handle glocs in race
9087 condition.
9088 (scm_unmemocar): Do not handle glocs.
9089 (scm_m_atfop): Memoize as a variable, not as a gloc.
9090 (scm_eval_args, scm_deval_args): Do not handle glocs.
9091 (scm_ceval, scm_deval): Likewise.
9092
9093 * eval.h (SCM_XEVALCAR): Do not test for glocs.
9094 (SCM_GLOC_VAR, SCM_GLOC_VAL, SCM_GLOC_SET_VAL, SCM_GLOC_VAL_LOC):
9095 Removed.
9096
9097 * debug.h, debug.c (scm_make_gloc, scm_gloc_p): Removed.
9098
9099 * dynwind.c (scm_swap_bindings): Likewise.
9100 (scm_dowinds): Updated to recognize lists of variables instead of
9101 lists of glocs.
9102
9103 * __scm.h (SCM_CAUTIOS, SCM_RECKLESS): Update comments.
9104
9105
9106 * gc_os_dep.c (GC_noop1): Moved into the same #if/#endif context
9107 where it is needed.
9108
9109 2001-07-25 Gary Houston <ghouston@arglist.com>
9110
9111 * numbers.c (scm_logand, scm_logior, scm_logxor): adjusted the
9112 docstrings to reflect the n-ary implementation.
9113
9114 2001-07-26 Marius Vollmer <mvo@zagadka.ping.de>
9115
9116 * eval.c (scm_ceval, scm_deval): Use "RETURN" macro when returning
9117 value of a variable, not the plain "return" statement.
9118
9119 2001-07-25 Marius Vollmer <mvo@zagadka.ping.de>
9120
9121 * eval.c: Allow variables in memoized code (in addition to glocs).
9122 (scm_lookupcar): Handle variables in lost races. Replace symbol
9123 with variable directly, do not make a gloc.
9124 (scm_unmemocar): Rewrite variables using a reverse lookup, just
9125 like glocs.
9126 (scm_ceval, scm_deval): Deal with variables in SCM_IM_SET and in
9127 the main switch.
9128
9129 2001-07-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
9130
9131 * variable.c (scm_i_variable_print): Use "value" instead of
9132 "binding" since a binding is the mapping between symbols and
9133 variables, not between variables and their values.
9134
9135 * tags.h (scm_tc7_variable): New.
9136 * gc.c (scm_gc_mark): Handle scm_tc7_variable objects.
9137 * print.c (scm_iprin1): Likewise.
9138
9139 * variable.h (scm_tc16_variable): Removed.
9140 (SCM_VARIABLEP): Test for new tc7 code.
9141 (scm_i_variable_print): New.
9142 * variable.c (scm_tc16_variable): Removed.
9143 (variable_print): Renamed to scm_i_variable_print and made
9144 non-static.
9145 (variable_equal_p): Removed.
9146 (make_variable): Construct a tc7 object instead of a smob.
9147 (scm_init_variable): Do not register smob.
9148
9149 2001-07-22 Marius Vollmer <mvo@zagadka.ping.de>
9150
9151 * tags.h: Include inttypes.h when we have it.
9152
9153 2001-07-13 Marius Vollmer <mvo@zagadka.ping.de>
9154
9155 * tags.h (SCM_UNBOUND): Make it the 34th isym/iflag, the 33th slot
9156 is taken by the new SCM_IM_CALL_WITH_VALUES.
9157 * print.c (scm_isymnames): Update table accordingly.
9158
9159 2001-07-22 Gary Houston <ghouston@arglist.com>
9160
9161 * regex-posix.c (s_scm_regexp_exec): use scm_long2num not
9162 SCM_MAKINUM to convert regoff_t value to SCM.
9163
9164 2001-07-21 Gary Houston <ghouston@arglist.com>
9165
9166 * scmsigs.c: include sys/time.h for itimer stuff.
9167
9168 2001-07-19 Rob Browning <rlb@defaultvalue.org>
9169
9170 * gc_os_dep.c (GC_noop1): ifdef out (unused) to quiet warning.
9171
9172 * c-tokenize.lex: add option %nounput to quiet warning.
9173 Add prototype for yylex to quiet warning.
9174
9175 * scmconfig.h.in: add flags for setitimer and getitimer.
9176
9177 * scmsigs.h (scm_init_scmsigs): new prototype.
9178 (scm_init_scmsigs): new prototype.
9179
9180 * scmsigs.c (s_scm_setitimer): new function.
9181 (s_scm_setitimer): new function.
9182
9183 2001-07-18 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9184
9185 * alist.c, arbiters.c, async.h, backtrace.h, boolean.c, chars.c,
9186 chars.h, continuations.h, debug-malloc.h, dynl.c, feature.c,
9187 feature.h, filesys.h, fluids.h, fports.h, gc_os_dep.c,
9188 gdb_interface.h, gh_eval.c, gh_funcs.c, gh_io.c, gh_list.c,
9189 gh_predicates.c, gsubr.c, gsubr.h, guardians.h,
9190 guile-func-name-check.in, guile-snarf-docs-texi.in,
9191 guile-snarf-docs.in, guile-snarf.awk.in, guile-snarf.in,
9192 hashtab.h, iselect.h, keywords.h, lang.c, list.h, load.h,
9193 objprop.c, objprop.h, options.c, options.h, random.h,
9194 regex-posix.h, root.c, root.h, script.c, snarf.h, stackchk.c,
9195 strerror.c, strop.h, strports.h, threads.h, values.c, values.h,
9196 version.c, version.h: Updated copyright notice.
9197
9198 2001-07-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
9199
9200 * goops.c (sym_layout, sym_vcell, sym_vtable, sym_print,
9201 sym_procedure, sym_setter, sym_redefined, sym_h0, sym_h1, sym_h2,
9202 sym_h3, sym_h4, sym_h5, sym_h6, sym_h7, sym_name,
9203 sym_direct_supers, sym_direct_slots, sym_direct_subclasses,
9204 sym_direct_methods, sym_cpl, sym_default_slot_definition_class,
9205 sym_slots, sym_getters_n_setters, sym_keyword_access, sym_nfields,
9206 sym_environment, scm_sym_change_class): New static variables to
9207 hold predefined symbols.
9208
9209 (build_class_class_slots): Build the list using scm_list_n
9210 instead of cons. Also, slots are already created as lists, thus
9211 making a call to maplist unnecessary.
9212
9213 (scm_class_name, scm_class_direct_supers, scm_class_direct_slots,
9214 scm_class_direct_subclasses, scm_class_direct_methods,
9215 scm_class_precedence_list, scm_class_slots, scm_class_environment,
9216 scm_method_procedure, create_standard_classes, purgatory): Use
9217 predefined symbols.
9218
9219 (build_slots_list, compute_getters_n_setters,
9220 scm_sys_initialize_object, scm_sys_inherit_magic_x,
9221 get_slot_value_using_name, set_slot_value_using_name,
9222 scm_sys_invalidate_method_cache_x, scm_generic_capability_p,
9223 scm_compute_applicable_methods, scm_sys_method_more_specific_p,
9224 make_struct_class): Prefer !SCM_<pred> over SCM_N<pred>.
9225
9226 (scm_sys_prep_layout_x): Minimize variable scopes.
9227
9228 (scm_sys_prep_layout_x, scm_sys_fast_slot_ref,
9229 scm_sys_fast_slot_set_x): Fix signedness.
9230
9231 (go_to_hell, go_to_heaven, purgatory, scm_change_object_class,
9232 lock_cache_mutex, unlock_cache_mutex, call_memoize_method,
9233 scm_memoize_method, scm_wrap_object): Use packing and unpacking
9234 when converting to and from SCM values.
9235
9236 (scm_enable_primitive_generic_x): Add rest argument checking.
9237
9238 (map, filter_cpl, maplist, scm_sys_initialize_object,
9239 scm_sys_prep_layout_x, slot_definition_using_name,
9240 scm_enable_primitive_generic_x, scm_compute_applicable_methods,
9241 call_memoize_method, scm_make, scm_make_class): Prefer explicit
9242 predicates over SCM_N?IMP tests.
9243
9244 (scm_sys_prep_layout_x): Fix typo in error message. Fix type
9245 checking.
9246
9247 (burnin, go_to_hell): Use SCM_STRUCT_DATA instead of the SCM_INST
9248 alias.
9249
9250 2001-07-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
9251
9252 * fports.c (fport_print): Don't use SCM_C[AD]R for non pairs.
9253
9254 * num2integral.i.c (INTEGRAL2NUM, INTEGRAL2BIG): Fix signedness.
9255
9256 * symbols-deprecated.c (scm_gentemp): Simplify vector test.
9257
9258 * vectors.c (scm_vector_p): Eliminate redundant IMP test.
9259
9260 2001-07-12 Michael Livshin <mlivshin@bigfoot.com>
9261
9262 * strings.c (s_scm_string): fix arg position in assert.
9263
9264 2001-07-11 Gary Houston <ghouston@arglist.com>
9265
9266 * strports.c (st_write): use memcpy, not strncpy. thanks to
9267 Dale P. Smith.
9268
9269 2001-07-09 Thien-Thi Nguyen <ttn@revel.glug.org>
9270
9271 * alist.c, alloca.c, arbiters.c, async.c, async.h, backtrace.c,
9272 boolean.c, chars.c, continuations.c, coop-defs.h, coop-threads.c,
9273 debug-malloc.h, debug.c, debug.h, dynl.c, dynwind.c, eq.c,
9274 error.c, eval.c, evalext.c, feature.c, feature.h, filesys.c,
9275 filesys.h, fluids.c, fluids.h, fports.c, fports.h, gc.c, gc.h,
9276 gdbint.c, gsubr.c, guardians.c, hash.c, hashtab.c, hooks.c,
9277 hooks.h, inet_aton.c, init.c, ioext.c, keywords.c, keywords.h,
9278 lang.c, list.c, load.c, macros.c, mallocs.c, memmove.c, modules.c,
9279 net_db.c, numbers.c, numbers.h, objects.c, objprop.c, options.c,
9280 pairs.c, pairs.h, ports.c, ports.h, posix.c, print.c, print.h,
9281 procprop.c, procs.c, procs.h, properties.c, putenv.c, ramap.c,
9282 random.c, random.h, read.c, regex-posix.c, regex-posix.h, root.c,
9283 root.h, scmsigs.c, script.c, simpos.c, smob.c, snarf.h, socket.c,
9284 sort.c, srcprop.c, srcprop.h, stackchk.c, stacks.c, stacks.h,
9285 stime.c, strerror.c, strings.c, strings.h, strop.c, strorder.c,
9286 strports.c, struct.c, struct.h, symbols-deprecated.c, symbols.c,
9287 symbols.h, tags.h, threads.c, threads.h, throw.c, unif.c, unif.h,
9288 variable.c, variable.h, vectors.c, vectors.h, version.c, vports.c,
9289 weaks.c, weaks.h: Remove "face-lift" comment.
9290
9291 2001-07-08 Rob Browning <rlb@defaultvalue.org>
9292
9293 * .cvsignore: add stamp-h.in.
9294
9295 2001-07-04 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9296
9297 * hooks.c (scm_make_hook, scm_add_hook_x),
9298 (scm_remove_hook_x, scm_reset_hook_x, scm_run_hook): Added return
9299 value info to the docstrings.
9300
9301 2001-07-03 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9302
9303 Some more compatibility patches for Windows.
9304
9305 * posix.c (getlogin): getlogin() implementation for Windows.
9306
9307 * backtrace.c, ioext.c: Include <stdio.h>.
9308
9309 * unif.c, script.c, rw.c, error.c: Include <io.h>, if it does
9310 exist.
9311
9312 * cpp_sig_symbols.in: Added SIGBREAK.
9313
9314 2001-07-01 Marius Vollmer <mvo@zagadka.ping.de>
9315
9316 * strports.c (scm_read_0str, scm_eval_0str): Call
9317 scm_c_read_string and scm_c_eval_string respectively, not
9318 themselves. Thanks to Dale P. Smith!
9319
9320 2001-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
9321
9322 * unif.c (scm_array_set_x): The variable args does not
9323 necessarily have to be a list. Further, got rid of a redundant
9324 SCM_NIMP test.
9325
9326 2001-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
9327
9328 * list.c (SCM_I_CONS): Make sure the cell type is initialized
9329 last.
9330
9331 * gc.c (s_scm_map_free_list, scm_igc, scm_gc_sweep,
9332 init_heap_seg): Fixed signedness.
9333
9334 (init_heap_seg): Replaced strange for-loop with a while loop.
9335
9336 * weaks.h (WEAKSH, SCM_WEAKS_H): Rename <foo>H to SCM_<foo>_H.
9337
9338 (SCM_WVECTP): Prefer !SCM_<pred> over SCM_N<pred>.
9339
9340 The following patch adds conservative marking for the elements of
9341 free or allocated cells.
9342
9343 * gc.c (allocated_mark, heap_segment): New static functions.
9344
9345 (which_seg): Deleted, since the functionality is now provided by
9346 function heap_segment.
9347
9348 (map_free_list): Use heap_segment instead of which_seg.
9349
9350 (MARK): If cell debugging is disabled, mark free cells
9351 conservatively.
9352
9353 (scm_mark_locations, scm_cellp): Extracted the search for the
9354 heap segment of a SCM value into function heap_segment.
9355
9356 (scm_init_storage): Allocated cells must be marked
9357 conservatively.
9358
9359 * gc.[ch] (scm_gc_mark_cell_conservatively): New function.
9360
9361 The following patch changes the representation of weak vectors to
9362 double cells instead of using an extension of the vector's
9363 allocated memory.
9364
9365 * gc.c (MARK): Use SCM_SET_WVECT_GC_CHAIN instead of assigning to
9366 the result of SCM_WVECT_GC_CHAIN.
9367
9368 (scm_gc_sweep): Weak vectors don't have extra fields any more.
9369
9370 * weaks.c (allocate_weak_vector): New static function. It does
9371 not patch any previously created vector object during the
9372 construction of a weak vector, and thus doesn't need to switch
9373 off interrupts during vector creation.
9374
9375 (scm_make_weak_vector, scm_make_weak_key_hash_table,
9376 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
9377 Use allocate_weak_vector to provide the new weak vector object.
9378
9379 * weaks.h (SCM_WVECT_TYPE, SCM_SET_WVECT_TYPE,
9380 SCM_SET_WVECT_GC_CHAIN): New macros. The weak vector subtype is
9381 now stored in the double cell.
9382
9383 (SCM_IS_WHVEC, SCM_IS_WHVEC_V, SCM_IS_WHVEC_B, SCM_IS_WHVEC_ANY):
9384 Use SCM_WVECT_TYPE.
9385
9386 (SCM_WVECT_GC_CHAIN): The weak objects are now chained together
9387 using an entry of the double cell.
9388
9389 2001-06-30 Thien-Thi Nguyen <ttn@revel.glug.org>
9390
9391 * stamp-h.in: bye bye
9392
9393 2001-06-30 Marius Vollmer <mvo@zagadka.ping.de>
9394
9395 * gh_eval.c (gh_eval_str): Use scm_c_eval_string instead of
9396 scm_eval_0str.
9397
9398 * load.c, load.h (scm_c_primitive_load,
9399 scm_c_primitive_load_path): New.
9400
9401 * strports.c, strports.h (scm_c_read_string): Renamed from
9402 scm_read_0str. Also, added "const" qualifier to argument.
9403 (scm_c_eval_string): Renamed from scm_eval_0str.
9404 (scm_read_0str, scm_eval_0str): Deprecated.
9405
9406 2001-06-28 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9407
9408 * fluids.c (scm_c_with_fluid): Use scm_list_1() instead of
9409 SCM_LIST1.
9410
9411 2001-06-28 Keisuke Nishida <kxn30@po.cwru.edu>
9412
9413 * list.h (scm_list_1, scm_list_2, scm_list_3, scm_list_4, scm_list_5,
9414 scm_list_n): New functions.
9415 (SCM_LIST0, SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5,
9416 SCM_LIST6, SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify): Deprecated.
9417 (lots of files): Use the new functions.
9418
9419 * goops.c (CALL_GF1, CALL_GF2, CALL_GF3, CALL_GF4): Use scm_call_N.
9420
9421 * strings.c: #include "libguile/deprecation.h".
9422
9423 2001-06-27 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9424
9425 * read.c (scm_lreadr): When reading a hash token, check for a
9426 user-defined hash procedure first, so that overriding the builtin
9427 hash characters is possible (this was needed for implementing
9428 SRFI-4's read synax `f32(...)').
9429
9430 * num2integral.i.c: Use scm_t_signed_bits instead of scm_t_bits,
9431 because the latter is unsigned now and breaks comparisons like
9432 (n < (scm_t_signed_bits)MIN_VALUE).
9433
9434 2001-06-26 Neil Jerram <neil@ossau.uklinux.net>
9435
9436 * eval.h, eval.c (scm_call_4): New function.
9437
9438 * eval.c (SCM_APPLY, SCM_CEVAL, ENTER_APPLY): Call trap handlers
9439 directly rather than dispatching to them via scm_ithrow and a lazy
9440 catch.
9441
9442 * eval.c (scm_evaluator_trap_table), eval.h (SCM_ENTER_FRAME_HDLR,
9443 SCM_APPLY_FRAME_HDLR, SCM_EXIT_FRAME_HDLR): Add three new options
9444 for trap handler procedures.
9445
9446 * debug.h (SCM_RESET_DEBUG_MODE): Add checks for trap handler
9447 procedures not being #f.
9448
9449 2001-06-27 Michael Livshin <mlivshin@bigfoot.com>
9450
9451 * Makefile.am (c-tokenize.c): add rule to generate it.
9452 (EXTRA_DIST): add c-tokenize.lex, so it gets distributed.
9453
9454 filter-doc-snarfage.c: remove.
9455
9456 2001-06-26 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9457
9458 * ports.c (scm_output_port_p): Use result of SCM_COERCE_OUTPORT.
9459
9460 The following set of changes makes compiling Guile under various
9461 Windows compilers easier. Compilation under GNU systems should
9462 not be affected at all.
9463
9464 Thanks to Stefan Jahn for all necessary information, patches and
9465 testing.
9466
9467 * posix.c: Conditialize getpwent, getgrent, kill, getppid, getuid,
9468 getpgrp, ttyname, primitive-fork and some header inclusion for
9469 Windows.
9470
9471 * random.c: Define M_PI, if not predefined and use __int64 for
9472 LONG64 under Windows.
9473
9474 * scmsigs.c: Emulate some functions (alarm, sleep, kill) under
9475 Windows and conditionalize some signal names.
9476
9477 * socket.c (scm_getsockopt): Added missing comma.
9478 Include socket library header under Windows.
9479
9480 * stime.c (CLKTCK): Add cast to int, to make it compile under
9481 Windows.
9482
9483 * ports.c (truncate): New function, compiled only under Windows.
9484
9485 * net_db.c: Do not declare errno under Windows.
9486
9487 * iselect.h, inet_aton.c: Include socket library headers under
9488 Windows.
9489
9490 * guile.c (inner_main): Under Windows, initialize socket library
9491 and initialize gdb_interface data structures.
9492
9493 * gdb_interface.h: Under Windows, gdb_interface cannot be
9494 initialized statically. Initialize at runtime instead.
9495
9496 * fports.c (write_all): ssize_t -> size_t.
9497 (fport_print): Conditionalize call to ttyname().
9498 (getflags): New function, compiled only under Windows.
9499
9500 * filesys.c: Conditionalize inclusion of <pwd.h>. Conditionalize
9501 primitives chown, link, fcntl.
9502 (scm_basename, scm_dirname): Under Windows, handle \ as well as /
9503 as path seperator.
9504
9505 * backtrace.c: Include <io.h> under Windows.
9506
9507 * async.h (ASYNCH, SCM_ASYNC_H): Rename <foo>H to SCM_<foo>_H.
9508
9509 * _scm.h: Added preprocessor conditional for __MINGW32__ for errno
9510 declaration.
9511
9512 2001-06-27 Keisuke Nishida <kxn30@po.cwru.edu>
9513
9514 * eval.c (scm_call_0, scm_call_1, scm_call_2, scm_call_3,
9515 scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3): New functions.
9516 * eval.h (scm_call_0, scm_call_1, scm_call_2, scm_call_3,
9517 scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3): Declared.
9518 * async.c (scm_run_asyncs), coop-threads.c (scheme_body_bootstrip,
9519 scheme_handler_bootstrip), debug.c (with_traps_inner), dynwind.c
9520 (scm_dynamic_wind, scm_dowinds), environments.c
9521 (import_environment_conflict), eval.c (scm_macroexp, scm_force,
9522 scm_primitive_eval_x, scm_primitive_eval), fluids.c (apply_thunk),
9523 goops.c (GETVAR, purgatory, make_class_from_template,
9524 scm_ensure_accessor), hashtab.c (scm_ihashx, scm_sloppy_assx,
9525 scm_delx_x, fold_proc), hooks.c (scm_c_run_hook), load.c
9526 (scm_primitive_load), modules.c (scm_resolve_module,
9527 scm_c_define_module, scm_c_use_module, scm_c_export,
9528 module_variable, scm_eval_closure_lookup, scm_sym2var,
9529 scm_make_module, scm_ensure_user_module, scm_load_scheme_module),
9530 ports.c (scm_port_for_each), print.c (scm_printer_apply),
9531 properties.c (scm_primitive_property_ref), ramap.c (ramap,
9532 ramap_cxr, rafe, scm_array_index_map_x, read.c (scm_lreadr),
9533 scmsigs.c (sys_deliver_signals), sort.c (applyless), strports.c
9534 (scm_object_to_string, scm_call_with_output_string,
9535 scm_call_with_input_string), throw.c (scm_body_thunk,
9536 scm_handle_by_proc, hbpca_body), unif.c (scm_make_shared_array,
9537 scm_make_shared_array), vports.c (sf_flush, sf_write,
9538 sf_fill_input, sf_close): Use one of the above functions.
9539 * goops.c, hashtab.c, scmsigs.c, sort.c: #include "libguile/root.h".
9540
9541 2001-06-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
9542
9543 * filesys.c (scm_close), ports.c (scm_close_port,
9544 scm_port_closed_p), strop.c (scm_string_null_p): Use SCM_BOOL
9545 instead of SCM_NEGATE_BOOL.
9546
9547 * filesys.c (scm_stat): Clean up type dispatch.
9548
9549 * filesys.c (scm_stat), ports.c (scm_input_port_p,
9550 scm_output_port_p): Get rid of redundant IM type check.
9551
9552 * filesys.c (scm_readdir, scm_getcwd, scm_readlink), gh_data.c
9553 (gh_str2scm), load.c (scm_primitive_load, scm_internal_parse_path,
9554 scm_search_path), net_db.c (scm_gethost, scm_getnet, scm_getproto,
9555 scm_return_entry), numbers.c (scm_number_to_string), objects.c
9556 (scm_make_subclass_object), ports.c (scm_port_mode), read.c
9557 (scm_lreadr), simpos.c (scm_getenv), socket.c (scm_inet_ntoa,
9558 scm_addr_vector), stime.c (scm_strftime), strings.c
9559 (scm_makfromstrs, scm_makfrom0str, scm_substring), strings.h
9560 (SCM_STRING_COERCE_0TERMINATION_X), strop.c (string_copy,
9561 scm_string_split), strports.c (scm_strport_to_string), symbols.c
9562 (scm_symbol_to_string), vports.c (sf_write): Use scm_mem2string
9563 instead of scm_makfromstr.
9564
9565 * net_db.c (scm_sethost, scm_setnet, scm_setproto, scm_setserv),
9566 ports.c (scm_close_all_ports_except), read.c (scm_lreadr,
9567 scm_read_hash_extend), stime.c (scm_strftime), strings.c
9568 (scm_string_append, scm_string), strings.h (SCM_STRINGP,
9569 SCM_STRING_COERCE_0TERMINATION_X, SCM_RWSTRINGP), strop.c
9570 (string_capitalize_x): Prefer explicit type check over SCM_N?IMP,
9571 !SCM_<pred> over SCM_N<pred>.
9572
9573 * strings.[ch] (scm_makfromstr): Deprecated.
9574
9575 (scm_mem2string): New function, replaces scm_makfromstr.
9576
9577 * strings.c (scm_substring), strop.c (string_copy,
9578 scm_string_split), strports.c (scm_strport_to_string), symbols.c
9579 (scm_symbol_to_string): Fix gc problem.
9580
9581 * strings.h (STRINGSH, SCM_STRINGS_H): Rename <foo>H to
9582 SCM_<foo>_H.
9583
9584 * validate.h (SCM_VALIDATE_SUBSTRING_SPEC_COPY): Eliminate
9585 warning about comparing signed and unsigned values. This fix is
9586 not optimal, since it won't work reliably if sizeof (c_start) >
9587 sizeof (size_t) or sizeof (c_end) > sizeof (size_t). A better
9588 solution is to define this macro as an inline function, thus
9589 allowing to specifiy the types of c_start and c_end.
9590
9591 2001-06-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
9592
9593 * debug.h (SCM_DEBUGOBJ_FRAME): Deliver result as a
9594 scm_t_debug_frame*.
9595
9596 * debug.h (DEBUGH, SCM_DEBUG_H), stacks.h (STACKSH, SCM_STACKSH):
9597 Rename <foo>H to SCM_<foo>_H.
9598
9599 * stacks.c (NEXT_FRAME, narrow_stack): Prefer explicit type check
9600 over SCM_N?IMP, !SCM_<pred> over SCM_N<pred>.
9601
9602 (narrow_stack): Make i unsigned. Don't use side-effecting
9603 operations in conditions.
9604
9605 (narrow_stack, scm_make_stack, scm_stack_id,
9606 scm_last_stack_frame): Get rid of redundant SCM_N?IMP checks.
9607
9608 (scm_make_stack, scm_stack_id, scm_last_stack_frame): Clean up
9609 type dispatch. No need to cast result of SCM_DEBUGOBJ_FRAME any
9610 more.
9611
9612 (scm_stack_ref, scm_frame_previous, scm_frame_next): Fix
9613 signedness.
9614
9615 (scm_last_stack_frame): Remove bogus `;´.
9616
9617 * stacks.h (SCM_FRAMEP): Fix type check.
9618
9619 2001-06-25 Michael Livshin <mlivshin@bigfoot.com>
9620
9621 * Makefile.am (MAINTAINERCLEANFILES): be sure to remove
9622 c-tokenize.c when doing maintainer-clean.
9623
9624 * snarf.h (SCM_SNARF_DOCS): change the "grammar" slightly.
9625
9626 * guile-snarf-docs.in, guile-snarf-docs-texi.in: rewrite &
9627 simplify.
9628
9629 * eval.c: all hash signs are in column 0.
9630
9631 * Makefile.am (guile_filter_doc_snarfage): build using
9632 c-tokenize.c, not filter-doc-snarfage.c.
9633 rearrange snarfing dependencies a bit.
9634
9635 * c-tokenize.lex: new file.
9636
9637 2001-06-25 Marius Vollmer <mvo@zagadka.ping.de>
9638
9639 * srcprop.h, srcprop.c (scm_srcprops_to_plist): Renamed from
9640 scm_t_srcpropso_plist. See the big type renaming.
9641 * coop-defs.h (scm_mutex_trylock, scm_cond_timedwait): Likewise.
9642 Thanks to Seth Alves!
9643
9644 * numbers.c (SIZE_MAX, PTRDIFF_MIN, PTRDIFF_MAX): Only define when
9645 they aren't defined already.
9646
9647 2001-06-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
9648
9649 * backtrace.c (display_backtrace_body): Use SCM_VALIDATE_STACK
9650 and SCM_VALIDATE_OPOUTPORT instead of SCM_ASSERT. Fix signedness
9651 problem.
9652
9653 * backtrace.c (display_expression, scm_set_print_params_x,
9654 display_application, display_frame, scm_backtrace), numbers.c
9655 (scm_istring2number), objects.c (scm_class_of,
9656 scm_mcache_lookup_cmethod, scm_mcache_compute_cmethod): Prefer
9657 explicit type check over SCM_N?IMP, !SCM_<pred> over SCM_N<pred>.
9658
9659 * fluids.c (scm_fluid_ref, scm_fluid_set_x): Fluid numbers are
9660 always positive.
9661
9662 * numbers.c (scm_i_mkbig): Remove unnecessary casts, remove
9663 unnecessary SCM_DEFER_INTS, SCM_ALLOW_INTS.
9664
9665 * objects.c (scm_class_of): Type fix.
9666
9667 (scm_mcache_lookup_cmethod): Improved comment, simplified,
9668 eliminated goto.
9669
9670 * pairs.h (scm_error_pair_access): The function can return if
9671 called recursively.
9672
9673 2001-06-20 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9674
9675 * init.c (scm_init_guile_1): Removed initialization of tag.c.
9676
9677 * gdbint.c, init.c: Removed inclusion of tag.h.
9678
9679 * tag.h, tag.c: Removed files.
9680
9681 * Makefile.am: Removed tag.{h,c,doc,x} in various places.
9682
9683 2001-06-20 Gary Houston <ghouston@arglist.com>
9684
9685 * deprecation.c, extensions.c, rw.c: include string.h.
9686
9687 2001-06-19 Gary Houston <ghouston@arglist.com>
9688
9689 * filter-doc-snarfage.c (process): added ungetc in
9690 MULTILINE_COOKIE case since otherwise it fails when there's no
9691 space between the '(' and the quote of the following string
9692 (gcc 3.0).
9693
9694 2001-06-14 Marius Vollmer <mvo@zagadka.ping.de>
9695
9696 Throughout: replace "scm_*_t" with "scm_t_*", except "scm_lisp_t".
9697
9698 2001-06-14 Marius Vollmer <mvo@zagadka.ping.de>
9699
9700 * unif.h (SCM_ARRAY_NDIM): Shift then cast so that no sign
9701 extension takes place.
9702 * strings.h (SCM_STRING_LENGTH): Likewise.
9703 (SCM_STRING_MAX_LENGTH): Use unsigned numbers.
9704
9705 * __scm.h (ptrdiff_t): Typedef to long when configure didn't find
9706 it.
9707
9708 * tags.h: Include <stdint.h> when we have it.
9709 (scm_bits_t): Changed to be a unsigned type. Use uintptr_t when
9710 available. Else use "unsigned long".
9711 (scm_signed_bits_t): New.
9712
9713 * numbers.h (SCM_SRS): Cast shiftee to scm_signed_bits_t.
9714 (SCM_INUM): Cast result to scm_signed_bits_t.
9715
9716 2001-06-13 Thien-Thi Nguyen <ttn@revel.glug.org>
9717
9718 * mkstemp.c: Update path to #include file scmconfig.h.
9719 Thanks to Golubev I. N.
9720
9721 2001-06-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
9722
9723 * struct.h (SCM_STRUCT_VTABLE_FLAGS): New macro.
9724
9725 * goops.h (SCM_NUMBER_OF_SLOTS): Removed bogus `\´ at the end of
9726 the macro definition.
9727
9728 (SCM_CLASSP, SCM_INSTANCEP, SCM_PUREGENERICP, SCM_ACCESSORP,
9729 SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Use SCM_STRUCT_VTABLE_FLAGS
9730 instead of SCM_INST_TYPE.
9731
9732 (SCM_ACCESSORP, SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Make sure
9733 the object is a struct before accessing its struct flags.
9734
9735 (SCM_INST_TYPE, SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Deprecated.
9736
9737 2001-06-10 Gary Houston <ghouston@arglist.com>
9738
9739 * rdelim.c (scm_init_rdelim_builtins): don't try to activate the
9740 (ice-9 rdelim) module in (guile) and (guile-user). it didn't
9741 work reliably anymore. try it from boot-9.scm instead.
9742
9743 2001-06-09 Marius Vollmer <mvo@zagadka.ping.de>
9744
9745 * ports.c (scm_lfwrite): Maintain columnd and row count in port.
9746 Thanks to Matthias Köppe!
9747
9748 2001-06-08 Michael Livshin <mlivshin@bigfoot.com>
9749
9750 * snarf.h, filter-doc-snarfage.c: more changes to cope with
9751 space-happy C preprocessors.
9752
9753 * filter-doc-snarfage.c, guile-snarf.in: try to cope with spaces
9754 inside cookies. thanks to Matthias Köppe!
9755
9756 2001-06-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
9757
9758 * keywords.c (keyword_print): Don't use SCM_C[AD]R to access
9759 keywords. Fix gc protection.
9760
9761 * objects.c (scm_mcache_lookup_cmethod): Don't use side effecting
9762 operations in macro calls.
9763
9764 * pairs.c (scm_error_pair_access): Avoid recursion.
9765
9766 Thanks to Matthias Koeppe for reporting the bugs that correspond
9767 to the following set of patches.
9768
9769 * unif.c (scm_bit_set_star_x, scm_bit_invert_x), vectors.h
9770 (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR): Obtain the
9771 bitvector base address using SCM_BITVECTOR_BASE.
9772
9773 * unif.h (SCM_BITVECTOR_BASE): Return the base address as an
9774 unsigned long*.
9775
9776 2001-06-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
9777
9778 * goops.c (SCM_CLASS_REDEF): Removed.
9779
9780 * vectors.h (VECTORSH, SCM_VECTORS_H): Renamed <foo>H to
9781 SCM_<foo>_H.
9782
9783 Thanks to Matthias Koeppe for reporting the bugs that correspond
9784 to the following set of patches.
9785
9786 * goops.c (scm_sys_prep_layout_x, scm_basic_basic_make_class,
9787 create_basic_classes, scm_sys_fast_slot_set_x, set_slot_value,
9788 scm_sys_allocate_instance, clear_method_cache,
9789 scm_sys_invalidate_method_cache_x, scm_make,
9790 create_standard_classes, scm_make_port_classes, scm_make_class,
9791 scm_add_slot): Use SCM_SET_SLOT to set slot values.
9792
9793 (prep_hashsets): Use SCM_SET_HASHSET to set class hash values.
9794
9795 * goops.h (SCM_SET_SLOT, SCM_SET_HASHSET): New macros.
9796
9797 * ramap.c (BINARY_ELTS_CODE, BINARY_PAIR_ELTS_CODE,
9798 UNARY_ELTS_CODE): Remove bogus break statement.
9799
9800 * vectors.h (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR):
9801 Don't access bit vectors elements as SCM objects.
9802
9803 * weaks.c (scm_make_weak_vector, scm_make_weak_key_hash_table,
9804 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
9805 Don't assign to an unpacked value.
9806
9807 2001-06-07 Dirk Herrmann <D.Herrmann@tu-bs.de>
9808
9809 * __scm.h (SCM_NORETURN): Moved here from error.h.
9810
9811 (SCM_UNUSED): New macro.
9812
9813 (SCM_DEBUG_PAIR_ACCESSES): New macro.
9814
9815 * backtrace.c (display_error_handler), continuations.c
9816 (continuation_print), debug.c (debugobj_print), dynwind.c
9817 (guards_print), environments.c (observer_print,
9818 core_environments_finalize, leaf_environment_cell,
9819 leaf_environment_print, eval_environment_print,
9820 eval_environment_observer, import_environment_define,
9821 import_environment_undefine, import_environment_print,
9822 import_environment_observer, export_environment_define,
9823 export_environment_undefine, export_environment_print,
9824 export_environment_observer), eval.c (scm_m_quote, scm_m_begin,
9825 scm_m_if, scm_m_set_x, scm_m_and, scm_m_or, scm_m_case,
9826 scm_m_cond, scm_m_lambda, scm_m_letstar, scm_m_do, scm_m_delay,
9827 scm_m_letrec1, scm_m_apply, scm_m_cont, scm_m_nil_cond,
9828 scm_m_nil_ify, scm_m_t_ify, scm_m_0_cond, scm_m_0_ify,
9829 scm_m_1_ify, scm_m_atfop, scm_m_at_call_with_values), evalext.c
9830 (scm_m_generalized_set_x), fluids.c (fluid_print), fports.c
9831 (fport_print), gc.c (gc_start_stats, scm_remember_upto_here_1,
9832 scm_remember_upto_here_2, scm_remember_upto_here, mark_gc_async),
9833 gh_init.c (gh_standard_handler), goops.c (get_slot_value,
9834 set_slot_value, test_slot_existence, scm_change_object_class,
9835 scm_m_atslot_ref, scm_m_atslot_set_x, make_struct_class,
9836 default_setter), guardians.c (guardian_print, guardian_gc_init,
9837 guardian_zombify, whine_about_self_centered_zombies), guile.c
9838 (inner_main), init.c (stream_handler), keywords.c (keyword_print),
9839 mallocs.c (malloc_print), numbers.c (scm_print_real,
9840 scm_print_complex, scm_bigprint), ports.c (flush_port_default,
9841 end_input_default, scm_port_print, fill_input_void_port,
9842 write_void_port), root.c (root_print), smob.c (scm_mark0,
9843 scm_free0, scm_smob_print, scm_smob_apply_1_error,
9844 scm_smob_apply_2_error, scm_smob_apply_3_error, free_print),
9845 stime.c (restorezone), strings.c (scm_makfromstr), struct.c
9846 (scm_struct_free_0, scm_struct_free_standard,
9847 scm_struct_free_entity, scm_struct_gc_init, scm_free_structs),
9848 throw.c (jmpbuffer_print, lazy_catch_print, ss_handler,
9849 scm_handle_by_throw, scm_ithrow), weaks.c
9850 (scm_weak_vector_gc_init, scm_mark_weak_vector_spines,
9851 scm_scan_weak_vectors), ramap.c (scm_array_fill_int), filesys.c
9852 (scm_dir_print): Mark unused parameters with SCM_UNUSED.
9853
9854 * error.h (SCM_NORETURN): Moved to __scm.h.
9855
9856 * error.h (ERRORH, SCM_ERROR_H), pairs.h (PAIRSH, SCM_PAIRS_H):
9857 Renamed <foo>H to SCM_<foo>_H.
9858
9859 * gc.c (debug_cells_gc_interval): New static variable.
9860
9861 (scm_assert_cell_valid): If selected by the user, perform
9862 additional garbage collections.
9863
9864 (scm_set_debug_cell_accesses_x): Extended to let the user specify
9865 if additional garbage collections are desired.
9866
9867 (mark_gc_async): If additional garbage collections are selected
9868 by the user, don't call the after-gc-hook. Instead require the
9869 user to run the hook manually.
9870
9871 * pairs.c (scm_error_pair_access): New function. Only compiled
9872 if SCM_DEBUG_PAIR_ACCESSES is set to 1.
9873
9874 * pairs.h (SCM_VALIDATE_PAIR): New macro.
9875
9876 (SCM_CAR, SCM_CDR, SCM_SETCAR, SCM_SETCDR): If
9877 SCM_DEBUG_PAIR_ACCESSES is set to 1, make sure that the argument
9878 is a real pair object. (Glocs are also accepted, but that may
9879 change.) If not, abort with an error message.
9880
9881 2001-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
9882
9883 * eval.c (SCM_VALIDATE_NON_EMPTY_COMBINATION): New macro.
9884
9885 (SCM_CEVAL, SCM_APPLY): Replace calls to SCM_EVALIM2 with calls
9886 to SCM_VALIDATE_NON_EMPTY_COMBINATION.
9887
9888 2001-06-05 Marius Vollmer <mvo@zagadka.ping.de>
9889
9890 * extensions.c (scm_c_register_extension): Allow NULL as library
9891 name.
9892 (load_extension): Ignore NULL library names when comparing.
9893
9894 * hash.c (scm_hasher): Use SCM_UNPACK in the case labels so that
9895 non-pointers are being compared. Thanks to Alexander Klimov!
9896
9897 2001-06-04 Gary Houston <ghouston@arglist.com>
9898
9899 * rw.c (scm_write_string_partial): new procedure implementing
9900 write-string/partial in (ice-9 rw).
9901 * rw.h: declare scm_write_string_partial.
9902
9903 2001-06-04 Marius Vollmer <mvo@zagadka.ping.de>
9904
9905 * keywords.c (keyword_print): Substract 1 from length of symbol
9906 name, accounting for the silly dash.
9907
9908 * dynl.c (scm_registered_modules, scm_clear_registered_modules):
9909 Do not emit deprecation warning.
9910
9911 Added exception notice to all files.
9912
9913 * dynl.c: Include "deprecation.h".
9914
9915 2001-06-03 Marius Vollmer <mvo@zagadka.ping.de>
9916
9917 * dynl.c (scm_register_module_xxx, scm_registered_modules,
9918 scm_clear_registered_modules): Deprecated.
9919
9920 2001-06-02 Rob Browning <rlb@cs.utexas.edu>
9921
9922 * .cvsignore: add guile_filter_doc_snarfage guile-snarf-docs
9923 guile-snarf-docs-texi.
9924
9925 * fports.c: HAVE_ST_BLKSIZE changed to
9926 HAVE_STRUCT_STAT_ST_BLKSIZE.
9927 (scm_fport_buffer_add): HAVE_ST_BLKSIZE changed to
9928 HAVE_STRUCT_STAT_ST_BLKSIZE.
9929
9930 * filesys.c (scm_stat2scm): HAVE_ST_RDEV changed to
9931 HAVE_STRUCT_STAT_ST_RDEV.
9932 (scm_stat2scm): HAVE_ST_BLKSIZE changed to
9933 HAVE_STRUCT_STAT_ST_BLKSIZE.
9934 (scm_stat2scm): HAVE_ST_BLOCKS changed to
9935 HAVE_STRUCT_STAT_ST_BLOCKS.
9936
9937 2001-06-02 Marius Vollmer <mvo@zagadka.ping.de>
9938
9939 * strports.c (scm_eval_string): Use scm_primitive_eval_x instead
9940 of scm_eval_x to allow module changes between the forms in the
9941 string. Set/restore module using scm_c_call_with_current_module.
9942
9943 * mkstemp.c: New file, slightly modified from libiberties
9944 mkstemps.c.
9945
9946 2001-05-31 Michael Livshin <mlivshin@bigfoot.com>
9947
9948 * guile-snarf-docs.in, guile-snarf-docs-texi.in,
9949 filter-doc-snarfage.c: new files.
9950
9951 * Makefile.am: add stuff to [build,] use and distribute
9952 guile-snarf-docs, guile-snarf-docs-texi, guile_filter_doc_snarfage.
9953
9954 * guile-snarf.in: grok the new snarf output.
9955
9956 * snarf.h: make the output both texttools- and `read'-friendly.
9957
9958 * guile-doc-snarf.in: reimplement in terms of guile-snarf and
9959 guile-snarf-docs. (should also deprecate, I guess. maybe not).
9960
9961 2001-05-31 Marius Vollmer <mvo@zagadka.ping.de>
9962
9963 * print.c (scm_simple_format): Support "~~" and "~%". Signal
9964 error for unsupported format controls and for superflous
9965 arguments. Thanks to Daniel Skarda!
9966
9967 * print.h, print.c (scm_print_symbol_name): Factored out of
9968 scm_iprin1.
9969 (scm_iprin1): Call it.
9970
9971 * keywords.c (keyword_print): Use scm_print_symbol_name so that
9972 weird names are printed correctly.
9973
9974 * print.c (scm_print_symbol_name): Symbols whose name starts with
9975 `#' or `:' or ends with `:' are considered weird.
9976
9977 2001-05-30 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9978
9979 * numbers.c (scm_difference, scm_divide): Clarified comments for -
9980 and /.
9981
9982 2001-05-29 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9983
9984 * debug.h: Removed prototype for scm_eval_string.
9985
9986 2001-05-28 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9987
9988 * symbols.c (scm_gensym): Fix buffer overrun (try `(gensym
9989 (make-string 2000 #\!))' in an older version).
9990
9991 Change strncpy to memcpy to allow embedded NUL characters in
9992 symbol prefix.
9993
9994 2001-05-28 Michael Livshin <mlivshin@bigfoot.com>
9995
9996 * hooks.c (scm_create_hook): deprecated.
9997 (make_hook): deleted.
9998 (scm_make_hook): all the hook creation code is now here.
9999
10000 * gc.c (scm_init_gc): don't call `scm_create_hook'. instead make
10001 a hook, make it permanent, and do a `scm_c_define' on it.
10002
10003 * strop.c (s_scm_string_capitalize_x): fix docstring quoting.
10004
10005 * socket.c (s_scm_inet_pton): fix docstring quoting.
10006 (s_scm_inet_ntop): ditto.
10007
10008 * num2integral.i.c (INTEGRAL2NUM): cast to fix a warning.
10009
10010 * hashtab.c (scm_internal_hash_fold): fix argument position in
10011 SCM_ASSERT.
10012
10013 * environments.c (s_scm_import_environment_set_imports_x): fix
10014 argument position in SCM_ASSERT.
10015
10016 * debug.c (s_scm_make_gloc): fix SCM packing/unpacking.
10017 (s_scm_make_iloc): ditto.
10018
10019 2001-05-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
10020
10021 * __scm.h (SCM_DEBUG_TYPING_STRICTNESS): Make 1 the default.
10022
10023 * eval.c (promise_print): Read the promise's value as an object.
10024
10025 (SCM_CEVAL): Don't perform side-effecting operations in macro
10026 parameters.
10027
10028 * eval.h (SCM_EVALIM2): Fix the typing strictness of the
10029 conditional expression.
10030
10031 * gc.c (scm_master_freelist, scm_master_freelist2): Added missing
10032 initializer.
10033
10034 * gh_data.c (gh_set_substr): Removed redundant unsigned >= 0
10035 text, removed redundant computation of effective_length and fixed
10036 the overflow check.
10037
10038 * goops.c (test_slot_existence): Use SCM_EQ_P to compare SCM
10039 values.
10040
10041 (wrap_init): Don't use SCM_C[AD]R for non pairs.
10042
10043 (hell): Make it a scm_bits_t pointer rather than a SCM pointer.
10044
10045 * goops.c (scm_sys_modify_class), strports.c (st_resize_port),
10046 struct.h (SCM_SET_STRUCT_PRINTER): Store unpacked values.
10047
10048 * goops.h (SCM_ACCESSORS_OF, SCM_SLOT): Return a SCM value.
10049
10050 * goops.h (GOOPSH, SCM_GOOPS_H), modules.h (MODULESH,
10051 SCM_MODULES_H), objects.h (OBJECTSH, SCM_OBJECTS_H), struct.h
10052 (STRUCTH, SCM_STRUCT_H), symbols.h (SYMBOLSH, SCM_SYMBOLS_H),
10053 __scm.h (__SCMH, SCM___SCM_H): Change <foo>H to SCM_<foo>_H.
10054
10055 * modules.[ch] (scm_module_tag): Make it a scm_bits_t value.
10056
10057 * objects.h (SCM_SET_CLASS_INSTANCE_SIZE): Fixed typing.
10058
10059 * ramap.c (ramap_rp): Removed bogus `;´.
10060
10061 * sort.c (scm_restricted_vector_sort_x): Fixed signedness
10062 problem.
10063
10064 * symbols.h (SCM_PROP_SLOTS, SCM_SET_PROP_SLOTS, SCM_SYMBOL_FUNC,
10065 SCM_SET_SYMBOL_FUNC, SCM_SYMBOL_PROPS, SCM_SET_SYMBOL_PROPS):
10066 Read SCM objects rather than scm_bits_t values.
10067
10068 * tags.h (SCM_VOIDP_TEST): Removed.
10069
10070 (SCM_DEBUG_TYPING_STRICTNESS): Now takes values 0, 1, 2. The
10071 value of 2 now corresponds to the former 1, the current 1
10072 corresponds to the former situation that SCM_VOIDP_TEST was
10073 defined.
10074
10075 (SCM): Now defined as typedef struct scm_unused_struct * SCM;
10076 If this appears to be not ANSI compliant, we will change it to
10077 typedef struct scm_unused_struct { } * SCM;
10078 Thanks to Han-Wen Nienhuys for the suggestion.
10079
10080 * unif.c (scm_array_set_x): Fix typing problem, and use
10081 SCM_UVECTOR_BASE instead of SCM_VELTS or SCM_CELL_WORD_1 when
10082 dealing with uniform vectors.
10083
10084 2001-05-27 Michael Livshin <mlivshin@bigfoot.com>
10085
10086 * gc.c (scm_init_storage): init `scm_gc_registered_roots'.
10087 (scm_igc): mark from them, too (precisely, not conservatively!).
10088
10089 * root.h (scm_gc_registered_roots): new object in
10090 scm_sys_protects.
10091
10092 * hooks.c (scm_create_hook): call `scm_gc_protect_object' instead
10093 `scm_protect_object'. shouldn't call it at all, though, it seems.
10094
10095 * gc.c (scm_[un]protect_object): deprecated.
10096 (scm_gc_[un]protect_object): new names for scm_[un]protect_object.
10097 (scm_gc_[un]register_root[s]): new.
10098
10099 * gc.h: add prototypes for scm_gc_[un]protect_object,
10100 scm_gc_[un]register_root[s].
10101
10102 2001-05-26 Michael Livshin <mlivshin@bigfoot.com>
10103
10104 revert the controversial part of the 2001-05-24 changes.
10105
10106 2001-05-25 Marius Vollmer <mvo@zagadka.ping.de>
10107
10108 * modules.c (scm_env_module): Exported to Scheme.
10109
10110 * eval.c (scm_debug_opts): New option `show-file-name'.
10111
10112 * debug.h (SCM_SHOW_FILE_NAME): New.
10113
10114 * backtrace.c: Include "libguile/filesys.h".
10115 (sym_base, display_backtrace_get_file_line,
10116 display_backtrace_file, display_backtrace_file_and_line): New.
10117 (display_frame): Call display_backtrace_file_and_line if that is
10118 requested.
10119 (display_backtrace_body): Call scm_display_backtrace_file if
10120 requested.
10121
10122 * debug.h (scm_lookup_cstr, scm_lookup_soft, scm_evstr):
10123 Prototypes removed since there's no definition for these
10124 functions.
10125
10126 2001-05-24 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10127
10128 * unif.c (scm_make_ra, array_free), unif.h (SCM_ARRAY_DIMS):
10129 Changed use of scm_array->scm_array_t and
10130 scm_array_dim->scm_array_dim_t to enable build with
10131 --disable-deprecated.
10132
10133 2001-05-24 Michael Livshin <mlivshin@bigfoot.com>
10134
10135 The purpose of this set of changes is to regularize Guile's usage
10136 of ANSI C integral types, with the following ideas in mind:
10137
10138 - SCM does not nesessarily have to be long.
10139 - long is not nesessarily enough to store pointers.
10140 - long is not nesessarily the same size as int.
10141
10142 The changes are incomplete and possibly buggy. Please test on
10143 something exotic.
10144
10145 * validate.h
10146 (SCM_NUM2{SIZE,PTRDIFF,SHORT,USHORT,BITS,UBITS,INT,UINT}[_DEF]):
10147 new macros.
10148
10149 * unif.h: type renaming:
10150 scm_array -> scm_array_t
10151 scm_array_dim -> scm_array_dim_t
10152 the old names are deprecated, all in-Guile uses changed.
10153
10154 * tags.h (scm_ubits_t): new typedef, representing unsigned
10155 scm_bits_t.
10156
10157 * stacks.h: type renaming:
10158 scm_info_frame -> scm_info_frame_t
10159 scm_stack -> scm_stack_t
10160 the old names are deprecated, all in-Guile uses changed.
10161
10162 * srcprop.h: type renaming:
10163 scm_srcprops -> scm_srcprops_t
10164 scm_srcprops_chunk -> scm_srcprops_chunk_t
10165 the old names are deprecated, all in-Guile uses changed.
10166
10167 * gsubr.c, procs.c, print.c, ports.c, read.c, rdelim.c, ramap.c,
10168 rw.c, smob.c, sort.c, srcprop.c, stacks.c, strings.c, strop.c,
10169 strorder.c, strports.c, struct.c, symbols.c, unif.c, values.c,
10170 vectors.c, vports.c, weaks.c:
10171 various int/size_t -> size_t/scm_bits_t changes.
10172
10173 * random.h: type renaming:
10174 scm_rstate -> scm_rstate_t
10175 scm_rng -> scm_rng_t
10176 scm_i_rstate -> scm_i_rstate_t
10177 the old names are deprecated, all in-Guile uses changed.
10178
10179 * procs.h: type renaming:
10180 scm_subr_entry -> scm_subr_entry_t
10181 the old name is deprecated, all in-Guile uses changed.
10182
10183 * options.h (scm_option_t.val): unsigned long -> scm_bits_t.
10184 type renaming:
10185 scm_option -> scm_option_t
10186 the old name is deprecated, all in-Guile uses changed.
10187
10188 * objects.c: various long -> scm_bits_t changes.
10189 (scm_i_make_class_object): flags: unsigned long -> scm_ubits_t
10190
10191 * numbers.h (SCM_FIXNUM_BIT): deprecated, renamed to
10192 SCM_I_FIXNUM_BIT.
10193
10194 * num2integral.i.c: new file, multiply included by numbers.c, used
10195 to "templatize" the various integral <-> num conversion routines.
10196
10197 * numbers.c (scm_mkbig, scm_big2num, scm_adjbig, scm_normbig,
10198 scm_copybig, scm_2ulong2big, scm_dbl2big, scm_big2dbl):
10199 deprecated.
10200 (scm_i_mkbig, scm_i_big2inum, scm_i_adjbig, scm_i_normbig,
10201 scm_i_copybig, scm_i_short2big, scm_i_ushort2big, scm_i_int2big,
10202 scm_i_uint2big, scm_i_long2big, scm_i_ulong2big, scm_i_bits2big,
10203 scm_i_ubits2big, scm_i_size2big, scm_i_ptrdiff2big,
10204 scm_i_long_long2big, scm_i_ulong_long2big, scm_i_dbl2big,
10205 scm_i_big2dbl, scm_short2num, scm_ushort2num, scm_int2num,
10206 scm_uint2num, scm_bits2num, scm_ubits2num, scm_size2num,
10207 scm_ptrdiff2num, scm_num2short, scm_num2ushort, scm_num2int,
10208 scm_num2uint, scm_num2bits, scm_num2ubits, scm_num2ptrdiff,
10209 scm_num2size): new functions.
10210
10211 * modules.c (scm_module_reverse_lookup): i, n: int -> scm_bits_t.
10212
10213 * load.c: change int -> size_t in various places (where the
10214 variable is used to store a string length).
10215 (search-path): call scm_done_free, not scm_done_malloc.
10216
10217 * list.c (scm_ilength): return a scm_bits_t, not long.
10218 some other {int,long} -> scm_bits_t changes.
10219
10220 * hashtab.c: various [u]int -> scm_bits_t changes.
10221 scm_ihashx_closure -> scm_ihashx_closure_t (and made a typedef).
10222 (scm_ihashx): n: uint -> scm_bits_t
10223 use scm_bits2num instead of scm_ulong2num.
10224
10225 * gsubr.c: various int -> scm_bits_t changes.
10226
10227 * goops.[hc]: various {int,long} -> scm_bits_t changes.
10228
10229 * gh_data.c (gh_num2int): no loss of precision any more.
10230
10231 * gh.h (gh_str2scm): len: int -> size_t
10232 (gh_{get,set}_substr): start: int -> scm_bits_t,
10233 len: int -> size_t
10234 (gh_<num>2scm): n: int -> scm_bits_t
10235 (gh_*vector_length): return scm_[u]size_t, not unsigned long.
10236 (gh_length): return scm_bits_t, not unsigned long.
10237
10238 * gc.[hc]: various small changes relating to many things stopping
10239 being long and starting being scm_[u]bits_t instead.
10240 scm_mallocated should no longer wrap around.
10241
10242 * fports.h: type renaming:
10243 scm_fport -> scm_fport_t
10244 the old name is deprecated, all in-Guile uses changed.
10245
10246 * fports.c (fport_fill_input): count: int -> scm_bits_t
10247 (fport_flush): init_size, remaining, count: int -> scm_bits_t
10248
10249 * debug.h (scm_lookup_cstr, scm_lookup_soft, scm_evstr): removed
10250 those prototypes, as the functions they prototype don't exist.
10251
10252 * fports.c (default_buffer_size): int -> size_t
10253 (scm_fport_buffer_add): read_size, write_size: int -> scm_bits_t
10254 default_size: int -> size_t
10255 (scm_setvbuf): csize: int -> scm_bits_t
10256
10257 * fluids.c (n_fluids): int -> scm_bits_t
10258 (grow_fluids): old_length, i: int -> scm_bits_t
10259 (next_fluid_num, scm_fluid_ref, scm_fluid_set_x): n: int ->
10260 scm_bits_t
10261 (scm_c_with_fluids): flen, vlen: int -> scm_bits_t
10262
10263 * filesys.c (s_scm_open_fdes): changed calls to SCM_NUM2LONG to
10264 the new and shiny SCM_NUM2INT.
10265
10266 * extensions.c: extension -> extension_t (and made a typedef).
10267
10268 * eval.h (SCM_IFRAME): cast to scm_bits_t, not int. just so
10269 there are no nasty surprises if/when the various deeply magic tag
10270 bits move somewhere else.
10271
10272 * eval.c: changed the locals used to store results of SCM_IFRAME,
10273 scm_ilength and such to be of type scm_bits_t (and not int/long).
10274 (iqq): depth, edepth: int -> scm_bits_t
10275 (scm_eval_stack): int -> scm_bits_t
10276 (SCM_CEVAL): various vars are not scm_bits_t instead of int.
10277 (check_map_args, scm_map, scm_for_each): len: long -> scm_bits_t
10278 i: int -> scm_bits_t
10279
10280 * environments.c: changed the many calls to scm_ulong2num to
10281 scm_ubits2num.
10282 (import_environment_fold): proc_as_ul: ulong -> scm_ubits_t
10283
10284 * dynwind.c (scm_dowinds): delta: long -> scm_bits_t
10285
10286 * debug.h: type renaming:
10287 scm_debug_info -> scm_debug_info_t
10288 scm_debug_frame -> scm_debug_frame_t
10289 the old names are deprecated, all in-Guile uses changed.
10290 (scm_debug_eframe_size): int -> scm_bits_t
10291
10292 * debug.c (scm_init_debug): use scm_c_define instead of the
10293 deprecated scm_define.
10294
10295 * continuations.h: type renaming:
10296 scm_contregs -> scm_contregs_t
10297 the old name is deprecated, all in-Guile uses changed.
10298 (scm_contregs_t.num_stack_items): size_t -> scm_bits_t
10299 (scm_contregs_t.num_stack_items): ulong -> scm_ubits_t
10300
10301 * continuations.c (scm_make_continuation): change the type of
10302 stack_size from long to scm_bits_t.
10303
10304 * ports.h: type renaming:
10305 scm_port_rw_active -> scm_port_rw_active_t (and made a typedef)
10306 scm_port -> scm_port_t
10307 scm_ptob_descriptor -> scm_ptob_descriptor_t
10308 the old names are deprecated, all in-Guile uses changed.
10309 (scm_port_t.entry): int -> scm_bits_t.
10310 (scm_port_t.line_number): int -> long.
10311 (scm_port_t.putback_buf_size): int -> size_t.
10312
10313 * __scm.h (long_long, ulong_long): deprecated (they pollute the
10314 global namespace and have little value beside that).
10315 (SCM_BITS_LENGTH): new, is the bit size of scm_bits_t (i.e. of an
10316 SCM handle).
10317 (ifdef spaghetti): include sys/types.h and sys/stdtypes.h, if they
10318 exist (for size_t & ptrdiff_t).
10319 (scm_sizet): deprecated.
10320
10321 * Makefile.am (noinst_HEADERS): add num2integral.i.c
10322
10323 2001-05-23 Marius Vollmer <mvo@zagadka.ping.de>
10324
10325 * snarf.h (SCM_CONST_LONG): Use SCM_VCELL_INIT instead of
10326 SCM_VARIABLE_INIT since that it what it used to be.
10327
10328 * deprecation.c (scm_include_deprecated_features): Make docstring
10329 ANSIsh. Thanks to Matthias Köppe!
10330
10331 2001-05-21 Marius Vollmer <mvo@zagadka.ping.de>
10332
10333 * symbols.c (scm_mem2symbol): Re-introduce indirect cell. It is
10334 needed for weak-key hashtables.
10335
10336 * procs.c (scm_make_subr_with_generic): Add missing last argument
10337 in call to scm_c_define_gsubr_with_generic. Thanks to Ariel Rios.
10338
10339 * eval.c: Use SCM_EQ_P instead of `==' or `!=' in certain
10340 places. (scm_c_improper_memq): Return 1 instead of SCM_BOOL_T.
10341
10342 * eval.h (SCM_EVALIM2): Use SCM_EQ_P instead of `=='.
10343
10344 2001-05-20 Marius Vollmer <mvo@zagadka.ping.de>
10345
10346 * symbols.c (scm_mem2symbol): Call `scm_must_strndup' instead of
10347 `duplicate_string'. Do not use an indirect cell, store symbol
10348 directly in collision list of hash table.
10349 (duplicate_string): Removed.
10350
10351 * init.c (scm_init_guile_1): Call scm_init_extensions.
10352
10353 * Makefile.am: Add "extensions.c" and related files in all the
10354 right places.
10355
10356 * extensions.h, extension.c: New files.
10357
10358 * gc.h, gc.c (scm_must_strdup, scm_must_strndup): New.
10359
10360 * modules.h (scm_system_module_env_p): Move out of deprecated
10361 section.
10362
10363 * rw.h (scm_init_rw): Added prototype.
10364
10365 * gsubr.h, gsubr.c (scm_c_make_gsubr, scm_c_define_gsubr,
10366 scm_c_make_gsubr_with_generic, scm_c_define_gsubr_with_generic):
10367 New functions. They replace scm_make_gsubr and
10368 scm_make_gsubr_with_generic. The `make' variants only create the
10369 gsubr object, while the `define' variants also put it into the
10370 current module. Changed all callers.
10371 (scm_make_gsubr, scm_make_gsubr_with_generic): Deprecated.
10372
10373 * procs.h, procs.c (scm_c_make_subr, scm_c_define_subr,
10374 scm_c_make_subr_with_generic, scm_c_define_subr_with_generic): New
10375 functions. They replace scm_make_subr, scm_make_subr_opt and
10376 scm_make_subr_with_generic. The `make' variants only create the
10377 subr object, while the `define' variants also put it into the
10378 current module. Changed all callers.
10379 (scm_make_subr, scm_make_subr_opt, scm_make_subr_with_generic):
10380 Deprecated.
10381
10382 * eval.c, gc.c, gh_funcs.c, goops.c, macros.c, pairs.c, ramap.c,
10383 rdelim.c, rw.c, scmsigs.c, snarf.h, values.c: Changed according to
10384 the comments above.
10385
10386 2001-05-19 Neil Jerram <neil@ossau.uklinux.net>
10387
10388 * throw.c (scm_lazy_catch): Slight docstring clarification.
10389
10390 2001-05-19 Marius Vollmer <mvo@zagadka.ping.de>
10391
10392 * throw.c: Lazy-catch handlers are no longer allowed to return.
10393 Fixed comments throughout.
10394 (scm_ithrow): Signal an error when a lazy-catch handler returns.
10395 Moved actual jump to jmpbuf into if-branch where the jmpbuf is
10396 recognized as such.
10397
10398 * version.c (s_scm_micro_version): Fix typo in FUNC_NAME, it
10399 refered to s_scm_minor_version previously.
10400
10401 * modules.h, modules.c: Moved around a lot of code so that
10402 deprecated features appear at the bottom.
10403 (root_module_lookup_closure, scm_sym_app, scm_sym_modules,
10404 module_prefix, make_modules_in_var, beautify_user_module_x_var,
10405 scm_the_root_module, scm_make_module, scm_ensure_user_module,
10406 scm_load_scheme_module): Deprecated.
10407 (scm_system_module_env_p): Return SCM_BOOL_T directly for
10408 environments corresponding to the root module.
10409 (convert_module_name, scm_c_resolve_module,
10410 scm_c_call_with_current_module, scm_c_define_module,
10411 scm_c_use_module, scm_c_export): New.
10412 (the_root_module): New static variant of scm_the_root_module. Use
10413 it everywhere instead of scm_the_root_module.
10414
10415 * fluids.h, fluids.c (scm_internal_with_fluids): Deprecated.
10416 (scm_c_with_fluids): Renamed from scm_internal_with_fluids.
10417 (scm_c_with_fluid): New.
10418 (scm_with_fluids): Use scm_c_with_fluids instead of
10419 scm_internal_with_fluids.
10420
10421 * goops.h, goops.c (scm_init_goops_builtins): Renamed from
10422 `scm_init_goops'. Do not explicitly create/switch modules.
10423 Return SCM_UNSPECIFIED.
10424 (scm_init_goops): Only register `%init-goops-builtins' procedure.
10425 (scm_load_goops): Use scm_c_resolve_module instead of
10426 scm_resolve_module.
10427
10428 * init.c (scm_init_guile_1): Call `scm_init_goops' instead of
10429 `scm_init_oop_goops_goopscore_module'. Call `scm_init_rdelim' and
10430 `scm_init_rw' prior to loading the startup files.
10431
10432 * rdelim.h, rdelim.c: (scm_init_rdelim_builtins): Renamed from
10433 scm_init_rdelim. Do not explicitly create/switch modules.
10434 Return SCM_UNSPECIFIED.
10435 (scm_init_rdelim): Only register `%init-rdelim-builtins'
10436 procedure.
10437
10438 * rw.c (scm_init_rw_builtins): Renamed from scm_init_rw. Do not
10439 explicitly create/switch modules. Return SCM_UNSPECIFIED.
10440 (scm_init_rw): Only register `%init-rw-builtins' procedure.
10441
10442 * script.c (scm_shell): Evaluate the compiled switches in the
10443 current module, not in the root module.
10444
10445 2001-05-18 Marius Vollmer <mvo@zagadka.ping.de>
10446
10447 * fluids.c (scm_c_with_fluids): Rename from
10448 scm_internal_with_fluids.
10449 (scm_internal_with_fluids): Deprecated.
10450 (scm_c_with_fluid): New.
10451
10452 2001-05-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
10453
10454 * print.h (PRINTH, SCM_PRINT_H): Renamed PRINTH to SCM_PRINT_H.
10455
10456 (SCM_PORT_WITH_PS_PORT, SCM_PORT_WITH_PS_PS): Only pairs may be
10457 accessed with SCM_C[AD]R.
10458
10459 (SCM_COERCE_OUTPORT): Removed redundant SCM_NIMP test.
10460
10461 2001-05-16 Rob Browning <rlb@cs.utexas.edu>
10462
10463 * version.c (s_scm_major_version): doc fixes.
10464 (s_scm_minor_version): doc fixes.
10465 (s_scm_minor_version): new function.
10466
10467 * version.h (scm_init_version): new function.
10468
10469 * versiondat.h.in: add GUILE_MICRO_VERSION.
10470
10471 2001-05-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
10472
10473 * deprecation.c (scm_init_deprecation): Renamed
10474 GUILE_WARN_DEPRECATED_DEFAULT to SCM_WARN_DEPRECATED_DEFAULT.
10475
10476 2001-05-16 Marius Vollmer <mvo@zagadka.ping.de>
10477
10478 * Makefile.am (cpp_sig_symbols.c, cpp_err_symbols.c): Make
10479 dependent on cpp_cnvt.awk
10480
10481 2001-05-15 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10482
10483 * script.c (scm_compile_shell_switches): New command line option
10484 `--use-srfi' for loading a list of SRFIs on startup.
10485 (scm_shell_usage): Added `--use-srfi' to help message.
10486
10487 2001-05-10 Marius Vollmer <mvo@zagadka.ping.de>
10488
10489 Merged from mvo-vcell-cleanup-1-branch.
10490
10491 The concept of vcells has been removed from Guile. With it,
10492 explicit obarrays and associated operations are gone. Use
10493 hashtables instead of obarrays.
10494
10495 Throughout: use scm_sym2var instead of scm_sym2vcell and treat
10496 result as variable instead of vcell. Glocs no longer point to a
10497 vcell but to a variable. Use scm_c_define instead of
10498 scm_sysintern and treat the result as a variable (which it is),
10499 not a vcell.
10500
10501 * variable.c, variable.h (SCM_VARVCELL, SCM_UDVARIABLEP,
10502 SCM_DEFVARIABLEP): Deprecated.
10503 (SCM_VARIABLE_REF, SCM_VARIABLE_SET, SCM_VARIABLE_LOC): New.
10504 (variable_print): Do not print name of variable.
10505 (variable_equalp): Compare values, not vcells.
10506 (anonymous_variable_sym): Removed.
10507 (make_vcell_variable): Removed.
10508 (make_variable): New, as replacement.
10509 (scm_make_variable, scm_make_undefined_variable): Do not take name
10510 hint parameter.
10511 (scm_variable_ref): Check for SCM_UNDEFINED and throw "unbound"
10512 error in that case.
10513 (scm_builtin_variable): Deprecated.
10514
10515 * symbols.c, symbols.h (scm_sym2vcell, scm_sym2ovcell_soft,
10516 scm_sym2ovcell, scm_intern_obarray_soft, scm_intern_obarray,
10517 scm_intern, scm_intern0, scm_sysintern0_no_module_lookup,
10518 scm_sysintern, scm_sysintern0, scm_symbol_value0,
10519 scm_string_to_obarray_symbol, scm_intern_symbol,
10520 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned,
10521 scm_symbol_bound_p, scm_symbol_set_x, scm_gentmp, gentmp_counter):
10522 Deprecated and moved to "symbols-deprecated.c".
10523 (copy_and_prune_obarray, scm_builtin_bindings): Removed.
10524 (scm_init_symbols): Call scm_init_symbols_deprecated.
10525 * symbols-deprecated.c: New file.
10526 * Makefile.am: Added symbols-deprecated.c and related files in all
10527 the right places.
10528
10529 * snarf.h (SCM_VCELL, SCM_GLOBAL_VCELL, SCM_VCELL_INIT,
10530 SCM_GLOBAL_VCELL_INIT): Deprecated.
10531 (SCM_VARIABLE, SCM_GLOBAL_VARIABLE, SCM_VARIABLE_INIT,
10532 SCM_GLOBAL_VARIABLE_INIT): New, as replacement. Changed all uses.
10533
10534 * print.c (scm_iprin1): Use scm_module_reverse_lookup instead of
10535 SCM_GLOC_SYM.
10536
10537 * evalext.c, filesys.c, fports.c, gdbint.c, gh_data.c, gsubr.c,
10538 hooks.c, load.c, numbers.c, objects.c, ports.c, posix.c, procs.c,
10539 ramap.c, random.c, read.c, regex-posix.c, scmsigs.c, script.c,
10540 socket.c, srcprop.c, stacks.c, stime.c, struct.c, tag.c, throw.c:
10541 Changed according to the `throughout' comments.
10542
10543 * modules.h, modules.c (scm_module_system_booted_p): Changed type
10544 to `int'.
10545 (scm_module_type): Removed.
10546 (the_root_module): Renamed to the_root_module_var. Now points to
10547 a variable instead of a vcell. Updated all uses.
10548 (scm_the_root_module): Return SCM_BOOL_F when module systems
10549 hasn't been booted yet.
10550 (SCM_VALIDATE_STRUCT_TYPE): Removed.
10551 (scm_post_boot_init_modules): Made static.
10552 (scm_set_current_module): Call scm_post_boot_init_modules on first
10553 call.
10554 (make_modules_in, beautify_user_module_x, resolve_module,
10555 try_module_autoload, module_make_local_var_x): Tacked on "_var"
10556 suffix. Now point to variables instead of vcells. Updated all
10557 uses.
10558 (scm_module_lookup_closure): Deal with the module being SCM_BOOL_F
10559 and return SCM_BOOL_F in that case.
10560 (scm_module_transformer): Likewise.
10561 (sym_module, scm_lookup_closure_module, scm_env_module): New.
10562 (SCM_F_EVAL_CLOSURE_INTERFACE, SCM_EVAL_CLOSURE_INTERFACE_P): New.
10563 (scm_eval_closure_lookup): Do not allow new definitions when
10564 `interface' flag is set.
10565 (scm_standard_interface_eval_closure): New.
10566 (scm_pre_modules_obarray, scm_sym2var, scm_module_lookup,
10567 scm_lookup, scm_module_define, scm_define, scm_c_module_lookup,
10568 scm_c_lookup, scm_c_module_define, scm_c_define,
10569 scm_module_reverse_lookup, scm_get_pre_modules_obarray,
10570 scm_modules_prehistory): New.
10571 (scm_post_boot_init_modules): Use scm_c_define and scm_c_lookup
10572 instead of scm_intern0.
10573
10574 * macros.c (scm_make_synt): Return SCM_UNSPECIFIED instead of the
10575 symbol.
10576
10577 * keywords.c (s_scm_make_keyword_from_dash_symbol): Use a regular
10578 hashtable operations to maintain the keywords, not obarray ones.
10579
10580 * init.c (scm_load_startup_files): Do not call
10581 scm_post_boot_init_modules. This is done by
10582 scm_set_current_module now.
10583 (scm_init_guile_1): Call scm_modules_prehistory. Call
10584 scm_init_variable early on.
10585
10586 * goops.c (s_scm_sys_goops_loaded): Get
10587 var_compute_applicable_methods from scm_sym2var, not from a direct
10588 invocation of scm_goops_lookup_closure.
10589
10590 * gh_funcs.c (gh_define): Return SCM_UNSPECIFIED instead of vcell.
10591
10592 * gc.c: Added simple debugging hack to mark phase of GC: When
10593 activated, do not tail-call scm_gc_mark. This gives nice
10594 backtraces.
10595 (scm_unhash_name): Removed.
10596
10597 * feature.c (features): Renamed to features_var. Now points to a
10598 variable instead of a vcell. Updated all uses.
10599
10600 * eval.h (SCM_TOP_LEVEL_LOOKUP_CLOSURE): Use
10601 `scm_current_module_lookup_closure' which will do the right thing
10602 when the module system hasn't been booted yet.
10603 (SCM_GLOC_SYM): Removed.
10604 (SCM_GLOC_VAR, SCM_GLOC_SET_VAL): New.
10605 (SCM_GLOC_VAL, SCM_GLOC_LOC): Reimplemented in terms of variables.
10606
10607 * eval.c (scm_lookupcar, scm_lookupcar1): Deal with variables
10608 instead of with vcells. Do not overwrite `var' with the result of
10609 the lookup, use the new `real_var' instead. Remove `var2' in
10610 exchange (which was only used with threads).
10611 (sym_three_question_marks): New.
10612 (scm_unmemocar): Use `scm_module_reverse_lookup' instead of
10613 `SCM_GLOC_SYM'.
10614 (scm_lisp_nil, scm_lisp_t): Directly define as symbols.
10615 (scm_m_atfop): Expect the function definition to be a variable
10616 instead of a vcell.
10617 (scm_macroexp): Do not use `unmemocar', explicitely remember the
10618 symbol instead.
10619 (scm_unmemocopy): Removed thoughts about anti-macro interface.
10620 (scm_eval_args): Use more explicit code in the gloc branch of the
10621 atrocious struct ambiguity test. The optimizer will sort this
10622 out.
10623 (scm_deval_args): Likewise.
10624 (SCM_CEVAL): Likewise. Also, do not use unmemocar, explicitely
10625 remember the symbol instead. Added some comments where
10626 scm_tc3_cons_gloc really exclusively refers to structs.
10627 (scm_init_eval): Use scm_define to initialize "nil" and "t" to
10628 scm_lisp_nil and scm_lisp_t, respectively. Use scm_define instead
10629 of scm_sysintern in general.
10630
10631 * dynwind.c (scm_swap_bindings): Use SCM_GLOC_SET_VAL instead of
10632 explicit magic.
10633
10634 * debug.c (s_scm_make_gloc): Only allow proper variables, no
10635 pairs. Put the variable directly in the gloc.
10636 (s_scm_gloc_p): Use `scm_tc3_cons_gloc' instead of the magic `1'.
10637 (scm_init_debug): Use scm_c_define instead scm_sysintern.
10638
10639 * cpp_cnvt.awk: Emit "scm_c_define" instead of "scm_sysintern".
10640
10641 * backtrace.h, backtrace.c (scm_the_last_stack_fluid): Renamed to
10642 scm_the_last_stack_fluid_var. It now points to a variable instead
10643 of a vcell. Updated all uses.
10644 (scm_has_shown_backtrace_hint_p_var): Now points to a variable
10645 instead of a vcell. Updated all uses.
10646
10647 * _scm.h: Include "variables.h" and "modules.h" since almost
10648 everybody needs them now.
10649
10650 * root.h (scm_symhash, scm_symhash_vars): Removed.
10651 * gc.c (scm_init_storage): Do not initialize them.
10652
10653 2001-05-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
10654
10655 * eval.c (scm_init_eval): Initialize scm_undefineds and
10656 scm_listofnull.
10657
10658 * gc.c (scm_debug_newcell, scm_debug_newcell2): Fixed to behave
10659 like the SCM_NEWCELL macro counterparts.
10660
10661 (scm_init_storage, scm_init_gc): Moved initialization of
10662 scm_tc16_allocated from scm_init_gc to scm_init_storage.
10663
10664 (scm_init_storage): Moved initialization of scm_undefineds and
10665 scm_listofnull to eval.c, initializion of scm_nullstr to
10666 strings.c, initializion of scm_nullvect to vectors.c.
10667
10668 * gc.h (SCM_NEWCELL, SCM_NEWCELL2): Prefer SCM_NULLP over
10669 SCM_IMP, as in scm_debug_newcell and scm_debug_newcell2.
10670
10671 * init.c (scm_init_guile_1): Reordered some initializations and
10672 added dependcy information comments.
10673
10674 * load.c (scm_init_load): Use scm_nullstr.
10675
10676 * strings.c (scm_init_strings): Initialize scm_nullstr.
10677
10678 * vectors.c (scm_init_vectors): Initialize scm_nullvect.
10679
10680 2001-05-15 Marius Vollmer <mvo@zagadka.ping.de>
10681
10682 * values.c (print_values): Print as a unreadable object, not as
10683 multiple lines. Thanks to Matthias Köppe!
10684
10685 2001-05-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
10686
10687 * deprecation.c: Fixed copyright date.
10688
10689 * deprecation.h (DEPRECATION_H, SCM_DEPRECATION_H): Renamed
10690 DEPRECATION_H to SCM_DEPRECATION_H.
10691
10692 2001-05-10 Thien-Thi Nguyen <ttn@revel.glug.org>
10693
10694 * guile-doc-snarf.in: Update copyright.
10695 Fix relative path bug. Thanks to Sergey Poznyakoff.
10696
10697 2001-05-10 Marius Vollmer <mvo@zagadka.ping.de>
10698
10699 * ports.c (scm_port_revealed, scm_set_port_revealed_x): Only
10700 accept open ports. Thanks to Quetzalcoatl Bradley!
10701
10702 2001-05-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10703
10704 * procs.c: Increased `scm_subr_table_room' to 800 because Guile now
10705 has 779 primitives on startup.
10706
10707 2001-05-09 Marius Vollmer <mvo@zagadka.ping.de>
10708
10709 * eval.c (scm_i_eval): Copy expression before passing it to
10710 SCM_XEVAL. The copy operation was removed unintendedly during my
10711 change on 2001-03-25.
10712
10713 2001-05-09 Michael Livshin <mlivshin@bigfoot.com>
10714
10715 from Matthias Köppe (thanks!):
10716
10717 * ports.c (scm_c_read): pointer arithmetic on void pointers isn't
10718 portable.
10719
10720 * deprecation.c (s_scm_include_deprecated_features): ANSI'fied the
10721 docstring.
10722
10723 2001-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
10724
10725 * gc.c (scm_init_gc): Added FIXME comment.
10726
10727 * hooks.c: Since hooks don't have a name any more, it is not
10728 necessary to include objprop.h.
10729
10730 (hook_print, scm_add_hook_x): Replace SCM_NFALSEP by !SCM_FALSEP.
10731
10732 (symbol_name, scm_make_hook_with_name): Removed.
10733
10734 (scm_create_hook): Don't set the hook's name property.
10735
10736 * hooks.h (HOOKSH, SCM_HOOKS_H): Renamed HOOKSH to SCM_HOOKS_H.
10737
10738 (SCM_HOOK_NAME, scm_make_hook_with_name): Removed.
10739
10740 * init.c (scm_init_guile_1): Hooks don't use objprops any more.
10741
10742 * numbers.c (SCM_FLOBUFLEN, FLOBUFLEN, scm_number_to_string,
10743 scm_print_real, scm_print_complex): Renamed SCM_FLOBUFLEN to
10744 FLOBUFLEN and define it unconditionally.
10745
10746 2001-05-07 Marius Vollmer <mvo@zagadka.ping.de>
10747
10748 * gh_data.c (gh_lookup): Call gh_module_lookup with
10749 `scm_current_module ()', not `#f'.
10750 (gh_module_lookup): Expect a module instead of an obarray as first
10751 argument and do lookup in that module.
10752
10753 * ramap.c (raeql_1): Do not call scm_uniform_vector_length on
10754 arrays. The length of array is already determined differently and
10755 scm_uniform_vector_length does not work on arrays.
10756
10757 2001-05-06 Marius Vollmer <mvo@zagadka.ping.de>
10758
10759 * snarf.h (SCM_FUNC_CAST_ARBITRARY_ARGS): Use "SCM (*)()" for C++
10760 as well. "SCM (*)(...)" does not work on RedHat 7.1.
10761
10762 * __scm.h (SCM_WTA_DISPATCH_0): Removed ARG and POS parameters,
10763 they are not used. Changed `wrong type' error into `wrong num
10764 args' error. Changed all callers.
10765
10766 * numbers.c (scm_difference): Call SCM_WTA_DISPATCH_0 when zero
10767 arguments are supplied.
10768
10769 2001-05-05 Thien-Thi Nguyen <ttn@revel.glug.org>
10770
10771 * regex-posix.c (scm_regexp_exec): Expand docstring to briefly
10772 describe `regexp/notbol' and `regexp/noteol' execution flags.
10773
10774 * strop.c (scm_substring_move_x): Doc fix; nfc.
10775
10776 2001-05-05 Marius Vollmer <mvo@zagadka.ping.de>
10777
10778 * objects.c, objects.h (scm_valid_object_procedure_p): New.
10779 (scm_set_object_procedure_x): Use it to check argument. Fix
10780 docstring.
10781
10782 * evalext.c (scm_definedp): Fix docstring.
10783
10784 2001-05-05 Gary Houston <ghouston@arglist.com>
10785
10786 * socket.c: use HAVE_IPV6 instead of AF_INET6 to enable IPv6
10787 support.
10788
10789 2001-05-04 Neil Jerram <neil@ossau.uklinux.net>
10790
10791 * eval.c (scm_promise_p), list.c (scm_append_x, scm_reverse_x),
10792 symbols.c (scm_symbol_to_string), vports.c (scm_make_soft_port):
10793 Change R4RS references to R5RS.
10794
10795 * guile-snarf.awk.in: Fixes so that (i) blank lines in the
10796 docstring source are correctly reproduced in the output (ii)
10797 we don't anymore get occasional trailing quotes. Also reorganized
10798 and commented the code a little.
10799
10800 * scmsigs.c (scm_raise), throw.c (scm_throw): Docstring format
10801 fixes.
10802
10803 2001-05-04 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10804
10805 * strop.c (scm_string_split): New procedure.
10806
10807 * strop.h (scm_string_split): Added prototype.
10808
10809 2001-05-04 Gary Houston <ghouston@arglist.com>
10810
10811 * socket.c: define uint32_t if netdb.h doesn't. thanks to
10812 Dale P. Smith.
10813
10814 2001-05-02 Marius Vollmer <mvo@zagadka.ping.de>
10815
10816 * rw.c: Include "modules.h" and "strports.h".
10817
10818 * net_db.h (scm_gethost): Added prototype.
10819
10820 * deprecation.h, deprecation.c: New.
10821 * Makefile.am (libguile_la_SOURCES): Added "deprecation.c".
10822 (DOT_X_FILES): Added "deprecation.x".
10823 (modinclude_HEADERS): Added "deprecation.h".
10824
10825 * init.c: Include "deprecation.h".
10826 (scm_init_guile_1): Call scm_init_deprecation.
10827
10828 2001-05-01 Marius Vollmer <mvo@zagadka.ping.de>
10829
10830 * gh.h (gh_init_guile, gh_make_string, gh_string_length,
10831 gh_string_ref, gh_string_set_x, gh_substring, gh_string_append):
10832 New.
10833
10834 2001-04-29 Gary Houston <ghouston@arglist.com>
10835
10836 * rw.c: new file, implementing C part of module (ice-9 rw).
10837 (scm_read_string_x_partial): moved from ioext.c
10838 (scm_init_rw): new proc.
10839 * rw.h: new file.
10840 init.c: include rw.h and call scm_init_rw.
10841 Makefile.am: include rw.c and rw.h.
10842
10843 2001-04-28 Rob Browning <rlb@cs.utexas.edu>
10844
10845 * numbers.c: enabled local definition of SCM_FLOBUFLEN until we
10846 know what's supposed to happen to it.
10847
10848 * list.h (scm_list_star): deprecation expired - removed.
10849
10850 * numbers.h (scm_dblproc): deprecation expired - removed.
10851 (SCM_UNEGFIXABLE): deprecation expired - removed.
10852 (SCM_FLOBUFLEN): deprecation expired - removed.
10853 (SCM_INEXP): deprecation expired - removed.
10854 (SCM_CPLXP): deprecation expired - removed.
10855 (SCM_REAL): deprecation expired - removed.
10856 (SCM_IMAG): deprecation expired - removed.
10857 (SCM_REALPART): deprecation expired - removed.
10858 (scm_makdbl): deprecation expired - removed.
10859 (SCM_SINGP): deprecation expired - removed.
10860 (SCM_NUM2DBL): deprecation expired - removed.
10861 (SCM_NO_BIGDIG): deprecation expired - removed.
10862
10863 * tags.h (SCM_DOUBLE_CELLP): deprecation expired - removed.
10864 (scm_tc_dblr): deprecation expired - removed.
10865 (scm_tc_dblc): deprecation expired - removed.
10866 (scm_tc16_flo): deprecation expired - removed.
10867 (scm_tc_flo): deprecation expired - removed.
10868
10869 * tag.h (scm_tag): deprecation expired - removed.
10870
10871 * tag.c: (scm_tag): deprecation expired - removed.
10872
10873 * ioext.c: (scm_fseek): deprecation expired - removed.
10874
10875 * ioext.h (scm_fseek): deprecation expired - removed.
10876
10877 * gh_data.c (gh_int2scmb): deprecation expired - removed.
10878
10879 * gh.h (gh_int2scmb): deprecation expired - removed.
10880
10881 2001-04-28 Neil Jerram <neil@ossau.uklinux.net>
10882
10883 * stacks.c (scm_make_stack): Fix typo in docstring.
10884
10885 2001-04-27 Rob Browning <rlb@cs.utexas.edu>
10886
10887 * error.c (scm_sysmissing): deprecation expired - removed.
10888
10889 * error.h (scm_sysmissing): deprecation expired - removed.
10890
10891 * gc.c
10892 (scm_init_gc): gc-thunk deprecation expired - removed.
10893 (scm_gc_vcell): deprecation expired - removed.
10894 (gc_async_thunk): scm_gc_vcell related code removed.
10895
10896 * vectors.h (SCM_NVECTORP): deprecation expired - removed.
10897
10898 * strings.h
10899 (SCM_NSTRINGP): deprecation expired - removed.
10900 (SCM_NRWSTRINGP): deprecation expired - removed.
10901
10902 * continuations.h (SCM_SETJMPBUF): deprecation expired - removed.
10903
10904 * chars.h
10905 (SCM_ICHRP): deprecation expired - removed.
10906 (SCM_ICHR): deprecation expired - removed.
10907 (SCM_MAKICHR): deprecation expired - removed.
10908
10909 * ports.h
10910 (SCM_INPORTP): deprecation expired - removed.
10911 (SCM_OUTPORTP): deprecation expired - removed.
10912
10913 2001-04-25 Marius Vollmer <mvo@zagadka.ping.de>
10914
10915 * modules.c (scm_module_type): New.
10916 (scm_post_boot_init_modules): Initialize from Scheme value.
10917 (the_module, scm_current_module, scm_init_modules): the_module is
10918 now a C only fluid.
10919 (scm_current_module): Export to Scheme.
10920 (scm_set_current_module): Do not call out to Scheme, do all the
10921 work in C. Export procedure to Scheme. Only accept modules, `#f'
10922 is no longer valid as the current module. Only set
10923 scm_top_level_lookup_closure_var and scm_system_transformer when
10924 they are not deprecated.
10925 (scm_module_transformer, scm_current_module_transformer): New.
10926
10927 * modules.h (scm_module_index_transformer, SCM_MODULE_TRANSFORMER,
10928 scm_current_module_transformer, scm_module_transformer): New.
10929
10930 * gh_data.c: Removed FIXME comment about gh_lookup returning
10931 SCM_UNDEFINED. That's the right thing to do.
10932
10933 * eval.h, eval.c (scm_system_transformer): Deprecated by moving it
10934 into the conditionally compiled sections.
10935 * eval.c (scm_primitive_eval_x, scm_primitive_eval): Use
10936 scm_current_module_transformer instead of scm_system_transformer.
10937 * init.c (start_stack): Move initialization of
10938 scm_system_transformer to the deprecated section.
10939
10940 2001-04-22 Neil Jerram <neil@ossau.uklinux.net>
10941
10942 * throw.c (scm_throw): Correct docstring.
10943
10944 2001-04-22 Gary Houston <ghouston@arglist.com>
10945
10946 * socket.c: attempted to improve the docstrings slightly.
10947
10948 * net_db.c: remove bogus "close" declaration.
10949 (inet_aton declaration, scm_inet_aton, scm_inet_ntoa,
10950 scm_inet_netof, scm_lnaof, scm_inet_makeaddr, INADDR_ANY etc.):
10951 moved to socket.c.
10952 * net_db.h: declarations moved too.
10953
10954 * socket.c (scm_htonl, scm_ntohl): use uint32_t instead of unsigned
10955 long.
10956 (ipv6_net_to_num, ipv6_num_to_net): new static procedures.
10957 (VALIDATE_INET6): new macro.
10958 (scm_inet_pton, scm_inet_ntop): new procedures, implementing
10959 inet-pton and inet-ntop.
10960 (scm_fill_sockaddr): use VALIDATE_INET6 and ipv6_num_to_net.
10961 (scm_addr_vector): use ipv6_net_to_num.
10962
10963 2001-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
10964
10965 * eq.c (scm_equal_p), ramap.c (scm_init_ramap): Don't compute the
10966 smob number explicitly. Use SCM_TC2SMOBNUM instead.
10967
10968 * gc.c (MARK, scm_gc_sweep): Only check for illegal heap objects
10969 when compiled in debug mode.
10970
10971 (scm_gc_sweep): Only call smob's free function if it is defined.
10972
10973 * print.c (scm_iprin1): No need to check for validity of smob
10974 type or existence of print function.
10975
10976 * smob.[ch] (scm_smobs): Made into a fixed size global array.
10977 Resizing will not work well with preemptive threading.
10978
10979 * smob.c (scm_smob_print): Don't use SCM_CDR to access smob data.
10980
10981 (scm_make_smob_type): Extracted initialization of smob
10982 descriptors to scm_smob_prehistory. Don't use scm_numsmob outside
10983 of the critical section.
10984
10985 (scm_smob_prehistory): Initialize all smob descriptors. By
10986 default, don't assign a smob free function: Most smob types don't
10987 need one.
10988
10989 * smob.h (SMOBH, SCM_SMOB_H): Renamed SMOBH to SCM_SMOB_H.
10990
10991 2001-04-21 Gary Houston <ghouston@arglist.com>
10992
10993 * socket.c (FLIP_NET_HOST_128): new macro.
10994 (scm_fill_sockaddr): use new macro.
10995 (scm_addr_vector): completed IPv6 address support. added const
10996 to the address parameter.
10997
10998 2001-04-20 Gary Houston <ghouston@arglist.com>
10999
11000 * socket.c (scm_fill_sockaddr): call htons for sin6_port.
11001 Don't assign sin6_scope_id in structure unless HAVE_SIN6_SCOPE_ID
11002 is defined.
11003 (scm_addr_vector): use a switch instead of multiple if statements.
11004 Add support for IPv6 (incomplete) .
11005 MAX_ADDR_SIZE: increase to size of struct sockaddr_in6 if needed.
11006
11007 2001-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
11008
11009 * struct.c (scm_free_structs): Only pairs may be accessed with
11010 SCM_C[AD]R.
11011
11012 2001-04-19 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11013
11014 * unif.h (SCM_ARRAY_CONTIGUOUS): Reintroduced as deprecated.
11015
11016 * __scm.h (SCM_WTA_DISPATCH_0, SCM_WTA_DISPATCH_1,
11017 SCM_WTA_DISPATCH_2, SCM_WTA_DISPATCH_n): Inserted required
11018 parentheses in order to get the correct associativity.
11019
11020 2001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
11021
11022 * unif.c (scm_array_to_list): Added missing handling of arrays of
11023 bytes. Thanks to Masao Uebayashi for the bug report.
11024
11025 2001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
11026
11027 * debug.c (scm_procedure_source): Use SCM_CLOSURE_FORMALS more
11028 consistently.
11029
11030 2001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
11031
11032 * procs.h (SCM_CLOSURE_FORMALS): New macro.
11033
11034 * debug.c (scm_procedure_source), eval.c (scm_badformalsp,
11035 SCM_CEVAL, SCM_APPLY), goops.c (get_slot_value, set_slot_value),
11036 procprop.c (scm_i_procedure_arity), sort.c (closureless): Use
11037 SCM_CLOSURE_FORMALS.
11038
11039 * eval.c (scm_badformalsp, SCM_CEVAL), procprop.c
11040 (scm_i_procedure_arity): Prefer stronger predicates like
11041 SCM_NULLP or SCM_FALSEP over SCM_IMP.
11042
11043 * macros.c (macro_print): Extracted macro printing code from
11044 print.c and simplified it.
11045
11046 (scm_macro_type): Use SCM_MACRO_TYPE;
11047
11048 (scm_init_macros): Use macro_print for printing macros.
11049
11050 * print.c (scm_print_opts): Improved option documentation.
11051
11052 (scm_iprin1): Extracted printing of macros to macros.c.
11053 Simplified printing of ordinary closures.
11054
11055 * procs.c (scm_thunk_p): Fixed handling of closures. Thanks to
11056 Martin Grabmueller for the bug report.
11057
11058 2001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
11059
11060 This patch eliminates some further applications of SCM_C[AD]R to
11061 non pair cells.
11062
11063 * gc.h (SCM_SETAND_CAR, SCM_SETOR_CAR): Deprecated. These have
11064 never been applied to real pairs.
11065
11066 * srcprop.h (SCM_SOURCE_PROPERTY_FLAG_BREAK): Added.
11067
11068 (SRCPROPBRK): Use SCM_SOURCE_PROPERTY_FLAG_BREAK.
11069
11070 * unif.h (SCM_ARRAY_CONTIGUOUS, SCM_ARRAY_FLAG_CONTIGUOUS,
11071 SCM_ARRAY_CONTP): Renamed SCM_ARRAY_CONTIGUOUS to
11072 SCM_ARRAY_FLAG_CONTIGUOUS and use it.
11073
11074 (SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG):
11075 Added.
11076
11077 * srcprop.h (SRCPROPH), unif.h (UNIFH): Renamed to
11078 SCM_SOURCE_PROPERTIES_H and SCM_UNIFORM_VECTORS_H, respectively.
11079
11080 * srcprop.h (SETSRCPROPBRK, CLEARSRCPROPBRK), unif.c
11081 (scm_dimensions_to_uniform_array, scm_ra_set_contp): Don't use
11082 SCM_SET{AND,OR}_CAR.
11083
11084 2001-04-17 Gary Houston <ghouston@arglist.com>
11085
11086 * some initial support for IPv6:
11087
11088 * socket.c (scm_fill_sockaddr): improve the argument validation.
11089 don't allocate memory until all args are checked. instead of
11090 unconditional memset of soka, try setting sin_len to 0 if
11091 SIN_LEN is defined. add support for AF_INET6. define FUNC_NAME.
11092 (scm_socket, scm_connect): extend docstrings for IPv6.
11093 (scm_init_socket): intern AF_INET6 and PF_INET6.
11094
11095 2001-04-17 Niibe Yutaka <gniibe@m17n.org>
11096
11097 * srcprop.c (scm_make_srcprops): Added SCM_ALLOW_INTS which
11098 matches SCM_DEFER_INTS at the beginning of the function.
11099
11100 * mallocs.c (scm_malloc_obj): Remove un-matched SCM_ALLOW_INTS.
11101
11102 * gc.c (scm_igc): Unconditionally call
11103 SCM_CRITICAL_SECTION_START/END.
11104
11105 * fluids.c (next_fluid_num): Unconditionally call
11106 SCM_CRITICAL_SECTION_START/END.
11107 (s_scm_make_fluid): Remove un-matched SCM_DEFER_INTS.
11108
11109 * coop-defs.h (SCM_THREAD_DEFER, SCM_THREAD_ALLOW,
11110 SCM_THREAD_REDEFER, SCM_THREAD_REALLOW_1, SCM_THREAD_REALLOW_2):
11111 Removed.
11112
11113 * __scm.h (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END):
11114 Defined as nothing for the case of !defined(USE_THREADS).
11115 (SCM_THREAD_DEFER, SCM_THREAD_ALLOW, SCM_THREAD_REDEFER):
11116 Removed.
11117 (<stdio.h>): Include when (SCM_DEBUG_INTERRUPTS == 1).
11118 (SCM_CHECK_NOT_DISABLED, SCM_CHECK_NOT_ENABLED): Print FILE and
11119 LINE.
11120 (SCM_DEFER_INTS, SCM_ALLOW_INTS_ONLY, SCM_ALLOW_INTS,
11121 SCM_REDEFER_INTS, SCM_REALLOW_INTS): Don't use
11122 SCM_THREAD_DEFER/SCM_THREAD_ALLOW. Instead, use
11123 SCM_CRITICAL_SECTION_START/END.
11124 (SCM_REALLOW_INTS: Bug fix. Don't call
11125 SCM_THREAD_SWITCHING_CODE.
11126 (SCM_TICK): Don't use SCM_DEFER_INTS/SCM_ALLOW_INTS. Instead, use
11127 SCM_THREAD_SWITCHING_CODE directly.
11128 (SCM_ENTER_A_SECTION): Unconditionally use
11129 SCM_CRITICAL_SECTION_START/END. (was:
11130 SCM_DEFER_INTS/SCM_ALLOW_INTS when SCM_POSIX_THREADS defined).
11131
11132 2001-04-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
11133
11134 * __scm.h (SCM_CAREFUL_INTS, SCM_DEBUG_INTERRUPTS): Replaced the
11135 macro SCM_CAREFUL_INTS by the macro SCM_DEBUG_INTERRUPTS and
11136 allowed to explicitly set this macro via the CFLAGS variable
11137 during make.
11138
11139 * fluids.c (next_fluid_num), gc.c (scm_igc), coop-defs.h
11140 (SCM_THREAD_CRITICAL_SECTION_START,
11141 SCM_THREAD_CRITICAL_SECTION_END): Renamed
11142 SCM_THREAD_CRITICAL_SECTION_START/END to
11143 SCM_CRITICAL_SECTION_START/END.
11144
11145 2001-04-11 Keisuke Nishida <kxn30@po.cwru.edu>
11146
11147 * debug-malloc.c (grow, scm_debug_malloc_prehistory): Use memset
11148 instead of bzero.
11149
11150 * coop.c, iselect.c (FD_ZERO_N): Unconditionally use memset.
11151 (MISSING_BZERO_DECL): Remove the declaration.
11152
11153 Thanks to NIIBE Yutaka.
11154
11155 2001-04-10 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11156
11157 * init.c, goops.c, goops.h: Reverted change of 2001-03-29. (The
11158 goops module should be registered in order to work for an
11159 application which uses libguile statically linked.)
11160
11161 2001-04-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
11162
11163 * numbers.[ch] (scm_num2long, scm_num2long_long,
11164 scm_num2ulong_long, scm_num2ulong): Argument position is an
11165 unsigned integer.
11166
11167 * environments.c (eval_environment_folder,
11168 import_environment_folder), gh_data.c (gh_scm2longs,
11169 gh_scm2floats, gh_scm2doubles): Distinguish between 0 and NULL
11170 for integers and pointers, respectively.
11171
11172 * gh_data.c (gh_scm2ulong, gh_scm2long, gh_scm2int), socket.c
11173 (scm_fill_sockaddr), unif.c (scm_array_set_x), validate.h
11174 (SCM_NUM2ULONG, SCM_NUM2LONG, SCM_NUM2LONG_DEF,
11175 SCM_NUM2LONG_LONG): Don't pass argument positions as pointers.
11176
11177 * filesys.c (scm_open_fdes, scm_open), net_db (scm_inet_ntoa,
11178 scm_inet_netof, scm_lnaof, scm_gethost, scm_getproto), posix.c
11179 (scm_utime), ramap.c (scm_array_fill_int), scmsigs.c
11180 (scm_sigaction), socket.c (scm_htonl, scm_ntohl, scm_sendto),
11181 stime.c (scm_localtime, scm_gmtime), struct.c (scm_struct_set_x),
11182 validate.h (SCM_VALIDATE_LONG_COPY): Whitespace fixes.
11183
11184 2001-04-09 Neil Jerram <neil@ossau.uklinux.net>
11185
11186 * strings.c (scm_read_only_string_p): Update docstring to reflect
11187 current (non-)usage of "read only" strings.
11188 (scm_make_shared_substring): Clarify docstring by changing
11189 "semantics" to "arguments".
11190
11191 2001-04-06 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11192
11193 * hooks.c (scm_make_hook, scm_make_hook_with_name),
11194 (scm_hook_p, scm_hook_empty_p, scm_run_hook): Docstring
11195 improvements.
11196
11197 2001-04-03 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11198
11199 The following changes make the documentation more consistent.
11200
11201 * rdelim.c (scm_write_line), posix.c (scm_utime), ports.c
11202 (scm_seek), net_db.c (scm_inet_aton, scm_inet_ntoa),
11203 (scm_inet_netof, scm_lnaof, scm_inet_makeaddr), ioext.c
11204 (scm_ftell): Changed @smalllisp ... @end smalllisp to @lisp
11205 ... @end lisp.
11206
11207 * vports.c (scm_make_soft_port), version.c (scm_version), unif.c
11208 (scm_array_dimensions, scm_make_shared_array),
11209 (scm_transpose_array, scm_enclose_array, scm_bit_count_star),
11210 throw.c (scm_catch), struct.c (scm_make_vtable_vtable), strop.c
11211 (scm_string_rindex, scm_string_index, scm_substring_fill_x),
11212 (scm_string_null_p), strings.c (scm_read_only_string_p), root.c
11213 (scm_call_with_dynamic_root), ramap.c (scm_array_index_map_x),
11214 posix.c (scm_mknod), numbers.c (scm_logtest, scm_logbit_p),
11215 macros.c (scm_makmmacro), list.c (scm_append), environments.c
11216 (scm_environment_fold), dynwind.c (s_scm_dynamic_wind): Changed
11217 @example ... @end example to @lisp ... @end lisp.
11218
11219 * weaks.c (scm_weak_vector): Corrected docstring.
11220
11221 * hashtab.c (scm_hashq_ref, scm_hashq_set_x, scm_hashq_remove_x),
11222 (scm_hashv_ref, scm_hashv_set_x, scm_hashv_remove_x),
11223 (scm_hash_ref, scm_hash_set_x, scm_hash_remove_x, scm_hashx_ref),
11224 (scm_hashx_set_x, scm_hashx_get_handle),
11225 (scm_hashx_create_handle_x), regex-posix.c (scm_make_regexp),
11226 (scm_regexp_exec, scm_regexp_p), numbers.c (scm_logtest),
11227 vectors.c (scm_vector_fill_x), strings.c
11228 (scm_make_shared_substring), symbols.c (scm_string_to_symbol),
11229 objprop.c (scm_set_object_properties_x):
11230 (scm_set_object_property_x), throw.c (scm_catch, scm_lazy_catch),
11231 strports.c (scm_call_with_input_string), ports.c
11232 (scm_truncate_file), ioext.c (scm_ftell), ports.c (scm_seek),
11233 list.c (scm_append_x), dynwind.c (scm_dynamic_wind), error.c
11234 (scm_error_scm), vports.c (scm_make_soft_port), weaks.c
11235 (scm_make_weak_vector,scm_weak_vector_p),
11236 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table),
11237 (scm_make_doubly_weak_hash_table, scm_weak_key_hash_table_p),
11238 (scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
11239 macros.c (scm_macro_type), dynl.c (scm_dynamic_link),
11240 (scm_dynamic_unlink, scm_dynamic_call, scm_dynamic_args_call):
11241 Made parameter names match documentation by renaming parameters
11242 and/or fixing docstrings.
11243
11244 * numbers.c (scm_ash): Corrected Texinfo markup.
11245
11246 * strop.c (scm_string_index, scm_string_rindex),
11247 (scm_substring_fill_x, scm_string_null_p): Removed `qdocs'.
11248
11249 * vports.c (scm_make_soft_port), unif.c
11250 (scm_uniform_vector_length, scm_array_p, scm_array_rank),
11251 (scm_dimensions_to_uniform_array, scm_transpose_array),
11252 (scm_array_in_bounds_p, scm_uniform_vector_ref),
11253 (scm_bit_count, scm_bit_position, scm_bit_count_star),
11254 (scm_array_to_list, scm_list_to_uniform_array),
11255 (scm_array_prototype, symbols.c (scm_string_to_symbol), strports.c
11256 (scm_open_input_string, scm_open_output_string),
11257 (scm_get_output_string), strop.c (scm_string_copy),
11258 (scm_string_fill_x), strings.c (scm_string_p, scm_string), stime.c
11259 (scm_get_internal_real_time, scm_times),
11260 (scm_get_internal_run_time, scm_current_time, scm_gettimeofday),
11261 (scm_localtime, scm_gmtime), socket.c (scm_htons, scm_ntohs),
11262 (scm_htonl, scm_ntohl, scm_socket, scm_socketpair),
11263 (scm_getsockopt, scm_getsockname, scm_getpeername, scm_recvfrom),
11264 simpos.c (scm_system), random.c (scm_random_uniform),
11265 (scm_random_normal, scm_random_exp), ramap.c
11266 (scm_array_equal_p), posix.c (scm_pipe, scm_getgroups),
11267 (scm_status_exit_val, scm_status_term_sig, scm_status_stop_sig),
11268 (scm_getppid, scm_getuid, scm_getgid, scm_geteuid, scm_getegid),
11269 (scm_getpgrp, scm_ttyname, scm_ctermid, scm_tcgetpgrp, scm_uname),
11270 (scm_environ, scm_tmpnam, scm_mkstemp, scm_access, scm_getpid),
11271 (scm_setlocale), ports.c (scm_char_ready_p, scm_drain_input),
11272 (scm_pt_size, scm_pt_member, scm_port_revealed, scm_port_mode),
11273 (scm_close_port, scm_input_port_p, scm_output_port_p, scm_port_p),
11274 (scm_port_closed_p, scm_eof_object_p, scm_read_char),
11275 (scm_peek_char), pairs.c (scm_pair_p, scm_cons), numbers.c
11276 (scm_logand, scm_logior, scm_logxor, scm_lognot),
11277 (scm_integer_expt, scm_bit_extract, scm_logcount),
11278 (scm_integer_length, scm_string_to_number, scm_inexact_to_exact),
11279 net_db.c (scm_inet_netof, scm_lnaof), modules.c
11280 (scm_interaction_environment), macros.c (scm_makacro),
11281 (scm_makmacro, scm_makmmacro), keywords.c (scm_keyword_p), ioext.c
11282 (scm_ftell, scm_dup_to_fdes, scm_fileno, scm_isatty_p),
11283 (scm_fdopen, scm_fdes_to_ports), gc.c (scm_gc_stats), fluids.c
11284 (scm_fluid_ref), filesys.c (scm_open_fdes),
11285 (scm_stat, scm_directory_stream_p, scm_getcwd, scm_readlink):
11286 Docstring correction: `Returns' -> `Return'
11287
11288 * gc.c (scm_set_debug_cell_accesses_x):
11289 (s_scm_gc_set_debug_check_freelist_x):
11290 * fluids.c (scm_fluid_p): Added texinfo markup.
11291
11292 * error.c (scm_strerror): Made docstring more precise.
11293
11294 * vectors.c (scm_vector_p, scm_vector, scm_make_vector),
11295 (scm_vector_to_list, _scm_vector_fill_x), symbols.c
11296 (scm_symbol_p, scm_symbol_to_string), strorder.c
11297 (scm_string_equal_p, scm_string_ci_equal_p, scm_string_less_p),
11298 (scm_string_leq_p, scm_string_gr_p, scm_string_geq_p),
11299 (scm_string_ci_less_p, scm_string_ci_leq_p, scm_string_ci_gr_p):
11300 (scm_string_ci_geq_p), strop.c (scm_string_copy),
11301 (scm_string_fill_x): Removed `(r5rs)' from docstrings.
11302
11303 2001-04-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
11304
11305 * gc.c (MARK): Re-introduce a cheap sanity test for non debug
11306 mode, as suggested by Michael Livshin.
11307
11308 2001-03-31 Michael Livshin <mlivshin@bigfoot.com>
11309
11310 * backtrace.c (display_backtrace_body): since the `print_state'
11311 variable is not used (instead its data field is used directly as
11312 `pstate'), protect it from the hungry compiler optimizations.
11313 thanks to Bill Schottstaedt for the report.
11314
11315 2001-03-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
11316
11317 * gc.[ch] (scm_tc16_allocated): New type tag for allocated cells.
11318 It is only defined and used if guile is compiled with
11319 SCM_DEBUG_CELL_ACCESSES set to true. It's purpose is, to never
11320 let cells with a free_cell type tag be visible outside of the
11321 garbage collector when in debug mode.
11322
11323 * gc.c (scm_debug_cell_accesses_p): Set to true as default.
11324
11325 (scm_assert_cell_valid): Use a local static variable to avoid
11326 recursion.
11327
11328 (MARK): Only check for rogue cell pointers in debug mode. Use
11329 scm_cellp for this purpose and place all checks for rogue pointers
11330 into that function. Further, since due to conservative scanning
11331 we may encounter free cells during marking, don't use the standard
11332 cell type accessor macro to determine the cell type.
11333
11334 (scm_cellp): Check if the cell pointer actually points into a
11335 card header.
11336
11337 (scm_init_gc): Initalize scm_tc16_allocated.
11338
11339 * gc.h (GCH): Renamed to SCM_GC_H.
11340
11341 (SCM_VALIDATE_CELL): Enclose the expression in brackets. This
11342 might be unnecessary, but I feel better this way :-)
11343
11344 (SCM_GC_CELL_TYPE): New macro.
11345
11346 (SCM_SETAND_CDR, SCM_SETOR_CDR): Deprecated. These are not used
11347 in guile, and it is unlikely that they will be applied to real
11348 pairs anyway.
11349
11350 (SCM_SET_FREE_CELL_TYPE): Removed. It was not used.
11351
11352 (SCM_GC_SET_ALLOCATED): New macro. Only non-empty if guile is
11353 compiled with SCM_DEBUG_CELL_ACCESSES set to true.
11354
11355 (SCM_NEWCELL, SCM_NEWCELL2): Use of SCM_GC_SET_ALLOCATED will
11356 make sure that in debug mode no free cell will ever be visible
11357 outside of the garbage collector.
11358
11359 2001-03-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
11360
11361 * async.c (scm_asyncs_pending): Don't use != to compare SCM
11362 values.
11363
11364 * async.c (scm_system_async), variable.c (scm_make_variable,
11365 scm_make_undefined_variable): Use scm_cons to create a pair.
11366
11367 * debug.c (scm_reverse_lookup): Perform proper type checking.
11368 Remove suspicious use of SCM_SLOPPY_CONSP.
11369
11370 * eq.c (scm_equal_p), tags.h (SCM_ECONSP): Use SCM_CONSP instead
11371 of SCM_SLOPPY_CONSP. A sane compiler should be able to perform
11372 the corresponding optimization.
11373
11374 * eval.c (iqq): Use proper type check.
11375
11376 (scm_m_expand_body): Remove redundant type checks.
11377
11378 (promise_print): Don't access promise cells as pairs.
11379
11380 * eval.c (EVALCAR, iqq, scm_m_expand_body, scm_eval_args,
11381 scm_deval_args SCM_CEVAL), guardians.c (scm_guard), hashtab.c
11382 (scm_internal_hash_fold), print.c (scm_iprlist): Use !SCM_CELLP
11383 for SCM_NCELLP, !SCM_CONSP for SCM_NCONSP, !SCM_IMP for SCM_NIMP,
11384 !SCM_FALSEP for SCM_NFALSEP, !SCM_NULLP for SCM_NNULLP
11385
11386 * eval.c (scm_m_define, scm_macroexp, SCM_CEVAL), print.c
11387 (scm_iprin1): Use new macro predicate and accessors.
11388
11389 * eval.h (scm_tc16_macro): Removed declaration. It is declared
11390 in macros.h.
11391
11392 * eval.h (EVALH), macros.h (MACROSH), ports.h (PORTSH), procs.h
11393 (PROCSH), tags.h (TAGSH), variable.h (VARIABLEH): Renamed to
11394 SCM_EVAL_H, SCM_MACROS_H, SCM_PORTS_H, SCM_PROCS_H, SCM_TAGS_H and
11395 SCM_VARIABLE_H. Even the macros that are used to inhibit
11396 including a header file twice should be in the SCM_ namespace.
11397
11398 * fluids.c (scm_swap_fluids, scm_swap_fluids_reverse),
11399 properties.c (scm_primitive_property_ref,
11400 scm_primitive_property_del_x): Prefer stronger predicates like
11401 SCM_NULLP or SCM_FALSEP over SCM_IMP.
11402
11403 * gc.c (MARK): Use proper macros to access procedure-with-setter
11404 cell elements and closure cell elements.
11405
11406 (gc_sweep_freelist_finish, scm_gc_sweep, init_heap_seg): Don't
11407 access free cells as pairs.
11408
11409 (scm_unprotect_object): scm_hashq_get_handle returns #f if
11410 no hashtab entry is found.
11411
11412 * gc.c (scm_gc_sweep), ports.c (scm_close_port): Use new macro
11413 SCM_CLR_PORT_OPEN_FLAG.
11414
11415 * guardians.c (TCONC_IN), print.c (scm_free_print_state): Don't
11416 use SCM_SET_C[AD]R for uninitialized cells.
11417
11418 * hashtab.c (scm_hash_fn_get_handle): Use SCM_VALIDATE_VECTOR.
11419 If the hashtable has no slots, return #f instead of '(). This
11420 unifies the return value with most assoc-functions.
11421
11422 (scm_hash_fn_ref): Use proper type check.
11423
11424 (scm_hashq_get_handle, scm_hashv_get_handle, scm_hash_get_handle):
11425 Removed references to non-existing functions from documentation.
11426
11427 * keywords.c (scm_keyword_dash_symbol): Use proper macros to
11428 access keyword cell elements.
11429
11430 * macros.h (SCM_MACROP, SCM_MACRO_TYPE, SCM_MACRO_CODE): New
11431 macros.
11432
11433 * ports.h (SCM_CLR_PORT_OPEN_FLAG): New macro.
11434
11435 * print.c (scm_iprlist): Added comment. Improved loop
11436 conditions.
11437
11438 * procs.h (SCM_ENV, SCM_SETENV): Don't access closure cells as
11439 pairs.
11440
11441 * smob.c (scm_markcdr): Don't access smob cells as pairs.
11442
11443 * tags.h (SCM_SLOPPY_CONSP, SCM_SLOPPY_NCONSP): Deprecated.
11444
11445 * throw.c (ACTIVATEJB, DEACTIVATEJB): Don't access jump buffer
11446 cells as pairs.
11447
11448 * variable.c (variable_print, variable_equalp, scm_variable_ref,
11449 scm_variable_set_x): Use proper macros to access variable cell
11450 elements.
11451
11452 (scm_variable_bound_p): Don't use SCM_NEGATE_BOOL.
11453
11454 * variable.h (SCM_VARVCELL): Don't access variable cells as
11455 pairs.
11456
11457 * vectors.c (scm_vector), weaks.c (scm_weak_vector): Simplified,
11458 added FIXME comment, removed register specifier.
11459
11460 2001-03-29 Keisuke Nishida <kxn30@po.cwru.edu>
11461
11462 * goops.c, goops.h (scm_init_oop_goops_goopscore_module): Deprecated.
11463 * init.c (scm_init_guile_1): Don't init goopscore module.
11464
11465 2001-03-27 Marius Vollmer <mvo@zagadka.ping.de>
11466
11467 * eval.c (SCM_APPLY): Check that arg1 is bound for scm_tc7_cxr.
11468
11469 2001-03-27 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11470
11471 * strop.c (scm_string_to_list): Fixed docstring markup.
11472 (scm_string_upcase_x, scm_string_upcase, scm_string_downcase_x),
11473 (scm_string_downcase, scm_string_capitalize_x),
11474 (scm_string_capitalize): Rewrote and corrected docstrings.
11475 (scm_string_ci_to_symbol): Made docstring more explicit.
11476
11477 2001-03-27 Marius Vollmer <mvo@zagadka.ping.de>
11478
11479 * values.h (scm_values_vtable, SCM_VALUESP): Moved here so that
11480 eval.c can use it.
11481 (scm_call_with_values): Removed.
11482 * values.c (values_vtable, scm_values_vtable): Added "scm_" prefix
11483 so that it can be exported.
11484 (scm_call_with_values): Removed.
11485
11486 * tags.h (SCM_IM_CALL_WITH_VALUES): New isym.
11487 * eval.c: Include "libguile/values.h"
11488 (scm_m_at_call_with_values, scm_sym_at_call_with_values):
11489 New.
11490 (unmemocopy, scm_ceval, scm_deval): Handle new isym.
11491 * eval.h (scm_sym_at_call_with_values, scm_m_at_call_with_values):
11492 New delcarations to support above change.
11493
11494 * eval.c (scm_primitive_eval_x, scm_primitive_eval): Fix syntax
11495 errors with last change.
11496
11497 2001-03-25 Marius Vollmer <mvo@zagadka.ping.de>
11498
11499 * eval.c (scm_primitive_eval_x, scm_primitive_eval, scm_i_eval_x,
11500 scm_i_eval): Moved the application of the system transformer from
11501 scm_i_eval to scm_primitive_eval.
11502
11503 2001-03-23 Neil Jerram <neil@ossau.uklinux.net>
11504
11505 * guile-snarf.awk.in: Substitute "\\" with "\" in .doc output.
11506
11507 * strop.c (scm_string_index): Fix docstring line break
11508 regression.
11509
11510 * list.c (scm_cons_star): Fix docstring typo.
11511
11512 2001-03-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
11513
11514 * gc.c (scm_init_storage), gdbint.c (scm_init_gdbint), numbers.c
11515 (big2str), ports.c (scm_drain_input), read.c (scm_read,
11516 scm_grow_tok_buf), strings.c (scm_string, scm_makfromstr,
11517 scm_make_string, scm_string_append), strports.c (st_resize_port,
11518 scm_object_to_string), unif.c (scm_make_uve): Replace calls to
11519 scm_makstr with calls to scm_allocate_string.
11520
11521 * strings.[ch] (scm_allocate_string): New function.
11522
11523 * strings.[ch] (scm_makstr): Deprecated.
11524
11525 2001-03-18 Gary Houston <ghouston@arglist.com>
11526
11527 * posix.c (scm_tmpnam): check that return value from tmpnam is not
11528 NULL. rewrote the docstring.
11529 (scm_mkstemp): new procedure implementing "mkstemp!".
11530 * posix.h: declare scm_mkstemp.
11531
11532 * net_db.c: declare h_errno if configure didn't define HAVE_H_ERRNO.
11533 normally it would be found in netdb.h.
11534
11535 2001-03-17 Gary Houston <ghouston@arglist.com>
11536
11537 * sort.c (scm_sort): move sortvec variable to avoid a compiler
11538 warning when HAVE_ARRAYS is not defined. move len too.
11539
11540 * Makefile.am (DOT_X_FILES): remove net_db.x, posix.x, socket.x.
11541 (EXTRA_DOT_X_FILES): let configure set the value.
11542 (DOT_DOC_FILES): remove net_db.doc, posix.doc, socket.doc.
11543
11544 * gc.c (scm_must_malloc): changed the comment explaining when
11545 scm_must variants of malloc/free etc., should be used, based on
11546 explanation from Dirk Herrmann.
11547 * fports.c (scm_fport_buffer_add): use FUNC_NAME instead of a local
11548 string with procedure name. use scm_must_malloc instead of malloc.
11549 (scm_setvbuf, scm_fdes_to_port, fport_close): use scm_must variants
11550 of malloc/free.
11551 * ports.c (scm_add_to_port_table, scm_remove_from_port_table,
11552 scm_ungetc): use scm_must variants of malloc/realloc/free.
11553 (scm_add_to_port_table, scm_ungetc): define FUNC_NAME.
11554
11555 2001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
11556
11557 * __scm.h (SCM_ASSERT, SCM_WTA_DISPATCH_0, SCM_WTA_DISPATCH_1,
11558 SCM_WTA_DISPATCH_2, SCM_WTA_DISPATCH_n): Don't call scm_wta, call
11559 scm_wrong_type_arg instead.
11560
11561 (SCM_WNA): Deprecated.
11562
11563 * error.[ch] (scm_wta): Deprecated.
11564
11565 * numbers.c (s_i_log): Minor comment fix.
11566
11567 * read.c (scm_lreadr), unif.c (scm_aind, scm_shap2ra,
11568 scm_make_shared_array, scm_transpose_array, scm_enclose_array,
11569 scm_array_in_bounds_p): Don't use SCM_ASSERT to check for
11570 wrong-num-args or misc errors.
11571
11572 * unif.c (scm_make_shared_array, scm_transpose_array,
11573 scm_enclose_array, scm_array_in_bounds_p, scm_array_set_x):
11574 Validate the rest argument (note: this is only done when guile is
11575 built with SCM_DEBUG_REST_ARGUMENT=1)
11576
11577 (scm_array_in_bounds_p, scm_uniform_vector_ref, scm_array_set_x):
11578 Replace calls to scm_wrong_num_args by SCM_WRONG_NUM_ARGS.
11579
11580 * validate.h (SCM_FUNC_NAME, SCM_VALIDATE_NUMBER_COPY,
11581 SCM_VALIDATE_NUMBER_DEF_COPY): Deprecated.
11582
11583 2001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
11584
11585 * validate.h (SCM_WRONG_NUM_ARGS): Call scm_error_num_args_subr
11586 instead of scm_wrong_num_args.
11587
11588 * coop-threads.c: Don't include libguile/strings.h. (Was only
11589 needed for former implementation of SCM_WRONG_NUM_ARGS.)
11590
11591 * debug.c (scm_m_start_stack): Don't use SCM_ASSERT to check for
11592 wrong-num-args errors.
11593
11594 2001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
11595
11596 * error.[ch] (scm_error_num_args_subr): New function.
11597
11598 2001-03-16 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11599
11600 * list.c (scm_list, scm_cons_star, scm_null_p, scm_list_p),
11601 (scm_length, scm_append, scm_reverse, scm_list_ref),
11602 (scm_memq, scm_memv, scm_member, scm_delv_x, scm_delete_x),
11603 (scm_delq, scm_delv, scm_delete, scm_delq1_x, scm_delv1_x),
11604 (scm_delete1_x), gc.c (scm_map_free_list),
11605 (scm_free_list_length), hash.c (scm_hashq, scm_hashv),
11606 (scm_hash), hashtab.c (scm_hashq_ref, scm_hashq_set_x),
11607 (scm_hashq_remove_x, scm_hashv_ref, scm_hashv_set_x),
11608 (scm_hashv_remove_x, scm_hash_ref, scm_hash_set_x),
11609 (scm_hash_remove_x), ports.c (scm_pt_size, scm_pt_member), print.c
11610 (scm_current_pstate), scmsigs.c (scm_usleep), goops.c
11611 (scm_get_keyword, scm_sys_compute_slots): Added texinfo markup.
11612
11613 * weaks.c (scm_weak_vector_p, scm_weak_key_hash_table_p),
11614 (scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
11615 rdelim.c (scm_read_delimited_x), strop.c (scm_string_index),
11616 symbols.c (scm_symbol_interned_p), numbers.c
11617 (scm_string_to_number), ports.c (scm_port_p): Corrected texinfo
11618 markup.
11619
11620 2001-03-16 Keisuke Nishida <kxn30@po.cwru.edu>
11621
11622 * snarf.h (SCM_CONST_LONG): Deprecated.
11623 * tag.c (CONST_INUM): New macro. Use it to define scm_utag_*.
11624
11625 2001-03-15 Marius Vollmer <marius.vollmer@uni-dortmund.de>
11626
11627 * numbers.c (scm_num2ulong): Check that a bignum is positive
11628 before looking at the magnitude. Correctly check for overflow
11629 during conversion.
11630 (scm_num2long_long): Likewise.
11631 (scm_num2ulong_long): New.
11632 (ULONG_LONG_MAX): Define if not already defined.
11633 * numbers.h: (scm_num2ulong_long): New prototype.
11634
11635 2001-03-15 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11636
11637 * validate.h (SCM_VALIDATE_OPOUTSTRPORT): New macro.
11638
11639 * strports.h (SCM_STRPORTP, SCM_OPSTRPORTP, SCM_OPINSTRPORTP),
11640 (SCM_OPOUTSTRPORTP): New predicate macros.
11641 (scm_open_input_string, scm_open_output_string),
11642 (scm_get_output_string): New prototypes.
11643
11644 * strports.c (scm_open_input_string, scm_open_output_string),
11645 (scm_get_output_string): New procedures (SRFI-6 compliant).
11646 Made scm_tc16_strport non-static.
11647
11648 2001-03-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
11649
11650 * macros.h (SCM_ASSYNT): Removed unused object argument from
11651 signature.
11652
11653 * eval.c (scm_m_body, scm_m_quote, scm_m_begin, scm_m_if,
11654 scm_m_set_x, scm_m_and, scm_m_or, scm_m_case, scm_m_cond,
11655 scm_m_letstar, scm_m_do, scm_m_quasiquote, scm_m_delay,
11656 scm_m_define, scm_m_letrec1, scm_m_letrec, scm_m_let, scm_m_apply,
11657 scm_m_cont, scm_m_nil_cond, scm_m_nil_ify, scm_m_t_ify,
11658 scm_m_0_cond, scm_m_0_ify, scm_m_1_ify, scm_m_atfop, scm_m_atbind,
11659 scm_m_expand_body), evalext.c (scm_m_generalized_set_x,
11660 scm_m_undefine), goops.c (scm_m_atslot_ref, scm_m_atslot_set_x,
11661 scm_m_atdispatch): Removed unused object argument from call to
11662 SCM_ASSYNT.
11663
11664 2001-03-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
11665
11666 * gh.h/gh_data.c (gh_ints2scm): Changed the signature to use a
11667 const int* to reflect that the input array of integers remains
11668 unchanged. Thanks to Brett Viren for the hint.
11669
11670 2001-03-14 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11671
11672 * gh_data.c (gh_scm2chars, gh_scm2shorts, gh_scm2longs),
11673 (gh_scm2floats, gh_scm2doubles): Check for malloc() returning NULL
11674 in various places.
11675 (gh_scm2newstr, gh_symbol2newstr): Change call to
11676 scm_must_malloc() to malloc(), because user-free()able memory is
11677 allocated.
11678
11679 * gc.c: Added declaration of `scm_debug_check_freelist'.
11680
11681 2001-03-13 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11682
11683 * ports.c (scm_port_mode): Changed `mode' array size to 4.
11684
11685 2001-03-12 Keisuke Nishida <kxn30@po.cwru.edu>
11686
11687 * strports.c (scm_object_to_string): New procedure.
11688 (scm_strprint_obj): Deprecated.
11689 * strports.h: Reflect the changes.
11690
11691 2001-03-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
11692
11693 * goops.h (SCM_VALIDATE_PUREGENERIC): New macro.
11694
11695 * goops.c (scm_m_atslot_ref, scm_m_atslot_set_x,
11696 scm_m_atdispatch): Provide definitions for FUNC_NAME. Don't use
11697 SCM_ASSYNT to check for correct argument types. Either use some
11698 SCM_VALIDATE_* macro or an explicit test.
11699
11700 (scm_make_foreign_object): Don't use SCM_ASSERT to check for
11701 misc-errors.
11702
11703 * macros.h (SCM_ASSYNT): On assertion failure, issue a misc-error
11704 instead of calling scm_wta.
11705
11706 2001-03-12 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11707
11708 * load.c (scm_primitive_load, scm_primitive_load_path),
11709 (scm_sys_search_load_path): Corrected docstrings (file ->
11710 filename).
11711
11712 * eval.c (scm_force): Added texinfo markup to docstring.
11713 (scm_promise_p): Renamed parameter to `obj' to match docstring.
11714
11715 * debug-malloc.c: Reinserted #include <stdio.h>.
11716
11717 2001-03-11 Keisuke Nishida <kxn30@po.cwru.edu>
11718
11719 * list.c (s_scm_reverse_x): Use SCM_VALIDATE_LIST.
11720
11721 * environments.c, error.c, eval.c, filesys.c, hashtab.c, load.c,
11722 net_db.c, procprop.c, read.c, scmsigs.c, socket.c, struct.c:
11723 Use SCM_LISTn instead of scm_listify.
11724
11725 2001-03-10 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11726
11727 * _scm.h: Removed #include <errno.h>.
11728
11729 * error.c, net_db.c, putenv.c, stime.c: Removed declaration of
11730 errno variable (can be a macro on some systems, for example when
11731 using linux libc with threads).
11732
11733 * error.c, filesys.c, gc.c, ioext.c, iselect.c, net_db.c, ports.c,
11734 posix.c, print.c, putenv.c, scmsigs.c, script.c, simpos.c, smob.c,
11735 socket.c, srcprop.c, stime.c, strop.c, unif.c, vports.c: Added
11736 #include <errno.h> in these 20 out of 100 files.
11737
11738 2001-03-10 Gary Houston <ghouston@arglist.com>
11739
11740 * socket.c: add a definition of SUN_LEN (from glibc) for when it's
11741 not already defined.
11742
11743 2001-03-09 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11744
11745 * coop.c: Inserted #include <stdio.h>.
11746
11747 * iselect.c: Reinserted #include <stdio.h>.
11748
11749 2001-03-10 Marius Vollmer <mvo@zagadka.ping.de>
11750
11751 * posix.c: Replaced `#define' of __USE_XOPEN right before
11752 including unistd.h with a define of _GNU_SOURCE at the very top of
11753 the file.
11754
11755 2001-03-09 Keisuke Nishida <kxn30@po.cwru.edu>
11756
11757 * alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,
11758 continuations.c, debug-malloc.c, debug.c, dynwind.c, eq.c, eval.c,
11759 feature.c, filesys.h, gc_os_dep.c, gh_data.c, gh_eval.c,
11760 gh_funcs.c, gh_io.c, gh_list.c, gh_predicates.c, hash.c,
11761 hashtab.c, iselect.c, keywords.c, list.c, load.c, mallocs.c,
11762 net_db.c, numbers.c, objprop.c, objprop.h, options.c, pairs.c,
11763 print.c, procprop.c, procs.c, properties.c, ramap.c,
11764 regex-posix.c, root.c, scmsigs.c, simpos.c, socket.c, srcprop.c,
11765 stackchk.c, stacks.c, strings.c, strop.c, strorder.c, struct.c,
11766 symbols.c, tag.c, threads.c, variable.c, vectors.c, weaks.c:
11767 Remove #include <stdio.h>
11768 * gc.c, gdbint.c, root.c, sort.c, unif.c: Add #include <string.h>.
11769
11770 * procs.c (scm_make_subr_opt): Init symcell to avoid warning.
11771
11772 2001-03-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11773
11774 * posix.c (scm_gethostname): Set initial name length to 256 for
11775 Solaris.
11776
11777 2001-03-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11778
11779 * posix.h (scm_crypt, scm_chroot, scm_getlogin, scm_cuserid),
11780 (scm_getpriority, scm_setpriority, scm_getpass, scm_flock),
11781 (scm_sethostname, scm_gethostname): New prototypes.
11782
11783 * posix.c: Added inclusion of <crypt.h>, <sys/resource.h> and
11784 <sys/file.h>, if present.
11785 (scm_init_posix): [PRIO_PROCESS, PRIO_PGRP, PRIO_USER, LOCK_SH,
11786 LOCK_EX, LOCK_UN, LOCK_NB]: New variables.
11787 (scm_crypt, scm_chroot, scm_getlogin, scm_cuserid),
11788 (scm_getpriority, scm_setpriority, scm_getpass, scm_flock),
11789 (scm_sethostname, scm_gethostname): New procedures.
11790
11791 2001-03-08 Neil Jerram <neil@ossau.uklinux.net>
11792
11793 * ports.c (scm_port_column): Docstring fixes: (i) port-line arg is
11794 not optional (ii) "recommend" spelling correction.
11795
11796 2001-03-08 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11797
11798 * ramap.c (racp): Removed optimization which caused array copying
11799 to fail if the two arrays shared storage. Re-inserted the IVDEP
11800 macros removed in the change of 2000-03-09. (Don't really have a
11801 complete grasp of what they are for, but they seem to be necessary
11802 on Crays. This needs testing!) Thanks to Miroslav Silovic.
11803
11804 * hash.c (scm_string_hash): Don't downcase characters.
11805
11806 2001-03-07 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11807
11808 * symbols.c (scm_symbols_prehistory): Changed symbol hash table
11809 size from 277 --> 1009.
11810
11811 * symbols.c, symbols.h (scm_sys_symbols): New function GUILE_DEBUG
11812 function.
11813
11814 * coop-threads.c: Fixed change of 2001-03-06.
11815
11816 * validate.h: Code formatting.
11817
11818 2001-03-07 Keisuke Nishida <kxn30@po.cwru.edu>
11819
11820 * Makefile.am (*.x): Add dependency on snarf.h and guile-doc-snarf.in.
11821 (*.doc): Add dependency on guile-snarf.awk.in.
11822
11823 * guile-snarf.awk.in: Neglect spaces at the end of
11824 SCM_SNARF_DOCSTRING_END. Skip lines "# NN ..." in the
11825 middle of docstrings. (To avoid the problem with gcc-2.96.)
11826
11827 2001-03-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
11828
11829 * coop-threads.c (scm_call_with_new_thread), load.c
11830 (scm_primitive_load, scm_sys_search_load_path), random.c
11831 (scm_c_default_rstate), struct.c (scm_make_struct_layout,
11832 scm_struct_ref, scm_struct_set_x): Don't use SCM_ASSERT to
11833 (potentially) issue a scm-misc-error or wrong-num-args error
11834 message.
11835
11836 * load.c (scm_search_path): Use SCM_ASSERT_TYPE to give details
11837 about the expected type with the wrong-type-arg error message.
11838
11839 * smob.c (scm_make_smob): Abort on misuse of smob - it indicates
11840 a C level bug that can't be fixed from scheme anyway.
11841
11842 2001-03-05 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11843
11844 * eval.c (scm_m_letstar): Removed check for duplicate bindings.
11845 Duplicate bindings are OK in a let* since a let* is semantically
11846 equivalent to a nested set of let:s.
11847
11848 2001-03-05 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11849
11850 * print.c (scm_print_options): Fixed texinfo in docstring.
11851
11852 * net_db.c (scm_getserv, scm_getproto, scm_getnet): Return #f if
11853 the underlying functions getservent, getprotoent or getnetent
11854 return NULL instead of signalling an error.
11855
11856 2001-03-04 Gary Houston <ghouston@arglist.com>
11857
11858 * socket.c (scm_fill_sockaddr): don't allow buffer overflows when
11859 taking an unexpectedly large filename for an AF_UNIX socket from
11860 bind/connect/sendto (thanks to Martin Grabmueller).
11861
11862 * socket.c (scm_sock_fd_to_port, SCM_SOCK_FD_TO_PORT): removed the
11863 former and adjusted the latter.
11864 (scm_socket, scm_socketpair): cosmetic changes.
11865 (scm_getsockopt, scm_setsockopt): declare optlen as int, not
11866 size_t as socklen_t substitute. don't restrict args/return values
11867 to INUM: allow full range of int or size_t.
11868 (scm_fill_sockaddr): check arguments before allocating memory, to
11869 avoid leakage. use malloc, not scm_must_malloc.
11870 (scm_connect, scm_bind, scm_sendto): use int, not size_t as socklen_t
11871 substitute. free the sockaddr structure before throwing an error.
11872 (scm_init_add_buffer): procedure removed, together with its static
11873 buffer scm_addr_buffer, which wouldn't be thread safe. instead,
11874 define a macro MAX_ADDR_SIZE and declare the buffer where needed.
11875 (scm_accept, scm_getpeername, scm_getsockname, scm_recvfrom,
11876 scm_sendto): use a local buffer instead of scm_addr_buffer.
11877 adjust for new SCM_SOCK_FD_TO_PORT. use int for address size,
11878 not size_t.
11879 (scm_recvfrom): set addr->sa_family to AF_UNSPEC before the recvfrom
11880 call to detect whether recvfrom could be bothered to set the address.
11881 (scm_init_socket): don't call scm_init_addr_buffer.
11882
11883 2001-03-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
11884
11885 * debug.c (scm_procedure_source, scm_procedure_environment),
11886 print.c (scm_get_print_state), ramap.c (scm_array_fill_int,
11887 scm_array_index_map_x), sort.c (scm_sort_x, scm_sort,
11888 scm_stable_sort_x, scm_stable_sort), stacks.c (scm_make_stack,
11889 scm_last_stack_frame), symbols.c (scm_sym2vcell, scm_sym2ovcell),
11890 unif.c (scm_list_to_uniform_array, scm_uniform_vector_length,
11891 scm_transpose_array, scm_enclose_array, scm_array_in_bounds_p,
11892 scm_uniform_vector_ref, scm_array_set_x, scm_uniform_array_read_x,
11893 scm_uniform_array_write, scm_bit_set_star_x, scm_bit_count_star,
11894 scm_array_to_list, scm_array_prototype), validate.h
11895 (SCM_VALIDATE_NUMBER_COPY): Don't call function scm_wta, call
11896 scm_misc_error or scm_wrong_type_arg instead.
11897
11898 * validate.h (SCM_WTA, RETURN_SCM_WTA): Deprecated.
11899
11900 2001-03-04 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11901
11902 * goops.c, goops.h (scm_sys_pre_expand_closure_x): Removed.
11903 (scm_sys_tag_body): Added.
11904
11905 2001-03-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
11906
11907 * continuations.c (continuation_apply), eval.c (scm_m_lambda,
11908 scm_m_letstar, scm_m_letrec1, scm_m_let, SCM_APPLY), eval.h
11909 (SCM_EVALIM2), evalext.c (scm_m_generalized_set_x), gc.c
11910 (get_bvec, MARK), goops.c (scm_primitive_generic_generic),
11911 options.c (scm_options), ports.c (scm_remove_from_port_table),
11912 ramap.c (scm_ramapc), read.c (skip_scsh_block_comment, scm_lreadr,
11913 scm_lreadparen, scm_lreadrecparen), script.c (script_get_octal,
11914 script_get_backslash, script_read_arg), unif.c (scm_cvref): Don't
11915 call function scm_wta, call scm_misc_error or scm_wrong_type_arg
11916 instead.
11917
11918 2001-03-04 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11919
11920 * goops.c (scm_sys_pre_expand_closure_x): New procedure.
11921
11922 2001-03-04 Marius Vollmer <mvo@zagadka.ping.de>
11923
11924 * eval.c (scm_s_duplicate_bindings): New error message.
11925 (scm_m_letrec1, scm_m_letstar): Check for duplicate bindings.
11926
11927 2001-03-03 Marius Vollmer <mvo@zagadka.ping.de>
11928
11929 * eval.h (SCM_EVALIM2): New macro. Use it when a
11930 immediate, literal constant should be evaluated.
11931 * eval.c (scm_s_duplicate_formals): New error message string.
11932 (scm_c_improper_memq): New function.
11933 (scm_m_lambda): Check for duplicate arguments.
11934 (scm_ceval, scm_deval): When executing a body: only cons a new
11935 toplevel environment frame when it is different from the
11936 existing one; use EVALCAR instead of SIDEVAL so that we can properly
11937 check for empty combinations; use SCM_EVALIM2 for the same reason
11938 in the non-toplevel loop.
11939 (nontoplevel_cdrxnoap, nontoplevel_cdrxbegin, nontoplevel_begin):
11940 New labels with the meaning of their non-"nontoplevel" partners,
11941 but they are used when it is known that the body is not evaluated at
11942 top-level.
11943 (scm_apply, scm_dapply): use SCM_EVALIM2 to get proper error
11944 reporting for empty combinations.
11945
11946 2001-03-02 Keisuke Nishida <kxn30@po.cwru.edu>
11947
11948 * Remove dump facilities.
11949 * dump.c, dump.h: Removed.
11950 * Makefile.am: Remove dump.c, dump.h, dump.x, dump.doc.
11951 * init.c: Remove #include "libguile/dump.h".
11952 (scm_init_guile_1): Remove scm_init_dump.
11953 * smob.h (scm_smob_descriptor): Remove slots: dump, undump.
11954 (scm_set_smob_dump, scm_set_smob_undump): Remove declaration.
11955 * smob.c (scm_make_smob_type): Remove initialization: dump, undump.
11956 (scm_set_smob_dump, scm_set_smob_undump): Removed.
11957
11958 * keywords.c: Remove #include "libguile/dump.h".
11959 (keyword_dump, keyword_undump): Removed.
11960 (scm_init_keywords): Remove scm_set_smob_dump and scm_set_smob_undump.
11961
11962 2001-03-02 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11963
11964 * vectors.c (s_scm_vector_p, list->vector, scm_vector)
11965 (scm_vector_ref, scm_vector_set_x, scm_vector_to_list)
11966 (scm_vector_fill_x), strorder.c (scm_string_equal_p)
11967 (scm_string_ci_equal_p, scm_string_less_p, scm_string_leq_p)
11968 (scm_string_gr_p, scm_string_geq_p, scm_string_ci_less_p)
11969 (scm_string_ci_geq_p), symbols.c (scm_symbol_p)
11970 (scm_symbol_to_string, scm_string_to_symbol): Changed use of @t{}
11971 to @code{} as the texinfo manual recommends, converted the
11972 examples to use a @lisp{}-environment.
11973
11974 * strports.c (scm_eval_string): Cleaned up the docstring.
11975
11976 * struct.c (scm_struct_p, scm_struct_vtable_p): Added texinfo
11977 markup.
11978
11979 * numbers.c (scm_exact_p, scm_odd_p, scm_even_p)
11980 (scm_number_to_string, scm_string_to_number, scm_number_p)
11981 (scm_real_p, scm_integer_p, scm_inexact_p, scm_make_rectangular)
11982 (scm_make_polar, scm_inexact_to_exact): Added texinfo markup.
11983 (scm_ash): Added texinfo markup and removed obsolete @refill.
11984 (scm_gr_p): Corrected comment.
11985 (scm_gr_p, scm_leq_p, scm_geq_p): Added texinfo markup to (future
11986 docstring) comments.
11987 (scm_positive_p, scm_less_p, scm_num_eq_p, scm_real_p)
11988 (scm_number_p, scm_negative_p, scm_max, scm_min, scm_sum)
11989 (scm_difference, scm_product, scm_divide, scm_asinh, scm_acosh)
11990 (scm_atanh, scm_truncate, scm_round, scm_exact_to_inexact)
11991 (floor, ceiling, $sqrt, $abs, $exp, $log, $sin, $cos, $tan, $asin)
11992 ($acos, $atan, $sinh, $cosh, $tanh, scm_real_part, scm_imag_part)
11993 (scm_magnitude, scm_angle, scm_abs, scm_quotient, scm_remainder)
11994 (scm_modulo, scm_gcd, scm_lcm): Added (future docstring) comments.
11995
11996 2001-02-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
11997
11998 * __scm.h (SCM_ASSERT_TYPE): Add missing macro parameter.
11999 (Obviously nobody compiles with SCM_RECKLESS defined...)
12000
12001 * validate.h (SCM_ASSERT_RANGE): Use the argument number.
12002
12003 2001-02-23 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12004
12005 * ports.c, ports.h (scm_c_read, scm_c_write): New functions.
12006
12007 * ports.h (SCM_READ_BUFFER_EMPTY_P): New macro.
12008
12009 2001-02-24 Neil Jerram <neil@ossau.uklinux.net>
12010
12011 * numbers.c (scm_two_doubles, scm_sys_expt, scm_sys_atan2,
12012 scm_make_polar): Rename arguments `z1' and `z2' to `x' and `y',
12013 since use of `z' suggests that the arguments may be complex.
12014
12015 * goops.c (scm_make), numbers.c (scm_sys_expt): Fix docstring
12016 typos.
12017
12018 2001-02-23 Neil Jerram <neil@ossau.uklinux.net>
12019
12020 * dump.c (scm_binary_write, scm_binary_read), eval.c
12021 (scm_primitive_eval), guardians.c (scm_guardian_destroyed_p,
12022 scm_guardian_greedy_p, scm_make_guardian), fports.c
12023 (scm_file_port_p): Minor docstring fixes.
12024
12025 2001-02-22 Marius Vollmer <mvo@zagadka.ping.de>
12026
12027 * load.c (load): Use scm_primitive_eval_x instead of scm_i_eval_x.
12028
12029 * goops.c (scm_add_method, DEFVAR): Use scm_eval instead of
12030 scm_i_eval.
12031 (make_class_from_template): Do not bother to set the current
12032 module around the call to DEFVAR, scm_eval takes care of that.
12033 (scm_init_goops): Make scm_module_goops and
12034 scm_goops_lookup_closure permanent objects.
12035
12036 * eval.c (scm_ceval, scm_deval): When evaluating expressions on
12037 top level, create a fresh top-level environment for each
12038 expression instead of mutating the exisint frame. This is
12039 important when that frame is closed over.
12040
12041 * numbers.c (s_scm_logior) [SCM_DIGSTOOBIG]: Also use
12042 SCM_DIGSPERLONG instead of DIGSPERLONG.
12043
12044 2001-02-21 Marius Vollmer <mvo@zagadka.ping.de>
12045
12046 * eval.c (scm_ceval, scm_deval): Check for wrong number of args
12047 before applying arrow procedure in `cond' and before applying
12048 receiver procedure in call-with-current-continuation.
12049 (scm_i_eval): Do not invoke scm_copy_tree in argument in SCM_XEVAL
12050 macro. The argument is expanded more than one time.
12051
12052 * numbers.c (scm_logior) [SCM_DIGSTOOBIG]: Correctly use
12053 SCM_BIGDIG instead of BIGDIG. Thanks to Steven G. Johnson!
12054
12055 2001-02-20 Marius Vollmer <mvo@zagadka.ping.de>
12056
12057 * guile-doc-snarf.in, guile-func-name-check.in: Added copyright
12058 notice and license.
12059
12060 2001-02-17 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12061
12062 * variable.c (scm_make_variable, scm_make_undefined_variable)
12063 (scm_variable_ref, scm_variable_set_x, scm_builtin_variable)
12064 (scm_variable_bound_p), values.c (scm_values)
12065 (scm_call_with_values), unif.c (scm_bit_count)
12066 (scm_bit_set_star_x), symbols.c (scm_gentemp)
12067 (scm_gensym), strings.c (scm_string_p, scm_make_string)
12068 (scm_read_only_string_p, scm_string_length, scm_string_ref)
12069 (scm_string_set_x, scm_substring, scm_string_append), stime.c
12070 (scm_strptime, scm_mktime), random.c (scm_seed_to_random_state)
12071 (scm_copy_random_state, scm_random), print.c (scm_newline)
12072 (scm_write_char, scm_simple_format), debug-malloc.c
12073 (scm_malloc_stats), environments.c (scm_environment_p)
12074 (scm_environment_bound_p, scm_environment_ref)
12075 (scm_environment_fold, scm_environment_define)
12076 (scm_environment_undefine, scm_environment_set_x)
12077 (scm_environment_cell, scm_environment_observe)
12078 (scm_environment_observe_weak, scm_environment_unobserve)
12079 (scm_make_eval_environment, scm_eval_environment_p)
12080 (scm_eval_environment_set_local_x, scm_eval_environment_local)
12081 (scm_eval_environment_imported)
12082 (scm_eval_environment_set_imported_x, scm_make_import_environment)
12083 (scm_import_environment_p, scm_import_environment_imports)
12084 (scm_import_environment_set_imports_x, scm_make_export_environment)
12085 (scm_export_environment_p, scm_export_environment_private)
12086 (scm_export_environment_set_private_x)
12087 (scm_export_environment_signature)
12088 (scm_export_environment_set_signature_x, scm_leaf_environment_p):
12089 Added texinfo markup.
12090
12091 * ports.c (scm_drain_input): Lowercased argument to @var.
12092 (scm_current_input_port, scm_current_output_port): Filled in
12093 missing explanation.
12094 (scm_current_load_port, scm_set_current_output_port)
12095 (scm_set_current_error_port, scm_port_line, scm_set_port_line_x):
12096 Added texinfo markup.
12097
12098 * arbiters.c (scm_make_arbiter, scm_try_arbiter)
12099 (scm_release_arbiter): Added texinfo markup to docstrings.
12100 Changed `Returns' to `Return'.
12101 (arbiter_print): Changed SCM_CDR to SCM_SMOB_DATA.
12102
12103 2001-02-16 Neil Jerram <neil@ossau.uklinux.net>
12104
12105 * guile-snarf.awk.in: Quote any `@'s that occur in Scheme names,
12106 by doubling them to `@@'.
12107
12108 2001-02-16 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12109
12110 * numbers.c (scm_lognot), random.c (scm_random,
12111 scm_random_normal, scm_random_solid_sphere_x,
12112 scm_random_hollow_sphere_x, scm_random_normal_vector_x,
12113 scm_random_exp), dynwind.c
12114 (scm_dynamic_wind): Removed unnecessary "" from docstrings.
12115
12116 * goops.c (scm_sys_initialize_object, scm_instance_p,
12117 scm_class_name, scm_class_precedence_list, scm_class_slots,
12118 scm_class_environment, scm_generic_function_name,
12119 scm_generic_function_methods, scm_method_generic_function,
12120 scm_method_specializers, scm_method_procedure, scm_make_unbound,
12121 scm_unbound_p, scm_assert_bound, scm_at_assert_bound_ref,
12122 scm_sys_fast_slot_ref, scm_sys_fast_slot_set_x, scm_slot_ref,
12123 scm_slot_set_x, _scm_slot_bound_p, scm_slots_exists_p,
12124 scm_sys_allocate_instance, scm_make, scm_pure_generic_p,
12125 scm_class_direct_supers, scm_class_direct_slots,
12126 scm_class_direct_subclasses, scm_class_direct_methods,
12127 scm_accessor_method_slot_definition, scm_sys_goops_loaded),
12128 debug.c (scm_with_traps, scm_memoized_p, scm_make_gloc,
12129 scm_gloc_p, scm_make_iloc, scm_iloc_p, scm_memcons,
12130 scm_mem_to_proc, scm_proc_to_mem, scm_unmemoize,
12131 scm_memoized_environment, scm_procedure_name,
12132 scm_procedure_source, scm_procedure_environment, scm_debug_hang),
12133 objects.c
12134 (scm_class_of, scm_entity_p, scm_operator_p,
12135 scm_set_object_procedure_x, scm_object_procedure,
12136 scm_make_class_object), hooks.c (scm_make_hook_with_name,
12137 scm_make_hook, scm_hook_p, scm_hook_empty_p, scm_add_hook_x,
12138 scm_remove_hook_x, scm_reset_hook_x, scm_run_hook,
12139 scm_hook_to_list), lang.c
12140 (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null, scm_nil_eq),
12141 numbers.c (scm_sys_expt, scm_sys_atan2), print.c
12142 (scm_print_options, scm_port_with_print_state,
12143 scm_get_print_state), procs.c (scm_make_cclo, scm_procedure_p,
12144 scm_closure_p, scm_thunk_p, scm_procedure_with_setter_p,
12145 scm_make_procedure_with_setter, scm_procedure), throw.c
12146 (scm_lazy_catch), modules.c (scm_standard_eval_closure), load.c
12147 (scm_parse_path, scm_search_path), stacks.c (scm_make_stack,
12148 scm_stack_ref, scm_stack_length, scm_frame_p,
12149 scm_last_stack_frame, scm_frame_number, scm_frame_source,
12150 scm_frame_procedure, scm_frame_arguments, scm_frame_previous,
12151 scm_frame_next, scm_frame_real_p, scm_frame_procedure_p,
12152 scm_frame_evaluating_args_p, scm_frame_overflow_p), filesys.c
12153 (scm_dirname, scm_basename), dynwind.c
12154 (scm_wind_chain), read.c (scm_read_options, scm_read,
12155 scm_read_hash_extend), gc.c
12156 (scm_unhash_name), eval.c (scm_eval_options_interface,
12157 scm_evaluator_traps, s_scm_nconc2last), backtrace.c
12158 (scm_display_error, scm_set_print_params_x,
12159 scm_display_application, scm_display_backtrace, scm_backtrace),
12160 async.c (scm_async, scm_system_async, scm_async_mark,
12161 scm_system_async_mark, scm_run_asyncs, scm_noop,
12162 scm_set_tick_rate, scm_set_switch_rate, scm_unmask_signals,
12163 scm_mask_signals): Added docstrings.
12164
12165 2001-02-15 Keisuke Nishida <kxn30@po.cwru.edu>
12166
12167 * dump.c (scm_undump): Use SCM_CARLOC/SCM_CDRLOC to obtain the
12168 address of car/cdr. (Thanks to Dirk Herrmann)
12169 Use scm_sizet to obtain the length of strings.
12170 (Thanks to Matthias Koeppe)
12171
12172 2001-02-15 Marius Vollmer <mvo@zagadka.ping.de>
12173
12174 * symbols.c (scm_mem2symbol): Put a empty statement after the
12175 next_symbol label. This is mandated by ANSI, appearantly.
12176
12177 2001-02-13 Marius Vollmer <marius.vollmer@uni-dortmund.de>
12178
12179 * gc_os_dep.c: Do not include <linux/version.h>. It makes no
12180 sense to compile for a specific kernel version. Do not include
12181 <asm/signal.h> while defining __KERNEL__. This hack should no
12182 longer be needed and caused problems.
12183
12184 2001-02-13 Marius Vollmer <mvo@zagadka.ping.de>
12185
12186 * eval.c (scm_ceval, scm_deval): use `SIDEVAL' instead of
12187 SCM_CEVAL when evaluating subforms of `begin' forms. SCM_CEVAL
12188 can not deal with immediates.
12189
12190 2001-02-12 Keisuke Nishida <kxn30@po.cwru.edu>
12191
12192 * list.c (scm_list_copy): Validate the first argument.
12193
12194 2001-02-11 Marius Vollmer <mvo@zagadka.ping.de>
12195
12196 Fix evaluator so that top-level expressions are correctly
12197 evaluated with respect to the module system.
12198
12199 * modules.h. modules.c (scm_current_module_lookup_closure): New
12200 function.
12201
12202 * eval.h (scm_primitive_eval, scm_primitive_eval_x): New
12203 prototypes.
12204 (scm_i_eval, scm_i_eval_x, scm_eval, scm_eval_x): Changed argument
12205 names to better reflect their meaning.
12206
12207 * eval.c (scm_ceval, scm_deval): Recognize when `begin' is being
12208 evaluated at top-level and synronize lookup closure before
12209 executing every subform.
12210 (scm_primitve_eval_x, scm_primitive_eval): New functions.
12211 (scm_eval_x, scm_eval): Reimplement in terms of
12212 scm_primitive_eval_x and scm_primitive_eval, respectively.
12213
12214 2001-02-09 Marius Vollmer <mvo@zagadka.ping.de>
12215
12216 * macros.c (scm_macro_name, scm_macro_transformer): Use
12217 SCM_SMOB_DATA instead of SCM_CDR. Provided by Martin Grabmueller.
12218 Thanks!
12219
12220 2001-02-10 Keisuke Nishida <kxn30@po.cwru.edu>
12221
12222 * dump.c (scm_store_bytes): Store data size before data.
12223 (scm_restore_bytes): Restore data size. Takes a pointer to size.
12224 * dump.h (scm_restore_bytes): Updated.
12225
12226 2001-02-09 Keisuke Nishida <kxn30@po.cwru.edu>
12227
12228 * dump.c: Use double cells for update schedule.
12229
12230 2001-02-08 Keisuke Nishida <kxn30@po.cwru.edu>
12231
12232 * ports.c (scm_unread_char): Take an optional argument.
12233
12234 2001-02-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
12235
12236 * modules.h (scm_selected_module, scm_current_module): Renamed
12237 scm_selected_module to scm_current_module to synchronize Scheme
12238 and C names.
12239 (scm_select_module, scm_set_current_module): Likewise. Changed
12240 all uses.
12241
12242 * ports.c (scm_port_for_each): Make a snapshot of the port table
12243 before iterating over it. The table might change while the user
12244 code is running. With the snapshot, the user can depend on the
12245 fact that each port that existed at the start of the iteration is
12246 encountered exactly once. (ice-9 popen) depends on this.
12247
12248 2001-02-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
12249
12250 * strings.h (SCM_STRING_MAX_LENGTH): New macro.
12251
12252 * strings.c (scm_makstr, scm_take_str, scm_make_string): Added
12253 range checking for the size parameter. Thanks to Martin
12254 Grabmueller for the hint.
12255
12256 (scm_makstr): Reordered string initialization to make interrupt
12257 deferring unnecessary.
12258
12259 * vectors.c (scm_make_vector): Fixed range checking.
12260
12261 2001-02-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
12262
12263 * vectors.h (SCM_VECTOR_MAX_LENGTH): New macro.
12264
12265 * vectors.c (scm_make_vector, scm_c_make_vector): Improved the
12266 checking of the size parameter for type correctness and valid
12267 range. Thanks to Rob Browning for reporting the problem. Instead
12268 of deferring interrupts, scm_remember_upto_here_1 is used.
12269
12270 2001-02-05 Keisuke Nishida <kxn30@po.cwru.edu>
12271
12272 * dump.c (scm_store_cell_object, scm_restore_cell_object): Removed.
12273 (scm_dump_cell_update): Removed.
12274 (scm_dump_update): Renamed from scm_dump_object_update.
12275 (scm_restore_string, scm_restore_bytes, scm_restore_word): Takes
12276 a pointer instead of returning a value.
12277 * keywords.c (keyword_undump): Updated.
12278
12279 2001-02-05 Keisuke Nishida <kxn30@po.cwru.edu>
12280
12281 * dump.c, dump.h: Modified a lot.
12282 (SCM_DUMP_COOKIE): Version 0.1
12283 (scm_dump_mark): Removed.
12284 (scm_restore_cell_object, scm_store_cell_object): New functions.
12285
12286 * smob.h (scm_smob_descriptor): Removed slots: dump_mark,
12287 dump_dealloc, dump_store, undump_alloc, undump_restore, undump_init.
12288 New slots: dump, undump.
12289 * smob.c (scm_make_smob_type, scm_set_smob_dump, scm_set_smob_undump):
12290 Updated.
12291
12292 * keywords.c (keyword_dump): Renamed from keyword_dealloc.
12293 (keyword_undump): Renamed from keyword_alloc.
12294 (scm_init_keywords): Set keyword_dump and keyword_undump.
12295
12296 2001-02-03 Michael Livshin <mlivshin@bigfoot.com>
12297
12298 * gc.c (DOUBLECELL_ALIGNED_P): new macro, a better-named analog of
12299 the deprecated SCM_DOUBLE_CELLP.
12300
12301 * tags.h (SCM_DOUBLE_CELLP): deprecated.
12302
12303 2001-02-02 Keisuke Nishida <kxn30@po.cwru.edu>
12304
12305 * dump.c, dump.h: New files.
12306 * Makefile.am: Added dump.c, dump.h, dump.x, dump.doc.
12307 * init.c: #include "libguile/dump.h".
12308 (scm_init_guile_1): Call scm_init_dump.
12309 * smob.h (scm_smob_descriptor): New slots: dump_mark,
12310 dump_dealloc, dump_store, undump_alloc, undump_restore,
12311 undump_init.
12312 * smob.c (scm_make_smob_type): Init the new slots.
12313 (scm_set_smob_dump, scm_set_smob_undump): New functions.
12314 * smob.h (scm_set_smob_dump, scm_set_smob_undump): Declared.
12315
12316 * keywords.c: #include "libguile/dump.h".
12317 (keyword_dealloc, keyword_alloc): New functions.
12318 (scm_init_keywords): Set smob_dump and smob_undump.
12319
12320 2001-02-01 Keisuke Nishida <kxn30@po.cwru.edu>
12321
12322 * vectors.c (scm_c_make_vector): New function.
12323 * vectors.h (scm_c_make_vector): Declared.
12324 * eval.c (scm_copy_tree), filesys.c (scm_stat2scm), fluids.c
12325 (scm_make_initial_fluids, grow_fluids), gc.c (scm_init_storage),
12326 gh_data.c (gh_ints2scm, gh_doubles2scm): goops.c
12327 (scm_make_method_cache, scm_i_vector2list,
12328 scm_compute_applicable_methods, scm_sys_method_more_specific_p),
12329 init.c (start_stack), net_db.c (scm_gethost, scm_getnet,
12330 scm_getproto, scm_return_entry), posix.c (scm_getgroups,
12331 scm_getpwuid, scm_getgrgid, scm_uname), print.c (make_print_state,
12332 grow_ref_stack), regex-posix.c (scm_regexp_exec), scmsigs.c
12333 (scm_init_scmsigs), socket.c (scm_addr_vector, scm_addr_vector),
12334 stime.c (scm_times, filltime), unif.c (scm_make_uve), vectors.c
12335 (scm_vector, scm_make_vector): Use scm_c_make_vector.
12336
12337 * hashtab.c (scm_c_make_hash_table): New function.
12338 * hashtab.h (scm_c_make_hash_table): Declared.
12339 * environments.c (scm_make_leaf_environment,
12340 scm_make_eval_environment), gc.c (scm_init_storage),
12341 keywords.c (scm_init_keywords), symbols.c (scm_builtin_bindings):
12342 Use scm_c_make_hash_table.
12343
12344 2001-01-31 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12345
12346 * unif.c (rapr1): Don't apply scm_uniform_vector_length on arrays.
12347
12348 2001-01-29 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12349
12350 * struct.c (scm_make_vtable_vtable): Removed unnecessary "" from
12351 end of docstring.
12352
12353 * struct.c (scm_struct_set_x, scm_struct_vtable_tag,
12354 scm_struct_vtable_name, scm_set_struct_vtable_name_x), weaks.c
12355 (scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table,
12356 scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
12357 srcprop.c (scm_source_properties, scm_set_source_properties_x,
12358 scm_source_property, scm_set_source_property_x), sort.c
12359 (scm_sort_list_x, scm_restricted_vector_sort_x, scm_sorted_p,
12360 scm_merge, scm_merge_x, scm_sort_x, scm_sort, scm_stable_sort_x,
12361 scm_stable_sort, scm_sort_list_x, scm_sort_list): Added
12362 docstrings.
12363
12364 2001-01-29 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12365
12366 * eval.c (SCM_APPLY): Check that primitives which take 1 arg
12367 really get that arg.
12368
12369 2001-01-26 Keisuke Nishida <kxn30@po.cwru.edu>
12370
12371 * goops.c (s_scm_get_keyword): Bug fix.
12372
12373 2001-01-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
12374
12375 The following patch was sent by Martin Grabmueller. It makes sure
12376 that in case of parameter errors the correct function name is
12377 shown, and that parameter types are only checked once.
12378
12379 * strop.c (string_copy, string_upcase_x, string_downcase_x,
12380 string_capitalize_x): New functions. Each one performs the core
12381 functionality of the corresponding scm_* function.
12382
12383 (scm_string_copy, scm_string_upcase_x, scm_string_upcase,
12384 scm_string_downcase_x, scm_string_downcase,
12385 scm_string_capitalize_x, scm_string_capitalize): Reduced to
12386 parameter checking wrappers of the above functions.
12387
12388 2001-01-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
12389
12390 * continuations.c, dynl.c, keywords.c, load.c: Include
12391 strings.h. Thanks to Bill Schottstaedt for the bug report.
12392
12393 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
12394
12395 * backtrace.c (display_header): Make sure that line and column
12396 information is shown independent of whether the port the code was
12397 read from had an associated filename. Thanks to Martin
12398 Grabmueller for providing this patch.
12399
12400 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
12401
12402 * fports.[ch] (scm_file_port_p): New primitive.
12403
12404 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
12405
12406 * tags.h (scm_tc16_fport, scm_tc16_strport, scm_tc16_sfport):
12407 These are now defined in fports.c, strports.c and vports.c.
12408
12409 * fports.[ch] (scm_tc16_fport), strports.c (scm_tc16_strport),
12410 vports.c (scm_tc16_sfport): Made variables (were macros defined in
12411 tags.h).
12412
12413 fports.c (scm_make_fptob), strports.c (scm_make_stptob), vports.c
12414 (scm_make_sfptob): Made static. These return a type code now.
12415
12416 fports.c (scm_init_fports), strports.c (scm_init_strports),
12417 vports.c (scm_init_vports): Create the corresponding port types.
12418
12419 * fports.h (SCM_FPORTP, SCM_OPFPORTP, SCM_OPINFPORTP,
12420 SCM_OPOUTFPORTP): Redefined in terms of scm_tc16_fport.
12421
12422 * init.c (scm_init_guile_1): Make sure strports are initialized
12423 before gdbint.
12424
12425 * ports.[ch] (scm_make_port_type): Changed the return type to
12426 scm_bits_t.
12427
12428 * ports.c (scm_ports_prehistory): Don't create any port types
12429 here.
12430
12431 * posix.c (scm_ttyname): Use SCM_FPORTP instead of comparing
12432 against scm_tc16_fport directly.
12433
12434 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
12435
12436 * srcprop.c (scm_set_source_property_x): Fix to handle
12437 (set-source-property! <obj> 'copy <datum>) correctly.
12438
12439 2001-01-24 Gary Houston <ghouston@arglist.com>
12440
12441 * filesys.c (scm_link): docstring fix.
12442 * fports.h (scm_setfileno): obsolete declaration removed.
12443 * posix.c: bogus popen declaration removed.
12444
12445 * rdelim.c: new file, split from ioext.c.
12446 * rdelim.h: new file, split from ioext.h
12447 * Makefile.am: add rdelim.c and related files.
12448 * init.c: call scm_init_rdelim. include rdelim.h.
12449
12450 2001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
12451
12452 This patch was sent by Martin Grabmueller and makes sure that
12453 parameter errors are reported correctly by the lexicographic
12454 ordering predicates.
12455
12456 * strorder.c (string_less_p, string_ci_less_p): New functions.
12457
12458 (scm_string_less_p, scm_string_ci_less_p): Extracted the core
12459 functionality into string_less_p, string_ci_less_p respectively.
12460 The remaining code is just a wrapper to do the parameter
12461 checking.
12462
12463 (scm_string_leq_p, scm_string_gr_p, scm_string_geq_p): Check the
12464 parameters and call string_less_p instead of scm_string_less_p.
12465
12466 (scm_string_ci_leq_p, scm_string_ci_gr_p, scm_string_ci_geq_p):
12467 Check the parameters and call string_less_ci_p instead of
12468 scm_string_ci_less_p.
12469
12470 2001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
12471
12472 This patch modifies scm_display_error to perform parameter
12473 checking. Thanks to Neil Jerram for the bug report.
12474
12475 * backtrace.[ch] (scm_i_display_error): New function.
12476
12477 * backtrace.c (scm_display_error): Added parameter check and
12478 extracted the core functionality into function
12479 scm_i_display_error.
12480
12481 * throw.c (handler_message): Call scm_i_display_error to display
12482 the error message.
12483
12484 2001-01-23 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12485
12486 * eval.c (SCM_APPLY): Added # args check for application of
12487 procedures with arity 3. (Thanks to Anders Holst.)
12488
12489 2001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
12490
12491 * filesys.h (SCM_DIR_FLAG_OPEN, SCM_DIR_OPEN_P): Added.
12492
12493 (SCM_OPDIRP): Deprecated.
12494
12495 * filesys.c (scm_opendir): Use SCM_DIR_FLAG_OPEN instead of
12496 SCM_OPN.
12497
12498 (scm_readdir, scm_rewinddir): Don't use SCM_VALIDATE_OPDIR.
12499 Instead, give an explicit error message in case the directory is
12500 closed.
12501
12502 (scm_closedir, scm_dir_print): Rewritten to use SCM_DIR_OPEN_P
12503 instead of SCM_OPENP and SCM_CLOSEDP.
12504
12505 * validate.h (SCM_VALIDATE_OPDIR): Deprecated.
12506
12507 2001-01-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
12508
12509 * eval.c (inner_eval, scm_eval): Move all real functionality into
12510 inner_eval. Avoid to copy the expression twice by inlining some
12511 code from scm_i_eval.
12512
12513 2001-01-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
12514
12515 * eval.c (scm_m_case): The 'else' clause of a 'case' statement
12516 now has to be the last clause, as required by R5RS. Thanks to
12517 Martin Grabmueller for the patch.
12518
12519 2001-01-18 Gary Houston <ghouston@arglist.com>
12520
12521 * ioext.c: further simplify scm_read_string_x_partial by defining
12522 a macro SCM_EBLOCK.
12523
12524 2001-01-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
12525
12526 * gh_data.c (gh_ints2scm): Simplified using SCM_FIXABLE.
12527
12528 2001-01-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
12529
12530 * __scm.h: Added comment about architecture and compiler
12531 properties that are required by guile.
12532
12533 (SCM_FIXNUM_BIT, SCM_MOST_POSITIVE_FIXNUM,
12534 SCM_MOST_NEGATIVE_FIXNUM): Moved to numbers.h.
12535
12536 (SCM_CHAR_BIT, SCM_LONG_BIT): Moved here from numbers.h.
12537
12538 * numbers.h (SCM_CHAR_BIT, SCM_LONG_BIT): Moved to __scm.h.
12539
12540 (SCM_FIXNUM_BIT, SCM_MOST_POSITIVE_FIXNUM,
12541 SCM_MOST_NEGATIVE_FIXNUM): Moved here from __scm.h.
12542
12543 2001-01-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
12544
12545 * __scm.h (SCM_FIXNUM_BIT): Added. The name is chosen in analogy
12546 to the names in limits.h.
12547
12548 * numbers.c (abs_most_negative_fixnum): Added.
12549
12550 (scm_quotient, scm_remainder): Fixed the fixnum-min / (abs
12551 fixnum-min) special case.
12552
12553 (scm_big_and): Fix for negative first parameter.
12554
12555 (scm_bit_extract): Fix for fixnum paramters.
12556 Thanks to Rob Browning for the bug report.
12557
12558 (scm_init_numbers): Initialize abs_most_negative_fixnum.
12559
12560 2001-01-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
12561
12562 * symbols.c (scm_symbol_bound_p): Fixed comment.
12563 Thanks to Chris Cramer.
12564
12565 2001-01-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
12566
12567 * smob.[ch] (scm_make_smob_type): Return type is scm_bits_t now.
12568 Thanks to Bill Schottstaedt.
12569
12570 2001-01-11 Michael Livshin <mlivshin@bigfoot.com>
12571
12572 from Matthias Köppe:
12573
12574 * objects.h (SCM_SET_ENTITY_SETTER): new macro. SCM_ENTITY_SETTER
12575 casts its result, so doesn't yield an lvalue per ANSI C.
12576
12577 * goops.c (s_scm_sys_set_object_setter_x): use
12578 SCM_SET_ENTITY_SETTER.
12579 (clear_method_cache): use SCM_SET_ENTITY_PROCEDURE.
12580
12581 * gc.h (SCM_GC_SET_CARD_BVEC): new macro. SCM_GC_CARD_BVEC casts
12582 its result, so doesn't yield an lvalue per ANSI C.
12583 (SCM_GC_SET_CARD_FLAGS): ditto for SCM_GC_GET_CARD_FLAGS.
12584 (SCM_GC_CLR_CARD_FLAGS): redefined in terms of
12585 SCM_GC_SET_CARD_FLAGS.
12586 (SCM_GC_SET_CARD_FLAG, SCM_GC_CLR_CARD_FLAGS): ditto.
12587
12588 * gc.c (INIT_CARD): use the explicit setter macro to set the bvec.
12589
12590 2001-01-08 Gary Houston <ghouston@arglist.com>
12591
12592 * validate.h (SCM_VALIDATE_SUBSTRING_SPEC_COPY): new macro.
12593 * ioext.c (scm_read_string_x_partial, scm_read_delimited_x),
12594 socket.c (scm_recvfrom): use the new macro, plus minor docstring
12595 changes.
12596 * ioext.c (scm_read_string_x_partial): don't crash if -1 is supplied
12597 for fdes. if current input port is used, check that it's a file
12598 port.
12599
12600 2001-01-06 Gary Houston <ghouston@arglist.com>
12601
12602 * ioext.c (scm_read_string_x_partial): new procedure, implements
12603 read-string!/partial.
12604 * ports.c (scm_take_from_input_buffers): new procedure used by
12605 scm_read_string_x_partial.
12606 (scm_drain_input): use scm_take_from_input_buffers.
12607
12608 2001-01-06 Marius Vollmer <mvo@zagadka.ping.de>
12609
12610 * validate.h (SCM_VALIDATE_NUMBER): New.
12611
12612 2001-01-03 Michael Livshin <mlivshin@bigfoot.com>
12613
12614 * guardians.c (F_GREEDY, F_LISTED, F_DESTROYED, GREEDY_P,
12615 SET_GREEDY, LISTED_P, SET_LISTED, CLR_LISTED, DESTROYED_P,
12616 SET_DESTROYED): new defines/macros.
12617 (GUARDIAN_LIVE, GUARDIAN_ZOMBIES, GUARDIAN_NEXT): deleted.
12618 (add_to_live_list): takes a `guardian_t *' now, not SCM.
12619 (guardian_print): print more info.
12620 (guardian_apply): check if the guardian is destroyed, and throw an
12621 error if so. take one more optional argument `throw_p'.
12622 (scm_guard): depending on the value of `throw_p', return a boolean
12623 result.
12624 (scm_get_one_zombie): remove redundant property test.
12625 (guardian_t): represent the various (currently 3, I hope nothing
12626 more gets added) boolean fields as bit flags.
12627 (scm_guardian_destroyed_p, scm_guardian_greedy_p): new predicates.
12628 (scm_destroy_guardian_x): new procedure.
12629
12630 * guardians.h: added prototypes for `scm_guardian_greedy_p' and
12631 `scm_guardian_destroyed_p'. changed prototype for `scm_guard'.
12632
12633 2001-01-01 Gary Houston <ghouston@arglist.com>
12634
12635 * fports.c (fport_write): bugfix: handle short writes for
12636 unbuffered ports too. optimize the buffered case by minimizing
12637 the number of write/flush calls.
12638 (write_all): new helper procedure.
12639
12640 The ChangeLog continues in the file: "ChangeLog-2000"