*** empty log message ***
[bpt/guile.git] / libguile / ChangeLog
1 2005-03-08 Marius Vollmer <mvo@zagadka.de>
2
3 libltdl is no longer distributed. We expect it to be installed
4 already.
5
6 * Makefile.am (INCLUDES): Removed @LTDLINCL@.
7 (libguile_la_LIBADD): Removed @LIBLTDL@.
8
9 2005-03-07 Marius Vollmer <mvo@zagadka.de>
10
11 * threads.h, async.h, threads.c (SCM_CRITICAL_SECTION_START,
12 SCM_CRITICAL_SECTION_END): Moved here from threads.h since now
13 they also block/unblock execution of asyncs and call
14 scm_async_click which is declared in async.h but threads.h can not
15 include async.h since async.h already includes threads.h.
16 (scm_i_critical_section_level): New, for checking mistakes in the
17 use of the SCM_CRITICAL_SECTION_* macros.
18 (scm_i_critical_section_mutex): Make it a recursive mutex so that
19 critical sections can be nested.
20
21 * throw.c (scm_ithrow): Abort when scm_i_critical_section_level is
22 not zero.
23
24 * threads.h, threads.c (scm_frame_lock_mutex): New.
25 (scm_frame_critical_section): Take mutex as argument.
26 (framed_critical_section_mutex): New, used as default for above.
27 (scm_init_threads): Initialize it.
28 (scm_threads_prehistory): Do not initialize thread_admin_mutex and
29 scm_i_critical_section_mutex; both are initialized statically.
30
31 * continuation.c, deprecated.c, goops.c, guardians.c keywords.c,
32 libguile_la-arrays.loT, objprop.c, ports.c, smob.c, sort.s,
33 srcprop.c, stime.c, struct.c, throw.c, regex-posix.c: Include
34 "libguile/async.h" for SCM_CRITICAL_SECTION_START/END.
35
36 * debug.c (scm_debug_options): Replace
37 SCM_CRITICAL_SECTION_START/END with a frame and
38 scm_frame_critical_section.
39
40 * continuations.c (scm_make_continuation): No longer a critical
41 section.
42 (scm_dynthrow): Abort when scm_i_critical_section_level is
43 not zero.
44
45 2005-03-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
46
47 * threads.c (scm_try_mutex): Renamed argument for consistency.
48
49 * root.c (scm_call_with_dynamic_root): New docstring.
50
51 * eval.c: Define _GNU_SOURCE.
52
53 2005-03-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
54
55 Big merge from the mvo-thread-cleanup branch. The main changes
56 are:
57
58 - The dynamic roots functionality has been split into dynamic
59 states and continuations barriers. Fluids have been
60 reimplemented and can now be garbage collected.
61
62 - Initialization of Guile now works in a multi-thread friendly
63 manner. Threads can freely enter and leave guile mode.
64
65 - Blocking on mutexes or condition variables or while selecting
66 can now be reliably interrupted via system asyncs.
67
68 - The low-level threading interface has been removed.
69
70 - Signals are delivered via a pipe to a dedicated 'signal delivery
71 thread'.
72
73 - SCM_DEFER_INTS, SCM_ALLOW_INTS etc have been deprecated.
74
75 * throw.c (scm_handle_by_message): Exit only the current thread,
76 not the whole process.
77 (scm_handle_by_message_noexit): Exit when catching 'quit.
78
79 * scmsigs.c (take_signal, signal_delivery_thread,
80 start_signal_delivery_thread, ensure_signal_delivery_thread,
81 install_handler): Reimplemented signal delivery as explained in
82 the comments.
83
84 * pthreads-threads.h (scm_i_pthread_t, scm_i_pthread_self,
85 scm_i_pthread_create, scm_i_pthread_detach, scm_i_pthread_exit,
86 scm_i_sched_yield, scm_i_pthread_sigmask,
87 SCM_I_PTHREAD_MUTEX_INITIALIZER,
88 SCM_I_PTHREAD_RECURSIVE_MUTEX_INITIALIZER, scm_i_pthread_mutex_t ,
89 scm_i_pthread_mutex_init, scm_i_pthread_mutex_destroy,
90 scm_i_pthread_mutex_trylock, scm_i_pthread_mutex_lock,
91 scm_i_pthread_mutex_unlock, SCM_I_PTHREAD_COND_INITIALIZER,
92 scm_i_pthread_cond_t, scm_i_pthread_cond_init,
93 scm_i_pthread_cond_destroy, scm_i_pthread_cond_signal,
94 scm_i_pthread_cond_broadcast, scm_i_pthread_cond_wait,
95 scm_i_pthread_cond_timedwait, scm_i_pthread_once_t,
96 SCM_I_PTHREAD_ONCE_INIT, scm_i_pthread_once, scm_i_pthread_key_t ,
97 scm_i_pthread_key_create, scm_i_pthread_setspecific,
98 scm_i_pthread_getspecific, scm_i_scm_pthread_mutex_lock,
99 scm_i_frame_pthread_mutex_lock, scm_i_scm_pthread_cond_wait,
100 scm_i_scm_pthread_cond_timedwait): Provide the obvious mapping
101 when using pthreads.
102 * null-threads.c, null-threads.h: Provide dummy definitions for
103 the above symbols when not using pthreads.
104
105 * modules.h, modules.c (scm_frame_current_module): New.
106
107 * load.c (scm_primitive_load): Use scm_i_frame_current_load_port
108 instead of scm_internal_dynamic_wind.
109
110 * init.h, init.c (restart_stack, start_stack): Removed.
111 (scm_boot_guile, invoke_main_func): Simply use scm_with_guile.
112 (scm_boot_guile_1): Removed.
113 (scm_i_init_mutex): New.
114 (really_cleanup_for_exit, cleanup_for_exit): New.
115 (scm_init_guile_1, scm_i_init_guile): Renamed former to latter.
116 Moved around some init funcs. Call
117 scm_init_threads_default_dynamic_state. Register cleanup_for_exit
118 with atexit.
119
120 * hashtab.c (scm_hash_fn_create_handle_x, scm_hash_fn_remove_x):
121 Use "!scm_is_eq" instead of "!=".
122
123 * ge-scmconfig.c, gen-scmconfig.h.in (SCM_I_GSC_USE_COOP_THREADS,
124 SCM_USE_COOP_THREADS): Removed.
125
126 * gc.c (scm_igc): Take care that scm_gc_running_p is properly
127 maintained. Unlock scm_i_sweep_mutex before running
128 scm_after_gc_c_hook.
129 (scm_permanent_object): Allocate outside of critical section.
130 (cleanup): Removed.
131
132 * fluids.h, fluids.c: Reimplemented completely.
133 (SCM_FLUID_NUM, SCM_FAST_FLUID_REF,
134 SCM_FAST_FLUID_SET): Reimplemented as functions.
135 (scm_is_fluid): New.
136 (scm_i_make_initial_fluids, scm_i_copy_fluids): Removed.
137 (scm_make_dynamic_state, scm_dynamic_state_p,
138 scm_is_dynamic_state, scm_current_dynamic_state,
139 scm_set_current_dynamic_state, scm_frame_current_dynamic_state,
140 scm_c_with_dynamic_state, scm_with_dynamic_state,
141 scm_i_make_initial_dynamic_state, scm_fluids_prehistory): New.
142
143 * feature.c (progargs_fluid): New.
144 (scm_program_arguments, scm_set_program_arguments): Use it instead
145 of scm_progargs.
146 (scm_init_feature): Allocate it. Also, only add "threads" feature
147 when SCM_USE_PTHREAD_THREADS is true.
148
149 * eval.c (scm_makprom): Use scm_make_recursive_mutex instead of
150 scm_make_rec_mutex, with all the consequences.
151 (scm_eval_x, scm_eval): Use scm_frame_begin etc instead of
152 scm_internal_dynamic_wind. Handle dynamic states as second
153 argument.
154
155 * threads.h, threads.c (scm_internal_select): Renamed to
156 scm_std_select and discouraged old name.
157 (scm_thread_sleep, scm_thread_usleep): Likewise, as scm_std_sleep
158 and scm_std_usleep.
159 (scm_tc16_fair_mutex, scm_tc16_fair_condvar, SCM_MUTEXP,
160 SCM_FAIR_MUTEX_P, SCM_MUTEX_DATA, SCM_CONDVARP,
161 SCM_FAIR_CONDVAR_P, SCM_CONDVAR_DATA, SCM_THREADP,
162 SCM_THREAD_DATA): Removed.
163 (SCM_I_IS_THREAD, SCM_I_THREAD_DATA): New.
164 (scm_i_thread): New.
165 (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR):
166 Use scm_assert_smob_type.
167 (scm_c_scm2thread, scm_thread_join, scm_thread_detach,
168 scm_thread_self, scm_thread_yield, scm_mutex_init,
169 scm_mutex_destroy, scm_mutex_trylock, scm_mutex_unlock,
170 scm_rec_mutex_init, scm_rec_mutex_destroy, scm_make_rec_mutex,
171 scm_rec_mutex_free, scm_rec_mutex_lock, scm_rec_mutex_trylock,
172 scm_cond_init, scm_cond_destroy, scm_cond_wait,
173 scm_cond_timedwait, scm_cond_signal, scm_cond_broadcast,
174 scm_key_create, scm_key_delete, scm_setspecific, scm_getspecific,
175 scm_thread_select): Removed. Replaced with scm_i_pthread
176 functions as appropriate.
177 (scm_in_guile, scm_outside_guile): Removed.
178 (scm_t_guile_ticket, scm_leave_guile, scm_enter_guile): Return and
179 take a ticket.
180 (scm_with_guile, scm_without_guile, scm_i_with_guile_and_parent):
181 New.
182 (scm_i_frame_single_threaded): New.
183 (scm_init_threads_default_dynamic_state): New.
184 (scm_i_create_thread): Removed.
185 (scm_make_fair_mutex, scm_make_fair_condition_variable): Removed.
186 (scm_make_recursive_mutex): New.
187 (scm_frame_critical_section): New.
188 (SCM_CURRENT_THREAD, SCM_I_CURRENT_THREAD): Renamed former to
189 latter, changed all uses.
190 (scm_i_dynwinds, scm_i_setdynwinds, scm_i_last_debug_frame,
191 scm_i_set_last_debug_frame): New, use them instead of scm_root
192 stuff.
193 (SCM_THREAD_LOCAL_DATA, SCM_SET_THREAD_LOCAL_DATA,
194 scm_i_root_state_key,m scm_i_set_thread_data): Removed.
195 (scm_pthread_mutex_lock, scm_frame_pthread_mutex_lock,
196 scm_pthread_cond_wait, scm_pthread_cond_timedwait).
197 (remqueue): Allow the removal of already removed cells. Indicate
198 whether a real removal has happened.
199 (scm_thread): Removed, replaced with scm_i_thread.
200 (make_thread, init_thread_creatant): Removed.
201 (cur_thread): Removed.
202 (block_self, unblock_from_queue): New.
203 (block, timed_block, unblock): Removed.
204 (guilify_self_1, guilify_self_2, do_thread_exit,
205 init_thread_key_once, init_thread_key,
206 scm_i_init_thread_for_guile, get_thread_stack_base,
207 scm_init_guile): New initialisation method.
208 (scm_call_with_new_thread, scm_spawn_thread): Use it to simplify
209 thread creation.
210 (fair_mutex, fat_mutex, etc, fair_condvar, fat_condvar): Renamed
211 "fair" to fat and implemented new semantics, including reliable
212 interruption.
213 (all_threads): Now a pointer to a scm_i_thread, not a SCM.
214 (scm_threads_mark_stacks): Explicitly mark handle.
215 (scm_std_select): Allow interruption by also selecting on the
216 sleep_pipe.
217 (scm_i_thread_put_to_sleep): Handle recursive requests for
218 single-threadedness.
219 (scm_threads_prehistory, scm_init_threads): Put current thread
220 into guile mode via guileify_self_1 and guileify_self_2,
221 respectively.
222
223 * fluid.h (SCM_FLUIDP): Deprecated.
224
225 * coop-threads.c: Removed.
226
227 * continuations.h, continuations.c (scm_with_continuation_barrier,
228 scm_c_with_continuation_barrier, scm_i_with_continuation_barrier):
229 New.
230
231 * async.h, async.c (scm_i_setup_sleep, scm_i_reset_sleep): New.
232 (async_mutex): New.
233 (scm_async_click): Protected with async_mutex. Do not deal with
234 signal_asyncs, which are gone. Set cdr of handled async cell to
235 #f.
236 (scm_i_queue_async_cell): Protected with async_mutex. Interrupt
237 current sleep.
238 (scm_system_async_mark_for_thread): Do not use scm_current_thread
239 since that might not work during early initialization.
240
241 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS, SCM_REDEFER_INTS,
242 SCM_REALLOW_INTS): Deprecated by moving into deprecated.h and
243 deprecated.c. Replaced all uses with SCM_CRITICAL_SECTION_START
244 and SCM_CRITICAL_SECTION_END.
245 (SCM_ENTER_A_SECTION, SCM_EXIT_A_SECTION): Removed. Replaced with
246 SCM_CRITICAL_SECTION_START/END.
247
248 * Makefile.am (modinclude_HEADER): Removed threads-plugin.h.
249 (libguile_la_SOURCES): Added null-threads.c
250 (EXTRA_libguile_la_SOURCES): Removed pthread-threads.c and
251 threads-plugin.c.
252 * pthread-threads.c, threads-plugin.c, threads-plugin.h: Removed.
253
254 * root.h, root.c (scm_tc16_root, SCM_ROOTP, SCM_ROOT_STATE,
255 scm_root_state, scm_stack_base, scm_save_regs_gc_mark,
256 scm_errjmp_bad, scm_rootcont, scm_dynwinds, scm_progargs,
257 scm_last_debug_frame, scm_exitval, scm_cur_inp, scm_outp,
258 scm_cur_err, scm_cur_loadp, scm_root, scm_set_root,
259 scm_make_root): Removed or deprecated. Replaced with references
260 to the current thread, dynamic state, continuation barrier, or
261 some fluid, as appropriate.
262 (root_mark, root_print): Removed.
263 (scm_internal_cwdr): Reimplemented guts with
264 scm_frame_current_dynamic_state and
265 scm_i_with_continuation_barrier.
266 (scm_dynamic_root): Return current continuation barrier.
267
268
269 2005-02-28 Marius Vollmer <mvo@zagadka.de>
270
271 * socket.c (scm_setsockopt): Handle IP_ADD_MEMBERSHIP and
272 IP_DROP_MEMBERSHIP options. Also, reorganized the code a bit for
273 cleanliness.
274 (scm_init_socket): Define IP_ADD_MEMBERSHIP and
275 IP_DROP_MEMBERSHIP.
276 Thanks to Greg Troxel!
277
278 2005-02-27 Mikael Djurfeldt <djurfeldt@nada.kth.se>
279
280 * gh.h: Bugfix: Include <libguile.h> outside of the extern "C"
281 block.
282
283 2005-02-25 Marius Vollmer <mvo@zagadka.de>
284
285 * hashtab.c (scm_i_rehash): Remove elements from old bucket vector
286 so that no two weak alist vectors share a spine.
287 (scm_hash_fn_create_handle_x): Deal with a possible rehashing
288 during GC before inserting the new alist cell.
289
290 2005-02-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
291
292 * hashtab.c (scm_i_rehash): Cope with the case that a GC modifies
293 the hashtable.
294 (scm_hash_fn_create_handle_x): Likewise.
295 * vectors.h (SCM_I_SET_WVECT_TYPE): New, for use in scm_i_rehash.
296
297 2005-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
298
299 * unif.c (prototype_to_type): Bugfix: Don't compare prototype to
300 the prototypical examples mentioned in the old reference manual.
301 Instead keep the old semantics of dispatching on type. (Yes, this
302 is extremely ugly, but the whole point of keeping the deprecated
303 interface is not to break old code.)
304
305 2005-02-08 Mikael Djurfeldt <djurfeldt@nada.kth.se>
306
307 * deprecated.h (SCM_ARRAY_DIMS): Rename scm_i_attay_dims -->
308 scm_i_array_dims.
309
310 2005-01-28 Kevin Ryde <user42@zip.com.au>
311
312 * numbers.c (scm_ash): Rewrite using shifts, much faster than
313 integer-expt and multiply/divide. Inexacts and fractions no longer
314 supported (they happened to work before for left shifts, but not
315 right). Don't really need inexacts and fractions, since ash is
316 documented as a "bitwise operation", and all the rest of those only
317 take exact integers.
318
319 2005-01-27 Han-Wen Nienhuys <hanwen@xs4all.nl>
320
321 * gc-card.c (scm_i_card_statistics): map structs, closures and
322 subrs to one tag.
323
324 * gc.c (s_scm_gc_live_object_stats): return alist, not hashtable.
325 (tag_table_to_type_alist): ignore unknown types.
326
327 * gc-segment.c (scm_i_all_segments_statistics): new function.
328 (scm_i_heap_segment_statistics): new function
329
330 * gc.c (s_scm_gc_live_object_stats): new GUILE callable: return
331 statistics on the number of live objects of each type.
332
333 * gc-card.c (scm_i_tag_name): new function.
334 (scm_i_card_statistics): new function.
335
336 2005-01-24 Kevin Ryde <user42@zip.com.au>
337
338 * posix.c (scm_setlocale): Force errno=EINVAL for an error, since
339 POSIX and C99 don't document errno being set. Reported by Bruno
340 Haible.
341 (scm_flock): Update docstring from manual.
342
343 * random.c (scm_i_init_rstate): Compare w to -1 not 0xffffffffUL, now
344 that it's an scm_t_int32. Otherwise gcc 3.4 says it's always false on
345 a 64-bit system.
346
347 * scmsigs.c (scm_sigaction_for_thread): Use scm_to_long for
348 sa_handler, needs to be a long on 64-bit systems where int is only 32
349 bits.
350
351 2005-01-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
352
353 * environments.c (obarray_enter, obarray_replace): Call
354 SCM_HASHTABLE_INCREMENT when adding a new entry.
355
356 * objects.c: Include goops.h for the scm_class_of prototype.
357
358 * hashtab.c (hashtable_size, HASHTABLE_SIZE_N): Restrict hashtable
359 sizes to be smaller than the maximum lengths of vectors.
360
361 2005-01-18 Marius Vollmer <marius.vollmer@uni-dortmund.de>
362
363 * ports.c, smob.c: Include "libguile/goops.h".
364
365 * objects.h, objects.c, goops.c, goops.h (scm_class_boolean,
366 scm_class_char, scm_class_pair, scm_class_procedure,
367 scm_class_string, scm_class_symbol,
368 scm_class_procedure_with_setter, scm_class_primitive_generic,
369 scm_class_vector, scm_class_null, scm_class_real,
370 scm_class_complex, scm_class_integer, scm_class_fraction,
371 scm_class_unknown, scm_port_class, scm_smob_class,
372 scm_no_applicable_method, scm_class_of): Moved from objects to
373 goops since they are only useable once goops has been loaded.
374 (scm_classes_initialized): Removed.
375 (scm_class_of): Do not check it.
376 (create_standard_classes): Do not set it.
377
378 2005-01-17 Marius Vollmer <marius.vollmer@uni-dortmund.de>
379
380 * objects.h, objects.c (scm_classes_initialized): New.
381 (scm_class_of): Signal error when scm_classes_initialized is zero.
382 * goops.c (create_standard_classes): Set scm_classes_initialized
383 to one.
384
385 * random.c (scm_random_solid_sphere_x): Use
386 scm_c_generalized_vector_length instead of
387 scm_uniform_vector_length.
388
389 2005-01-16 Marius Vollmer <mvo@zagadka.de>
390
391 * script.c (scm_compile_shell_switches): Removed debugging output.
392
393 2005-01-15 Kevin Ryde <user42@zip.com.au>
394
395 * numbers.c (scm_logtest, scm_logbit_p, scm_integer_expt): Update
396 docstrings from manual.
397 * random.c (scm_random_solid_sphere_x): Update docstring from manual.
398
399 2005-01-14 Marius Vollmer <marius.vollmer@uni-dortmund.de>
400
401 * random.c: Don't check for definedness of SCM_HAVE_T_INT64, check
402 its value.
403
404 Implement u64 and s64 uniform numeric vectors with bignums when
405 scm_t_uint64 and scm_t_int64 are not available.
406
407 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_take_u64vector,
408 scm_array_handle_u64_elements,
409 scm_array_handle_u64_writable_elements, scm_u64vector_elements,
410 scm_u64vector_writable_elements): Do not define when scm_t_uint64
411 is not available.
412 (scm_take_s64vector, scm_array_handle_s64_elements,
413 scm_array_handle_s64_writable_elements, scm_s64vector_elements,
414 scm_s64vector_writable_elements): Likewise for scm_t_int64.
415 (uvec_sizes, uvec_print, uvec_equalp): Use SCM bignums when
416 scm_t_int64/scm_t_uint64 are not available.
417 (uvec_mark): New, to mark the bignums.
418 (alloc_uvec): Initialize bignums.
419 (uvec_fast_ref): Return bignums directly.
420 (scm_uint64_min, scm_uint64_max, scm_int64_min, scm_int64_max,
421 assert_exact_integer): New.
422 (uvec_fast_set): Use them to validate the bignums.
423 (scm_init_srfi_4): Set mark function of smob when needed.
424 Initialize scm_uint64_min, scm_uint64_max, scm_int64_min,
425 scm_int64_max.
426
427 Recognize 1.4 -e syntax.
428
429 * script.c (sym_at, sym_atat, sym_main, all_symbols): New.
430 (scm_compile_shell_switches): Use them to recognize and convert
431 1.4 "-e" syntax.
432
433 2005-01-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
434
435 * deprecated.h, deprecated.c, strings.h, strings.c: Turn all
436 deprecated features that once were macros but are now functions
437 back into macros.
438
439 2005-01-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
440
441 * eval.c, debug.h (SCM_WARN_DEPRECATED): New debug option.
442 * deprecation.c (scm_issue_deprecation_warning,
443 scm_c_issue_deprecation_warning_fmt): Use it.
444 (mode): Removed.
445 (print_summary): New.
446 (scm_init_deprecation): Initialize SCM_WARN_DEPRECATED instead of
447 mode.
448
449 Deprecated SCM_ARRAY* macros.
450
451 * unif.h, unif.c, ramap.c, vectors.c, srfi-4.c, srfi-4.i.c
452 (SCM_ARRAYP, SCM_I_ARRAYP): Renamed former to latter internal
453 version. Changed all uses.
454 (scm_tc16_array, scm_i_tc16_array,
455 scm_tc16_enclosed_array, scm_i_tc16_enclosed_array,
456 SCM_ARRAY_FLAG_CONTIGUOUS, SCM_I_ARRAY_FLAG_CONTIGUOUS,
457 SCM_ENCLOSE_ARRAYP, SCM_I_ENCLOSE_ARRAYP,
458 SCM_ARRAY_NDIM, SCM_I_ARRAY_NDIM,
459 SCM_ARRAY_CONTP, SCM_I_ARRAY_CONTP,
460 SCM_ARRAY_MEM, SCM_I_ARRAY_MEM,
461 SCM_ARRAY_V, SCM_I_ARRAY_V,
462 SCM_ARRAY_BASE, SCM_I_ARRAY_BASE,
463 SCM_ARRAY_DIMS, SCM_I_ARRAY_DIMS,
464 scm_t_array, scm_i_t_array): Likewise.
465 (SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG):
466 Moved from unif.h to unif.c.
467 (scm_c_array_rank): New.
468 (scm_array_rank): Reimplement using it.
469
470 * deprecated.h, deprecated.c (SCM_ARRAYP, SCM_ARRAY_NDIM,
471 SCM_ARRAY_CONTP, SCM_ARRAY_MEM, SCM_ARRAY_V, SCM_ARRAY_BASE,
472 SCM_ARRAY_DIMS, scm_t_array): New deprecated versions.
473
474 2005-01-11 Marius Vollmer <mvo@zagadka.de>
475
476 * ramap.c: Replace uses of scm_make_ra with scm_i_make_ra.
477 (GVREF, GVSET): New abbreviations. Use them everywhere instead of
478 scm_c_generalized_vector_ref and scm_cvref, and
479 scm_c_generalized_vector_set_x, respectively.
480 (RVREF, IVDEP, BINARY_ELTS_CODE, BINARY_PAIR_ELTS_CODE,
481 UNARY_ELTS_CODE, UNARY_PAIR_ELTS_CODE): Removed since unused.
482
483 * unif.h, unif.c (indices_to_pos, scm_array_handle_pos): Renamed
484 former to latter and made public. Changed all uses.
485 (scm_i_make_ra): Made public, changed tag param to enclosed flag.
486 (scm_make_ra): Deprecated, changed all uses to scm_i_make_ra.
487 (scm_i_shap2ra): New internal version of scm_shap2ra.
488 (scm_shap2ra): Deprecated, changed all uses to scm_i_shap2ra.
489 (scm_i_ra_set_contp): New internal version of scm_ra_set_contp.
490 (scm_ra_set_contp): Deprecated, changed all uses to
491 scm_i_ra_set_contp.
492 (scm_cvref, scm_aind, scm_raprin1): Deprecated.
493
494 2005-01-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
495
496 * eval.c (scm_eval): Added example to docstring. Thanks to Issac
497 Trotts!
498
499 * unif.c (scm_list_to_typed_array): Allow the specification of the
500 upper bound as well. This is needed for empty arrays.
501 (l2ra): Give needed number of elements in error message.
502 (scm_i_print_array): Print length information for arrays that need
503 it.
504 (scm_i_read_array): Parse it.
505
506 * deprecated.h, deprecated.c (SCM_CHARS, SCM_UCHARS, SCM_LENGTH,
507 scm_i_object_chars, scm_i_object_length): Brought back from the
508 dead.
509
510 2005-01-10 Marius Vollmer <mvo@zagadka.de>
511
512 * ramap.c: Replaced single-index uses of scm_array_set_x with
513 scm_c_generalized_vector_set_x.
514
515 * unif.c (scm_array_rank, scm_array_dimensions,
516 scm_shared_array_offset, scm_shared_array_increments,
517 scm_array_ref, scm_array_set_x): Use scm_t_array_handle operations
518 to simplify code and make it more general.
519 (scm_shared_array_root): Work with all kinds of arrays, including
520 naked vectors.
521 (indices_to_pos): New.
522 (scm_make_shared_array): Use it instead of scm_aind; use handle
523 for oldra.
524
525 2005-01-10 Kevin Ryde <user42@zip.com.au>
526
527 * posix.c (scm_mkstemp): Update docstring from manual.
528
529 * stime.c (scm_mktime): Missing default errno=EINVAL from prev change.
530
531 2005-01-09 Marius Vollmer <mvo@zagadka.de>
532
533 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_i_uniform_vector_ref_proc,
534 scm_i_uniform_vector_set_proc): New.
535 (u8ref, u8set, s8ref, s8set, etc): New.
536 (uvec_reffers, uvec_setters): New.
537 (uvec_to_list): Use generic scm_array_handle_ref instead of
538 uvec_fast_ref since scm_array_handle_ref should be faster now.
539 (coerce_to_uvec, scm_c_uniform_vector_ref,
540 scm_c_uniform_vector_set_x): Likewise.
541
542 * unif.h, unif.c, inline.h (scm_i_t_array_ref, scm_i_t_array_set):
543 New.
544 (scm_t_array_handle): Added ref, set, elements and
545 writable_elements for fast inline operation of
546 scm_array_handle_ref and scm_array_handle_set.
547 (scm_array_handle_ref, scm_array_handle_set): Moved to inline.h
548 and replaced with inline code that simply calls the ref/set
549 members of the handle.
550 (enclosed_ref, vector_ref, string_ref, bitvector_ref, memoize_ref,
551 enclosed_set, vector_set, string_set, bitvector_set, memoize_set):
552 New.
553 (scm_array_handle_get): Initialize ref/set fields to memoize_ref
554 and memoize_set.
555 (scm_bitvector_fill_x, scm_bitvector_to_list, scm_bit_count,
556 scm_bit_position, scm_bit_set_star_x, scm_bit_count_star,
557 scm_bit_invert_x): Correctly multiply index with increment in the
558 general case.
559
560 * unif.c (scm_array_handle_set): Correctly execute only one
561 alternative. D'Oh!
562 (scm_list_to_typed_array, l2ra): Use scm_t_array_handle to fill
563 the array; this covers all cases with much simpler code.
564
565 * srfi-4.c (scm_uniform_element_size): Deprecated implementation
566 as well.
567
568 2005-01-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
569
570 * srfi-4.c (uvec_type): New.
571 (uvec_to_list, uvec_ref, uvec_set_x, scm_c_uniform_vector_ref,
572 scm_c_uniform_vector_x): Use it to get concrete type.
573
574 * unif.h (scm_t_array_dim): Changed type of members to ssize_t, to
575 fit the docs.
576
577 * unif.c (ra2l): Handle zero rank arrays.
578 (scm_i_print_array): Print zero rank arrays specially.
579 (tag_to_type): Return #t for an empty tag, not the empty symbol.
580 (scm_i_read_array): Allow zero rank arrays.
581
582 2005-01-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
583
584 * hashtab.h, hashtab.c (SCM_HASHTAB_BUCKET_LOC): Removed.
585 (scan_weak_hashtables): Rewrote its use with SCM_HASHTAB_BUCKET
586 and SCM_SET_HASHTAB_BUCKET.
587
588 * print.h, print.c (scm_print_state, SCM_PRINT_STATE_LAYOUT):
589 Removed ref_stack field.
590 (PSTATE_STACK_REF, PSTATE_STACK_SET): New, for accessing the stack
591 of a print state. Use them everywhere instead of ref_stack.
592
593 * srfi-4.h (scm_uniform_element_size): Deprecated for real.
594
595 * srfi-4.c: Include deprecation.h.
596
597 * vectors.h, vectors.c, unif.h, unif.c, deprecated.h,
598 deprecated.c, eq.c
599 (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR): Removed.
600 (scm_vector_elements, scm_vector_writable_elements,
601 scm_generalized_vector_get_handle): Moved to vectors.[hc] from
602 unif.[hc].
603 (SCM_SIMPLE_VECTOR_LOC): Removed.
604 (SCM_VECTOR_MAX_LENGTH, SCM_VECTOR_LENGTH, SCM_VELTS,
605 SCM_WRITABLE_VELTS, SCM_VECTOR_REF, SCM_VECTOR_SET,
606 scm_vector_equal_p): Moved from vectors.[hc] to deprecated.[hc].
607 (scm_vector_equal_p, scm_i_vector_equal_p): Renamed former to
608 latter. Changed use in eq.c.
609
610 2005-01-07 Marius Vollmer <mvo@zagadka.de>
611
612 Make the uniform vector routines also deal with one dimensional
613 arrays.
614
615 * srfi-4.c (SCM_IS_UVEC): New, use it instead of
616 SCM_SMOB_PREDICATE in this file.
617 (is_uvec): Also recognize one-dimensional uniform numeric arrays
618 of the right type.
619 (scm_is_uniform_vector): Likewise.
620 (uvec_fast_ref): Made BASE param const.
621 (uvec_writable_elements, uvec_elements): New.
622 (uvec_to_list, uvec_ref, uvec_set_x, uvec_length,
623 scm_c_uniform_vector_length, scm_c_uniform_vector_ref,
624 scm_c_uniform_set_x): Use them to also deal with one-dimensional
625 arrays.
626 (scm_uniform_vector_ref, scm_uniform_vector_set_x): Deprecate old
627 argument convention.
628 (scm_uniform_vector_to_list): Let uvec_to_list do all the
629 checking.
630 (scm_uniform_vector_length): Use uvec_length.
631
632 2005-01-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
633
634 * srfi-4.h, srfi-4.c (scm_c_uniform_vector_element_size,
635 scm_c_uniform_vector_size): Removed.
636 (scm_array_handle_uniform_element_size): New.
637
638
639 * unif.h (scm_array_handle_ref, scm_array_handle_set): Changed
640 type of POS parameter to be signed, positions can be negative.
641 (scm_array_handle_release): New, changed all uses of
642 scm_t_array_handle to properly call it.
643 (scm_vector_get_handle, scm_generalized_vector_get_handle):
644 Renamed former to latter, changed all uses.
645
646 2005-01-05 Marius Vollmer <mvo@zagadka.de>
647
648 Updated bitvector routines to also use scm_t_array_handles.
649
650 * unif.h (scm_bitvector_elements,
651 scm_bitvector_writable_elements): Use a scm_t_array_handle and
652 deliver offset, length and increment to caller. Changed all uses.
653 (scm_bitvector_release_elements,
654 scm_frame_bitvector_release_elements,
655 scm_bitvector_release_writable_elements,
656 scm_frame_bitvector_release_writable_elements): Removed.
657 (scm_array_handle_bit_elements,
658 scm_array_handle_bit_writable_elements,
659 scm_array_handle_bit_elements_offset): New.
660 (scm_make_typed_array): The special value for non-initialized
661 arrays is now SCM_UNSPECIFIED. The old special value SCM_BOOL_F
662 was a valid value to fill bitvectors with, so it can't really be
663 specialed out.
664
665 2005-01-04 Kevin Ryde <user42@zip.com.au>
666
667 * stime.c (scm_strftime): Free t.tm_zone produced by bdtime2c.
668 Reported by Bill Schottstaedt.
669
670 2005-01-02 Marius Vollmer <mvo@zagadka.de>
671
672 * sort.c (quicksort): Added INC parameter for non-contigous
673 vectors.
674 (quicksort1): New, for contigous vectors. Both functions are
675 generated from the same code by including "quicksort.i.c".
676 (scm_restricted_vector_sort_x): Call one of quicksort and
677 quicksort1, depending on increment of vector.
678 (scm_sort): Simply call scm_sort_x on a copy of the list or
679 vector.
680 (scm_merge_vector_x, scm_merge_vector_step): Changed indices to
681 size_t, added inc parameter.
682 (scm_stable_sort_x): Allocate temporary storage as Scheme vector
683 so that it doesn't leak.
684 (scm_stable_sort): Simply call scm_stable_sort_x on a copy of the
685 list or vector.
686
687 * ramap.c (scm_array_map_x): Do not try to convert fill value
688 before filling, any necessary conversion is done while storing.
689
690 * gc-card.c (scm_i_sweep_card): Call scm_i_vector_free instead of
691 doing it inline.
692
693 * hashtab.c, hashtab.h (SCM_HASHTABLE_BUCKETS): Removed.
694 (SCM_HASHTABLE_BUCKET, SCM_HASHTABLE_BUCKET_LOC): New. Replaced
695 all uses of SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET.
696
697 * tags.h, weaks.c, vports.c, hashtab.c, convert.c, sort.c,
698 convert.c, convert.h, convert.i.c, deprecated.c, environments.c,
699 eval.c, filesys.c, fluids.c, gc-mark.c, gh.h, gh_data.c, goops.c,
700 hash.c, init.c, libguile_la-arrays.loT, modules.c, net_db.c,
701 objects.c, ports.c, posix.c, print.c, random.c, read.c,
702 regex-posix.c, scmsigs.c, socket.c, stime.c, symbols.c: Use new
703 vector elements API or simple vector API, as appropriate. Removed
704 SCM_HAVE_ARRAYS ifdefery. Replaced all uses of
705 SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET.
706
707 * srfi-4.h, srfi-4.c,
708 srfi-4.i.c (scm_array_handle_uniform_elements,
709 scm_array_handle_uniform_writable_elements,
710 scm_uniform_vector_elements,
711 scm_uniform_vector_writable_elements):
712 (scm_<foo>vector_elements, scm_<foo>vector_writable_elements): Use
713 scm_t_array_handle, deliver length and increment.
714 (scm_array_handle_<foo>_elements,
715 scm_array_handle_<foo>_writable_elements): New.
716
717 * gen-scmconfig.h.in (SCM_I_GSC_HAVE_ARRAYS): Removed.
718 * gen-scmconfig.c: Hard code SCM_HAVE_ARRAYS to "1".
719
720 * unif.h, unif.c (scm_t_array_handle, scm_array_get_handle,
721 scm_array_handle_rank, scm_array_handle_dims, scm_array_handle_ref
722 scm_array_handle_set, scm_array_handle_elements
723 scm_array_handle_writable_elements, scm_vector_get_handle): New.
724 (scm_make_uve, scm_array_prototype, scm_list_to_uniform_array,
725 scm_dimensions_to_uniform_array): Deprecated for real.
726 (scm_array_p, scm_i_array_p): Use latter for SCM_DEFINE since
727 snarfing wont allow a mismatch between C and Scheme arglists.
728 (scm_make_shared_array, scm_enclose_array): Correctly use
729 scm_c_generalized_vector_length instead of
730 scm_uniform_vector_length.
731
732 * validate.h (SCM_VALIDATE_VECTOR,
733 SCM_VALIDATE_VECTOR_OR_DVECTOR): use scm_is_simple_vector instead
734 of SCM_VECTORP.
735
736 * weaks.h, weaks.c: Use new internal weak vector API from
737 vectors.h.
738
739 * Makefile.am (libguile_la_SOURCES, DOT_X_FILES, DOT_DOC_FILES,
740 EXTRA_libguile_la_SOURCES): Changed ramap.c and unif.c from being
741 'extra' to being regular sources.
742 (noinst_HEADERS): Added quicksort.i.c.
743 * quicksort.i.c: New file.
744
745 * vectors.h, vector.c (SCM_VECTORP, SCM_VECTOR_LENGTH, SCM_VELTS,
746 SCM_WRITABLE_VELTS, SCM_VECTOR_REF, SCM_VECTOR_SET): Deprecated
747 and reimplemented. Replaced all uses with scm_vector_elements,
748 scm_vector_writable_elements, or SCM_SIMPLE_VECTOR_*, as
749 appropriate.
750 (scm_is_simple_vector, SCM_SIMPLE_VECTOR_LENGTH,
751 SCM_SIMPLE_VECTOR_REF, SCM_SIMPLE_VECTOR_SET,
752 SCM_SIMPLE_VECTOR_LOC): New.
753 (SCM_VECTOR_BASE, SCM_SET_VECTOR_BASE, SCM_VECTOR_MAX_LENGTH,
754 SCM_MAKE_VECTOR_TAG, SCM_SET_VECTOR_LENGTH,
755 SCM_VELTS_AS_STACKITEMS, SCM_SETVELTS, SCM_GC_WRITABLE_VELTS):
756 Removed.
757 (scm_vector_copy): New.
758 (scm_vector_elements, scm_vector_writable_elements): Use
759 scm_t_array_handle, deliver length and increment. Moved to
760 unif.h. Changed all uses.
761 (scm_vector_release_elements,
762 scm_vector_release_writable_elements,
763 (scm_frame_vector_release_elements,
764 scm_frame_vector_release_writable_elements): Removed.
765 (SCM_I_IS_VECTOR, SCM_I_VECTOR_ELTS, SCM_I_VECTOR_WELTS,
766 SCM_I_VECTOR_LENGTH, scm_i_vector_free): New internal API.
767 (SCM_I_WVECTP SCM_I_WVECT_LENGTH SCM_I_WVECT_VELTS
768 SCM_I_WVECT_GC_WVELTS SCM_I_WVECT_TYPE SCM_I_WVECT_GC_CHAIN
769 SCM_I_SET_WVECT_GC_CHAIN, scm_i_allocate_weak_vector): New, for
770 weak vectors.
771
772 2004-12-29 Marius Vollmer <mvo@zagadka.de>
773
774 No longer use creators to specify the type of an array. Creators
775 expose the fact that arrays are wrapped around vectors, but that
776 might change.
777
778 * srfi-4.h (scm_i_proc_make_u8vector, scm_i_proc_make_s8vector,
779 scm_i_proc_make_u16vector, scm_i_proc_make_s16vector,
780 scm_i_proc_make_u32vector, scm_i_proc_make_s32vector,
781 scm_i_proc_make_u64vector, scm_i_proc_make_s64vector,
782 scm_i_proc_make_f32vector, scm_i_proc_make_f64vector,
783 scm_i_proc_make_c32vector, scm_i_proc_make_c64vector,
784 uvec_proc_vars): Removed.
785 (scm_i_generalized_vector_creator): Removed.
786 (scm_i_generalized_vector_type): New.
787
788 * unif.h, unif.c (scm_typed_array_p, scm_make_array,
789 scm_make_typed_array, scm_array_type, scm_list_to_array,
790 scm_list_to_typed_array, scm_is_array, scm_is_typed_array): New.
791 (scm_array_creator): Removed.
792 (scm_array_p): Deprecated second PROT argument.
793 (scm_dimensions_to_uniform_array, scm_list_to_uniform_array):
794 Deprecated, reimplemented in terms of scm_make_typed_array and
795 scm_list_to_typed_array.
796 (scm_i_proc_make_vector, scm_i_proc_make_string,
797 scm_i_proc_make_bitvector): Removed.
798 (type_creator_table, init_type_creator_table, type_to_creator,
799 make_typed_vector): New.
800 (scm_i_convert_old_prototype): Removed.
801 (prototype_to_type): New.
802 (scm_make_uve): Deprecated, reimplemented using make_typed_vector.
803 (scm_array_dimensions): Use scm_list_1 instead of scm_cons for
804 minor added clarity.
805 (scm_make_shared_array, scm_ra2contig): Use make_typed_vector
806 instead of scm_make_uve.
807 (tag_creator_table, scm_i_tag_to_creator): Removed.
808 (tag_to_type): New.
809 (scm_i_read_array): Use scm_list_to_typed_array instead of
810 scm_list_to_uniform_array.
811
812 2004-12-27 Marius Vollmer <mvo@zagadka.de>
813
814 * unif.h, unif.c (scm_bitvector_elements): Made return value "const".
815 (scm_bitvector_writable_elements): New.
816 (scm_bitvector_release, scm_bitvector_release_elements):
817 Renamed former to latter. Added explicit call to
818 scm_remember_upto_here_1.
819 (scm_frame_bitvector_release,
820 scm_frame_bitvector_release_elements): Renamed former to latter.
821 (scm_bitvector_release_writable_elements,
822 scm_bitvector_release_writable_elements): New.
823 Changed all uses as required by the changes above.
824
825 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_uniform_vector_elements,
826 scm_u8vector_elements, etc): Made return value "const".
827 (scm_uniform_vector_writable_elements,
828 scm_u8vector_writable_elements, etc): New.
829 (scm_uniform_vector_release, scm_uniform_vector_release_elements):
830 Renamed former to latter. Added explicit call to
831 scm_remember_upto_here_1.
832 (scm_frame_uniform_vector_release,
833 scm_frame_uniform_vector_release_elements): Renamed former to latter.
834 (scm_uniform_vector_release_writable_elements,
835 scm_frame_uniform_vector_release_writable_elements): New. Takes
836 crown of longest identifier yet.
837 Changed all uses as required by the changes above.
838
839 * vectors.h, vectors.c (scm_c_vector_set_x): Make return type
840 void.
841 (scm_is_vector, scm_vector_p, scm_vector_length,
842 scm_c_vector_length, scm_vector_ref, scm_c_vector_ref,
843 scm_vector_set_x, scm_c_vector_set_x, scm_vector_to_list,
844 scm_vector_move_left_x, scm_vector_move_right_x,
845 scm_vector_fill_x): handle one-dimensional arrays.
846 (scm_vector_elements, scm_vector_release_elements,
847 scm_vector_frame_release_elements, scm_vector_writable_elements,
848 scm_vector_release_writable_elements,
849 scm_vector_frame_release_writable_elements): New.
850 (scm_list_to_vector, scm_vector_to_list, scm_vector_fill,
851 scm_vector_move_left_x, scm_vector_move_right_x): Use them.
852
853 * ramap.c (scm_ramapc, scm_raeql): Use
854 scm_c_generalized_vector_length instead of
855 scm_uniform_vector_length.
856 (scm_ramap, rafe): Use scm_c_vector_ref instead of SCM_VELTS. use
857 scm_c_generalized_vector_ref instead of scm_uniform_vector_ref.
858
859 2004-12-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
860
861 * continuations.h, continuations.c (scm_t_contregs): New 'offset'
862 member for relocating debug frames.
863 (scm_make_continuation): Set it.
864
865 * stacks.c (read_frame, read_frames, scm_make_stack,
866 scm_last_stack_frame, scm_stack_id): Use the new 'offset' member
867 of continuations instead of calculating the offset ourselves.
868 Relocate 'vect' member of scm_t_debug_frame.
869
870 2004-12-16 Kevin Ryde <user42@zip.com.au>
871
872 * ramap.c (scm_array_map_x): Check for at least one source argument.
873
874 2004-12-14 Kevin Ryde <user42@zip.com.au>
875
876 * srfi-13.c (string-any, string-every): Use a scheme wrapper around
877 the C code so for the final call to the predicate procedure is a tail
878 call, per SRFI-13 spec.
879
880 2004-12-10 Kevin Ryde <user42@zip.com.au>
881
882 * eq.c (scm_eq_p, scm_eqv_p, scm_equal_p): Update docstrings from
883 recent revision to the reference manual.
884
885 * numbers.c (scm_modulo): Amend fixme comment about negative divisor
886 with "%", C99 says it's well-defined.
887
888 * socket.c (scm_from_ipv6): Just use mpz_import. Don't bother trying
889 to fit scm_from_ulong_long, since that uses mpz_import anyway. Don't
890 bother trying to fit scm_from_ulong, not really worth the trouble if
891 addresses are more than 4 bytes usually.
892
893 2004-11-30 Kevin Ryde <user42@zip.com.au>
894
895 * gc_os_dep.c (NetBSD): Test __m68k__ and __arm__ as well as m68k and
896 arm32. Reported by Greg Troxel.
897
898 2004-11-14 mvo <mvo@zagadka.de>
899
900 * unif.c, unif.h (scm_i_cvref): Made non-static for ramap.c.
901
902 * Makefile.am (INCLUDES): It is "@LTDLINCL@", not "@LTDLINC@".
903
904 2004-11-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
905
906 Enclosed arrays are now their own smob. This has been done to
907 make the code more explicit about them and to prepare for the time
908 when generalized vectors include arbitrary one-dimensional
909 arrays. (Uptonow, enclosed arrays have been recognized by their
910 use of an array as their storage 'vector'. When all generalized
911 vectors are allowed as storage, including one-dimensional arrays,
912 this will no longer work.)
913
914 * unif.h, unif.c: (scm_tc16_enclosed_array, SCM_ENCLOSED_ARRAYP):
915 New.
916 (exactly_one_third, singp): Removed.
917 (scm_array_p, scm_array_dimensions, scm_shared_array_root,
918 scm_shared_array_offset, scm_shared_array_increments): Handle
919 enclosed arrays explicitely.
920 (scm_array_rank): Likewise. Also, do not return zero for
921 non-arrays, signal an error instead since arrays with rank zero do
922 exist.
923 (scm_i_make_ra): New, for specifying the tag of the new array.
924 (scm_make_enclosed_array): Use it.
925 (scm_make_ra): Reimplemented in terms of scm_i_make_ra.
926 (scm_make_shared_array): Use scm_c_generalized_vector_length
927 instead of scm_uniform_vector_length.
928 (scm_array_in_bounds_p): Rewritten to be much cleaner.
929 (scm_i_cvref): New, doing the job of scm_cvref.
930 (scm_cvref): Use scm_i_cvref.
931 (scm_array_ref): Do not accept non-arrays when no indices are
932 given. Use scm_i_cvref to do the actual access.
933 ("uniform-array-set1"): Do not register.
934 (scm_array_set_x, scm_uniform_array_read_x,
935 scm_uniform_array_write): Handle enclosed arrays explicitly.
936 (ra2l): Use scm_i_cvref instead of scm_uniform_vector_ref to also
937 handle enclosed arrays.
938 (scm_array_to_list): Handle enclosed arrays explicitly.
939 (rapr1): Removed.
940 (scm_i_print_array_dimension): Use scm_i_cvref to also handle
941 enclosed arrays.
942 (scm_i_print_enclosed_array): New.
943 (tag_proto_table, tag_creator_table): Renamed former to latter.
944 Added "a" and "b" for strings and bitvectors, resp.
945 (scm_i_tag_to_prototype, scm_i_tag_to_creator): Renamed former to
946 latter. Tag "a" is in the table now, no need to handle it as a
947 legacy tag.
948 (scm_raprin1): Just call scm_iprin1.
949 (scm_array_creator, scm_array_prototype): Handle enclosed arrays
950 explicitly.
951 (scm_init_unif): Initialize scm_tc16_enclosed_array smob.
952 Use scm_i_print_array as printer for scm_tc16_array.
953
954 2004-11-10 Marius Vollmer <mvo@zagadka.de>
955
956 * ramap.c (cind): Changed second arg to be pointer to long instead
957 of uniform vector.
958 (scm_ramapc): Allocate index vector with scm_malloc and not as
959 uniform vector. Wrap it in a frame so that it gets properly freed.
960 (scm_array_index_map_x): Likewise.
961
962 * unif.c: Changed all uses of scm_array_prototype to
963 scm_array_creator. (scm_i_get_old_prototype): Signal error when no
964 prototype is known.
965 (scm_uniform_array_read_x, scm_uniform_array_write): Reimplemented
966 in terms of scm_uniform_vector_read_x and
967 scm_uniform_vector_write, respectively. Strings and
968 bitvector support has been dropped.
969
970 * srfi-4.h, srfi-4.c: Do not include <libguile.h>, include the
971 needed files directly. Include config.h, <unistd.h> and <io.h>
972 when available.
973 (scm_uniform_vector_read_x, scm_uniform_vector_write): New.
974
975 2004-11-09 Marius Vollmer <mvo@zagadka.de>
976
977 * gh_data.c (gh_uniform_vector_length): Properly use
978 scm_c_uniform_vector_length instead of scm_uniform_vector_length.
979
980 2004-11-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
981
982 * srfi-4.h (scm_c_uniform_vector_ref, scm_c_uniform_vector_set_x):
983 New.
984 (scm_i_uniform_vector_creator): Removed.
985 (scm_i_generalized_vector_creator): New.
986 (scm_uniform_vector_length, scm_uniform_element_size): Do not
987 handle generalized vectors, only uniform numeric vectors.
988 (alloc_uvec): Do length check here...
989 (make_uvec): ...but not here.
990 (coerce_to_uvec): Use new generalized vector functions to handle
991 all kinds of vectors in one go.
992
993 * tags.h (scm_tc7_bvect): Renamed to scm_tc7_unused7, renaming the
994 remaining scm_tc7_unused tags to get a neatly ordered list.
995
996 * eq.c, evalext.c, gc-card.c, gc-mark.c, objects.c, print.c: Do no
997 longer handle scm_tc7_bvect bitvectors.
998
999 * ramap.c: Use the new generalized vector functions to handle all
1000 vector like things.
1001
1002 * vectors.h, vectors.c (scm_is_vector, scm_c_vector_length,
1003 scm_c_vector_ref, scm_c_vector_set_x, scm_generalized_vector_p,
1004 scm_generalized_vector_length, scm_generalized_vector_ref,
1005 scm_generalized_vector_set_x, scm_generalized_vector_to_list,
1006 scm_is_generalized_vector, scm_c_generalized_vector_length,
1007 scm_c_generalized_vector_ref, scm_c_generalized_vector_set_x):
1008 New.
1009
1010 * unif.h, unif.c (scm_bitvector_p, scm_bitvector,
1011 scm_make_bitvector, scm_bitvector_length, scm_bitvector_ref,
1012 scm_bitvector_set_x, scm_list_to_bitvector, scm_bitvector_to_list,
1013 scm_bitvector_fill_x, scm_is_bitvector, scm_c_make_bitvector,
1014 scm_c_bitvector_length, scm_c_bitvector_ref,
1015 scm_c_bitvector_set_x, scm_bitvector_elements,
1016 scm_bitvector_release, scm_frame_bitvector_release,
1017 scm_tc16_bitvector, bitvector_free, bitvector_print,
1018 bitvector_equalp, count_ones, find_first_one): New.
1019 (scm_bit_count, scm_bit_position, scm_bit_set_star_x,
1020 scm_bit_count_star, scm_bit_invert_x, scm_istr2bve): Rewritten
1021 using the new C API for bitvectors and maybe count_ones or
1022 find_first_one, as appropriate.
1023 (SCM_I_MAX_LENGTH, SCM_BITVECTOR_P, SCM_BITVECTOR_BASE,
1024 SCM_SET_BITVECTOR_BASE, SCM_BITVECTOR_MAX_LENGTH,
1025 SCM_BITVECTOR_LENGTH, SCM_MAKE_BITVECTOR_TAG,
1026 SCM_SET_BITVECTOR_LENGTH): Removed. Replaced all uses with the
1027 new functions from above.
1028 (scm_i_proc_make_vector, scm_i_proc_make_string,
1029 scm_i_proc_make_bitvector): Made non-static for use in
1030 scm_i_generalized_vector_creator.
1031 (scm_make_u1vector): Removed, replaced by scm_make_bitvector.
1032 (scm_make_uve): Validate that the created object is a generalized
1033 vector.
1034 (scm_i_legacy_tag): Removed.
1035 (scm_i_print_array): Do it here.
1036 (scm_raprin1): Only print enclosed arrays.
1037
1038 * Makefile.am (DOT_DOC_FILES): Added srfi-4.doc.
1039
1040 2004-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1041
1042 * srfi-4.c (make_uvec): Use SCM_I_SIZE_MAX instead of SIZE_MAX for
1043 added portability.
1044
1045 * chars.c (scm_charnames, scm_charnums): Added "sp" as an alias
1046 for "space". Thanks to Bruce Korb!
1047
1048 * rw.c (scm_read_string_x_partial): Bugfix, apply offset to dest
1049 only after dest has been set. Thanks to Hyper Division!
1050
1051 * gh_data.c (gh_uniform_vector_length): Use
1052 scm_uniform_vector_length instead of SCM_UVECTOR_LENGTH.
1053
1054 2004-11-03 Marius Vollmer <mvo@zagadka.de>
1055
1056 * unif.h (SCM_UVECTOR_BASE, SCM_SET_UVECTOR_BASE,
1057 SCM_UVECTOR_MAXLENGTH, SCM_UVECTOR_LENGTH, SCM_MAKE_UVECTOR_TAG,
1058 SCM_SET_UVECTOR_LENGTH): Removed.
1059
1060 2004-11-02 Marius Vollmer <mvo@zagadka.de>
1061
1062 Mac OS X and OpenBSD compatibility patches from Andreas Vögele.
1063 Thanks!
1064
1065 * backtrace.c (scm_display_backtrace_with_highlights): Join the
1066 first and the second line of the SCM_DEFINE macro call, since old
1067 preprocessors cannot handle definitions that are split into two
1068 lines.
1069
1070 * inline.h (scm_cell, scm_double_cell): Don't use C99 variable
1071 declarations.
1072
1073 * pairs.c (scm_i_chase_pairs): Replace scm_t_bits with
1074 scm_t_uint32 to fix the mismatch between the function declaration
1075 and definition.
1076
1077 * sort.c (quicksort): Don't use C99 variable declarations.
1078
1079 * srfi-4.c (uvec_fast_ref): Avoid a compiler warning by returning
1080 SCM_BOOL_F if no type matches.
1081
1082 * threads.c (thread_print): Cast a pointer to size_t when printing
1083 with scm_uintprint.
1084
1085 * unif.c (scm_i_tag_to_prototype): Make sure that "instead" gets
1086 defined.
1087 (scm_array_prototype): Deprecated.
1088
1089 2004-11-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1090
1091 * srfi-4.h, srfi-4.c (scm_frame_uniform_vector_release): New.
1092 * unif.c (scm_bit_set_star_x, scm_bit_count_star_x): Use it to get
1093 more efficient access to the u32vector.
1094
1095 * tags.h (scm_tc7_llvect, scm_tc7_uvect, scm_tc7_fvect,
1096 scm_tc7_dvect, scm_tc7_cvect, scm_tc7_svect, scm_tc7_byvect,
1097 scm_tc7_ivect): Renamed to scm_tc7_unused_1 to scm_tc7_unused_8.
1098
1099 * validate.h (SCM_VALIDATE_VECTOR_OR_DVECTOR): Accept f64vectors
1100 instead of the old-style dvectors.
1101
1102 * gh_data.c: Use new-style uniform arrays in place of old-style
1103 ones.
1104
1105 * eq.c, evalext.c, gc-card.c, gc-mark.c, objects.c, print.c,
1106 ramap.c, unif.c: Do no longer handle old-style uniform vectors.
1107
1108 * unif.c (scm_bit_set_star_x, scm_bit_count_star_x): Use u32vectors
1109 instead of old-sytle uvectors.
1110
1111 * convert.c, convert.i.c: Rewritten completely, using
1112 scm_any_to_u8vector, etc and other new-style uniform vector
1113 functions.
1114
1115 * random.c (scm_random_solid_sphere_x,
1116 scm_random_hollow_sphere_x): Do not validate vector argument, this
1117 is already done elsewhere.
1118
1119 * srfi-4.h, srfi-4.i.c, srfi-4.c (coerce_to_uvec,
1120 scm_any_to_u8vector, etc): New.
1121 (scm_uniform_element_size, scm_uniform_vector_length): Do no
1122 longer handle old-style uniform vectors.
1123
1124 * read.c (scm_lreadr): Bugfix: include the last bit in the
1125 bit vector.
1126
1127 2004-10-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1128
1129 * unif.h, unif.c (scm_array_creator): New.
1130 (scm_i_get_old_prototype): New.
1131 (scm_array_prototype): use it to return old-style prototype, never
1132 return creators.
1133 (scm_make_uve): Use scm_call_1 instead of scm_call_2 with a second
1134 arg of SCM_UNDEFINED. The latter is wrong.
1135
1136 * unif.h, unif.c (scm_make_u1vector): New, but only temporary.
1137 (make_uve): Removed.
1138 (scm_i_proc_make_vector, scm_i_proc_make_string,
1139 scm_i_proc_make_u1vector): New.
1140 (scm_init_unif): Initialize them.
1141 (scm_i_convert_old_prototype): New.
1142 (scm_make_uve): Use it to get the creator procedure. Removed all
1143 old code that created old-style uniform vectors.
1144 (scm_array_p): Handle generic vectors.
1145 (scm_dimensions_to_uniform_array): Do not fill new array with
1146 prototype when that is a procedure.
1147 (scm_list_to_uniform_array): Also accept a list of lower bounds as
1148 the NDIM argument.
1149 (scm_i_print_array): Print rank for shared or non-zero-origin
1150 vectors.
1151 (tag_proto_table, scm_i_tag_to_prototype, scm_i_read_array): New.
1152 (scm_raprin1): Do not call scm_i_array_print for enclosed arrays,
1153 which I do not understand yet.
1154 (scm_array_prototype): Explicitely handle generic vectors.
1155
1156 * numbers.c, number.h (scm_i_print_complex, icmplx2str): New.
1157 (iflo2str): Use icmplx2str for complex numbers.
1158
1159 * srfi-4.c, srfi-4.h (scm_i_read_homogenous_vector,
1160 scm_i_uniform_vector_prototype): Removed.
1161 (scm_i_uniform_vector_creator): New.
1162 (SCM_UVEC_C32, scm_c32vector, scm_make_c32vector, etc,
1163 SCM_UVEC_C64, scm_c64vector, scm_make_c64vector, etc): New.
1164 Updated all tables and generic functions to support them.
1165 (scm_i_proc_make_u8vector, scm_i_proc_make_s8vector, etc): New.
1166 (scm_init_srfi_4): Initialize them.
1167
1168 * srfi-4.i.c (scm_take_u8vector, etc): use uvec_sizes instead of
1169 sizeof(CTYPE) as explained in the comment.
1170
1171 * read.c (scm_lreadr): Call scm_i_read_array for all characters
1172 following '#' that can start an array. Explicitely disambiguate
1173 'i' and 'e' between introducing numbers and uniform vectors. Do
1174 not call scm_i_read_homogenous_vector, since that is also handled
1175 by scm_i_read_array now.
1176
1177 2004-10-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1178
1179 First cut at integrating uniform vectors from srfi-4 with the rest
1180 of Guile. This change replaces scm_tc7_byvect with a s8 uniform
1181 vector. The plan is to gradually replace one type after the other
1182 until none is left and then to consider general cleanups and
1183 optimizations.
1184
1185 * srfi-4.h, srfi-4.i.c (scm_u8vector_elements, etc): New.
1186
1187 * srfi-4.h, srfi-4.c (scm_uniform_vector_p,
1188 scm_uniform_vector_ref, scm_uniform_vector_set_x,
1189 scm_uniform_vector_to_list, scm_is_uniform_vector,
1190 scm_c_uniform_vector_lengths, scm_c_uniform_vector_size,
1191 scm_uniform_vector_elements, scm_uniform_vector_element_size,
1192 scm_uniform_vector_release): New.
1193 (scm_i_uniform_vector_prototype, scm_i_uniform_vector_tag): New.
1194 (scm_uniform_element_size, scm_uniform_vector_length): Moved here
1195 from unif.h, unif.c and extended to handle both the old and new
1196 uniform vectors.
1197
1198 * tags.h (scm_tc7_byvect): Commented out.
1199
1200 * unif.h, unif.c (scm_uniform_vector_ref, scm_array_ref): Renamed
1201 the former to the latter.
1202 (scm_uniform_vector_length, scm_uniform_element_size): Moved to
1203 srfi-4.h, srfi-4.c.
1204 (scm_make_uve): Call scm_make_s8vector for #\nul prototype.
1205 (scm_array_p, scm_array_rank, scm_array_dimensions,
1206 scm_transpose_array, scm_enclose_array, scm_array_ref, scm_cvref,
1207 scm_array_set_x, scm_array_contents, scm_uniform_array_read_x,
1208 scm_array_to_list, scm_array_prototype): Handle srfi-4 uniform
1209 vectors. Removed code for scm_tc7_byvect.
1210 (scm_dimensions_to_uniform_array): Fill array with 0 when
1211 prototype is #\nul.
1212 (scm_i_print_array_dimension, scm_i_legacy_tag,
1213 scm_i_print_array): New.
1214 (scm_raprin1): Call scm_i_print_array for arrays. Removed code
1215 for scm_tc7_byvect.
1216
1217 * ramap.c (scm_ra_matchp, scm_array_fill_int, racp,
1218 scm_array_index_map_x, raeql_1, scm_array_equal_p): Handle srfi-4
1219 uniform vectors. Removed code for scm_tc7_byvect
1220
1221 * print.c (iprin1): Removed code for scm_tc7_byvect.
1222 * objects.c (scm_class_of): Likewise.
1223 * gc-mark.c (scm_gc_mark_dependencies): Likewise.
1224 * gc-card.c (scm_i_sweep_card): Likewise.
1225 * evalext.c (scm_self_evaluating_p): Likewise.
1226 * eq.c (scm_equal_p): Likewise.
1227
1228 * gh_data.c (gh_chars2byvect): Reimplemented with
1229 scm_make_s8vector.
1230 (gh_scm2chars): Handle s8vectors, removed code for scm_tc7_byvect.
1231
1232 * srfi-4.c (take_uvec): New.
1233 (alloc_uvec): Use it.
1234 * srfi-4.h, srfi-4.i.c (scm_take_u8vector, etc): New.
1235
1236 * random.c (vector_scale, vector_scale_x): Renamed former to the
1237 latter, since it modifies its argument.
1238 (vector_scale_x, vector_sum_squares, scm_random_normal_vector_x):
1239 Do not use scm_universal_vector_length for non-uniform vectors.
1240 Use scm_f64vector_elements to access innards of uniform vectors.
1241
1242 * convert.i.c: Convert srfi-4 style uniform vectors when
1243 requested.
1244 * convert.c (scm_c_scm2chars, scm_c_chars2scm,
1245 scm_c_chars2byvect): Use a s8vector instead of a scm_tc7_byvect.
1246
1247 2004-10-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1248
1249 * numbers.h, numbers.c (scm_i_print_double): New.
1250
1251 * srfi-4.c, srfi-4.h, srfi-4.i.c: New files, initially from
1252 ../srfi/ but heavily modified.
1253 * Makefile.am: Add them in all the right places.
1254 * init.c (scm_init_guile_1): Call scm_init_srfi_4.
1255 * read.c (scm_lreadr): Call scm_i_read_homogenous_vector for '#f',
1256 '#u', and '#s'.
1257
1258 * read.h, read.c (scm_i_input_error): Renamed from scm_input_error
1259 and made non-static. Changed all uses.
1260
1261 2004-10-22 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1262
1263 * variable.c, threads.c, struct.c, stackchk.c, smob.c, root.c,
1264 print.c, ports.c, mallocs.c, hooks.c, hashtab.c, fports.c,
1265 guardians.c, filesys.c, coop-pthreads.c, continuations.c: Use
1266 scm_uintprint to print unsigned integers, raw heap words, and
1267 adresses, using a cast to scm_t_bits to turn pointers into
1268 integers.
1269
1270 * unif.c: Include "libguile/print.h".
1271
1272 * numbers.h, numbers.c (SCM_T_INTBUFLEN): Increased to cover
1273 scm_t_intmax values.
1274 (scm_uint2str): New, for scm_t_uintmax.
1275 (scm_iint2str): Argument type changed to scm_t_intmax,
1276 reimplemented in terms of scm_uint2str.
1277
1278 * print.c, print.h (scm_uintprint): New, for printing
1279 scm_t_uintmax values.
1280 (scm_intprint): Argument type changed to scm_t_intmax.
1281
1282 * sort.c (quicksort, scm_merge, scm_merge_list_x,
1283 scm_merge_list_step, scm_merge_vector_step): Inserted SCM_TICKs at
1284 strategic places so that the loops can be interrupted.
1285
1286 * Makefile.am (INCLUDES): Use @LTDLINC@ instead of
1287 "-I$(top_srcdir)/libguile-ltdl".
1288 (libguile_la_LIBADD): Use @LIBLTDL@ instead of
1289 "../libguile-ltdl/libguile-ltdl.a".
1290
1291 * guile.c, dynl.c: Switched to using libltdl directly. Replaced
1292 all references to scm_lt_* with just lt_*. Include <ltdl.h>
1293 instead of <libguile-ltdl.h>.
1294
1295 2004-10-20 Marius Vollmer <mvo@zagadka.de>
1296
1297 * sort.c (quicksort): Copy pivot out of the array while
1298 constructing the partitions; it could get overwritten otherwise.
1299 Because of the ultimate insertion sort, this bug did not cause
1300 quicksort to fail, it just put all the burdon on the insertion
1301 sort and was thus very slow. Thanks to Rolan Orre for reporting
1302 the slowness!
1303
1304 2004-10-19 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1305
1306 * numbers.c (scm_i_range_error): New.
1307 * conv-integer.i.c, conv-uinteger.i.c: Use it instead of
1308 scm_out_of_range.
1309
1310 * sort.c (scm_restricted_vector_sort_x): Validate startpos <=
1311 endpos. State inclusiveness/exclusiveness of bounds in docstring.
1312
1313 * unif.c (scm_array_p): When no prototype is given, explicitely
1314 test for allowable types, do not simply return true. Thanks to
1315 Roland Orre for reporting this!
1316
1317 * private-gc.h (SCM_DEFAULT_MAX_SEGMENT_SIZE): Increase to 20 Mib.
1318
1319 * gc-segment.c (scm_i_get_new_heap_segment): Limit size of new
1320 segment to scm_max_segment_size.
1321
1322 2004-10-08 Han-Wen Nienhuys <hanwen@xs4all.nl>
1323
1324 * gc.c (scm_igc): put scm_gc_running-- before running hooks.
1325
1326 * inline.h (scm_double_cell): abort if GC running.
1327 (scm_cell): idem.
1328
1329 2004-10-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1330
1331 * error.c (scm_wrong_type_arg): Do not talk about "argument" for
1332 pos == 0.
1333
1334 Keywords no longer store a 'dash symbol'. Instead, they store a
1335 symbol with their real name.
1336
1337 * keywords.h, keywords.c, deprecated.h, deprecated.c
1338 (SCM_KEYWORDP, SCM_KEYWORDSYM): Deprecated and implemented in
1339 terms of scm_is_keyword and scm_keyword_dash_symbol.
1340
1341 * keywords.h, keywords.c, discouraged.h, discouraged.c
1342 (scm_make_keyword_from_dash_symbol, scm_keyword_dash_symbol,
1343 scm_c_make_keyword): Discouraged.
1344
1345 * keywords.h, keywords.c (scm_symbol_to_keyword,
1346 scm_keyword_to_symbol): Implemented in C.
1347 (scm_is_keyword, scm_from_locale_keyword,
1348 scm_from_locale_keywordn): New.
1349
1350 * goops.c: Replaced SCM_KEYWORDP with scm_is_keyword.
1351
1352 * snarf.h (SCM_KEYWORD, SCM_GLOBAL_KEYWORD): Use
1353 scm_from_locale_keyword instead of scm_c_make_keyword.
1354
1355 * keywords.c (scm_symbol_to_keyword): Use SCM_ASSERT_TYPE for a
1356 better error message.
1357
1358 * deprecated.c: Include discouraged.h and keywords.h.
1359
1360 * read.c (scm_lreadr): Simply do (symbol->keyword (read)) after
1361 reading '#:' or ':'. See NEWS for consequences.
1362
1363 2004-09-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1364
1365 * read.c (scm_lreadr): Revert change from 2004-09-22: string
1366 literals are now read-write again (until SCM_STRING_CHARS is
1367 removed).
1368
1369 * strings.c (SCM_STRING_CHARS): Explicitely reject read-only
1370 strings with an error message that blames SCM_STRING_CHARS.
1371
1372 * options.c (change_option_setting): Use scm_car instead of
1373 explicit type check plus SCM_CAR.
1374
1375 * print.h, print.c (SCM_PRINT_HIGHLIGHT_PREFIX,
1376 SCM_PRINT_HIGHLIGHT_SUFFIX): New printer options.
1377 (scm_iprin1): Use them instead of the previoulsy hardcoded
1378 strings.
1379 (scm_init_print): Initialize them.
1380
1381 * backtrace.c (display_frame_expr): Do not remove control
1382 characters from the final string. Print it directly using
1383 scm_display.
1384
1385 * ramap.c (scm_array_equal_p): Include scm_tc7_svect in switch.
1386 Thanks to Roland Orre!
1387
1388 2004-09-29 Kevin Ryde <user42@zip.com.au>
1389
1390 * regex-posix.c (scm_regexp_exec): Correction to last change, should
1391 be whole original string in match struct, not offsetted substring.
1392
1393 2004-09-24 Han-Wen Nienhuys <hanwen@xs4all.nl>
1394
1395 * gc.c (scm_gc_unprotect_object): abort if called during GC.
1396
1397 2004-09-24 Marius Vollmer <mvo@zagadka.de>
1398
1399 * Makefile.am (EXTRA_DIST): Added gettext.h.
1400
1401 * smob.c, smob.h (scm_assert_smob_type): New.
1402
1403 * Makefile.am (guile_CFLAGS, guile_LDFLAGS, libguile_la_CFLAGS):
1404 Include GUILE_CFLAGS.
1405 (libguile_la_LIBADD): Removed THREAD_LIBS_LOCAL, which is unused
1406 now.
1407 (libpath.h): Put GUILE_CFLAGS in the build-info.
1408
1409 2004-09-23 Marius Vollmer <mvo@zagadka.de>
1410
1411 * print.h (scm_print_state): Added highlight_objects.
1412 * print.c (make_print_state, scm_free_print_state): Initialize it
1413 to SCM_EOL.
1414 (scm_iprin1): Wrap output in '{...}' when object is contained in
1415 highlight_objects.
1416
1417 * backtrace.h, backtrace.c (scm_display_backtrace_with_highlights,
1418 scm_backtrace_with_highlights): New. Set highlight_objects of
1419 printstate.
1420
1421 * error.c (scm_error_scm): Document new meaning of data/rest
1422 argument for out-of-range and wrong-type-arg errors.
1423 (scm_out_of_range, scm_out_of_range_pos, scm_wrong_type_arg,
1424 scm_wrong_type_arg_msg): Pass bad_value in rest argument of
1425 exception so that it gets highlighted in the backtrace.
1426 Don't talk about "argument" when not giving a position.
1427
1428 * throw.c (handler_message): The rest argument is the fourth
1429 argument, not everything after the third. Call
1430 scm_display_backtrace_with_highlights, passing the rest argument
1431 when appropriate.
1432
1433 2004-09-22 Marius Vollmer <mvo@zagadka.de>
1434
1435 From Jan Nieuwenhuizen <janneke@gnu.org> and Bruno Haible
1436 <bruno@clisp.org>:
1437
1438 * i18n.c: Handle --disable-nls (thanks Bruno).
1439
1440 * posix.c (scm_init_posix): Add LC_PAPER, LC_NAME, LC_ADDRESS,
1441 LC_TELEPHONE, LC_MEASUREMENT, LC_IDENTIFICATION.
1442
1443 * i18n.c (scm_i_to_lc_category): New name and export. Support all
1444 LC categories.
1445 * posix.c (scm_setlocale): Use it.
1446
1447 * i18n.h, i18n.c (scm_textdomain, scm_bindtextdomain,
1448 scm_bind_textdomain_codeset): Make wrappers similar to C function
1449 they wrap.
1450
1451 * i18n.h: New file.
1452 * i18n.c: New file.
1453 * gettext.h: New file, taken from GNU gettext.
1454 * init.c: Include libguile/i18n.h.
1455 (scm_init_guile_1): Add call to scm_init_i18n().
1456 * Makefile.am (libguile_la_SOURCES): Add i18n.c.
1457 (DOT_X_FILES): Add i18n.x.
1458 (DOT_DOC_FILES): Add i18n.doc.
1459 (libguile_la_LDFLAGS): Add @LTLIBINTL@.
1460 (modinclude_HEADERS): Add i18n.h.
1461
1462 2004-09-22 Marius Vollmer <mvo@zagadka.de>
1463
1464 * gh_list.c: Replaced SCM_CAR, etc with scm_car, etc.
1465
1466 * discouraged.h, tags.h (SCM_CONSP, SCM_NCONSP): Moved to
1467 discouraged.h. Replaced all uses with scm_is_pair.
1468 (SCM_I_CONSP): New name for SCM_CONSP.
1469
1470 * pairs.h, pairs.c (scm_is_pair, scm_is_null, scm_car, scm_cdr,
1471 scm_i_chase_pairs, SCM_I_A_PAT, SCM_I_D_PAT, etc, scm_caar,
1472 scm_cadr, etc): New.
1473 (SCM_NULLP, SCM_NNULLP): Moved to discouraged.h. Replaced all
1474 uses with scm_is_null.
1475
1476 * eval.c (scm_eval, scm_apply, call_cxr_1): Use scm_i_chase_pairs
1477 instead of explicit code.
1478
1479 2004-09-22 Marius Vollmer <mvo@zagadka.de>
1480
1481 * srfi-13.c (scm_string_contains, scm_string_contains_ci):
1482 Reworded logic a bit so that #f is returned immediately when s1 is
1483 too short to contain s2.
1484
1485 * regex-posix.c (scm_regexp_exec): Convert string to
1486 zero-terminated locale string before matching against it.
1487
1488 * strings.h, strings.c (scm_substring_read_only,
1489 scm_c_substring_read_only, scm_i_substring_read_only): New.
1490 (RO_STRING_TAG, IS_RO_STRING): New.
1491 (scm_i_string_writable_chars): Bail on read-only strings.
1492
1493 * read.c (scm_lreadr): use scm_c_substring_read_only for string
1494 literals, thus making them read-only as specified by R5RS.
1495
1496 2004-09-22 Marius Vollmer <mvo@zagadka.de>
1497
1498 * eq.c (scm_equal_p): Allow smobs with different flags to be equal
1499 by testing for smobs before insisting on equal SCM_CELL_TYPES.
1500
1501 2004-09-21 Marius Vollmer <mvo@zagadka.de>
1502
1503 * numbers.h, numbers.c: Include <gmp.h> in numbers.h, not in
1504 numbers.c.
1505 (scm_to_mpz, scm_from_mpz): New.
1506 Thanks to Andreas Vögele!
1507
1508 * read.c (skip_scsh_block_comment): Recognize "!#" everywhere, not
1509 just on a line of its own.
1510
1511 * srfi-13.c (scm_string_any, scm_string_every,
1512 scm_string_tabulate, string_upcase_x, string_down_case_x,
1513 string_titlecase_x, string_reverse_x, scm_string_tokenize): Use
1514 size_t instead of int for indices into strings. Make sure that no
1515 over- or underflow occurs. Thanks to Andreas Vögele!
1516 (scm_xsubstring, scm_string_xcopy_x): Use ints for 'extended'
1517 indices, which can also be negative.
1518
1519 2004-09-20 Marius Vollmer <mvo@zagadka.de>
1520
1521 * gc-mark.c (SCM_MARK_BACKING_STORE): Removed, it was unused.
1522
1523 * threads.c (scm_threads_mark_stacks): Call
1524 SCM_MARK_BACKING_STORE. Also, do not use stack_len local, it was
1525 only used once.
1526
1527 2004-09-13 Jan Nieuwenhuizen <janneke@gnu.org>
1528
1529 * srfi-13.c (scm_string_contains, scm_string_contains_ci):
1530 Bugfix: when subtracting unsigned values, make sure that result
1531 does not wrap.
1532
1533 2004-09-09 Kevin Ryde <user42@zip.com.au>
1534
1535 * filesys.c, stime.c (_POSIX_C_SOURCE): Use this only on hpux, it
1536 causes too many problems elsewhere (glibc, freebsd, mingw). Reported
1537 by Andreas Vögele.
1538
1539 2004-09-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1540
1541 * Makefile.am (EXTRA_libguile_la_SOURCES): Removed "alloca.c".
1542
1543 * eq.c (real_eqv): Pretend that all NaNs are equal.
1544
1545 * numbers.c (scm_integer_expt): Do not accept inexact integers.
1546
1547 2004-09-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1548
1549 * srfi-13.c (scm_string_trim_right, scm_string_xcopy_x): Correctly
1550 use size_t for some locals instead of int.
1551
1552 * read.c (scm_flush_ws): Detect "#!"-style comments here.
1553 (scm_lreadr): Abort on seeing "#!", which should no longer happen.
1554 (skip_scsh_block_comment): Use scm_input_error instead of
1555 scm_misc_error in case of EOF.
1556
1557 2004-09-07 Kevin Ryde <user42@zip.com.au>
1558
1559 * numbers.c (scm_integer_expt): Reject exponent +/-inf.
1560 Bug report by Bill Schottstaedt.
1561
1562 * ports.c (scm_getc, scm_lfwrite): Recognise \a \b and \r for port
1563 column.
1564 * ports.h (SCM_ZEROCOL, SCM_DECCOL): New macros.
1565
1566 * posix.c (scm_access): Update docstring per manual.
1567
1568 * posix.c (scm_nice): Correction to error detection. Reported by
1569 Matthias Koeppe.
1570
1571 * stime.c (scm_current_time, scm_gettimeofday, scm_strptime): Don't
1572 throw error before unlocking mutex with SCM_ALLOW_INTS.
1573
1574 2004-09-06 Kevin Ryde <user42@zip.com.au>
1575
1576 * stime.h (SCM_TIME_UNITS_PER_SECOND): Use sysconf(_SC_CLK_TCK) when
1577 available. This also gets around CLK_TCK being absent when
1578 _GNU_SOURCE and _POSIX_C_SOURCE are defined in stime.c.
1579
1580 2004-09-03 Stefan Jahn <stefan@lkcc.org>
1581
1582 * threads.c (scm_threads_mark_stacks): Fixed local variable
1583 definitions.
1584
1585 * strings.c (scm_i_substring_copy, scm_string_append): Fixed
1586 local variable definitions.
1587
1588 * stime.c (_POSIX_C_SOURCE): Do not define this item on
1589 MinGW32 because it conflicts with its pthread headers.
1590 (scm_mktime): Consider the HAVE_STRUCT_TM_TM_ZONE define.
1591 (scm_strftime): Using scm_from_locale_string() instead of
1592 scm_makfrom0str().
1593
1594 * posix.c (scm_putenv): Fixed typo in the !HAVE_UNSETENV
1595 part.
1596
1597 * numbers.c (scm_init_numbers): Removed check_sanity() call
1598 inside GUILE_DEBUG. The function has been removed somewhen...
1599
1600 * filesys.c (_POSIX_C_SOURCE): Do not define this item on
1601 MinGW32 because it conflicts with its pthread headers.
1602
1603 2004-08-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1604
1605 * strings.c (SCM_STRINGP): Accept all strings.
1606 (SCM_STRING_CHARS): Reject shared substrings here.
1607
1608 * script.c (scm_compile_shell_switches): Added 2003 and 2004 to
1609 the Copyright years.
1610
1611 2004-08-27 Kevin Ryde <user42@zip.com.au>
1612
1613 * socket.c (scm_fill_sockaddr): Use HAVE_STRUCT_SOCKADDR_SIN_LEN and
1614 HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN for sockaddr fields, SIN_LEN and
1615 SIN_LEN6 are not defined on all systems. Reported by Michael Tuexen.
1616
1617 2004-08-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1618
1619 * strings.h, strings.c (scm_i_make_symbol): Added FLAGS parameter.
1620 * symbols.h, symbols.c (SCM_I_F_SYMBOL_UNINTERNED,
1621 scm_i_symbol_is_interned, scm_i_mem2symbol,
1622 scm_i_mem2uninternedsymbol): Use it to store uninternedness flag.
1623
1624 2004-08-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1625
1626 * srfi-13.c: First cut at thread-safeness and proper use of
1627 scm_i_string_chars et al. Copious scm_remember_upto_heres have
1628 been inserted. Made sure that no internal string pointer is used
1629 across a SCM_TICK or a possible GC.
1630
1631 * script.c (scm_compile_shell_switches): Use
1632 scm_from_locale_string instead of scm_makfrom0str.
1633
1634 * srfi-13.c (scm_string_rindex): Export to Scheme, as it has
1635 always been.
1636
1637 2004-08-25 Marius Vollmer <mvo@zagadka.de>
1638
1639 Moved SRFI-13 and SRFI-14 into the core, taking over the role of
1640 strop.c.
1641
1642 * srfi-13.c, srfi-13.h, srfi-14.c, srfi-14.h: New files.
1643 * strop.h, strop.c: Removed, they are now empty.
1644 * Makefile.am: Updated for new and removed files.
1645
1646 * symbols.h, symbols.c (scm_string_ci_to_symbol): Moved here, next
1647 to scm_string_to_symbol.
1648
1649 * chars.c (scm_char_alphabetic_p, scm_char_numeric_p,
1650 scm_char_whitespace_p, scm_upper_case_p, scm_lower_case_p,
1651 scm_char_is_both_p): Use scm_char_set_contains_p with the proper
1652 charset instead of libc functions.
1653
1654 * strorder.c (scm_string_equal_p, scm_string_ci_equal_p,
1655 scm_string_less_p, scm_string_leq_p, scm_string_gr_p,
1656 scm_string_geq_p, scm_string_ci_less_p, scm_string_ci_leq_p,
1657 scm_string_ci_gr_p, scm_string_ci_geq_p): Use scm_string_eq, etc
1658 instead of explicit code.
1659
1660 * deprecated.c, load.c, posix.c, unif.c, symbols.c: Include
1661 "srfi-13.h" instead of "strop.h".
1662
1663 * init.c (scm_init_guile_1): Call scm_init_srfi_13 and
1664 scm_init_srfi_14. Do not call scm_init_strop.
1665
1666 2004-08-24 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1667
1668 * numbers.c (scm_inf_p): Synced docstring back from manual.
1669
1670 2004-08-22 Marius Vollmer <mvo@zagadka.de>
1671
1672 * strings.c (get_str_buf_start): New helper function.
1673 (scm_i_substring, scm_i_substring_copy, scm_i_substring_shared,
1674 scm_i_string_char, scm_i_string_writable_chars): Use it.
1675 (scm_i_substring_copy): Make START argument optional for C
1676 callers, for upcoming SRFI-13 integration.
1677
1678 2004-08-21 Marius Vollmer <mvo@zagadka.de>
1679
1680 From Richard Todd, Thanks!
1681
1682 * script.c (scm_compile_shell_switches): added '-L' switch to add
1683 to the %load-path.
1684
1685 2004-08-21 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
1686
1687 * eval.c (unmemoize_exprs): When dropping internal body markers
1688 from the output during unmemoization, also drop those that are not
1689 immediately at the beginning of a body.
1690
1691 2004-08-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1692
1693 * eval.c (scm_lookupcar1): Report "Variable used before given a
1694 value" insetad of an "Unbound" one for variables that are found
1695 but still contain SCM_UNDEFINED.
1696
1697 * posix.c (scm_mkstemp): Correction to the correction, mkstemp
1698 expects a null-terminated string in the locale encoding, but
1699 scm_i_string_writable_chars doesn't give that. Fixed by letting
1700 mkstemp modify a locale version of the tmpl argument and copying
1701 the result back into tmpl.
1702
1703 * strop.c (scm_substring_move_x): Store into str2, not str1.
1704
1705 2004-08-20 Kevin Ryde <user42@zip.com.au>
1706
1707 * posix.c (scm_mkstemp): Correction to new locale_string stuff, need
1708 to modify the input string.
1709
1710 2004-08-19 Marius Vollmer <mvo@zagadka.de>
1711
1712 * deprecated.c (SCM_SYMBOL_CHARS): Cast away const in return.
1713 (SCM_SYMBOL_LENGTH): It's scm_i_symbol_length, not
1714 scm_c_symbol_length.
1715
1716 2004-08-19 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1717
1718 New string implementation, with copy-on-write strings and
1719 mutation-sharing substrings, and a new internal string API.
1720 Symbols can now share memory with strings.
1721
1722 * tags.h (scm_tc7_stringbuf): New tag.
1723
1724 * strings.h, strings.c: (scm_i_string_chars, scm_i_string_length,
1725 scm_i_string_writable_chars, scm_i_string_stop_writing): New, to
1726 replace SCM_I_STRING_CHARS and SCM_I_STRING_LENGTH. Updated all
1727 uses.
1728 (scm_i_make_string, scm_c_make_string): New, to replace
1729 scm_allocate_string. Updated all uses.
1730 (SCM_STRINGP, SCM_STRING_CHARS, SCM_STRING_UCHARS,
1731 SCM_STRING_LENGTH): Deprecated.
1732 (scm_allocate_string, scm_take_str, scm_take0str, scm_mem2string,
1733 scm_str2string, scm_makfrom0str, scm_makfrom0str_opt):
1734 Discouraged. Replaced all uses with scm_from_locale_string or
1735 similar, as appropriate.
1736 (scm_c_string_length, scm_c_string_ref, scm_c_string_set_x,
1737 scm_c_substring, scm_c_substring_shared, scm_c_substring_copy,
1738 scm_substring_shared, scm_substring_copy): New.
1739
1740 * symbols.c, symbols.h (SCM_SYMBOLP, SCM_SYMBOL_FUNC,
1741 SCM_SET_SYMBOL_FUNC, SCM_SYMBOL_PROPS, SCM_SET_SYMBOL_PROPS,
1742 SCM_SYMBOL_HASH, SCM_SYMBOL_INTERNED_P, scm_mem2symbol,
1743 scm_str2symbol, scm_mem2uninterned_symbol): Discouraged.
1744 (SCM_SYMBOL_LENGTH, SCM_SYMBOL_CHARS, scm_c_symbol2str):
1745 Deprecated.
1746 (SCM_MAKE_SYMBOL_TAG, SCM_SET_SYMBOL_LENGTH, SCM_SET_SYMBOL_CHARS,
1747 SCM_PROP_SLOTS, SCM_SET_PROP_SLOTS): Removed.
1748 (scm_is_symbol, scm_from_locale_symbol, scm_from_locale_symboln):
1749 New, to replace scm_str2symbol and scm_mem2symbol, respectively.
1750 Updated all uses.
1751 (scm_gensym): Generate only the number suffix in the buffer, just
1752 string-append the prefix.
1753
1754 * error.c (scm_memory_error): Do not try to throw, just abort.
1755 Throwing will not work anyway.
1756
1757 * gh.h, gh-data.c (gh_set_substr): Made src const.
1758
1759 * ports.c (scm_i_mode_bits_n): New, for counted strings.
1760 (scm_mode_bits): Use it.
1761 (scm_c_port_for_each): Blocking GC does not seem to work, allocate
1762 a vector normally and fill that instead of consing a list with a
1763 blocked GC.
1764
1765 * read.c (scm_i_casei_streq): New, for counted strings.
1766
1767 * threads.c (gc_section_count): Removed, thread-sleeping can not
1768 be nested.
1769 (scm_i_thread_put_to_sleep): Call scm_i_leave_guile before locking
1770 admin mutex so that we can be put to sleep by other threads while
1771 blocking on that mutex. Lock all the heap mutex of all threads,
1772 including ourselves.
1773 (scm_i_thread_wake_up): Unlock all threads, including ourselves,
1774 call scm_i_enter_guile.
1775 (scm_thread_mark_stacks): Expect all threads to be suspended.
1776
1777 * gc.h, gc.c (scm_i_gc_admin_mutex): New, to protect
1778 scm_gc_mallocated, for now.
1779 (scm_init_storage): Initialize it.
1780 * gc-malloc.c (descrease_mtrigger, increase_mtrigger): Use it.
1781
1782 * gc-mark.c (scm_gc_mark_dependencies): Call scm_i_string_mark,
1783 scm_i_stringbuf_mark and scm_i_symbol_mark, as appropriate.
1784 * gc-card.c (scm_i_sweep_card): Call scm_i_string_free,
1785 scm_i_stringbuf_free and scm_i_symbol_free, as appropriate.
1786
1787 * strop.c (scm_string_copy): Use scm_c_substring to get a
1788 copy-on-write string.
1789
1790 2004-08-18 Kevin Ryde <user42@zip.com.au>
1791
1792 * arbiters.c (FETCH_STORE): New macro.
1793 (SCM_LOCK_VAL, SCM_UNLOCK_VAL): New constants.
1794 (SCM_LOCK_ARB, SCM_UNLOCK_ARB): Remove, effectively absorbed into
1795 scm_try_arbiter and scm_release_arbiter.
1796 (scm_try_arbiter, scm_release_arbiter): Use FETCH_STORE to get xchg
1797 for speed on i386, otherwise using mutex.
1798
1799 * eq.c (scm_equal_p): Remove real==fraction and fraction==real, they
1800 must be #f according to R5RS. (equal? follows eqv?, and for eqv? an
1801 exact and inexact is #f.)
1802
1803 * fports.c (fport_print): Use scm_ttyname instead of ttyname directly,
1804 to get thread safety of scm_ttyname.
1805
1806 * ports.c (ttyname): Remove prototype, unused.
1807
1808 * socket.c (scm_init_socket): Add SOCK_SEQPACKET and SOCK_RDM.
1809 Reported by Michael Tuexen.
1810
1811 2004-08-13 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1812
1813 * load.c (scm_init_load_path): Do not pass NULL to
1814 scm_to_locale_string, which would happen when GUILE_LOAD_PATH is
1815 not set. Thanks to Bill Schottstaedt.
1816
1817 2004-08-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1818
1819 * socket.c (scm_inet_aton, scm_inet_pton): Convert SCM strings to
1820 locale strings instead of accessing their internals.
1821 (scm_recv, scm_send, scm_recvfrom, scm_sendto): Use
1822 SCM_I_STRING_CHARS and SCM_I_STRING_LENGTH instead of
1823 SCM_STRING_CHARS and SCM_STRING_LENGTH.
1824
1825 * simpos.c (scm_system): Convert SCM strings to locale strings
1826 instead of accessing their internals.
1827
1828 * script.c (scm_compile_shell_switches): Convert version to locale
1829 string before printing it.
1830
1831 * rdelim.c (scm_read_delimited_x): Avoid
1832 SCM_VALIDATE_SUBSTRING_SPEC_COPY and use scm_from_size_t instead
1833 of scm_from_long for the returned number of read characters.
1834
1835 * ioext.c (scm_fdopen): Use scm_i_fdes_to_port together with
1836 scm_i_mode_bits to avoid accessing internals of SCM string from C.
1837
1838 * filesys.c (STRING_SYSCALL, STRING2_SYSCALL): New helper macros.
1839 Use them instead of SCM_SYSCALL when one or two strings need to be
1840 converted into locale strings.
1841 (my_rename): New, gathers platform dependent code for renaming.
1842 (scm_rename): Use it.
1843 (scm_readlink, scm_copy_file): Convert SCM strings to locale
1844 strings instead of accessing their internals.
1845 (scm_basename, scm_dirname): Use SCM_I_STRING_CHARS and
1846 SCM_I_STRING_LENGTH instead of SCM_STRING_CHARS and
1847 SCM_STRING_LENGTH.
1848
1849 * extensions.c (load_extension): Convert lib and init to locale
1850 strings instead of accessing the internals directly.
1851 (scm_c_load_extension): Use scm_from_locale_string instead of
1852 scm_makfrom0str.
1853
1854 * fports.h, fports.c (scm_i_fdes_to_port): New, like
1855 scm_fdes_to_port, but take mode bits directly instead of as a C
1856 string.
1857 (scm_i_fdes_to_port): Implement using above.
1858 (scm_open_file): Use scm_i_fdes_to_port together with
1859 scm_i_mode_bits to avoid accessing internals of SCM string from C.
1860 * vports.c (scm_make_soft_port): Use scm_i_fdes_to_port together
1861 with scm_i_mode_bits to avoid accessing internals of SCM string
1862 from C.
1863
1864 * ports.h (scm_i_mode_bits): New, same as scm_mode_bits but with a
1865 SCM string as argument.
1866
1867 * ports.c (scm_i_void_port): New, like scm_void_port but take mode
1868 bits directly instead of C string.
1869 (scm_void_port): Implement using above.
1870 (scm_sys_make_void_port): Use scm_i_void_port together with
1871 scm_i_mode_bits to avoid accessing internals of SCM string.
1872
1873 * strings.h, strings.c (scm_i_get_substring_spec): New.
1874
1875 * socket.c, rw.c, deprecated.h, validate.h
1876 (SCM_VALIDATE_STRING_COPY): Deprecated. Replaced all uses with
1877 SCM_VALIDATE_STRING plus SCM_I_STRING_CHARS or
1878 scm_to_locale_string, etc.
1879 (SCM_VALIDATE_SUBSTRING_SPEC_COPY): Deprecated. Replaced as
1880 above, plus scm_i_get_substring_spec.
1881
1882 * regex-posix.c, read.c, random.c, ramap.c, print.c, numbers.c,
1883 hash.c, gc.c, gc-card.c, convert.i.c, backtrace.c, strop.c,
1884 strorder.c, strports.c, struct.c, symbols.c, unif.c, ports.c: Use
1885 SCM_I_STRING_CHARS, SCM_I_STRING_UCHARS, and SCM_I_STRING_LENGTH
1886 instead of SCM_STRING_CHARS, SCM_STRING_UCHARS, and
1887 SCM_STRING_LENGTH, respectively. Also, replaced scm_return_first
1888 with more explicit scm_remember_upto_here_1, etc, or introduced
1889 them in the first place.
1890
1891 * posix.c (WITH_STRING): New helper macro. Use it where one
1892 locale string is needed for a short piece of code.
1893 (STRING_SYSCALL): New helper macro. Use it instead of SCM_SYSCALL
1894 when one locale string is needed.
1895 (scm_mkstemp): Convert tmpl to a locale string.
1896 (scm_putenv): Rewritten to use only C strings.
1897 (scm_setlocale, scm_crpt): Convert argument strings to locale
1898 strings.
1899
1900 2004-08-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1901
1902 * load.c (scm_primitive_load_path): Do not check for absolute
1903 filenames when scm_sys_search_load_path returns false, which will
1904 return absolute filenames unchanged.
1905
1906 2004-08-11 Marius Vollmer <mvo@zagadka.de>
1907
1908 * gc.c, procprop.c (scm_init_storage, scm_stand_in_procs,
1909 scm_stand_in_proc): Use a hastable for scm_stand_in_procs instead
1910 of an alist. Thanks to Matthias Koeppe!
1911
1912 2004-08-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1913
1914 * strings.h, deprecated.h (SCM_STRING_COERCE_0TERMINATION_X):
1915 Moved from string.h to deprecated.h.
1916
1917 * deprecated.c, deprecated.h (SCM_CHARS, SCM_LENGTH): Removed.
1918
1919 * strings.h, strings.c (SCM_MAKE_STRING_TAG): Renamed to
1920 SCM_I_MAKE_STRING_TAG, changed all uses.
1921 (SCM_STRING_CHARS, SCM_STRING_UCHARS, SCM_STRING_LENGTH): Renamed
1922 to SCM_I_STRING_CHARS, SCM_I_STRING_UCHARS, and SCM_I_LENGTH
1923 respectively. For a short time, the old names are still there as
1924 aliases. Not all uses have been changed yet, but the ones in
1925 strings.c have.
1926 (SCM_STRING_MAX_LEN): Do not hardcode to 24 bits, compute from
1927 SCM_T_BITS_MAX.
1928 (scm_is_string, scm_from_locale_string, scm_from_locale_stringn,
1929 scm_take_locale_string, scm_take_locale_stringn,
1930 scm_to_locale_string, scm_to_locale_stringn,
1931 scm_to_locale_stringbuf): New.
1932 (scm_c_string2str, scm_c_substring2str): Deprecated by moving to
1933 deprecated.[hc]. Implemented in terms of the new functions above.
1934 (scm_take_str, scm_take0str, scm_mem2string, scm_str2string,
1935 scm_makfrom0str): Reimplemented in terms of the new functions from
1936 above. They will be discouraged shortly.
1937 (scm_substring): Do not use scm_mem2string.
1938 (scm_i_allocate_string_pointers, scm_i_free_string_pointers): New,
1939 to replace similar code from posix.c, simpos.c, and dynl.c.
1940 (scm_string_append): Use memcpy instead of explicit loop. Do not
1941 use register keyword. Use plain 'char' instead of 'unsigned
1942 char'.
1943
1944 * strports.c (scm_mkstrport): Use SCM_I_STRING_UCHARS instead of
1945 SCM_STRING_UCHARS. Use SCM_I_STRINGP instead of SCM_STRINGP.
1946
1947 * strop.c (scm_i_index): Replaced SCM_STRINGP, SCM_STRING_CHARS,
1948 and SCM_STRING_LENGTH with SCM_I_STRINGP, SCM_I_STRING_CHARS, and
1949 SCM_I_STRING_LENGTH, respectively. Pass string object directly,
1950 not as a pointer. Use scm_remember_upto_here_1 to protect it.
1951
1952 * read.c (scm_input_error): Use a SCM value for 'fn', not a C
1953 string. This avoids a conversion round-trip.
1954
1955 * gh_data.c: Replaced SCM_STRINGP, SCM_STRING_CHARS, and
1956 SCM_STRING_LENGTH with SCM_I_STRINGP, SCM_I_STRING_CHARS, and
1957 SCM_I_STRING_LENGTH, respectively.
1958 (gh_scm2newstr): Implement in terms of scm_to_locale_string.
1959
1960 * environments.c: Instead calling scm_puts on the SCM_STRING_CHARS
1961 of a string, call scm_display on the string itself.
1962
1963 * dynwind.c, dynwind.h (scm_frame_free): New.
1964
1965 * stime.c, socket.c, simpos.c, procs.c, posix.c, ports.c,
1966 net_db.c, fports.c, filesys.c, eval.c, deprecation.c, dynl.c:
1967 Replaced uses of SCM_STRING_CHARS with proper uses of
1968 scm_to_locale_string. Replaced SCM_STRINGP with scm_is_string.
1969 Replaced scm_mem2string with scm_from_locale_string.
1970
1971 * simpos.c, posix.c (allocate_string_pointers, environ_list_to_c):
1972 Removed, replaced all uses with scm_i_allocate_string_pointers.
1973
1974 * load.h, load.c (scm_internal_parse_path): Removed.
1975 (scm_parse_path): Use scm_string_split to do the work.
1976 (scm_init_load_path): Use scm_parse_path instead of
1977 scm_internal_parse_path.
1978 (scm_search_path): Rewritten string handling part of the code in
1979 terms of scm_to_locale_stringbuf and so that it is thread safe.
1980
1981 * error.c (scm_error_scm): Throw directly instead of calling
1982 scm_error, this avoids the back and forth conversion of SUBR and
1983 MESSAGE and also plugs a memory leak.
1984 (scm_error): Call scm_error_scm.
1985
1986 * backtrace.c: Replaced SCM_STRINGP with scm_is_string.
1987 (display_header): Print FNAME when it is true, not
1988 merely when it is a string.
1989
1990 * strings.h (SCM_SET_STRING_LENGTH, SCM_SET_STRING_CHARS): Removed
1991 unceremoniously. They were unused by Guile itself, and external
1992 use should stop immediately.
1993
1994
1995 2004-08-10 Marius Vollmer <mvo@zagadka.de>
1996
1997 * numbers.h, number.c, deprecated.h, deprecated.c (scm_round,
1998 scm_truncate): Renamed to scm_c_round and scm_c_truncate;
1999 deprecated versions installed in deprecated.h and deprecated.c.
2000 Changed all uses.
2001
2002 2004-08-06 Rob Browning <rlb@defaultvalue.org>
2003
2004 * net_db.c (scm_resolv_error): don't cause an exception while
2005 trying to throw an exception -- call scm_misc_error with correct
2006 arguments. The previous arguments needed a format escape that
2007 wasn't in any of the format strings.
2008
2009 2004-08-06 Kevin Ryde <user42@zip.com.au>
2010
2011 * ramap.c (scm_array_fill_x): For byvect char fill, force signed char
2012 so as not to depend on signedness of plain char. For byvect range
2013 check, throw out-of-range rather than wrong-type-arg.
2014
2015 * unif.c (scm_uniform_vector_ref, scm_array_set_x): For byvect, force
2016 signed byte range checks by using scm_to_schar and scm_from_schar,
2017 don't want to depend on signedness of C char.
2018
2019 2004-08-05 Kevin Ryde <user42@zip.com.au>
2020
2021 * arbiters.c (scm_try_arbiter): Use scm_i_misc_mutex instead of
2022 SCM_DEFER_INTS.
2023 (scm_release_arbiter): Use scm_i_misc_mutex so return value can be
2024 guaranteed if multiple threads compete to unlock.
2025 Update docstrings per doc/ref/api-scheduling.texi.
2026
2027 * filesys.c (scm_copy_file): Use fstat on the input fd rather than
2028 stat on the filename, to be certain a file rename can't mean we get
2029 info on one filesystem object but open another. This fstat usage is
2030 similar to Emacs copy-file.
2031
2032 * posix.c (scm_setgroups): Enhance docstring, per doc/ref/posix.texi.
2033
2034 * simpos.c (scm_system_star): Change scm_from_long to scm_from_int on
2035 SIGINT and SIGQUIT, since those values are ints.
2036
2037 2004-08-03 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2038
2039 * num2integral.i.c, num2float.i.c: Removed.
2040 * Makefile.am (noinst_HEADERS): Updated.
2041
2042 * numbers.h. numbers.c (scm_make_ratio): Renamed to
2043 scm_i_make_ratio and made static, replaced uses with scm_divide.
2044 (scm_complex_p): New, export as "complex?" to Scheme.
2045 (scm_number_p): Export as "number?" to Scheme.
2046 (scm_is_complex, scm_is_number): New.
2047 (scm_c_make_rectangular, scm_c_make_polar): New.
2048 (scm_make_rectangular, scm_make_polar): Use above.
2049 (scm_c_real_part, scm_c_imag_part, scm_c_magnitude, scm_c_angle):
2050 New.
2051 (scm_make_complex): Discouraged by moving to discouraged.h and
2052 discouraged.c. Replaced all uses with scm_c_make_rectangular.
2053
2054 * discouraged.h, discouraged.c, numbers.c, numbers.h
2055 (scm_is_rational): New.
2056 (scm_i_short2big, scm_i_int2big, scm_i_uint2big, scm_i_size2big,
2057 scm_i_ptrdiff2big, scm_i_long_long2big, scm_i_ulong_long2big):
2058 Removed prototypes.
2059 (scm_make_real, scm_num2dbl, scm_float2num, scm_double2num):
2060 Discouraged by moving to discouraged.h and discouraged.c.
2061 Replaced all uses with scm_from_double.
2062 (scm_num2float, scm_num2double): Discouraged by moving prototype
2063 to discouraged.h and rewriting in terms of scm_to_double.
2064 Replaced all uses with scm_to_double.
2065 (scm_to_double): Do not implement in terms of scm_num2dbl, use
2066 explicit code.
2067 (scm_from_double): Do not implement in terms of scm_make_real, use
2068 explicit code.
2069
2070 2004-08-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2071
2072 * init.c (scm_init_guile_1): Call scm_i_init_discouraged.
2073
2074 * gen-scmconfig.h.in (SCM_I_GSC_ENABLE_DISCOURAGED): New.
2075 * gen-scmconfig.c (SCM_ENABLE_DISCOURAGED): Emit based on above.
2076
2077 * eval.c (SCM_EVALIM, SCM_EVALIM2, SCM_XEVAL, SCM_XEVALCAR):
2078 Renamed to SCM_I_* in order to avoid collisions with the versions
2079 defined in deprecated.h.
2080
2081 * discouraged.h, discouraged.c: New files.
2082
2083 * deprecated.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_EQ_P,
2084 SCM_NEGATE_BOOL, SCM_BOOL, SCM_BOOT_NOT): Promoted from being
2085 deprecated to being discouraged by moving to discouraged.h.
2086
2087 * numbers.h, numbers.c, discouraged.h, discouraged.c
2088 (scm_short2num, scm_ushort2num, scm_int2num, scm_uint2num,
2089 scm_long2num, scm_ulong2num, scm_size2num, scm_ptrdiff2num,
2090 scm_num2short, scm_num2ushort, scm_num2int, scm_num2uint,
2091 scm_num2long, scm_num2ulong, scm_num2size, scm_num2ptrdiff,
2092 scm_long_long2num, scm_ulong_long2num, scm_num2long_long,
2093 scm_num2ulong_long): Discouraged by moving to discouraged.h and
2094 discouraged.c and reimplementing in terms of scm_from_* and
2095 scm_to_*. Changed all uses to the new scm_from_* and scm_to_*
2096 functions.
2097
2098 * numbers.h, numbers.c: Removed GUILE_DEBUG code.
2099 (scm_i_short2big, scm_i_ushort2big, scm_i_int2big, scm_i_uint2big,
2100 scm_i_size2big, scm_i_ptrdiff2big): Removed.
2101 (scm_i_long2big, scm_i_ulong2big): New, explicit definitions.
2102 * conv-integer.i.c, conv-uinteger.i.c: Use them instead of
2103 explicit code.
2104
2105 2004-08-02 Kevin Ryde <user42@zip.com.au>
2106
2107 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Add comments about past
2108 and current usage and migration.
2109
2110 2004-07-31 Kevin Ryde <user42@zip.com.au>
2111
2112 * error.c (scm_strerror): Use scm_i_misc_mutex around strerror since
2113 it's not thread safe.
2114 (scm_syserror): Use scm_strerror rather than SCM_I_STRERROR, to take
2115 advantage of this.
2116 * fports.c (scm_open_file): Use scm_strerror likewise.
2117 * filesys.c (scm_stat, scm_lstat): Ditto.
2118
2119 * filesys.c (scm_copy_file): Avoid fd leak when destination file
2120 cannot be opened.
2121
2122 * symbols.c (scm_gensym): Use scm_i_misc_mutex around gensym_counter
2123 update, for thread safety.
2124 (gensym_counter): Move into scm_gensym which is its only user.
2125 (scm_init_symbols): No need to explicitly initialize gensym_counter.
2126
2127 2004-07-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2128
2129 * numbers.h (scm_to_schar, scm_to_uchar, scm_to_char,
2130 scm_to_short, scm_to_ushort, scm_to_int, scm_to_uint, scm_to_long,
2131 scm_to_ulong, scm_to_long_long, scm_to_ulong_long, scm_to_intmax,
2132 scm_to_uintmax, scm_to_size_t, scm_to_ssize_t scm_from_schar,
2133 scm_from_uchar, scm_from_char, scm_from_short, scm_from_ushort,
2134 scm_from_int, scm_from_uint, scm_from_long, scm_from_ulong,
2135 scm_from_long_long, scm_from_ulong_long, scm_from_intmax,
2136 scm_from_uintmax, scm_from_size_t, scm_from_ssize_t): No longer
2137 defined in terms of scm_to_signed_integer, etc, but in terms of
2138 scm_to_int8, etc.
2139
2140 * gen-scmconfig.c (SCM_SIZEOF_INTMAX, SCM_SIZEOF_SIZE_T): New.
2141
2142 * gen-scmconfig.h.in: Removed SCM_I_GSC_*_LIMITS macros, they are
2143 no longer used.
2144
2145 * __scm.h (SCM_I_UTYPE_MAX, SCM_I_TYPE_MAX, SCM_I_TYPE_MIN,
2146 SCM_I_SIZE_MAX, SCM_I_SSIZE_MIN, SCM_I_SSIZE_MAX): New.
2147
2148 * __scm.h, gen-scmconfig.c (SCM_I_LLONG_MAX, SCM_I_LLONG_MIN,
2149 SCM_I_ULLONG_MAX, SCM_T_INT8_MIN, SCM_T_INT8_MAX, SCM_T_UINT8_MAX,
2150 SCM_T_INT16_MIN, SCM_T_INT16_MAX, SCM_T_UINT16_MAX,
2151 SCM_T_INT32_MIN, SCM_T_INT32_MAX, SCM_T_UINT32_MAX,
2152 SCM_T_INT64_MIN, SCM_T_INT64_MAX, SCM_T_UINT64_MAX,
2153 SCM_T_INTMAX_MIN, SCM_T_INTMAX_MAX, SCM_T_UINTMAX_MAX): Moved
2154 definition into __scm.h, using new SCM_I_TYPE_MIN, etc.
2155
2156 * conv-integer.i.c, conv-uinteger.i.c: New files, used to generate
2157 the functions below.
2158
2159 * Makefile.am (noinst_HEADERS): Added conv-integer.i.c and
2160 conv-uinteger.i.c.
2161
2162 * numbers.c, numbers.h (scm_to_int8, scm_to_uint8, scm_to_int16,
2163 scm_to_uint16, scm_to_int32, scm_to_uint32, scm_to_int64,
2164 scm_to_uint64, scm_from_int8, scm_from_uint8, scm_from_int16,
2165 scm_from_uint16, scm_from_int32, scm_from_uint32, scm_from_int64,
2166 scm_from_uint64): Turned from macros into proper functions.
2167 (scm_to_signed_integer, scm_to_unsigned_integer,
2168 scm_from_signed_integer, scm_from_unsigned_integer): Generate via
2169 conv-integer.i.c and conv-uinteger.i.c, as well.
2170
2171 * number.h (scm_to_ssize_t, scm_to_size_t): Use the new
2172 SCM_I_SSIZE_MIN, SCM_I_SSIZE_MAX, and SCM_I_SIZE_MAX macros for
2173 the limits. Those are always defined.
2174
2175 2004-07-29 Kevin Ryde <user42@zip.com.au>
2176
2177 * posix.c (scm_ttyname): Use scm_i_misc_mutex for thread safety.
2178
2179 2004-07-28 Kevin Ryde <user42@zip.com.au>
2180
2181 * posix.c (scm_ctermid): Use an L_ctermid buf on the stack, for thread
2182 safety.
2183
2184 * unif.c (scm_array_set_x): For svect, use scm_num2short for
2185 consistency with other vector types and to get arg and func name into
2186 error message.
2187
2188 2004-07-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2189
2190 * deprecated.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_BOOL):
2191 Reimplement using scm_is_false, scm_is_true, scm_is_bool, and
2192 scm_from_bool, respectively.
2193 (SCM_NINUMP): Added.
2194
2195 * tags.h, deprecated.h (SCM_EQ_P): Deprecated by moving it into
2196 deprecated.h. Replaced all uses with scm_is_eq.
2197
2198 2004-07-24 Kevin Ryde <user42@zip.com.au>
2199
2200 * threads.c, threads.h (scm_i_misc_mutex): New SCM_GLOBAL_MUTEX.
2201 * posix.c (scm_crypt): Use it to protect static data in crypt().
2202
2203 2004-07-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2204
2205 * deprecated.h, deprecated.c, numbers.h (SCM_INUMP, SCM_NINUMP,
2206 SCM_INUM): Deprecated by renaming them to SCM_I_INUMP,
2207 SCM_I_NINUMP and SCM_I_INUM, respectively and adding deprecated
2208 versions to deprecated.h and deprecated.c. Changed all uses to
2209 either use the SCM_I_ variants or scm_is_*, scm_to_*, or
2210 scm_from_*, as appropriate.
2211
2212 * dynwind.c (scm_i_dowinds): Removed unused code that would call
2213 the unexisting scm_cross_dynwind_binding_scope for inums on the
2214 windlist.
2215
2216 2004-07-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2217
2218 * socket.c (ipv6_net_to_num, scm_from_ipv6): Renamed
2219 ipv6_net_to_num to scm_from_ipv6, for converting from an IPv6
2220 byte-wise address to a SCM integer. Changed all uses.
2221 (ipv6_num_to_net, scm_to_ipv6): Renamed ipv6_num_to_net to
2222 scm_to_ipv6 and added type and range checking, for converting from
2223 an IPv& byte-wise address to a SCM integer. Changed all uses.
2224 (bignum_in_ipv6_range_p, VALIDATE_INET6): Removed, their function
2225 is now done by scm_to_ipv6.
2226
2227 * numbers.c (scm_to_signed_integer, scm_to_unsigned_integer): dot
2228 not accept inexact integers.
2229
2230 * validate.h, deprecated.h (SCM_VALIDATE_INUM,
2231 SCM_VALIDATE_INUM_COPY, SCM_VALIDATE_BIGINT,
2232 SCM_VALIDATE_INUM_MIN, SCM_VALIDATE_INUM_MIN_COPY,
2233 SCM_VALIDATE_INUM_MIN_DEF_COPY,SCM_VALIDATE_INUM_DEF,
2234 SCM_VALIDATE_INUM_DEF_COPY, SCM_VALIDATE_INUM_RANGE,
2235 SCM_VALIDATE_INUM_RANGE_COPY): Deprecated because they make the
2236 fixnum/bignum distinction visible. Changed all uses to
2237 scm_to_size_t or similar.
2238
2239 2004-07-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2240
2241 * cpp_cnvt.awk: Use scm_from_int instead of SCM_MAKINUM.
2242
2243 2004-07-10 Kevin Ryde <user42@zip.com.au>
2244
2245 * hash.c (scm_hashq, scm_hashv, scm_hash): Restrict to size>=1 rather
2246 than size>=0, since 0<=hash<size cannot be satisfied for size==0, and
2247 such a size causes divide-by-zeros in scm_hasher.
2248
2249 * regex-posix.c (scm_make_regexp): Free rx on error, to avoid memory
2250 leak.
2251
2252 2004-07-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2253
2254 * numbers.c (scm_is_signed_integer, scm_is_unsigned_integer):
2255 Rewritten using the same logic as scm_to_signed_integer and
2256 scm_to_unsigned_integer, respectively, which is better(tm). Also,
2257 use CHAR_BIT instead of hardcoding 8.
2258 (LLONG_MIN, LLONG_MAX, ULLONG_MAX): Removed and used
2259 SCM_I_LLONG_MIN etc. instead.
2260
2261 * numbers.h (SCM_MAKINUM, SCM_I_MAKINUM): Renamed SCM_MAKINUM to
2262 SCM_I_MAKINUM and changed all uses.
2263 * deprecated.h, deprecated.c (SCM_MAKINUM): Newly deprecated.
2264
2265 * gen-scmconfig.c (SCM_I_LLONG_MIN, SCM_I_LLONG_MAX,
2266 SCM_I_ULLONG_MAX): Instead of hard-coding the numbers, compute
2267 them by assuming twos-complement.
2268
2269 2004-07-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2270
2271 * gen-scmconfig.h.in: Added all the new SCM_I_GSC_*_LIMITS that
2272 configure now produces.
2273 * gen-scmconfig.c: Use them to output SCM_T_INT8_MIN, etc
2274 definitions, giving the limits of the integer types defined by
2275 Guile. Also, output a hard coded SCM_I_LLONG_MIN, etc since
2276 LLONG_MIN or LONG_LONG_MIN is hard to get at.
2277
2278 * numbers.h (scm_to_short, scm_to_ushort): It's SHRT_MIN, etc, not
2279 SHORT_MIN.
2280 (scm_to_size_t): Use SIZE_MAX instead of cooking our own.
2281 (scm_to_long_long, scm_to_ulong_long, scm_to_int8, scm_to_uint8,
2282 scm_to_int16, scm_to_uint16, scm_to_int32, scm_to_uint32,
2283 scm_to_int64, scm_to_uint64, scm_to_intmax, scm_to_uintmax,
2284 scm_from_long_long, scm_from_ulong_long, scm_from_int8,
2285 scm_from_uint8, scm_from_int16, scm_from_uint16, scm_from_int32,
2286 scm_from_uint32, scm_from_int64, scm_from_uint64, scm_from_intmax,
2287 scm_from_uintmax): New.
2288
2289 2004-07-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2290
2291 * tags.h (scm_is_eq): New.
2292
2293 * deprecated.h, boolean.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOL,
2294 SCM_NEGATE_BOOL, SCM_BOOLP): Deprecated by moving into
2295 "deprecated.h". Replaced all uses with scm_is_false, scm_is_true,
2296 scm_from_bool, and scm_is_bool, respectively.
2297
2298 * boolean.h (scm_is_bool): Fix bug in prototype.
2299 (scm_from_bool): The argument is "x" not "f", stupid.
2300
2301 * boolean.c (scm_is_bool): Fix typo.
2302
2303 * numbers.h, numbers.c (scm_is_integer, scm_is_signed_integer,
2304 scm_is_unsigned_integer, scm_to_signed_integer,
2305 scm_to_unsigned_integer, scm_to_schar, scm_to_uchar, scm_to_char,
2306 scm_to_short, scm_to_ushort, scm_to_long, scm_to_ulong,
2307 scm_to_size_t, scm_to_ssize_t, scm_from_schar, scm_from_uchar,
2308 scm_from_char, scm_from_short, scm_from_ushort, scm_from_int,
2309 scm_from_uint, scm_from_long, scm_from_ulong, scm_from_size_t,
2310 scm_from_ssize_t, scm_is_real, scm_to_double, scm_from_double):
2311 New.
2312
2313 2004-07-05 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2314
2315 * boolean.h, boolean.c (scm_is_true, scm_is_false, scm_from_bool,
2316 scm_to_bool): New.
2317
2318 2004-06-27 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2319
2320 * backtrace.c (display_expression, display_frame): Call
2321 scm_i_unmemoize_expr for unmemoizing a memoized object holding a
2322 single memoized expression.
2323
2324 * debug.c (memoized_print): Don't try to unmemoize the memoized
2325 object, since we can't know whether it holds a single expression
2326 or a body.
2327
2328 (scm_mem_to_proc): Removed check for lambda expression, since it
2329 was moot anyway. Whoever uses these functions for debugging
2330 purposes should know what they do: Creating invalid memoized code
2331 will cause crashes, independent of whether this check is present
2332 or not.
2333
2334 (scm_proc_to_mem): Take the closure's code as it is and don't
2335 append a SCM_IM_LAMBDA isym. To allow easier debugging, the
2336 memoized code should not be modified.
2337
2338 * debug.[ch] (scm_unmemoize, scm_i_unmemoize_expr): Removed
2339 scm_unmemoize from public use, but made scm_i_unmemoize_expr
2340 available as a guile internal function instead. However,
2341 scm_i_unmemoize_expr will only work on memoized objects that hold
2342 a single memoized expression. It won't work with bodies.
2343
2344 * debug.c (scm_procedure_source), macros.c (macro_print), print.c
2345 (scm_iprin1): Call scm_i_unmemocopy_body for unmemoizing a body,
2346 i. e. a list of expressions.
2347
2348 * eval.c (unmemoize_exprs): Drop internal body markers from the
2349 output during unmemoization.
2350
2351 * eval.[ch] (scm_unmemocopy, scm_i_unmemocopy_expr,
2352 scm_i_unmemocopy_body): Removed scm_unmemocopy from public use,
2353 but made scm_i_unmemocopy_expr and scm_i_unmemocopy_body available
2354 as guile internal functions instead. scm_i_unmemoize_expr will
2355 only work on a single memoized expression, while
2356 scm_i_unmemocopy_body will only work on bodies.
2357
2358 2004-06-21 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2359
2360 * eval.c (unmemoize_exprs): Handle semi-memoized code.
2361
2362 (scm_cons_source, scm_primitive_eval): Prefer higher level
2363 predicate SCM_FALSEP over SCM_IMP.
2364
2365 2004-06-15 Rob Browning <rlb@defaultvalue.org>
2366
2367 * script.c (scm_shell_usage): minor phrasing change.
2368
2369 * gc_os_dep.c: update ifdefery for macosx.
2370 (scm_get_stack_base): separate result initialization from
2371 declaration to slience warnings with macosx and hp-ux using gcc
2372 3.3. Thanks to Andreas Vögele.
2373
2374 2004-06-13 Han-Wen Nienhuys <hanwen@xs4all.nl>
2375
2376 * eval.c (unmemoize_exprs): use SCM_CONSP for the loop condition.
2377
2378 2004-06-06 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2379
2380 * list.[ch] (scm_i_finite_list_copy): New internal function to
2381 copy lists that are known to be finite (though not necessarily
2382 proper).
2383
2384 * debug.c (scm_procedure_source): Don't have scm_unmemocopy treat
2385 a closure's argument list like an expression of a body.
2386
2387 * eval.c (unmemoize_expression, unmemoize_exprs, unmemoize_and,
2388 unmemoize_begin, unmemoize_case, unmemoize_cond, unmemoize_delay,
2389 unmemoize_do, unmemoize_if, unmemoize_lambda, unmemoize_let,
2390 unmemoize_letrec, unmemoize_letstar, unmemoize_or,
2391 unmemoize_set_x, unmemoize_apply, unmemoize_atcall_cc,
2392 unmemoize_at_call_with_values, unmemoize_future, sym_atslot_ref,
2393 unmemoize_atslot_ref, sym_atslot_set_x, unmemoize_atslot_set_x,
2394 unmemoize_builtin_macro): New static functions and symbols.
2395
2396 (scm_unmemocopy): Rewritten in terms of the above. scm_unmemocopy
2397 now has a slightly different meaning: The memoized form that is
2398 receives as its argument is now interpreted as a sequence of
2399 expressions from a body.
2400
2401 (unmemocar, scm_unmemocar): Since the whole functionality of
2402 unmemocar and scm_unmemocar is not needed any more, scm_unmemocar
2403 has its old content back and is deprecated, while unmemocar has
2404 been removed.
2405
2406 (SCM_BIT7): Removed.
2407
2408 (CEVAL): For unmemoizing a single expression, call
2409 unmemoize_expression instead of scm_unmemocopy, which now expects
2410 a sequence of body expressions. Eliminated unnecessary empty
2411 environment frame when executing let* forms. Eliminated
2412 unmemoization step from evaluator.
2413
2414 2004-06-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2415
2416 * eval.c (scm_macroexp, macroexp): Renamed scm_macroexp to
2417 macroexp and made static. Added new version of scm_macroexp that
2418 emits a deprecation warning and then calls macroexp.
2419 (scm_m_undefine): Issue deprecation warning.
2420
2421 2004-05-30 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2422
2423 * eval.c (lookup_global_symbol, literal_p, try_macro_lookup):
2424 Modified to make set! work on symbols that represent syntactic
2425 keywords.
2426
2427 2004-05-26 Han-Wen Nienhuys <hanwen@xs4all.nl>
2428
2429 * gc.h (SCM_CELL_OBJECT_LOC): use SCM_GC_CELL_OBJECT to prevent
2430 compound expression as lvalue errors.
2431
2432 2004-05-24 Marius Vollmer <mvo@zagadka.de>
2433
2434 * dynwind.c (winder_mark): Use SCM_PACK to correctly convert the
2435 WINDER_DATA to a SCM.
2436
2437 2004-05-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2438
2439 * goops.c (compute_getters_n_setters, create_standard_classes,
2440 scm_add_slot): Compute closures by calling scm_i_eval_x on a
2441 lambda expression rather than creating them with scm_closure.
2442
2443 2004-05-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2444
2445 * eval.c (s_macro_keyword, scm_m_set_x): Remove checking for
2446 misplaced syntactic keywords. This will not work unless guile's
2447 defmacro feature is deprecated.
2448
2449 (scm_m_case): Fixed a bug that caused the list of labels to grow
2450 with every case form.
2451
2452 2004-05-19 Kevin Ryde <user42@zip.com.au>
2453
2454 * numbers.c (scm_round_number): For inum and big, just return x. For
2455 real, use scm_round for 2^54-1 etc problems covered there.
2456
2457 * numbers.c (trunc): Remove #define to scm_truncate when the C library
2458 doesn't provide trunc. This was for when `truncate' was done as a
2459 scm_tc7_dsubr, no longer required.
2460
2461 * threads.c (scm_threads_mark_stacks) [SCM_STACK_GROWS_UP]: Correction
2462 to stack marking call, two parameters and no cast on t->base.
2463
2464 2004-05-18 Marius Vollmer <mvo@zagadka.de>
2465
2466 * hashtab.c (rehash_after_gc): Bug fix: properly link the
2467 processed hashtables back into the weak_hashtables list. Thanks
2468 to Bill Schottstaedt!
2469
2470 2004-05-16 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2471
2472 * eval.c (unmemoize_quote): New static function.
2473
2474 (scm_m_quote, scm_m_atslot_ref, SCM_CEVAL): Changed the byte code
2475 representation of 'quote' and '@slot-ref' to an improper list.
2476 This reduces execution time, the number of cells used to hold the
2477 memoized code, and thus also reduces garbage collection time.
2478
2479 (scm_unmemocopy): Use unmemoize_quote for quote expressions.
2480
2481 (SCM_CEVAL): Changed macro handling to also work with macros that
2482 return improper lists. Added an assertion, that the code returned
2483 by a macro transformer will not lead to cycles in the memoized
2484 code.
2485
2486 2004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2487
2488 No functional change, just rearrangements of functions within the
2489 file.
2490
2491 * eval.c (scm_ilookup, scm_unbound_variable_key,
2492 error_unbound_variable, scm_lookupcar1, scm_lookupcar): Moved to
2493 the definitions used for execution, since that's where they will
2494 belong to later.
2495
2496 2004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2497
2498 * numbers.h (SCM_SLOPPY_FRACTIONP): Removed. It was not used
2499 throughout guile, has not been part of an official release yet,
2500 and the concept of sloppy predicates has never been a good idea.
2501
2502 (SCM_FRACTION_NUMERATOR, SCM_FRACTION_DENOMINATOR,
2503 SCM_FRACTION_SET_NUMERATOR, SCM_FRACTION_SET_DENOMINATOR):
2504 Simplified.
2505
2506 2004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2507
2508 * throw.c (SETJBJMPBUF, SCM_SETJBDFRAME): Add cast to scm_t_bits
2509 to make explicit what happens.
2510
2511 2004-05-15 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2512
2513 * dynl.c (SET_DYNL_HANDLE): Add cast to scm_t_bits to make
2514 explicit what happens.
2515
2516 * guardians.c (TCONC_IN): Use SCM_SET_CELL_OBJECT_x rather than
2517 SCM_SET_CELL_WORD_x when writing scheme objets to cell elements.
2518
2519 2004-05-11 Marius Vollmer <mvo@zagadka.de>
2520
2521 * scmsigs.c (scm_sigaction_for_thread): Validate that the handler
2522 is indeed a procedure when it isn't a number.
2523
2524 2004-05-10 Marius Vollmer <mvo@zagadka.de>
2525
2526 Convert floating point numbers into strings with an arbitrary
2527 radix. Thanks to Richard Todd!
2528
2529 * numbers.c (FLOBUFLEN): Increase so that radix 2 strings will
2530 fit.
2531 (fx): Removed.
2532 (scm_dblprec, fx_per_radix, init_dblprec, init_fx_radix,
2533 number_chars): New, to support variable radices.
2534 (idbl2str): Use above instead of the old base-10 only tables.
2535 (iflo2str): Pass on new RADIX argument to idbl2str.
2536 (scm_number_to_string): Pass radix to iflo2str.
2537 (scm_print_real, scm_print_complex): Explicitly pass radix 10 to
2538 iflo2str.
2539 (scm_init_numbers): Call init_dblprec and init_fx_radix for all
2540 possible radices.
2541
2542 2004-05-10 Kevin Ryde <user42@zip.com.au>
2543
2544 * numbers.c (scm_logbit_p): Correction to test above the end of an
2545 inum. Reported by Jan Konecny.
2546
2547 2004-05-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2548
2549 * gc.h (scm_t_cell): Fields are now of type SCM instead of
2550 scm_t_bits. Updated all users.
2551 (SCM_GC_CARD_SIZE_MASK): Use SCM_GC_SIZEOF_CARD instead of
2552 duplicating the code.
2553 (SCM_CELL_OBJECT_LOC): New.
2554 (SCM_CARLOC, SCM_CDRLOC): Use it instead of SCM_CELL_WORD_LOC.
2555 (SCM_CELL_WORD_LOC): Moved to "deprecated.h".
2556
2557 * smob.h (SCM_SMOB_DATA_2, SCM_SMOB_DATA_3, SCM_SMOB_FLAGS,
2558 SCM_SET_SMOB_DATA_2, SCM_SET_SMOB_DATA_3, SCM_SET_SMOB_FLAGS,
2559 SCM_SMOB_OBJECT, SCM_SMOB_OBJECT_2, SCM_SMOB_OBJECT_3,
2560 SCM_SET_SMOB_OBJECT, SCM_SET_SMOB_OBJECT_2, SCM_SET_SMOB_OBJECT_3,
2561 SCM_SMOB_OBJECT_LOC, SCM_SMOB_OBJECT_2_LOC,
2562 SCM_SMOB_OBJECT_3_LOC): New.
2563 * smob.c (scm_i_set_smob_flags): New function.
2564
2565 * dynl.c, dynwind.c, eval.h, fluids.h, futures.h, hashtab.h,
2566 hooks.h, keywords.h, macros.h, macros.c, mallocs.c, mallocs.h,
2567 random.h, regex-posix.h, root.h, srcprop.h, srcprop.c, threads.h:
2568 Use SCM_SMOB_* instead of SCM_CELL_* as appropriate. Use
2569 SCM_SMOB_FLAGS and SCM_SET_SMOB_FLAGS instead of accessing the
2570 zeroth word directly. Use SCM_SMOB_PREDICATE as appropriate.
2571
2572 * numbers.h (SCM_I_BIG_MPZ): Use SCM_CELL_OBJECT_LOC instead of
2573 taking the address of SCM_CELL_WORD_1, the latter being no longer
2574 an lvalue.
2575
2576 * variable.h (SCM_VARIABLE_LOC): Use SCM_CELL_OBJECT_LOC instead
2577 of casting SCM_CELL_WORD_LOC.
2578
2579 2004-05-02 Kevin Ryde <user42@zip.com.au>
2580
2581 * eval.c (scm_macroexp): Add prototype, since it's not in eval.h under
2582 --disable-deprecated. Reported by Andreas Vögele.
2583
2584 * filesys.c (_POSIX_C_SOURCE): Define to 199506L to get readdir_r (in
2585 particular on HP-UX). Reported by Andreas Vögele.
2586
2587 * list.c (varargs.h): Remove, leave just stdarg.h which is all the
2588 code has support for. Fixes building with AIX cc, which is ansi but
2589 doesn't define __STDC__. Reported by Keith Crane.
2590 (var_start): Remove macro, this variation no longer required.
2591 (scm_list_n): Use va_start directly.
2592
2593 2004-05-01 Kevin Ryde <user42@zip.com.au>
2594
2595 * continuations.c (scm_dynthrow): Use >= instead of SCM_PTR_GE which
2596 is now gone. Reported by Andreas Vögele.
2597
2598 2004-04-28 Kevin Ryde <user42@zip.com.au>
2599
2600 * backtrace.c (display_frame_expr), numbers.c (XDIGIT2UINT,
2601 mem2uinteger, mem2decimal_from_point, mem2ureal): Cast char to int for
2602 ctype.h tests, to avoid warnings from gcc on HP-UX about char as array
2603 subscript. Reported by Andreas Vögele.
2604 Also cast through unsigned char to avoid passing negatives to those
2605 macros if input contains 8-bit values.
2606
2607 * num2integral.i.c (NUM2INTEGRAL): Under non-BIGMPZ_FITSP case,
2608 corrections to range check for signed numbers. Remove
2609 scm_remember_upto_here_1(num) from these checks, since num is used
2610 subsequently anyway.
2611
2612 * num2integral.i.c (NUM2INTEGRAL): Test BIGMPZ_FITSP with "!= 0" to
2613 avoid warning from gcc 3.4. Reported by Hyperdivision.
2614
2615 * numbers.c (scm_bit_extract): Use min instead of MIN.
2616 (MIN): Remove, this conflicts with similar macro defined by limits.h
2617 on HP-UX. Reported by Andreas Vögele.
2618
2619 * stime.c (_POSIX_C_SOURCE): Define to 199506L to get gmtime_r (in
2620 particular on HP-UX). Reported by Andreas Vögele.
2621
2622 * threads.c (scm_threads_mark_stacks): Correction sizet -> size_t.
2623 Reported by Andreas Vögele.
2624
2625 * threads-plugin.h (SCM_MUTEX_MAXSIZE): Increase to 25*sizeof(long),
2626 for the benefit of hpux11 where pthread_mutex_t is 88 bytes. Reported
2627 by Andreas Vögele.
2628
2629 2004-04-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2630
2631 * eval.c (s_macro_keyword): New static identifier.
2632
2633 (scm_m_define): Change order to first create binding and
2634 evaluating the expression afterwards.
2635
2636 (scm_m_set_x): Memoize complete set! expression. Only leave
2637 symbols if no binding exists at memoization time. Throw error if
2638 assigning to a syntactic keyword.
2639
2640 (lazy_memoize_variable): New function.
2641
2642 (CEVAL): When execution set!, perform lazy memoization if
2643 unmemoized symbol is detected.
2644
2645 * modules.c (module_variable): Return variables with unbound
2646 value.
2647
2648 * tags.h: Fix comment.
2649
2650 2004-04-25 Kevin Ryde <user42@zip.com.au>
2651
2652 * chars.c (scm_char_upcase, scm_char_downcase, scm_c_upcase,
2653 scm_c_downcase): Use ctype.h toupper and tolower. This will be useful
2654 in 8-bit locales, and ensures consistency with char-upper-case? and
2655 char-lower-case? which already use ctype.h.
2656 (scm_c_upcase_table, scm_c_downcase_table, scm_lowers, scm_uppers):
2657 Remove.
2658 * chars.c, chars.h, init.c (scm_tables_prehistory): Remove.
2659
2660 * socket.c (VALIDATE_INET6): Correction to bignum_in_ipv6_range_p
2661 call. Reported by Hyperdivision.
2662
2663 * threads.c (scm_yield): Correction, actually call scm_thread_yield.
2664 Reported by Hyperdivision.
2665
2666 * unif.c (s_scm_make_uve): Remove unused local variable. Reported by
2667 Hyperdivision.
2668
2669 2004-04-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2670
2671 Hide the implementation of ilocs and isyms in eval.c.
2672
2673 * deprecated.h (SCM_IFRINC, SCM_ICDR, SCM_IFRAME, SCM_IDIST,
2674 SCM_ICDRP), eval.c (SCM_IFRINC, SCM_ICDR, SCM_IFRAME, SCM_IDIST,
2675 SCM_ICDRP), eval.h (SCM_ICDR, SCM_IFRINC, SCM_IFRAME, SCM_IDIST,
2676 SCM_ICDRP): Deprecated and added to deprecated.h. Moved from
2677 eval.h to eval.c.
2678
2679 * deprecated.c (scm_isymnames), deprecated.h (scm_isymnames,
2680 SCM_ISYMNUM, SCM_ISYMCHARS), eval.c (SCM_ISYMNUM, isymnames,
2681 scm_unmemocopy, CEVAL), print.c (scm_isymnames), tags.h
2682 (SCM_ISYMNUM, scm_isymnames, SCM_ISYMCHARS): Deprecated
2683 scm_isymnames, SCM_ISYMNUM and SCM_ISYMCHARS and added to
2684 deprecated.[hc]. Moved scm_isymnames from print.c to eval.c and
2685 renamed to isymnames. Moved SCM_ISYMNUM from tags.h to eval.c and
2686 renamed to ISYMNUM.
2687
2688 * eval.c (scm_i_print_iloc, scm_i_print_isym), eval.h
2689 (scm_i_print_iloc, scm_i_print_isym), print.c (scm_iprin1):
2690 Extracted printing of ilocs and isyms to guile internal functions
2691 scm_i_print_iloc, scm_i_print_isym of eval.c.
2692
2693 2004-04-22 Kevin Ryde <user42@zip.com.au>
2694
2695 * numbers.c (scm_bit_extract): Use SCM_SRS for signed right shift.
2696
2697 * numbers.c (scm_round): Test for x already an integer, to avoid bad
2698 rounding in x+0.5 when x is a big value already an integer. In
2699 certain hardware rounding cases x+0.5 can give an adjacent integer,
2700 leading to that as the result, when we really just wanted x itself.
2701
2702 2004-04-19 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2703
2704 * eval.c (scm_unmemocopy): Fixed unmemoization of let*.
2705
2706 (deval_args, CEVAL): Minor improvements: Reduced variable scopes,
2707 added const qualifiers, cast intentionally unused expressions to
2708 void for emphasis, improved comment.
2709
2710 2004-04-18 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2711
2712 * tags.h (scm_tags, scm_tc8_tags, scm_tc9_flag, scm_tc8_flag,
2713 scm_tc8_isym): Renamed scm_tags to scm_tc8_tags. Renamed
2714 scm_tc9_flag to scm_tc8_flag. Introduced new identifier
2715 scm_tc8_isym. Defined tc8-tags relative to scm_tc3_imm24.
2716 Defined the tc8-tag for flags to be 0x04, which will mean that
2717 SCM_BOOL_F will also have the value 0x04 instead of 0x013c. Due
2718 to the reduced number of bits and the simpler bit pattern for
2719 SCM_BOOL_F, certain machines may be able to use more efficient
2720 processor instructions to deal with SCM_BOOL_F.
2721
2722 (SCM_ITAG9, SCM_MAKE_ITAG9, SCM_ITAG9_DATA): Removed. These have
2723 never been defined in a released version, thus no need to
2724 deprecate them.
2725
2726 (SCM_IFLAGP, SCM_MAKIFLAG, SCM_IFLAGNUM): Flags now use tc8
2727 instead of tc9 tags.
2728
2729 (SCM_ISYMP, SCM_MAKISYM, SCM_ISYMNUM): Isyms now use tc8 instead
2730 of tc9 tags.
2731
2732 (SCM_MAKSPCSYM): Removed. It is almost impossible that user code
2733 could have used this definition.
2734
2735 (SCM_IM_AND, SCM_IM_BEGIN, SCM_IM_CASE, SCM_IM_COND, SCM_IM_DO,
2736 SCM_IM_IF, SCM_IM_LAMBDA, SCM_IM_LET, SCM_IM_LETSTAR,
2737 SCM_IM_LETREC, SCM_IM_OR, SCM_IM_QUOTE, SCM_IM_SET_X): Now encoded
2738 as isyms, as special isyms don't exist any more.
2739
2740 2004-04-18 Kevin Ryde <user42@zip.com.au>
2741
2742 * filesys.c (scm_readdir): Use readdir_r when available, for thread
2743 safety.
2744
2745 * numbers.c (scm_max, scm_min): For big/real, use SCM_SWAP rather than
2746 explicit swapping code.
2747
2748 2004-04-15 Kevin Ryde <user42@zip.com.au>
2749
2750 * cpp_sig_symbols.in: Add SIGSYS.
2751
2752 * list.c (scm_append_x): Use iterative style, to avoid non-tail
2753 recursion.
2754
2755 * numbers.c (scm_max, scm_min): For inum/frac, frac/inum, big/frac,
2756 frac/big and frac/frac, use scm_less_p for exact comparison.
2757
2758 * numbers.c (scm_gcd): For inum/big, use mpz_gcd_ui by sharing code
2759 with big/inum.
2760
2761 * numbers.c (xisinf): Add a comment about solaris 7 lacking isinf.
2762
2763 2004-04-06 Han-Wen Nienhuys <hanwen@xs4all.nl>
2764
2765 * inline.h (scm_cell): use SCM_GC_CELL_WORD for checking tag.
2766
2767 * chars.h (scm_init_chars): change scm_{upcase,downcase} to
2768 scm_c_{up,down}case.
2769 (SCM_MAKE_CHAR): add (unsigned char) cast. This prevents havoc
2770 when hi-bit ASCII is subjected to SCM_MAKE_CHAR().
2771
2772 2004-04-06 Kevin Ryde <user42@zip.com.au>
2773
2774 * numbers.c (scm_ash): Remove stray "}" in docstring.
2775
2776 * numbers.c (scm_make_ratio): For inum/bignum integer detection, use
2777 x==SCM_MOST_NEGATIVE_FIXNUM explicitly, for clarity and to avoid
2778 calling mpz_cmp_ui in most cases.
2779
2780 * numbers.c (scm_quotient, scm_remainder): In inum/big, use mpz_cmp_ui
2781 for big == abs(most-negative-fixnum) special case.
2782 (abs_most_negative_fixnum): Remove, no longer used.
2783
2784 * scmsigs.c (scm_sigaction_for_thread): Correction to signum range
2785 test, avoids SCM_VECTOR_REF outside bounds of signal_handlers on
2786 calling (sigaction NSIG).
2787
2788 * simpos.c (scm_system_star): Fix execargv memory leak, merge parent
2789 and fork error cases to do this.
2790
2791 2004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2792
2793 * eval.c (CEVAL): Don't distinguish between short and long
2794 instructions when dispatching - just always dispatch on the
2795 instruction code, which is common for short and long instructions.
2796 Further, removed unnecessary goto statements and added comment.
2797
2798 2004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2799
2800 * eval.c (scm_unmemocopy): Don't distinguish between short and
2801 long instructions when dispatching - just always dispatch on the
2802 instruction code, which is common for short and long instructions.
2803 Further, removed unnecessary goto statements, fixed indentation
2804 and replaced SCM_IMP predicates by SCM_NULLP.
2805
2806 2004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2807
2808 * eval.c (scm_lookupcar1, CEVAL): Use SCM_ILOCP instead of
2809 comparison with SCM_ILOC00. In CEVAL, eliminate goto-label
2810 'checkmacro'.
2811
2812 2004-03-31 Kevin Ryde <user42@zip.com.au>
2813
2814 * simpos.c: Include <signal.h> for SIG_IGN and friends.
2815
2816 2004-03-29 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2817
2818 Introduce scm_debug_mode_p as a replacement for scm_debug_mode and
2819 SCM_DEBUGGINGP:
2820
2821 * debug.h (scm_debug_mode_p, scm_debug_mode, SCM_DEBUGGINGP),
2822 eval.c (scm_debug_mode_p): Deprecated scm_debug_mode and
2823 SCM_DEBUGGINGP. Provided scm_debug_mode_p instead, to have one
2824 single interface that also matches the naming conventions.
2825 Probably scm_debug_mode_p should be part of the private interface
2826 anyway.
2827
2828 * debug.h (scm_debug_mode_p), backtrace.c (display_error_body),
2829 eval.c (SCM_APPLY, scm_trampoline_0, scm_trampoline_1,
2830 scm_trampoline_2): Change uses of scm_debug_mode or SCM_DEBUGGINGP
2831 to scm_debug_mode_p.
2832
2833
2834 Deprecate direct access to scm_ceval, scm_deval and scm_ceval_ptr:
2835
2836 * eval.h (scm_ceval, scm_deval, scm_ceval_ptr), debug.h
2837 (scm_ceval_ptr): Deprecated. Moved declaration of scm_ceval_ptr
2838 from debug.h to eval.h.
2839
2840 * debug.h (SCM_RESET_DEBUG_MODE): Don't access scm_ceval_ptr any
2841 more, just leave it with setting scm_debug_mode_p, which is
2842 equivalent for practical purposes.
2843
2844 * deprecated.h (SCM_XEVAL, SCM_XEVALCAR): Call scm_i_eval_x
2845 instead of *scm_ceval_ptr. Leave all evaluating to scm_i_eval_x.
2846
2847 * gdbint.c (gdb_eval): Call scm_i_eval_x instead of scm_ceval.
2848
2849 * eval.c (ceval, deval, scm_ceval, scm_deval): Made scm_ceval
2850 static and renamed it to ceval throughout. Provide a new exported
2851 but deprecated function scm_ceval as a wrapper for backwards
2852 compatibility. The same is done for the deval/scm_deval pair of
2853 functions.
2854
2855 * eval.c (CEVAL, SCM_CEVAL): Renamed SCM_CEVAL to CEVAL
2856 throughout. Defined CEVAL to ceval or deval, based on compilation
2857 phase.
2858
2859 * eval.c (SCM_XEVAL, SCM_XEVALCAR): Dispatch on scm_debug_mode_p
2860 to ceval and deval instead of calling *scm_ceval_ptr.
2861
2862 * eval.c (dispatching_eval): New deprecated static function.
2863
2864 * eval.c (scm_ceval_ptr): Initialized to dispatching_eval in order
2865 to emulate its old behaviour as closely as possible.
2866
2867
2868 Change the evaluator such that only expressions for which pair? is
2869 true are passed to CEVAL, and such that all other expressions are
2870 evaluated outside of CEVAL:
2871
2872 * eval.c (EVAL): New, provided in analogy to EVALCAR. Evaluate an
2873 expression that is assumed to be memoized already. All but
2874 expressions of the form '(<form> <form> ...)' are evaluated inline
2875 without calling an evaluator.
2876
2877 * eval.c (SCM_XEVAL, SCM_XEVALCAR, EVALCAR): Evaluate all but
2878 expressions of the form '(<form> <form> ...)' inline without
2879 calling an evaluator.
2880
2881 * eval.c (scm_i_eval_x, scm_i_eval, scm_ceval, scm_deval): Handle
2882 the special case of unmemoized symbols passed on the top level.
2883
2884 * eval.c (CEVAL): Change calls to CEVAL to EVAL, except where it
2885 is known that the expression passed to CEVAL is of the form
2886 '(<form> <form> ...)'. Remove handling of the tc7-objects, since
2887 now it is known that the input expression of CEVAL is a pair.
2888
2889 2004-03-29 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2890
2891 * eval.c (is_self_quoting_p): New static function.
2892
2893 (scm_m_quote): Use is_self_quoting_p.
2894
2895 (copy_tree): Corrected typo in comment.
2896
2897 2004-03-28 Han-Wen Nienhuys <hanwen@xs4all.nl>
2898
2899 * eval.c (s_scm_copy_tree): idem.
2900
2901 * list.c (s_scm_filter): remove "pointer" from doc string.
2902
2903 * gc.h (SCM_GC_CELL_TYPE): SCM_GC_CELL_TYPE uses SCM_GC_CELL_OBJECT.
2904
2905 * goops.h (SCM_NUMBER_OF_SLOTS): don't SCM_UNPACK the result.
2906
2907 * backtrace.c ("display_backtrace_body"): SCM_PACK before SCM_EQ_P
2908 (display_frame): idem.
2909 (display_backtrace_file_and_line): idem.
2910
2911 * tags.h (SCM_UNPACK): stricter typechecking on SCM_UNPACK
2912 arguments.
2913
2914 2004-03-26 Kevin Ryde <user42@zip.com.au>
2915
2916 * filesys.c (scm_getcwd, scm_readlink): Avoid memory leak on errors.
2917
2918 * numbers.c (scm_modulo): For inum/big and big/big, remove test of
2919 big==0 since that never occurs.
2920
2921 * numbers.c, numbers.h (scm_modulo_expt): Renamed from
2922 scm_modular_expt, matching scheme level name `modulo-expt'.
2923
2924 * numbers.c (scm_modular_expt): Return a negative remainder for a
2925 negative divisor, the same as `modulo' does.
2926
2927 2004-03-26 Eric Hanchrow <offby1@blarg.net>
2928
2929 * numbers.c, numbers.h (scm_modular_expt): New function.
2930
2931 2004-03-25 Kevin Ryde <user42@zip.com.au>
2932
2933 * numbers.c (scm_min, scm_max): Correction to big/real and real/big,
2934 return inexact as required by r5rs.
2935
2936 2004-03-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2937
2938 * eval.c: Separated some definitions relevant for execution from
2939 the memoization part of the file.
2940
2941 (copy_tree): New static function
2942
2943 (scm_copy_tree): Rewritten to fix two kinds or bugs: First, cyclic
2944 structures are detected now and will lead to an exception instead
2945 of forcing guile to run in an endless loop, using up all the
2946 system's memory. Second, arrays in the cdr of an improper list
2947 are now copied. See the new test cases in eval.test.
2948
2949 2004-03-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
2950
2951 * posix.c (scm_gethostname): Make sure len is initialised before
2952 it is used. Restructured to (hopefully) represent possible
2953 configurations more clearly in the code. Added unwind handler.
2954
2955 2004-03-23 Kevin Ryde <user42@zip.com.au>
2956
2957 * posix.c (scm_gethostname): Use sysconf(_SC_HOST_NAME_MAX) and/or
2958 MAXHOSTNAMELEN when available.
2959
2960 2004-03-21 Marius Vollmer <mvo@zagadka.de>
2961
2962 * read.c (skip_scsh_block_comment): Also recognize '\r' as a line
2963 terminator. Rewritten the logic as a state machine, I must have
2964 been doing too much VHDL lately...
2965
2966 * eval.c (scm_ceval, scm_deval): Explicitely evaluate ports to
2967 themselves. Thanks to Han-Wen Nienhuys!
2968
2969 * list.c: Changed docstrings so that they no longer talk about
2970 returning 'pointers' to something.
2971
2972 2004-03-20 Han-Wen Nienhuys <hanwen@xs4all.nl>
2973
2974 * gc.c: remove set_debug_cell_accesses! when
2975 SCM_DEBUG_CELL_ACCESSES is not defined. Scheme source code should
2976 use (if (defined? 'set-debug-cell-accesses!) .. ) to switch on
2977 debugging conditionally.
2978
2979 2004-03-21 Kevin Ryde <user42@zip.com.au>
2980
2981 * stime.c (scm_gmtime): Use gmtime_r when available, for thread safety.
2982
2983 2004-03-20 Kevin Ryde <user42@zip.com.au>
2984
2985 * posix.c (scm_gethostname): Preserve errno across free() call.
2986
2987 2004-03-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
2988
2989 * gc-card.c (sweep_card): use SCM_GC_SET_CELL_WORD for setting
2990 free cells.
2991
2992 2004-03-14 Kevin Ryde <user42@zip.com.au>
2993
2994 * stime.c: Define _GNU_SOURCE for strptime prototype from glibc.
2995 (strptime): Use HAVE_DECL_STRPTIME for when to give own prototype.
2996
2997 2004-03-07 Kevin Ryde <user42@zip.com.au>
2998
2999 * stime.c (scm_gmtime): Return bd_time->tm_zone when available, rather
3000 than "GMT" always.
3001 (filltime): Make zname parameter "const".
3002
3003 2004-03-03 Mikael Djurfeldt <mdj@chunk.mit.edu>
3004
3005 * threads.c, threads.h (scm_c_scm2thread): New function.
3006
3007 2004-02-29 Kevin Ryde <user42@zip.com.au>
3008
3009 * numbers.c (guile_ieee_init): Use C99 INFINITY and NAN when
3010 available. Test HAVE_DINFINITY and HAVE_DQNAN for those globals, in
3011 particular don't assume "defined (__alpha__) && ! defined (linux)"
3012 means OSF. Remove "SCO" code, which was not really SCO specific and
3013 which John W. Eaton advises should be long past being needed.
3014
3015 * posix.c (scm_execl, scm_execlp, scm_execle): Avoid memory leak under
3016 error throw.
3017
3018 2004-02-24 Kevin Ryde <user42@zip.com.au>
3019
3020 * posix.c (scm_cuserid): Use a private result buffer, for thread safe.
3021
3022 2004-02-22 Kevin Ryde <user42@zip.com.au>
3023
3024 * numbers.c (scm_max, scm_min): For one arg, dispatch to generic for
3025 complex, same as for two args. (Handle only inum, big, real, frac).
3026
3027 2004-02-21 Kevin Ryde <user42@zip.com.au>
3028
3029 * posix.c (scm_crypt): Use new HAVE_CRYPT.
3030 (<crypt.h>): Remove HAVE_LIBCRYPT condition.
3031 Reported by Andreas Voegele.
3032
3033 2004-02-20 Neil Jerram <neil@ossau.uklinux.net>
3034
3035 * list.c (scm_list_n): Add #if SCM_DEBUG_CELL_ACCESSES_P around
3036 validation.
3037
3038 * read.c (scm_lreadparen): Removed.
3039 (scm_lreadparen1): Renamed scm_i_lreadparen.
3040
3041 2004-02-20 Han-Wen Nienhuys <hanwen@xs4all.nl>
3042
3043 * list.c (scm_list_n): validate non-immediate arguments;
3044 this will catch forgotten a SCM_UNDEFINED.
3045
3046 2004-02-18 Marius Vollmer <mvo@zagadka.de>
3047
3048 * gc.h (scm_gc_cells_collected): Removed duplicated declaration.
3049 Thanks to Bill Schottstaedt!
3050
3051 * socket.h (scm_gethost): Removed prototype it is already in
3052 "net_db.h". Thanks to Bill Schottstaedt!
3053
3054 2004-02-18 Kevin Ryde <user42@zip.com.au>
3055
3056 * num2integral.i.c (INTEGRAL2BIG): WORDS_BIGENDIAN not right for word
3057 order parameter to mpz_import, in fact with just one word there's no
3058 order to worry about at all.
3059
3060 * numbers.c (scm_num_eq_p): For real==frac, complex==frac, frac==real
3061 and frac==complex, make an exact comparison rather than converting
3062 with fraction2double.
3063
3064 * posix.c, putenv.c, stime.c (environ): Use _NSGetEnviron in Darwin
3065 shared library, since environ is not directly available there.
3066
3067 * script.c (scm_shell_usage): Print to stdout for --help, per GNU
3068 standard.
3069
3070 * stime.c (scm_localtime, scm_gmtime, scm_mktime): Provide a default
3071 errno EINVAL in case localtime and gmtime don't set it.
3072 (scm_mktime, scm_strptime): Forcibly use errno EINVAL for our
3073 SCM_SYSERROR, since mktime and strptime generally don't set errno.
3074
3075 2004-02-16 Kevin Ryde <kevin@swox.se>
3076
3077 * gc-malloc.c (scm_done_malloc, scm_done_free): Allow negative sizes,
3078 which were permitted in the past for these.
3079
3080 * num2float.i.c (NUM2FLOAT): Expand isfinite to !xisinf, as per
3081 previous change to numbers.c.
3082
3083 * script.c (scm_shell_usage): Print bug-guile email address, as per
3084 GNU standard. Reported by Han-Wen Nienhuys.
3085
3086 2004-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
3087
3088 * unif.c (scm_make_uve): Removed local variable and simplified
3089 code in order to avoid compiler used uninitialized warnings.
3090
3091 * hashtab.c, hashtab.h (scm_hash_map_to_list): Renamed from
3092 scm_hash_map.
3093 (scm_hash_fold): Use scm_call_3 directly in the call to
3094 scm_internal_hash_fold instead of going via fold_proc (which is
3095 now removed).
3096 (scm_hash_for_each): Use a trampoline +
3097 scm_internal_hash_for_each_handle.
3098 (scm_internal_hash_for_each_handle, scm_hash_for_each_handle): New
3099 functions.
3100
3101 2004-02-12 Kevin Ryde <user42@zip.com.au>
3102
3103 * ports.c (scm_port_line): In docstring, note first line is 0.
3104 (scm_set_port_line_x): In docstring, note first line is 0.
3105 (scm_port_column): In docstring, there's no default to current input
3106 port, and remove shared port-line @defun.
3107 (scm_set_port_column_x): In docstring, there's no default to current
3108 input port, note first column is 0, remove shared set-port-line!
3109 @defun.
3110
3111 * ramap.c (scm_array_fill_x): For fvect and dvect, use scm_num2dbl to
3112 convert args the same way that array-set! does.
3113
3114 * unif.c (scm_make_uve, scm_array_p): Allow fraction 1/3 as prototype
3115 for dvect.
3116 (scm_array_p): Add missing "break"s in switch, fix llvect test look
3117 for "l" not "s", fix dvect to be false for singp(prot) since such a
3118 value is for fvect.
3119 (scm_array_prototype): Return 1/3 for dvect, rather than 0.33..33.
3120 (exactly_one_third): New variable.
3121 (scm_init_unif): Initialize it.
3122
3123 2004-02-10 Neil Jerram <neil@ossau.uklinux.net>
3124
3125 * read.c (scm_read_opts): Change `escaped-parens' to
3126 `elisp-strings'.
3127
3128 2004-02-08 Neil Jerram <neil@ossau.uklinux.net>
3129
3130 * read.c (scm_read_opts): New opts `elisp-vectors' and
3131 `escaped-parens'.
3132 (s_vector): New.
3133 (scm_lreadr): Use scm_lreadparen1 instead of scm_lreadparen. Make
3134 handling of elisp vector syntax dependent on SCM_ENABLE_ELISP and
3135 `elisp-vectors' option instead of SCM_ELISP_READ_EXTENSIONS.
3136 Allow "\(" and "\)" in strings when SCM_ENABLE_ELISP defined and
3137 `escaped-parens' option set.
3138 (scm_read_token): If elisp vector syntax active, disallow [ and ]
3139 in tokens.
3140 (scm_lreadparen): Rewrite as interface to scm_lreadparen1.
3141 (scm_lreadparen1): New.
3142
3143 * read.h: Remove conditionally compiled last arg to
3144 scm_lreadparen.
3145 (SCM_ELISP_VECTORS_P, SCM_ESCAPED_PARENS_P): New.
3146
3147 2004-01-23 Han-Wen Nienhuys <hanwen@xs4all.nl>
3148
3149 * eval.c (m_expand_body): remove stray variable new_body.
3150
3151 2004-01-22 Marius Vollmer <mvo@zagadka.de>
3152
3153 * eval.c (m_expand_body): Rewrite the expression in place (by
3154 overwriting FORMS) also when a letrec is constructed, not only
3155 when no definitions are found. Do not return rewritten expression
3156 to emphasize the in-place rewriting. Changed all users.
3157
3158 2004-01-19 Han-Wen Nienhuys <hanwen@xs4all.nl>
3159
3160 * gc.c: add protected_object_count, a number that is dumped from
3161 gc_stats()
3162
3163 2004-01-11 Marius Vollmer <mvo@zagadka.de>
3164
3165 * dynwind.h, dynwind.c (scm_frame_unwind,
3166 scm_frame_unwind_handler): Renamed and changed all uses.
3167 (scm_frame_rewind, scm_frame_rewind_handler): Likewise.
3168
3169 2004-01-11 Kevin Ryde <user42@zip.com.au>
3170
3171 * unif.c (scm_bit_count, scm_bit_position, s_scm_bit_set_star_x,
3172 s_scm_bit_count_star, s_scm_bit_invert_x): Clarify docstrings, as per
3173 changes made to scheme-compound.texi.
3174
3175 2004-01-10 Marius Vollmer <mvo@zagadka.de>
3176
3177 * print.c (scm_print_symbol_name): Handle #{`foo}#, #{,foo}#,
3178 #{.}#, and all numeric strings specially. Thanks to Paul Jarc!
3179
3180 * guile-snarf.in: Use mkdir to create a unique temporary directory
3181 that we can safely use. Thanks to Stefan Nordhausen!
3182
3183 2004-01-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3184
3185 * dynwind.h, dynwind.c (scm_i_dowinds): Removed 'explicit'
3186 argument since it is always zero now. Changed all callers.
3187 Removed code for handling fluids.
3188
3189 * fluids.c (scm_c_with_fluids): Use frames instead of adding to
3190 the wind chain explicitely. Use scm_c_with_fluid for the common
3191 case of only one fluid.
3192 (scm_with_fluid): New.
3193 (scm_c_with_fluid): Use frames instead of scm_c_with_fluids.
3194
3195 * fluids.h, fluids.c (scm_frame_fluid): New.
3196 (scm_with_fluid): New.
3197 (scm_i_swap_fluids, scm_i_swap_fluids_reverse): Removed.
3198
3199 * dynwind.c (scm_frame_end): Do not use scm_i_dowinds. Instead,
3200 do the unwinding directly. It is simple enough.
3201
3202 * dynwind.h, dynwind.c: Did the following renamings:
3203 scm_begin_frame -> scm_frame_begin,
3204 scm_end_frame -> scm_frame_end,
3205 scm_on_unwind -> scm_frame_unwind,
3206 scm_on_rewind -> scm_frame_rewind,
3207 scm_on_unwind_with_scm -> scm_frame_unwind_with_scm,
3208 scm_on_rewind_with_scm -> scm_frame_rewind_with_scm.
3209 Changed all uses.
3210
3211 * aync.h, async.c: Did the follwing renamings:
3212 scm_with_blocked_asyncs -> scm_frame_block_asyncs,
3213 scm_with_unblocked_asyncs -> scm_frame_unblock_asyncs.
3214 Changed all uses.
3215
3216 * ports.h, ports.c: Did the follwing renamings:
3217 scm_with_current_input_port -> scm_frame_current_input_port,
3218 scm_with_current_output_port -> scm_frame_current_output_port,
3219 scm_with_current_error_port -> scm_frame_current_error_port.
3220 Changed all uses.
3221
3222 2004-01-07 Kevin Ryde <user42@zip.com.au>
3223
3224 * numbers.c (s_bignum): Remove, not used since gmp bignums.
3225 Reported by Richard Todd.
3226
3227 * threads-plugin.h (SCM_MUTEX_MAXSIZE): Increase to 12*sizeof(long),
3228 for the benefit of powerpc-apple-darwin5.5. Reported by Richard Todd.
3229
3230 * unif.c (scm_aind): Test SCM_CONSP rather than !SCM_NULLP while
3231 traversing the args list, fixes segv if an improper list is given.
3232 Reported by Rouben Rostamian.
3233
3234 2004-01-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3235
3236 * ports.c (swap_ports, scm_with_current_foo_port): Do not allocate
3237 swap_data on stack, use a 'malloc obj'.
3238
3239 * fluids.h, fluids.c (scm_make_initial_fluids, scm_copy_fluids,
3240 scm_swap_fluids, scm_swap_fluids_reverse): Renamed to
3241 scm_i_... since they are internal. Changed all uses.
3242
3243 * dynwind.c (frame_print): Removed, use the default printer.
3244 (WINDER_F_MARK, WINDER_MARK_P, winder_mark): New.
3245 (scm_on_unwind_with_scm, scm_on_rewind_with_scm): New. Use above
3246 to protect SCM values.
3247
3248 * dynwind.h (SCM_F_WIND_EXPLICITELY,
3249 SCM_F_WIND_EXPLICITLY): It's "explicitly" not "explicitely", damn.
3250 Changed all uses.
3251 (scm_on_unwind_with_scm, scm_on_rewind_with_scm): New.
3252
3253 2004-01-05 Marius Vollmer <mvo@zagadka.de>
3254
3255 * ports.h, ports.c (scm_with_current_input_port,
3256 scm_with_current_output_port, scm_with_current_error_port): New.
3257
3258 * async.h, async.c (scm_with_blocked_asyncs,
3259 scm_with_unblocked_asyncs): New.
3260
3261 2004-01-03 Marius Vollmer <mvo@zagadka.de>
3262
3263 * dynwind.h, scm_dynwind.c (scm_t_frame_flags, scm_t_wind_flags,
3264 scm_begin_frame, scm_end_frame, scm_on_unwind, scm_on_rewind):
3265 New.
3266 (scm_dowinds, scm_i_dowinds): scm_dowinds has been renamed to
3267 scm_i_dowinds and extended to handle frames and to invoke a 'turn'
3268 function when the outermost wind point has been reached. The
3269 latter is used to copy a continuation stack at the right time.
3270 scm_dowinds remains available.
3271 (SCM_GUARDSP, SCM_BEFORE_GUARD, SCM_AFTER_GUARD, SCM_GUARD_DATA,
3272 tc16_guard, guards_print): Removed.
3273 (scm_internal_dynamic_wind): Reimplemented using frames.
3274
3275 * continuations.c (copy_stack): New, do only the stack copying
3276 part of copy_stack_and_call.
3277 (copy_stack_and_call): Copy the stack after unwinding and before
3278 rewinding.
3279 (scm_dynthrow): Do not call scm_dowinds, this is now done by
3280 copy_stack_and_call.
3281
3282 2004-01-04 Kevin Ryde <user42@zip.com.au>
3283
3284 * numbers.c (scm_less_p): Don't convert frac to float for compares,
3285 can give bad results due to rounding.
3286
3287 * stime.c (scm_current_time, scm_gettimeofday): Add a comment about
3288 setzone/restorezone protection for DOS.
3289
3290 2003-12-26 Marius Vollmer <mvo@zagadka.de>
3291
3292 * gen-scmconfig.h.in, gen-scmconfig.c: Arrange for scm_t_intmax
3293 and scm_t_uintmax to be defined in scmconfig.h
3294
3295 2003-12-03 Kevin Ryde <user42@zip.com.au>
3296
3297 * numbers.c (scm_less_p): Remove spurious xisnan from frac+big case.
3298
3299 * numbers.c (scm_make_ratio): Check for numerator equal to
3300 SCM_MOST_NEGATIVE_FIXNUM and bignum denominator the negative of that,
3301 giving integer -1.
3302
3303 * numbers.c (scm_real_part): Return fraction unchanged rather than
3304 converting to flonum.
3305
3306 2003-11-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
3307
3308 * modules.c (module_variable): Fixed (and thus simplified) the
3309 definition of SCM_BOUND_THING_P to reflect the fact that since
3310 after the 1.4 series of guile, obarrays only hold variable
3311 objects.
3312
3313 2003-11-30 Marius Vollmer <mvo@zagadka.de>
3314
3315 * numbers.c (scm_logand): It's "#b...", not "#\b...".
3316
3317 From Paul Jarc:
3318
3319 * read.c (scm_lreadr): Signal an error for invalid escape
3320 sequences in strings. Code cleanups too.
3321
3322 * print.c (scm_iprin1): use \xNN hexadecimal sequences when
3323 writing control characters in strings.
3324
3325 2003-11-21 Marius Vollmer <mvo@zagadka.de>
3326
3327 * ports.c (scm_drain_input): Bug fix: only access the port after
3328 checking that it indeed is one.
3329
3330 2003-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
3331
3332 * eval.c (s_bad_define): New static identifier.
3333
3334 (m_body): Fixed comment.
3335
3336 (scm_m_define): Don't generate memoized code for definitions that
3337 are not on the top level. As a consequence, no memoized code at
3338 all is generated for definitions any more: Top level definitions
3339 are executed immediately during memoization and internal
3340 definitions are handled separately in m_expand_body.
3341
3342 (scm_unmemocopy, unmemocopy): Removed code for unmemoizing
3343 definitions. Consequently, there is no unmemoizing code any more
3344 that might modify the environment. Thus, the old scm_unmemocopy
3345 is removed and the old unmemocopy is renamed to scm_unmemocopy.
3346
3347 (SCM_CEVAL): The SCM_IM_DEFINE keyword can no longer occur in
3348 memoized code. Call EVALCAR for continuations. Prefer !SCM_NULLP
3349 over SCM_NIMP in places, where the argument is known to be part of
3350 a proper list.
3351
3352 2003-11-21 Kevin Ryde <user42@zip.com.au>
3353
3354 * numbers.c (scm_abs): Allocate a new real only for negatives, as done
3355 for bignums.
3356
3357 * numbers.c (scm_bit_extract): Use mpz functions, rearrange inum case
3358 to share some shifting.
3359
3360 * numbers.c (scm_integer_expt): Don't mpz_init after scm_i_clonebig or
3361 scm_i_mkbig, since they do so already. Don't mpz_clear a bignum SCM,
3362 since gc does this.
3363
3364 2003-11-19 Marius Vollmer <mvo@zagadka.de>
3365
3366 * numbers.c (scm_make_ratio): Rewritten to have a simpler
3367 structure. Previously, not all cases with a negative denominator
3368 were covered.
3369
3370 * numbers.c (mem2decimal_from_point): use scm_divide instead of
3371 scm_divide2real when forming the fractional part. This allows
3372 "#e1.2" to yield 6/5.
3373
3374 * numbers.c (scm_i_fraction_equalp): Do not treat the return value
3375 of scm_equal_p as a C boolean, use SCM_FALSEP. Previously, all
3376 fractions were equal to each other regardless of value. Ooops.
3377
3378 * numbers.c (scm_rationalize): Return an inexact result when given
3379 inexact arguments.
3380
3381 * numbers.c (scm_exact_p, scm_inexact_p): Throw error for
3382 non-numbers.
3383
3384 2003-11-18 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3385
3386 Support for exact fractions from Bill Schottstaedt! Thanks!
3387
3388 * print.c (scm_iprin1): Handle fractions.
3389
3390 * objects.h (scm_class_fraction): New.
3391 * objects.c (scm_class_fraction): New.
3392 (scm_class_of): Handle fractions.
3393
3394 * hash.c (scm_hasher): Handle fractions.
3395
3396 * numbers.c: New code for handling fraction all over the place.
3397 (scm_odd_p, scm_even_p): Handle inexact integers.
3398 (scm_rational_p): New function, same as scm_real_p.
3399 (scm_round_number, scm_truncate_number, scm_ceiling, scm_floor):
3400 New exact functions that replace the inexact 'dsubr'
3401 implementations.
3402 (scm_numerator, scm_denominator): New.
3403
3404 * numbers.h (SCM_NUMP): Recognize fractions.
3405 (SCM_FRACTIONP, SCM_SLOPPY_FRACTIONP, SCM_FRACTION_NUMERATOR,
3406 SCM_FRACTION_DENOMINATOR, SCM_FRACTION_SET_NUMERATOR,
3407 SCM_FRACTION_SET_DENOMINATOR, SCM_FRACTION_REDUCED_BIT,
3408 SCM_FRACTION_REDUCED_SET, SCM_FRACTION_REDUCED_CLEAR,
3409 SCM_FRACTION_REDUCED): New.
3410 (scm_floor, scm_ceiling, scm_truncate_number, scm_round_number):
3411 New prototypes.
3412 (scm_make_ratio, scm_rationalize, scm_numerator, scm_denominator,
3413 scm_rational_p): New prototypes.
3414 (scm_i_dbl2num, scm_i_fraction2double, scm_i_fraction_equalp,
3415 scm_i_print_fraction): New prototypes.
3416
3417 * goops.c (create_standard_classes): Create "<fraction>" class.
3418
3419 * gc-mark.c (scm_gc_mark_dependencies): Handle fractions.
3420
3421 * gc-card.c (scm_i_sweep_card): Include scm_tc16_fraction as a
3422 case in the switch, but do nothing for now.
3423
3424 * eval.c (SCM_CEVAL, SCM_APPLY, call_dsubr_1): Convert fractions
3425 to doubles when calling 'dsubr' functions.
3426
3427 * eq.c (scm_eqv_p, scm_equal_p): Handle fractions.
3428
3429 2003-11-18 Rob Browning <rlb@defaultvalue.org>
3430
3431 * gen-scmconfig.c (main): remove public definition of
3432 SCM_SIZEOF___INT64 and SCM_SIZEOF_UNSIGNED___INT64 and add
3433 direct typedef of long_long and ulong_long inside deprecated block
3434 when appropriate.
3435
3436 * deprecated.h: move long_long and ulong_long definitions to
3437 gen-scmconfig.c so that we don't need to add SCM_SIZEOF___INT64
3438 and SCM_SIZEOF_UNSIGNED___INT64 to the public namespace.
3439
3440 2003-11-17 Marius Vollmer <mvo@zagadka.de>
3441
3442 * hash.c (scm_string_hash): New hashing algorithm that takes the
3443 complete string into account.
3444
3445 * eval.c (scm_m_generalized_set_x): Macroexpand the target when it
3446 is a list. This allows (@ ...) to work with set!.
3447 (scm_m_generalized_set_x): Use ASSERT_SYNTAX_2 instead of
3448 SCM_ASSYNT.
3449
3450 * script.c (scm_compile_shell_switches): Use scm_c_read_string for
3451 the "-e" option instead of scm_str2symbol. This allows things
3452 like (@ ...) to be specified for the entry point.
3453
3454 2003-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
3455
3456 * eval.c (scm_m_letstar): Create memoized code in place to
3457 minimize consing.
3458
3459 2003-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
3460
3461 * eval.c (s_splicing): Commented and reformulated.
3462
3463 (lookup_global_symbol, lookup_symbol): New static functions.
3464
3465 (s_test, s_bindings, s_duplicate_bindings, s_variable): Removed.
3466
3467 (try_macro_lookup, literal_p): Use lookup_symbol instead of
3468 creating a temporary pair for scm_lookupcar.
3469
3470 (scm_unmemocar, unmemocar): Renamed scm_unmemocar to unmemocar,
3471 created deprecated wrapper function scm_unmemocar.
3472
3473 (SCM_VALIDATE_NON_EMPTY_COMBINATION, scm_sym_else,
3474 scm_sym_unquote, scm_sym_uq_splicing, scm_sym_enter_frame,
3475 scm_sym_apply_frame, scm_sym_exit_frame, scm_sym_trace, f_apply,
3476 undefineds, sym_three_question_marks): Moved around without
3477 modifications.
3478
3479 * eval.c, eval.h (scm_macroexp, scm_unmemocar): Deprecated.
3480
3481 2003-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
3482
3483 * eval.c (try_macro_lookup, expand_user_macros, is_system_macro_p,
3484 m_expand_body, scm_m_expand_body): Grouped together with m_body.
3485 No further modifications.
3486
3487 2003-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
3488
3489 * eval.c (s_mixed_body_forms): New static identifier.
3490
3491 (canonicalize_define, scm_m_define): The check for a bad
3492 expression is performed in canonicalize_define now.
3493
3494 (try_macro_lookup, expand_user_macros, is_system_macro_p): New
3495 static helper functions for m_expand_body.
3496
3497 (m_expand_body): Use ASSERT_SYNTAX to signal syntax errors. Only
3498 expand user defined macros. Fixed handling of the definition/
3499 expression boundary. Fixed handling of definitions grouped with
3500 'begin. Use canonicalize_define to expand definitions.
3501
3502 2003-11-13 Marius Vollmer <mvo@zagadka.de>
3503
3504 * read.c (scm_lreadr): detect EOF after backslash, and interpret
3505 \xNN hexadecimal sequences. From Paul Jarc, thanks!
3506
3507 * snarf.h (SCM_SMOB, SCM_GLOBAL_SMOB, SCM_SMOB_MARK,
3508 SCM_GLOBAL_SMOB_MARK, SCM_SMOB_FREE, SCM_GLOBAL_SMOB_FREE,
3509 SCM_SMOB_PRINT, SCM_GLOBAL_SMOB_PRINT, SCM_SMOB_EQUALP,
3510 SCM_GLOBAL_SMOB_EQUALP, SCM_SMOB_APPLY, SCM_GLOBAL_SMOB_APPLY):
3511 New macros from Paul Jarc. Thanks!
3512
3513 * gc_os_dep.c (scm_get_stack_base): Provide a definition that
3514 return NULL when the machine type is unknown. Previously,
3515 gc_os_dep.c would refuse to compile.
3516
3517 2003-11-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
3518
3519 * eval.c (scm_m_body, m_body, scm_m_lambda, memoize_named_let,
3520 scm_m_let, scm_m_letrec, m_expand_body): Renamed static function
3521 scm_m_body to m_body.
3522
3523 2003-11-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
3524
3525 * eval.c, eval.h (scm_m_expand_body, m_expand_body): Deprecated
3526 public use of scm_m_expand_body in eval.h. In eval.c, renamed
3527 scm_m_expand_body to m_expand_body and made it static. Added
3528 deprecated wrapper scm_m_expand_body.
3529
3530 (scm_eval_body, SCM_CEVAL, SCM_APPLY): Use m_expand_body instead
3531 of scm_m_expand_body.
3532
3533 2003-11-09 Kevin Ryde <user42@zip.com.au>
3534
3535 * dynl.c (scm_dynamic_unlink): Need scm_list_1 on error message
3536 argument. Reported by Mike Gran.
3537
3538 2003-11-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
3539
3540 * eval.c (s_missing_body_expression): New static identifier.
3541
3542 (s_body): Removed.
3543
3544 (scm_m_expand_body): Fixed core dump when passing a body with
3545 defines, but without expressions (see additions to syntax.test).
3546 Use ASSERT_SYNTAX to signal syntax errors.
3547
3548 2003-11-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
3549
3550 * eval.c (canonicalize_define): New static helper function.
3551
3552 (memoize_define, canonicalize_define): Extract handling of
3553 function currying to canonicalize_define.
3554
3555 2003-11-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
3556
3557 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
3558 Make sure that error checking in debug mode is not worse than in
3559 standard mode.
3560
3561 2003-11-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
3562
3563 * eval.c (scm_m_body, scm_m_lambda): Documentation strings are not
3564 handled in scm_m_body any more, but rather in scm_m_lambda.
3565
3566 (scm_m_body, memoize_named_let, scm_m_let, scm_m_letstar,
3567 scm_m_letrec, scm_m_expand_body): Check for validity is done by
3568 calling functions of scm_m_body.
3569
3570 (scm_m_lambda): Avoid unnecessary consing when creating the
3571 memoized code.
3572
3573 2003-11-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
3574
3575 * eval.c (s_expression): Added comment.
3576
3577 (s_empty_combination, error_unbound_variable): New static
3578 identifiers.
3579
3580 (SCM_VALIDATE_NON_EMPTY_COMBINATION, SCM_EVALIM2, scm_lookupcar1):
3581 Use ASSERT_SYNTAX, syntax_error or error_unbound_variable to
3582 signal syntax errors.
3583
3584 (SCM_CEVAL): Separated handling of evaluator bytecodes and other
3585 scheme objects.
3586
3587 2003-10-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
3588
3589 * eval.c (unmemocar, sym_three_question_marks, scm_unmemocar):
3590 Grouped together with unmemocopy, without modifications.
3591
3592 (build_binding_list, unmemocopy): Renamed names of list arguments
3593 and variables to reflect the actual order of the list elements.
3594
3595 2003-10-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
3596
3597 * eval.c (s_defun): New static identifier.
3598
3599 (scm_m_nil_cond, scm_m_atfop, scm_m_undefine): Add comments. Use
3600 ASSERT_SYNTAX to signal syntax errors. Avoid unnecessary consing
3601 when creating the memoized code.
3602
3603 2003-10-19 Kevin Ryde <user42@zip.com.au>
3604
3605 * numbers.c (scm_ash): Revise docstring as per recent update to manual.
3606
3607 * numbers.c (scm_i_big2dbl): Rewrite, carefully rounding to "closest"
3608 in accordance with R5RS, which just mpz_get_d doesn't really give.
3609
3610 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
3611
3612 * eval.c (s_bad_slot_number): New static identifier.
3613
3614 (scm_m_atslot_ref, scm_m_atslot_set_x): Use ASSERT_SYNTAX to
3615 signal syntax errors. Avoid unnecessary consing when creating the
3616 memoized code.
3617
3618 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
3619
3620 * eval.c (scm_m_cont, scm_m_at_call_with_values,
3621 scm_m_generalized_set_x): Use ASSERT_SYNTAX to signal syntax
3622 errors. Avoid unnecessary consing when creating the memoized
3623 code.
3624
3625 (scm_m_generalized_set_x): Let scm_m_set_x handle the R5RS
3626 standard case. Make sure line and file information are copied to
3627 every created expression.
3628
3629 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
3630
3631 * eval.c (scm_m_set_x, scm_m_apply, scm_m_atbind): Use
3632 ASSERT_SYNTAX to signal syntax errors. Avoid unnecessary consing
3633 when creating the memoized code.
3634
3635 (scm_m_atbind): Reversed the order, in which the init expressions
3636 are stored and executed. The order of execution is now equal to
3637 the order in which the initializers of the let-forms are executed.
3638 Use check_bindings and transform_bindings.
3639
3640 (SCM_CEVAL): Eliminated SCM_NIMP in favor of more appropriate
3641 !SCM_NULLP. Added some comments.
3642
3643 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
3644
3645 * eval.c: Sorted include files alphabetically.
3646
3647 (scm_m_begin): Added comment.
3648
3649 (scm_m_or): Use ASSERT_SYNTAX to signal syntax errors. Avoid
3650 unnecessary consing when creating the memoized code.
3651
3652 (iqq, scm_m_quasiquote, scm_m_quote): Use ASSERT_SYNTAX to signal
3653 syntax errors. Be more specific about the kind of error that was
3654 detected.
3655
3656 (scm_m_quote, unmemocopy): As an optimization, vector constants
3657 are now inserted unquoted into the memoized code. During
3658 unmemoization the quotes are added again to provide syntactically
3659 correct code.
3660
3661 2003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
3662
3663 * eval.c (scm_m_let, scm_m_letstar, scm_m_letrec,
3664 scm_m_expand_body, check_bindings): Extracted syntax checking of
3665 bindings to new static function check_bindings.
3666
3667 (scm_m_let, memoize_named_let): Extracted handling of named let to
3668 new static function memoize_named_let.
3669
3670 (transform_bindings, scm_m_let, scm_m_letstar, scm_m_letrec): Use
3671 ASSERT_SYNTAX to signal syntax errors. Be more specific about the
3672 kind of error that was detected. Avoid use of SCM_CDRLOC. Avoid
3673 unnecessary consing when creating the memoized code.
3674
3675 2003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
3676
3677 * eval.c (s_bad_formals, s_bad_formal, s_duplicate_formal): New
3678 static identifiers.
3679
3680 (s_clauses, s_formals, s_duplicate_formals): Removed.
3681
3682 (scm_m_lambda): Use ASSERT_SYNTAX to signal syntax errors. Be more
3683 specific about the kind of error that was detected. Prepare for
3684 easier integration of changes for separated memoization.
3685
3686 2003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
3687
3688 * eval.c (s_duplicate_binding): New static identifier.
3689
3690 (scm_m_case): Call scm_c_memq instead of implementing it inline.
3691
3692 (scm_m_define): Added comment about how we check for duplicate
3693 formals.
3694
3695 (scm_m_do): Added check for duplicate bindings.
3696
3697 (scm_m_if): Use ASSERT_SYNTAX to signal syntax errors. Avoid
3698 unnecessary consing when creating the memoized code.
3699
3700 (scm_c_improper_memq, c_improper_memq, scm_m_lambda): Renamed
3701 scm_c_improper_memq to c_improper_memq, since it is not exported.
3702
3703 (transform_bindings): Call scm_c_memq rather than
3704 scm_c_improper_memq.
3705
3706 (SCM_CEVAL): Simplified handling of SCM_IM_IF forms.
3707
3708 2003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
3709
3710 * eval.c (s_bad_bindings, s_bad_binding, s_bad_exit_clause): New
3711 static identifiers.
3712
3713 (scm_m_do): Use ASSERT_SYNTAX to signal syntax errors. Be more
3714 specific about the kind of error that was detected. Avoid use of
3715 SCM_CDRLOC. Avoid unnecessary consing when creating the memoized
3716 code, this way also making sure that file name, line number
3717 information etc. remain available.
3718
3719 2003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
3720
3721 * eval.c (memoize_as_thunk_prototype): New static function.
3722
3723 (scm_m_delay, scm_m_future): Use memoize_as_thunk_prototype.
3724 Avoid unnecessary consing when creating the memoized code.
3725
3726 2003-10-12 Kevin Ryde <user42@zip.com.au>
3727
3728 * list.c (scm_append): Track argument number and use in error.
3729
3730 2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
3731
3732 * eval.c (s_missing_expression, s_bad_variable): New static
3733 identifiers.
3734
3735 (scm_m_define): Use ASSERT_SYNTAX to signal syntax errors. Prefer
3736 R5RS terminology for the naming of variables. Be more specific
3737 about the kind of error that was detected. Make sure file name,
3738 line number etc. are added to all freshly created expressions.
3739 Avoid unnecessary consing when creating the memoized code.
3740
3741 2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
3742
3743 * eval.c (s_extra_expression, s_misplaced_else_clause,
3744 s_bad_cond_clause, s_missing_recipient): New static identifiers.
3745
3746 (s_extra_case_clause): Removed.
3747
3748 (scm_m_case, scm_m_cond): If a clause appears after an else
3749 clause, report a misplaced else clause.
3750
3751 (scm_m_cond): Use ASSERT_SYNTAX to signal syntax errors. Be more
3752 specific about the kind of error that was detected. Handle bound
3753 'else and '=>. Avoid unnecessary consing when creating the
3754 memoized code.
3755
3756 (scm_m_cond, unmemocopy, SCM_CEVAL): Use SCM_IM_ELSE to memoize
3757 the syntactic keyword 'else and SCM_IM_ARROW to memoize the
3758 syntactic keyword '=>.
3759
3760 2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
3761
3762 * eval.c (scm_m_case): Allow empty lists of case labels.
3763
3764 2003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
3765
3766 * tags.h (SCM_IM_ELSE, SCM_IM_ARROW): New memoizer codes.
3767
3768 * print.c (scm_isymnames): Add names for the new memoizer codes.
3769
3770 * eval.c (s_missing_clauses, s_bad_case_clause,
3771 s_extra_case_clause, s_bad_case_labels, s_duplicate_case_label,
3772 literal_p): New static identifiers.
3773
3774 (scm_m_case): Use ASSERT_SYNTAX to signal syntax errors. Be more
3775 specific about the kind of error that was detected. Check for
3776 duplicate case labels. Handle bound 'else. Avoid unnecessary
3777 consing when creating the memoized code.
3778
3779 (scm_m_case, unmemocopy, SCM_CEVAL): Use SCM_IM_ELSE to memoize
3780 the syntactic keyword 'else.
3781
3782 2003-10-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
3783
3784 * eval.c (s_bad_expression, syntax_error_key, syntax_error,
3785 ASSERT_SYNTAX, ASSERT_SYNTAX_2): New static identifiers.
3786
3787 (scm_m_and): Use ASSERT_SYNTAX to signal syntax errors. Avoid
3788 unnecessary consing when creating the memoized code.
3789
3790 2003-10-09 Kevin Ryde <user42@zip.com.au>
3791
3792 * numbers.c (scm_inexact_to_exact): Don't depend on what double->long
3793 cast gives for values bigger than a long, or for nan or inf.
3794
3795 2003-10-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
3796
3797 * smob.h (scm_make_smob_type): Made the declaration match the
3798 definition.
3799
3800 2003-10-07 Marius Vollmer <mvo@zagadka.de>
3801
3802 * goops.c, objects.h, smob.c, smob.h: Make type names char
3803 const * instead of char *. Thanks to Paul Jarc!
3804
3805 2003-10-02 Kevin Ryde <user42@zip.com.au>
3806
3807 * strports.c (scm_call_with_output_string): scm_get_output_string
3808 rather than scm_strport_to_string, so as to guard against the port
3809 having been closed by the called procedure. Reported by Nic Ferrier.
3810
3811 2003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
3812
3813 * numbers.h (SCM_INEXACTP): Removed uses of SCM_TYP16S.
3814
3815 * tags.h, deprecated.h (SCM_TYP16S): Deprecated and moved from
3816 tags.h to deprecated.h.
3817
3818 2003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
3819
3820 This set of patches introduces a new tc7 code scm_tc7_number for
3821 numbers. Bignums, reals and complex numbers are turned from smobs
3822 into subtypes of scm_tc7_number.
3823
3824 * tags.h (scm_tc7_number): New.
3825
3826 * eq.c (scm_equal_p), eval.c (SCM_CEVAL), evalext.c
3827 (scm_self_evaluating_p), gc-card.c (scm_i_sweep_card), gc-mark.c
3828 (scm_gc_mark_dependencies), goops.c (create_smob_classes), hash.c
3829 (scm_hasher), numbers.c, numbers.h (SCM_NUMP), objects.c
3830 (scm_class_of), print.c (scm_iprin1), smob.c
3831 (scm_smob_prehistory): Don't handle bignums, reals and complex
3832 numbers as subtypes of scm_tc7_smob any more.
3833
3834 * numbers.h, tags.h (scm_tc16_big, scm_tc16_real,
3835 scm_tc16_complex): Moved definitions from tags.h to numbers.h.
3836
3837 2003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
3838
3839 * numbers.c (scm_make_complex), gc-card.c (scm_i_sweep_card): Use
3840 sizeof (scm_t_complex) to determine the memory size of the
3841 malloc'd area for complex numbers.
3842
3843 2003-09-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
3844
3845 * numbers.c (scm_bigequal): Fixed.
3846
3847 2003-09-16 Marius Vollmer <mvo@zagadka.de>
3848
3849 * stime.c (scm_current_time): 'time' does not set errno so don't
3850 use SCM_SYSERROR for reporting errors.
3851
3852 2003-09-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
3853
3854 This set of patches eliminates the dependency between the
3855 implementation of evaluator specific memoization codes and special
3856 constants like #f, '() etc. ('flags'), which are not evaluator
3857 specific. The goal is to remove definitions of evaluator
3858 memoization codes completely from the public interface. This will
3859 make it possible to experiment more freely with optimizations of
3860 guile's internal representation of memoized code.
3861
3862 * objects.c (scm_class_of): Eliminate dependency on SCM_ISYMNUM.
3863
3864 * print.c (iflagnames): New array, holding the printed names of
3865 guile's special constants ('flags').
3866
3867 (scm_isymnames): Now holds only the printed names of the
3868 memoization codes.
3869
3870 (scm_iprin1): Separate the handling of memoization codes and
3871 guile's special constants.
3872
3873 * tags.h (scm_tc9_flag, SCM_ITAG9, SCM_MAKE_ITAG9, SCM_ITAG9_DATA,
3874 SCM_IFLAGNUM): new
3875
3876 (scm_tc8_char, scm_tc8_iloc, SCM_BOOL_F, SCM_BOOL_T,
3877 SCM_UNDEFINED, SCM_EOF_VAL, SCM_EOL, SCM_UNSPECIFIED, SCM_UNBOUND,
3878 SCM_ELISP_NIL, SCM_IM_DISPATCH, SCM_IM_SLOT_REF,
3879 SCM_IM_SLOT_SET_X, SCM_IM_DELAY, SCM_IM_FUTURE,
3880 SCM_IM_CALL_WITH_VALUES, SCM_IM_NIL_COND, SCM_IM_BIND): Changed
3881 values.
3882
3883 (SCM_IFLAGP): SCM_IFLAGP now only tests for flags.
3884
3885 (SCM_IFLAGP, SCM_MAKIFLAG, SCM_IFLAGNUM): Generalized to use the
3886 tc9 macros and scm_tc9_flag.
3887
3888 2003-09-15 Marius Vollmer <mvo@zagadka.de>
3889
3890 * posix.c (scm_setgroups): Check that the gid list is not too
3891 long. Thanks to Paul Jarc!
3892
3893 2003-09-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
3894
3895 * tags.h: Reduced the number of short instructions from 14 to 13.
3896 The typecode of the former 14th short instruction is now used to
3897 represent long instructions. Changed some comments to reflect
3898 this fact.
3899
3900 (SCM_MAKISYM): ISYMs get a new tc7 code, namely the one that was
3901 previously used by SCM_IM_DEFINE.
3902
3903 (SCM_IM_DEFINE): Turned into a long instruction.
3904
3905 * eval.c (unmemocopy, SCM_CEVAL): Treat SCM_IM_DEFINE as a long
3906 instruction.
3907
3908 * eval.c (SCM_CEVAL): Since characters and iflags have now a tc7
3909 code that is separate from all instructions, one level of dispatch
3910 for long instructions can be eliminated.
3911
3912 * print.c (scm_isymnames): Removed some commented code.
3913
3914 2003-09-12 Marius Vollmer <mvo@zagadka.de>
3915
3916 * __scm.h (SCM_FENCE): Use __memory_barrier with the Intel
3917 compiler on IA64.
3918
3919 * hashtab.h (scm_tc16_hashtable): Added "extern" declaration.
3920
3921 * modules.c (scm_module_reverse_lookup): Check that the obarray
3922 really is a hashtable and do nothing if not.
3923
3924 * inline.h: Use "extern inline" only with GCC. Use "static
3925 inline" else.
3926
3927 2003-09-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
3928
3929 * numbers.h (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Removed uses
3930 of SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
3931
3932 * numbers.h, deprecated.h (SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP,
3933 SCM_SLOPPY_COMPLEXP): Deprecated and moved from numbers.h to
3934 deprecated.h.
3935
3936 2003-09-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
3937
3938 * eq.c (scm_eqv_p, scm_equal_p): Removed uses of
3939 SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
3940
3941 * eq.c (scm_eqv_p, scm_equal_p): Reordered comparisons from
3942 0.0==some_expression to some_expression==0.0. The latter is
3943 better readable. The former is preferred by some people, since it
3944 leads to a compiler error when confusing == with =. However, when
3945 using gcc, a warning will be issued if in an if-statement an
3946 assigment appears. Since many Guile developers are using gcc,
3947 such errors will not remain unnoticed anyway. We can therefore
3948 focus on better readability.
3949
3950 2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
3951
3952 * tags.h: Added description of Guile's type system. Removed some
3953 old and misleading comments.
3954
3955 2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
3956
3957 * unit.c (scm_cvref): Eliminate unnecessary uses of SCM_NIMP,
3958 SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
3959
3960 2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
3961
3962 * numbers.h (SCM_MAKINUM): Define in terms of scm_tc2_int.
3963
3964 (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Define in terms of the
3965 respective SLOPPY macro.
3966
3967 2003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
3968
3969 * eq.c (scm_equal_p): Use SCM_TYP7 to check if an object is of
3970 type string, not SCM_TYP7S.
3971
3972 2003-09-03 Kevin Ryde <user42@zip.com.au>
3973
3974 * numbers.c (scm_lognot): Correction to docstring, ones-complement not
3975 2s-complement.
3976
3977 * stime.c (scm_strptime): Add comment about glibc strptime %s and
3978 current timezone requiring SCM_DEFER_INTS.
3979
3980 2003-08-30 Neil Jerram <neil@ossau.uklinux.net>
3981
3982 * script.c (scm_compile_shell_switches): Make -s switch optional
3983 if file to be loaded does not begin with a `-'. (Thanks to Aaron
3984 VanDevender for the patch!)
3985
3986 2003-08-30 Kevin Ryde <user42@zip.com.au>
3987
3988 * numbers.c (scm_lognot): Rewrite using ~ and mpz_com, for directness
3989 and to have non-integer types rejected as per other logical funcs.
3990
3991 2003-08-28 Kevin Ryde <user42@zip.com.au>
3992
3993 * gc.h (scm_remember_upto_here_1): Revise comments on the asm form.
3994
3995 2003-08-23 Kevin Ryde <user42@zip.com.au>
3996
3997 * simpos.c (scm_system): Remove SCM_DEFER_INTS, system() should be
3998 thread safe, and could take a long time too.
3999
4000 2003-08-22 Kevin Ryde <user42@zip.com.au>
4001
4002 * numbers.c (scm_difference): Correction to bignum - negative inum.
4003
4004 2003-08-14 Kevin Ryde <user42@zip.com.au>
4005
4006 * gc.h (scm_remember_upto_here_1, scm_remember_upto_here_2)
4007 [__GNUC__]: Use volatile asm macros rather than a function call.
4008 * gc.c (scm_remember_upto_here_1, scm_remember_upto_here_2): Undefine
4009 macros while defining functions.
4010
4011 * simpos.c (getenv): Use <stdlib.h> for prototype.
4012 (scm_system): In docstring, refer to status:exit-val rather than
4013 "functions above".
4014
4015 2003-08-09 Kevin Ryde <user42@zip.com.au>
4016
4017 * srcprop.c (scm_source_properties): Return plist from hash if it's a
4018 list set by source-properties! rather than an SRCPROPS object,
4019
4020 2003-07-29 Kevin Ryde <user42@zip.com.au>
4021
4022 * properties.c (scm_primitive_property_ref): In docstring, note
4023 parameters to not-found-proc, use hyphens rather than underscores for
4024 that parameter name.
4025 (scm_primitive_property_set_x): In docstring, VAL is the value
4026 parameter not CODE.
4027
4028 2003-07-27 Marius Vollmer <mvo@zagadka.de>
4029
4030 * print.c (scm_print_symbol_name): handle more weird characters by
4031 escaping the symbol name properly. Thanks to Paul Jarc!
4032
4033 * posix.h (scm_setgroups): New prototype.
4034 * posix.c (scm_setgroups): New. Thanks to Paul Jarc!
4035 (scm_getgroups): Handle groups ids that don't fit into a fixnum.
4036 Don't use SCM_WRITABLE_VELTS.
4037
4038 * gc.h (SCM_GC_SET_CELL_BVEC): New.
4039 * gc-card.c (scm_i_init_card_freelist): Use it. Thanks to
4040 Matthias Koeppe!
4041
4042 * __scm.h (SCM_C_INLINE_KEYWORD): New.
4043 * numbers.c: Use it in place of SCM_C_INLINE so that the code
4044 compiles when SCM_C_INLINE is undefined.
4045
4046 2003-07-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
4047
4048 * __scm.h: Reformulated the architecture and compiler properties
4049 in terms of properties of scm_t_bits and SCM variables rather than
4050 in terms of c standard types. This is since it is not known which
4051 of the standard types scm_t_bits and SCM variables will be defined
4052 to.
4053
4054 2003-07-24 Kevin Ryde <user42@zip.com.au>
4055
4056 * numbers.c (scm_angle): Use scm_flo0 for non-negative inum, bignum
4057 and real.
4058
4059 2003-07-18 Kevin Ryde <user42@zip.com.au>
4060
4061 * numbers.c (scm_product): In complex * bignum, correction to
4062 REAL/IMAG fetch, x is the complex, not y.
4063
4064 2003-07-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4065
4066 * numbers.c (scm_odd_p, scm_even_p): Bugfix: Treat result of
4067 scm_inf_p test as Scheme values.
4068 (scm_sum): Bugfix: Normalize bignum created from a negative bignum
4069 and a positive inum.
4070 Use GNU indentation style.
4071
4072 2003-07-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
4073
4074 * values.c (scm_values): Build lists of length 1 by using
4075 scm_list_1 instead of using scm_cons.
4076
4077 2003-07-10 Kevin Ryde <user42@zip.com.au>
4078
4079 * deprecation.c (scm_c_issue_deprecation_warning_fmt): Add va_end.
4080 * list.c (scm_list_n): Ditto.
4081
4082 * gc-malloc.c (scm_gc_realloc): Define "ptr" at start of function.
4083
4084 2003-07-08 Matthias Koeppe <mkoeppe@merkur.math.uni-magdeburg.de>
4085
4086 * tags.h (scm_t_bits, scm_t_signed_bits, etc): Avoid solaris empty
4087 defines of INTPTR_MAX and UINTPTR_MAX, combine conditionals for
4088 scm_t_bits and scm_t_signed_bits to avoid any chance of one and not
4089 the other using intptr_t.
4090
4091 2003-07-08 Kevin Ryde <user42@zip.com.au>
4092
4093 * numbers.c (scm_make_polar): Use sincos, when available.
4094 (scm_magnitude): Use hypot.
4095
4096 * ports.c (scm_char_ready_p, scm_peek_char): In docstrings, don't use
4097 @footnote since it doesn't go through to guile-procedures.txt.
4098
4099 * threads.c (scm_call_with_new_thread): In docstring, use "( )"
4100 outside @var to quieten makeinfo, and use @code.
4101
4102 2003-07-06 Han-Wen Nienhuys <hanwen@cs.uu.nl>
4103
4104 * gc-malloc.c (decrease_mtrigger): new function
4105 (increase_mtrigger): new function, separate debug registering and
4106 mtrigger administration.
4107 (scm_gc_realloc): bugfix: do mtrigger administration before the
4108 actual realloc, for the realloc might invalidate a GC-d segment of
4109 memory. Thanks to Sam Hocevar for pointing this out.
4110 (scm_gc_realloc): use scm_malloc_reregister instead of
4111 unregistering and registering in sequence.
4112
4113 2003-07-03 Han-Wen Nienhuys <hanwen@cs.uu.nl>
4114
4115 * __scm.h (SCM_ASSERT): change "else" expansion to "do { } while (0)"
4116
4117 2003-07-02 Han-Wen Nienhuys <hanwen@cs.uu.nl>
4118
4119 * __scm.h (SCM_ASRTGO): add "else" to macro expansions with if
4120 clauses.
4121
4122 2003-06-29 Marius Vollmer <mvo@zagadka.de>
4123
4124 * deprecated.h (SCM_OPDIRP, scm_fport, scm_option, scm_srcprops,
4125 scm_srcprops_chunk, scm_info_frame, scm_stack, scm_array,
4126 scm_array_dim, SCM_ARRAY_CONTIGUOUS, SCM_FUNC_NAME, SCM_WTA,
4127 RETURN_SCM_WTA, SCM_VALIDATE_NUMBER_COPY,
4128 SCM_VALIDATE_NUMBER_DEF_COPY, SCM_VALIDATE_OPDIR): Re-added from
4129 the release_1_6 branch.
4130
4131 2003-06-25 Stefan Jahn <stefan@lkcc.org>
4132
4133 * continuations.c: Redeclaration of getcontext() via the
4134 __asm__ ("getcontext") directive.
4135
4136 * continuations.h: Include <ucontext.h> instead of
4137 <sys/ucontext.h>.
4138
4139 2003-06-21 Kevin Ryde <user42@zip.com.au>
4140
4141 * numbers.c (_GNU_SOURCE): #define, to get C99 things.
4142 (scm_asinh, scm_acosh, scm_atanh, scm_truncate, $asinh, $acosh,
4143 $atanh, truncate): Use C library asinh, acosh, atanh and trunc, when
4144 available.
4145 (scm_inexact_to_exact): Expand isfinite to its definition !xisinf.
4146 (isfinite): Remove, conflicts with C99 isfinite().
4147
4148 2003-06-19 Marius Vollmer <mvo@zagadka.de>
4149
4150 * deprecated.h, deprecated.c (scm_strhash, scm_sym2ovcell_soft,
4151 scm_sym2ovcell, scm_intern_obarray_soft, scm_intern_obarray,
4152 scm_symbol_value0, scm_string_to_obarray_symbol scm_intern_symbol,
4153 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned_p,
4154 scm_symbol_bound_p, scm_symbol_set_x, scm_gentemp): Re-added from
4155 the release_1_6 branch.
4156
4157 2003-06-14 Stefan Jahn <stefan@lkcc.org>
4158
4159 * threads.h: Redefined scm_getspecific() and scm_setspecific()
4160 to be functions instead of macros.
4161
4162 * threads.c: Conditionalized inclusion of <sys/time.h> and
4163 <unistd.h>.
4164 (scm_getspecific, scm_setspecific): Made these two function
4165 real part of the API.
4166
4167 * posix.c (s_scm_putenv): Added some code to make a
4168 (putenv "FOO="), i.e. setting an empty string, work also on
4169 Win32 systems. Thanks to Kevin Ryde for the proposal.
4170
4171 2003-06-12 Kevin Ryde <user42@zip.com.au>
4172
4173 * posix.c (scm_putenv): Free temporary ptr in mingw unset. Add
4174 freebsd to comment about need to use unsetenv.
4175
4176 2003-06-02 Marius Vollmer <mvo@zagadka.de>
4177
4178 * ports.c (scm_peek_char): Safe the column of the port around the
4179 getc/ungetc calls. Thanks to Dr. Peter Ivanyi!
4180
4181 2003-06-07 Kevin Ryde <user42@zip.com.au>
4182
4183 * tags.h: Use inttypes.h and stdint.h when available, for INTPTR_MAX
4184 and friends required by scm_t_bits setups.
4185
4186 2003-06-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
4187
4188 * tags.h (scm_tc2_int): Added.
4189
4190 * tags.h (scm_tc3_int_1, scm_tc3_int_2): Expressed in terms of
4191 scm_tc2_int.
4192
4193 * tags.h (scm_tcs_cons_imcar, scm_tcs_cons_nimcar, scm_tcs_struct,
4194 scm_tcs_closures): Hard coded values replaced by symbolic ones.
4195
4196 2003-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
4197
4198 * eval.c: Partially undid my patch from 2003-05-31. This patch
4199 caused the segfault referenced in the previous changelog entry.
4200
4201 2003-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
4202
4203 * tags.h: Fixed comment about the immediate type code layout.
4204
4205 * eval.c: Fixed handling of non-special instructions. Without
4206 this patch, guile will segfault on (#\0) and similar instructions.
4207
4208 2003-06-05 Kevin Ryde <user42@zip.com.au>
4209
4210 * numbers.c (scm_max, scm_min): For inum, bignum and real, if other
4211 operand is NaN, then return NaN. Also avoid passing NaN to mpz_cmp_d.
4212
4213 * read.c (scm_input_error): Pass arg list parameter to scm_error_scm,
4214 rather than SCM_EOL. Needed by "Unknown # object" case in scm_lreadr.
4215
4216 2003-06-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
4217
4218 * __scm.h, gc-card.c (SCM_DEBUG_DEBUGGER_SUPPORT,
4219 SCM_DEBUG_DEBUGGING_SUPPORT): Renamed macro
4220 SCM_DEBUG_DEBUGGER_SUPPORT to SCM_DEBUG_DEBUGGING_SUPPORT and
4221 generalized it to apply not only to C level functions but also to
4222 scheme level functions.
4223
4224 * debug.c, debug.h, eval.c (make-iloc, scm_make_iloc, iloc?,
4225 scm_iloc_p, dbg-make-iloc, scm_dbg_make_iloc, dbg-iloc?,
4226 scm_dbg_iloc_p): Moved functions scm_make_iloc, scm_iloc_p to
4227 eval.c, made them available under SCM_DEBUG_DEBUGGING_SUPPORT == 1
4228 only and renamed them to scm_dbg_make_iloc, scm_dbg_iloc_p,
4229 respectively.
4230
4231 * deprecated.h, eval.c, eval.h (SCM_ILOC00, SCM_IDINC,
4232 SCM_IDSTMSK): Deprecated. The macro definitions are moved from
4233 eval.h into eval.c and a copy is placed into deprecated.h.
4234
4235 * eval.c, eval.h (SCM_MAKE_ILOC): Removed from eval.h and placed
4236 into eval.c. This definition was not part of the API in any
4237 officially released version of guile and thus does not need to go
4238 through a phase of deprecation.
4239
4240 2003-06-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
4241
4242 * deprecated.c, deprecated.h, eval.c, eval.h (scm_s_expression,
4243 scm_s_test, scm_s_body, scm_s_bindings, scm_s_variable,
4244 scm_s_clauses, scm_s_formals): Deprecated. In eval.c the
4245 definitions are make static and renamed from scm_s_xxx to s_xxx.
4246 In deprecated.c the original definitions are copied.
4247
4248 * deprecated.h, eval.c, eval (SCM_EVALIM2, SCM_EVALIM, SCM_XEVAL,
4249 SCM_XEVALCAR): Deprecated. The macro definitions are moved from
4250 eval.h into eval.c and a copy (slightly modified to work in user
4251 code) is placed into deprecated.h.
4252
4253 * eval.c: Use the local static s_xxx definitions instead of the
4254 scm_s_xxx definitions throughout.
4255
4256 2003-06-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
4257
4258 This set of patches separates the representation of the cxr family
4259 of functions (car, cdr etc.) from the dsubr family of functions
4260 (i. e. functions that take a double precision floating point
4261 argument). Further, the algorithm for handling the cxr function
4262 is improved.
4263
4264 * eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_1), numbers.c
4265 (scm_asinh, scm_acosh, scm_atanh, scm_truncate, scm_round, floor,
4266 ceil, sqrt, fabs, exp, log, sin, cos, tan, asin, acos, atan, sinh,
4267 cosh, tanh), objects.c (scm_class_of), procprop.c
4268 (scm_i_procedure_arity), ramap.c (scm_array_map_x), tags.h
4269 (scm_tc7_dsubr, scm_tcs_subrs): Introduce scm_tc7_dsubr as new
4270 typecode for the dsubr family of functions.
4271
4272 * ramap.c (ramap_cxr, ramap_dsubr): Renamed ramap_cxr to
4273 ramap_dsubr.
4274
4275 * eval.c (SCM_CEVAL, SCM_APPLY, call_cxr_1), pairs.c
4276 (scm_init_pairs): Make use of the (now usable) second cell element
4277 of a scm_tc7_cxr function to implement the cxr family of functions
4278 more efficiently.
4279
4280 2003-05-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
4281
4282 * eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_0,
4283 scm_trampoline_1, scm_trampoline_2): Postpone error cases to the
4284 end of an if-else-if-sequence of checks.
4285
4286 2003-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
4287
4288 * eval.c (SCM_CEVAL): Improved readability of call-with-values
4289 execution. Generalize apply_closure to apply_proc and use that
4290 for call-with-values.
4291
4292 2003-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
4293
4294 * eval.c (SCM_CEVAL): Avoid one level of indirection when applying
4295 a non closure.
4296
4297 2003-05-30 Stefan Jahn <stefan@lkcc.org>
4298
4299 * posix.c (s_scm_putenv): Use the new HAVE_UNSETENV
4300 appropriately for mingw32 hosts.
4301
4302 * numbers.h: Defining copysign(), isnan() and finite() to
4303 be prefixed by a single '_' for mingw32 hosts.
4304
4305 2003-05-30 Kevin Ryde <user42@zip.com.au>
4306
4307 * numbers.c (z_negative_one): New variable.
4308 (scm_init_numbers): Initialize it.
4309 (scm_logcount): Use it and mpz_hamdist to count zeros for negatives.
4310
4311 2003-05-29 Stefan Jahn <stefan@lkcc.org>
4312
4313 * win32-dirent.c: Use malloc() instead of scm_malloc().
4314
4315 * stime.c (s_scm_strftime): Add a type cast to avoid compiler
4316 warning.
4317
4318 * posix.c (s_scm_putenv): Disable use of unsetenv() for the
4319 mingw32 build.
4320
4321 * modules.c (s_scm_module_import_interface): Renamed local
4322 variable interface to _interface. Seems like 'interface'
4323 is a special compiler directive for the mingw32 compiler.
4324
4325 * mkstemp.c: Provide prototype to avoid compiler warning.
4326
4327 * load.c (s_scm_search_path): Fixed absolute and relative
4328 path detections for native Windows platforms.
4329
4330 * gc.h, threads.h: Export some more symbols using SCM_API (necessary
4331 to build on mingw32).
4332
4333 * gc-freelist.c ("s_scm_map_free_list",
4334 "s_scm_gc_set_debug_check_freelist_x"): Fixed use of FUNC_NAME.
4335
4336 * fports.c (fport_fill_input): Disable use of
4337 fport_wait_for_input() on Win32 platforms.
4338
4339 * filesys.c (s_scm_basename): Fixed __MINGW32__ code.
4340
4341 * Makefile.am: Modified some rules for cross compiling.
4342
4343 2003-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
4344
4345 * eval.c (SCM_CEVAL): In case of an application, all checks for a
4346 proper function object and the correct number of arguments are now
4347 performed in the application part of SCM_CEVAL.
4348
4349 (scm_badformalsp): Removed.
4350
4351 2003-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
4352
4353 * deprecated.c (scm_read_and_eval_x): Fixed C99-ism.
4354
4355 2003-05-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4356
4357 * num2integral.i.c (NUM2INTEGRAL): Avoid warning about conditional
4358 always being false by inserting preprocessor conditional. (Thanks
4359 to Bruce Korb.)
4360
4361 * __scm.h (SCM_STACK_PTR): New macro. (Cast argument through
4362 (void *) in order to avoid an aliasing warning; thanks to Bruce
4363 Korb.)
4364
4365 * stackchk.h (SCM_STACK_OVERFLOW_P): Use SCM_STACK_PTR.
4366
4367 * threads.c (suspend, launch_thread, scm_threads_mark_stacks): Use
4368 SCM_STACK_PTR.
4369
4370 * threads.c (scm_threads_mark_stacks): Bugfix: Changed
4371 thread->base --> t->base.
4372
4373 * eval.c (SCM_CEVAL): Don't cast argument of SCM_STACK_OVERFLOW_P.
4374
4375 2003-05-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4376
4377 * deprecated.h, deprecated.c (scm_makstr, scm_makfromstr,
4378 scm_variable_set_name_hint, scm_builtin_variable,
4379 scm_internal_with_fluids, scm_make_gsubr,
4380 scm_make_gsubr_with_generic, scm_create_hook, SCM_LIST0,
4381 SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5, SCM_LIST6,
4382 SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify, scm_sloppy_memq,
4383 scm_sloppy_memv, scm_sloppy_member, scm_read_and_eval_x,
4384 scm_subr_entry, SCM_SUBR_DOC, scm_make_subr,
4385 scm_make_subr_with_generic, scm_make_subr_opt,
4386 scm_call_catching_errors, scm_make_smob_type_mfpe,
4387 scm_set_smob_mfpe, scm_strprint_obj, scm_read_0str, scm_eval_0str,
4388 SCM_CHARS, SCM_UCHARS, SCM_LENGTH): Re-added from the release_1_6
4389 branch. Some have been slightly rewritten.
4390 (scm_i_object_chars, scm_i_object_length): New, to support
4391 SCM_CHARS, SCM_UCHARS, and SCM_LENTH.
4392
4393 2003-05-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
4394
4395 * eval.c (scm_m_do, unmemocopy, SCM_CEVAL): Reversed order of
4396 names and inits in the memoized code of do.
4397
4398 2003-05-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4399
4400 * c-tokenize.lex (yyget_lineno, yyget_in, yyget_out, yyget_leng,
4401 yyget_text, yyset_lineno, yyset_in, yyset_out, yyget_debug,
4402 yyset_debug, yylex_destroy): Added prototypes (otherwise we'll get
4403 a compilation error if error-on-warning is enabled).
4404
4405 2003-05-17 Marius Vollmer <mvo@zagadka.de>
4406
4407 * c-tokenize.lex: Gobble up complete lines after a '#'. This
4408 removes preprocessor directives from the snarfage that might
4409 otherwise confuse us. These directives appear when compiling with
4410 "-g3", for example.
4411
4412 2003-05-16 Han-Wen Nienhuys <hanwen@cs.uu.nl>
4413
4414 * ChangeLog: add my surname
4415
4416 * srcprop.c (scm_finish_srcprop): use
4417 scm_gc_register_collectable_memory()
4418 (scm_make_srcprops): idem.
4419
4420 2003-05-14 Han-Wen Nienhuys <hanwen@cs.uu.nl>
4421
4422 * gc-malloc.c (scm_gc_register_collectable_memory): avoid
4423 wrap-around for scm_mtrigger
4424 (scm_gc_register_collectable_memory): abort on overflowing
4425 scm_mallocated().
4426
4427 2003-05-13 Kevin Ryde <user42@zip.com.au>
4428
4429 * numbers.c (xmpz_cmp_d): New macro, handling infs if gmp doesn't.
4430 (scm_num_eq_p, scm_less_p, scm_max, scm_min): Use it.
4431
4432 2003-05-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4433
4434 * backtrace.c (scm_display_error_message): Introduced fancy
4435 printing with max level 7 and length 10. (Purpose: avoid printing
4436 gigantic objects in error messages.)
4437
4438 * print.c, print.h (scm_i_port_with_print_state): New function.
4439
4440 * print.c (scm_iprin1, scm_printer_apply,
4441 scm_port_with_print_state): Use scm_i_port_with_print_state.
4442 (scm_simple_format): Modified not to destroy print states.
4443 (print_state_mutex): New mutex.
4444 (scm_make_print_state, scm_free_print_state, scm_prin1):
4445 Lock/unlock print_state_mutex.
4446
4447 * deprecated.h (SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK):
4448 Use current names in definitions.
4449
4450 2003-05-10 Kevin Ryde <user42@zip.com.au>
4451
4452 * numbers.c (scm_num_eq_p, scm_less_p): Don't pass NaN to mpz_cmp_d.
4453
4454 * numbers.c (scm_integer_length): On negative bignums, adjust
4455 mpz_sizeinbase to account for it looking at absolute value where we
4456 want ones-complement.
4457
4458 * numbers.c (scm_gcd): In bignum/inum, don't pass yy==0 to mpz_gcd_ui
4459 since we're only using the ulong return value, and x might not fit.
4460
4461 2003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
4462
4463 * eval.c, eval.h, read.c, read.h (scm_sym_dot): Moved from eval to
4464 read. This will allow to make the definition in read.c static.
4465
4466 2003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
4467
4468 * eval.c, eval.h, evalext.c, evalext.h (scm_m_undefine): Moved
4469 from evalext to eval. This will allow to make some of the
4470 definitions in eval.c static.
4471
4472 2003-05-06 Kevin Ryde <user42@zip.com.au>
4473
4474 * numbers.c (scm_difference): In inum - bignum, handle negative inum.
4475 (scm_logcount): Use mpz_com, not mpz_neg.
4476
4477 2003-05-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
4478
4479 The purpose of this patch is to make guile's internal memoizers
4480 distinguishable from memoizing macros created on the scheme level
4481 or from user provided primitive memoizing macros. The reason is,
4482 that the internal memoizers are the only ones that are allowed to
4483 transform their scheme input into memoizer byte code, while all
4484 other memoizing macros may only transform scheme code into new
4485 scheme code.
4486
4487 To achieve this, a new macro type 'builtin-macro!' is introduced.
4488 Currently, 'builtin-macro!'s are handled as memoizing macros, but
4489 this will change when the memoizer and executor are separated.
4490
4491 * macros.[ch] (scm_i_makbimacro): New.
4492
4493 * macros.h (SCM_BUILTIN_MACRO_P): New.
4494
4495 * macros.c (macro_print, scm_macro_type): Support builtin-macro!s.
4496
4497 * eval.c, goops.c: All of guile's primitive memoizing macros are
4498 primitive builtin-macros now.
4499
4500 * eval.c (scm_macroexp, SCM_CEVAL): Make sure the primitive
4501 builtin-macros are handled equally to memoizing macros.
4502
4503 2003-05-04 Marius Vollmer <mvo@zagadka.de>
4504
4505 * throw.c (scm_ithrow): Remove "asm volatile" hack. It used to
4506 work around a bug in GCC 2.95.2 but is now a bug in itself.
4507
4508 2003-05-02 Marius Vollmer <mvo@zagadka.de>
4509
4510 * deprecated.h (scm_rstate, scm_rng, SCM_SLOPPY_CONSP,
4511 SCM_SLOPPY_NCONSP, scm_tc7_ssymbol, scm_tc7_msymbol,
4512 scm_tcs_symbols): New.
4513
4514 2003-04-30 Marius Vollmer <marius.vollmer@uni-dortmund.de>
4515
4516 * deprecated.h, deprecated.c (scm_protect_object,
4517 scm_unprotect_object, SCM_SETAND_CAR, SCM_SETOR_CAR,
4518 SCM_SET_AND_CDR, SCM_SET_OR_CDR, SCM_FREEP, SCM_NFREEP,
4519 SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16,
4520 SCM_GCCDR, scm_remember, scm_the_root_module, scm_make_module,
4521 scm_ensure_user_module, scm_load_scheme_module, scm_port,
4522 scm_ptob_descriptor, scm_port_rw_active,
4523 scm_close_all_ports_except): New.
4524
4525 * ports.c (scm_c_port_for_each): New function, mostly copied from
4526 scm_port_for_each.
4527 (scm_port_for_each): Reimplemented using scm_c_port_for_each.
4528 * ports.h (scm_c_port_for_each): New prototype.
4529
4530 2003-04-28 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4531
4532 * eval.c (scm_m_atdispatch): Removed until actually needed. (This
4533 macro was introduced in anticipation of GOOPS method compilation
4534 code.)
4535
4536 * goops.c: Removed binding of @dispatch.
4537
4538 2003-04-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
4539
4540 * eval.c, goops.c (@dispatch, @slot-ref, @slot-set!): Move the
4541 instructions that bind the macros on the scheme level back to
4542 goops.c in order to make sure again that the bindings go into the
4543 (oop goops) module and are not visible from the outside.
4544
4545 2003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
4546
4547 * eval.c: Non functional change: Separated R5RS and non-R5RS
4548 macros into different sections of the file and ordered the
4549 memoizers alphabetically.
4550
4551 2003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
4552
4553 * eval.c (scm_ilookup): Rewritten to improve readability.
4554
4555 2003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
4556
4557 * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2):
4558 Partially reverted patch from 2003-04-23 in oder to find a better
4559 compromise between readability and debuggability.
4560
4561 2003-04-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
4562
4563 * eval.c, eval.h, goops.c, goops.h (scm_m_atslot_ref,
4564 scm_m_atslot_set_x, scm_m_atdispatch): Move the declarations and
4565 definitions of the special goops memoizers from goops.[ch] to
4566 eval.[ch]. Hmm... it seems that scm_m_atdispatch is not used
4567 throughout guile.
4568
4569 2003-04-24 Mikael Djurfeldt <mdj@kvast.blakulla.net>
4570
4571 * ports.c, ports.h (scm_i_port_table_mutex): New mutex.
4572
4573 * fports.c (scm_evict_ports): Lock/unlock scm_i_port_table_mutex.
4574
4575 * ports.c (scm_close_port, scm_flush_all_ports): Ditto.
4576
4577 * ioext.c (scm_fdes_to_ports): Ditto.
4578
4579 * vports.c (scm_make_soft_port): Changed SCM_DEFER/ALLOW_INTS into
4580 lock/unlock scm_i_port_table_mutex.
4581
4582 * strports.c (scm_mkstrport): Ditto.
4583
4584 * ports.c (scm_void_port, scm_port_for_each): Ditto.
4585
4586 * fports.c (scm_fdes_to_port): Ditto.
4587
4588 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
4589
4590 This set of patches contains no functional changes, only debatable
4591 minor stylistic ones. Still, in order to prepare a patch between
4592 my local copy and the CVS version, I decided to submit the changes
4593 below. Then, the patch will hopefully only contain relevant
4594 modifications :-)
4595
4596 * eval.c (iqq): Added const specifier.
4597
4598 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
4599 Use NULL instead of 0 to indicate that a pointer is returned.
4600 Removed some misleading 'fall through' comments.
4601
4602 * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2):
4603 Split up long expressions into smaller ones to be more debugging
4604 friendly.
4605
4606 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
4607
4608 * eval.h (SCM_ENTER_FRAME_HDLR, SCM_APPLY_FRAME_HDLR,
4609 SCM_EXIT_FRAME_HDLR): Use SCM_PACK to convert data to a SCM value
4610 rather than casting to SCM.
4611
4612 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
4613
4614 * sort.c, pairs.h: Removed unnecessary includes.
4615
4616 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
4617
4618 * sort.c: Replaced hand-made trampline code by the new official
4619 mechanism from eval.c. This fixes a segfault in the new test file
4620 sort.test.
4621
4622 (quicksort, compare_function, scm_restricted_vector_sort_x,
4623 scm_sorted_p, scm_merge, scm_merge_list_x, scm_merge_x,
4624 scm_merge_list_step, scm_sort_x, scm_sort, scm_merge_vector_x,
4625 scm_merge_vector_step, scm_stable_sort_x, scm_stable_sort,
4626 scm_sort_list_x, scm_sort_list): Use trampoline mechanism from
4627 eval.c.
4628
4629 (subr2less, lsubrless, closureless, applyless, scm_cmp_function,
4630 cmp_fun_t): Removed.
4631
4632 (compare_function): Added.
4633
4634 * sort.c (quicksort, SWAP, stack_node): Replaced pointer
4635 arithmetics with index arithmetics. Changed quicksort to work on
4636 an array of SCM values instead of an array of characters. Avoid
4637 bytewise copying of SCM elements. Avoid allocating memory on the
4638 stack with alloca. Fixed some comments.
4639
4640 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
4641
4642 * eval.c (EXTEND_ENV): Eliminated.
4643
4644 (unmemocopy, SCM_CEVAL, SCM_APPLY): Use SCM_EXTEND_ENV instead of
4645 EXTEND_ENV.
4646
4647 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
4648
4649 * __scm.h (SCM_DEBUG_DEBUGGER_SUPPORT): New compile-time option.
4650
4651 * gc.card.c (scm_gc_marked_p): Fixed compiler warning when
4652 compiling with SCM_DEBUG==1 by moving definition behind prototype.
4653
4654 * gc.card.c (scm_dbg_t_list_cell, scm_dbg_t_double_cell,
4655 scm_dbg_gc_marked_p, scm_dbg_gc_get_card, scm_dbg_gc_get_bvec,
4656 scm_t_list_cell_struct, scm_t_list_cell, scm_t_double_cell,
4657 scm_gc_marked_p, scm_gc_get_card, scm_gc_get_bvec): Fixed
4658 functions such that they check if the object is a non-immediate.
4659 Further, renamed identifiers to use the scm_dbg_ prefix and made
4660 their inclusion into the lib dependent of the
4661 SCM_DEBUG_DEBUGGER_SUPPORT compile time option.
4662
4663 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
4664
4665 * __scm.h: Fixed comment about the SCM_DEBUG_TYPING_STRICTNESS
4666 debug option.
4667
4668 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
4669
4670 * list.c (scm_ilength, scm_last_pair), unif.c (l2ra): Prefer
4671 !SCM_CONSP over SCM_NCONSP. Now, guile itself does not include
4672 any calls to SCM_NCONSP any more.
4673
4674 * unif.c (l2ra): Eliminate redundant check.
4675
4676 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
4677
4678 * list.c (scm_cons_star), ramap.c (scm_ra_sum, scm_ra_product,
4679 scm_array_map_x), unif.c (l2ra): Prefer !SCM_NULLP over
4680 SCM_NNULLP. Now, guile itself does not include any calls to
4681 SCM_NNULLP any more.
4682
4683 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
4684
4685 * eval.c (unmemocopy, SCM_APPLY, scm_map, scm_for_each,
4686 scm_copy_tree): Place assignment expressions which are part of
4687 other expressions into an expression of their own.
4688
4689 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
4690
4691 * goops.c (TEST_CHANGE_CLASS, scm_sys_initialize_object): Don't
4692 compare SCM values with !=.
4693
4694 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
4695
4696 * eval.c, eval.h, evalext.c, evalext.h (scm_sym_setter,
4697 scm_m_generalized_set_x, scm_init_evalext): Move the declaration
4698 and definition of the memoizer for the generalized set! macro from
4699 evalext.[ch] to eval.[ch]. Use the SCM_SYNTAX snarfer macro to
4700 define the macro object.
4701
4702 * eval.c, eval.h (s_set_x, scm_s_set_x, scm_m_set_x,
4703 scm_m_generalized_set_x): Since now scm_s_set_x is only used in
4704 eval.c, it is made static and renamed to s_set_x.
4705
4706 * evalext.c (scm_defined_p, scm_m_undefine): Prefer !SCM_<foo>
4707 over SCM_N<foo>.
4708
4709 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
4710
4711 * eval.c, root.h (scm_undefineds, SCM_NUM_PROTECTS, undefineds,
4712 scm_init_eval): Made scm_undefineds static in eval.c, renamed it
4713 to undefineds and registered the object as a permanent object.
4714
4715 * eval.c, eval.h (scm_f_apply, scm_init_eval): Made scm_f_apply
4716 static in eval.c, renamed it to f_apply and registered the object
4717 as a permanent object.
4718
4719 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
4720
4721 * eval.c (SCM_BIT7, SCM_BIT8, unmemocopy, SCM_CEVAL): Renamed
4722 file-local macro SCM_BIT8 to SCM_BIT7, which is more appropriate.
4723
4724 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
4725
4726 * numbers.c (scm_logtest): Fixed argument bug in the call to
4727 mpz_and, which showed up when compiling with SCM_DEBUG defined.
4728
4729 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
4730
4731 * gc-card.c (scm_i_sweep_card, scm_i_init_card_freelist): Fixed
4732 type errors that showed up when compiling with SCM_DEBUG defined.
4733
4734 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
4735
4736 * continuations.c, continuations.h, eval.c, eval.h, extensions.c,
4737 gsubr.c, guile.c, init.c, read.c, root.c, root.h, stackchk.h,
4738 throw.c: Removed uses of DEBUG_EXTENSIONS and DYNAMIC_LINKING to
4739 fix compile errors with --disable-deprecated.
4740
4741 2003-04-17 Rob Browning <rlb@defaultvalue.org>
4742
4743 * numbers.c (scm_integer_expt): fix case where we were declaring
4744 vars in the middle of a statement block. Thanks to Thamer
4745 Al-Harbash.
4746
4747 2003-04-17 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4748
4749 * goops.c (TEST_CHANGE_CLASS): Update variable class after class
4750 change.
4751
4752 * eq.c (scm_eqv_p): Turned into a primitive generic.
4753
4754 2003-04-16 Rob Browning <rlb@defaultvalue.org>
4755
4756 * gc_os_dep.c: Added patch for UnixWare and OpenUNIX support.
4757 Thanks to Boyd Gerber.
4758 Added check for __arm__ in addition to arm for LINUX and copied
4759 __s390__ defines from upstream libgc. Thanks to James Treacy for
4760 reporting the problems.
4761
4762 * numbers.c (PTRDIFF_MIN): use SCM_CHAR_BIT.
4763
4764 * socket.c: use SCM_CHAR_BIT.
4765
4766 * random.c (scm_c_random_bignum): use SCM_CHAR_BIT.
4767
4768 * num2integral.i.c (NUM2INTEGRAL): use SCM_CHAR_BIT.
4769
4770 2003-04-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
4771
4772 * feature.c (scm_init_feature): Always add threads feature.
4773
4774 2003-04-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4775
4776 * goops.c (scm_sys_fast_slot_ref): Use SCM_SLOT instead of
4777 scm_at_assert_bound_ref. (We don't want the unbound check. See
4778 oop/goops/active-slot.scm.)
4779
4780 2003-04-14 Rob Browning <rlb@defaultvalue.org>
4781
4782 * tags.h: scm_t_intptr should have been intptr_t.
4783
4784 2003-04-13 Rob Browning <rlb@defaultvalue.org>
4785
4786 * __scm.h (SCM_FLUSH_REGISTER_WINDOWS): don't just rely on "sparc"
4787 test. Instead use
4788 #if defined (sparc) || defined (__sparc__) || defined (__sparc)
4789 as gc_os_dep.c suggests is appropriate.
4790
4791 * goops.c (prep_hashsets): make static to match prototype.
4792 (scm_sym_args): SCM_SYMBOL -> SCM_GLOBAL_SYMBOL. Thanks to Albert
4793 Chin.
4794
4795 * c-tokenize.lex: remove trailing comma from enum. Thanks to
4796 Albert Chin.
4797
4798 * gc_os_dep.c: add NetBSD powerpc config info. Thanks to Thomas
4799 Klausner.
4800
4801 2003-04-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4802
4803 * goops.c (scm_sys_prep_layout_x): Instance allocation is now
4804 indicated through extra fields in getters-n-setters.
4805 (scm_add_slot): Adapted to new format of getters_n_setters slot.
4806 (Thanks to Andy Wingo.)
4807
4808 2003-02-25 Han-Wen Nienhuys <hanwen@cs.uu.nl>
4809
4810 * gc-segment.c: add comment
4811
4812 2003-04-07 Rob Browning <rlb@defaultvalue.org>
4813
4814 * debug.h: change "id" arg name to "info_id" to avoid objective-c
4815 clash.
4816
4817 * num2integral.i.c (NUM2INTEGRAL): fix bug pointed out by Mikael
4818 and add regression test to standalone/.
4819
4820 2003-04-06 Rob Browning <rlb@defaultvalue.org>
4821
4822 * strings.c (scm_mem2string): use memcpy rather than by-hand loop.
4823 Thanks to Dale P. Smith.
4824
4825 * random.c: #include gmp.h.
4826 (scm_c_random_bignum): normalize result on return.
4827
4828 * init.c: #include gmp.h.
4829
4830 * numbers.h: remove the gmp.h #include (not needed now).
4831
4832 * posix.h: change occurences of "id" to something else so we don't
4833 cause trouble when included via objective-c (can't hurt, might
4834 help). Still have usage in debug.h, though.
4835
4836 2003-04-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4837
4838 * random.c (scm_c_random_bignum): Don't generate a random number
4839 equal to m (the second argument of scm_c_random_bignum); only
4840 generate numbers in the range 0 <= r < m.
4841 (scm_c_default_rstate): Use SCM_VARIABLE_REF to access
4842 scm_var_random_state.
4843
4844 * num2integral.i.c (INTEGRAL2BIG): Put negation of n inside then
4845 clause.
4846
4847 2003-04-05 Rob Browning <rlb@defaultvalue.org>
4848
4849 * modules.c (scm_module_import_interface): move declaration of
4850 uses before any code.
4851
4852 2003-04-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
4853
4854 * Makefile.am (scmconfig.h): Look for config.h in top_builddir,
4855 not top_srcdir.
4856
4857 * hashtab.c (rehash_after_gc): Clear to_rehash list before
4858 processing it in order to avoid an infinite loop.
4859
4860 * print.c (scm_prin1): Remember old state of pstate->writingp.
4861
4862 2003-04-05 Marius Vollmer <mvo@zagadka.de>
4863
4864 * Changed license terms to the plain LGPL thru-out.
4865
4866 2003-04-04 Rob Browning <rlb@defaultvalue.org>
4867
4868 * socket.c (FLIPCPY_NET_HOST_128): new macro.
4869 (ipv6_net_to_num, ipv6_num_to_net, bignum_in_ipv6_range_p):
4870 rewrite to handle GMP bignums.
4871
4872
4873 * random.c (scm_c_random_bignum): rewrite to handle GMP bignums.
4874
4875 * ports.c (scm_getc): minor tweak.
4876
4877 * numbers.h: remove SCM_BIGDIG conditionals, reorganize, and
4878 rewrite to handle GMP bignums.
4879
4880 * numbers.c: rewrite *many* functions to handle GMP bignums.
4881
4882 * num2integral.i.c (NUM2INTEGRAL, INTEGRAL2NUM, INTEGRAL2BIG):
4883 handle GMP bignums.
4884
4885 * num2float.i.c (NUM2FLOAT): handle GMP bignums.
4886
4887 * init.c (check_config): remove SCM_BIGDIG conditionals.
4888 (scm_init_guile_1): test to make sure mpz_t fits in a double_cell.
4889
4890 * gc-card.c ("sweep_card"): handle new mpz_t bignums.
4891
4892 * eval.c: remove SCM_BIGDIG conditionals.
4893
4894 * eq.c (s_scm_eqv_p): scm_i_bigcomp -> scm_i_bigcmp.
4895
4896 2003-03-31 Rob Browning <rlb@defaultvalue.org>
4897
4898 * Makefile.am (scmconfig.h): change srcdir to builddir. (Thanks
4899 to Kevin Ryde.)
4900
4901 2003-03-27 Rob Browning <rlb@defaultvalue.org>
4902
4903 * threads.h: fix various preprocessor usages of new public
4904 symbols to expect 0 or 1 values rather than 1 or undefined.
4905 i.e. change #ifdef to #if, etc.
4906
4907 * threads.c: fix various preprocessor usages of new public
4908 symbols to expect 0 or 1 values rather than 1 or undefined.
4909 i.e. change #ifdef to #if, etc.
4910
4911 * tags.h: fix various preprocessor usages of new public
4912 symbols to expect 0 or 1 values rather than 1 or undefined.
4913 i.e. change #ifdef to #if, etc.
4914
4915 * stacks.c: fix various preprocessor usages of new public
4916 symbols to expect 0 or 1 values rather than 1 or undefined.
4917 i.e. change #ifdef to #if, etc.
4918
4919 * stackchk.h: fix various preprocessor usages of new public
4920 symbols to expect 0 or 1 values rather than 1 or undefined.
4921 i.e. change #ifdef to #if, etc.
4922
4923 * stackchk.c: fix various preprocessor usages of new public
4924 symbols to expect 0 or 1 values rather than 1 or undefined.
4925 i.e. change #ifdef to #if, etc.
4926
4927 * sort.c: fix various preprocessor usages of new public
4928 symbols to expect 0 or 1 values rather than 1 or undefined.
4929 i.e. change #ifdef to #if, etc.
4930
4931 * read.c: fix various preprocessor usages of new public
4932 symbols to expect 0 or 1 values rather than 1 or undefined.
4933 i.e. change #ifdef to #if, etc.
4934
4935 * random.c: fix various preprocessor usages of new public
4936 symbols to expect 0 or 1 values rather than 1 or undefined.
4937 i.e. change #ifdef to #if, etc.
4938
4939 * print.c: fix various preprocessor usages of new public
4940 symbols to expect 0 or 1 values rather than 1 or undefined.
4941 i.e. change #ifdef to #if, etc.
4942
4943 * objects.c: fix various preprocessor usages of new public
4944 symbols to expect 0 or 1 values rather than 1 or undefined.
4945 i.e. change #ifdef to #if, etc.
4946
4947 * numbers.h: fix various preprocessor usages of new public
4948 symbols to expect 0 or 1 values rather than 1 or undefined.
4949 i.e. change #ifdef to #if, etc.
4950
4951 * null-threads.c: fix various preprocessor usages of new public
4952 symbols to expect 0 or 1 values rather than 1 or undefined.
4953 i.e. change #ifdef to #if, etc.
4954
4955 * lang.c: fix various preprocessor usages of new public
4956 symbols to expect 0 or 1 values rather than 1 or undefined.
4957 i.e. change #ifdef to #if, etc.
4958
4959 * lang.h: fix various preprocessor usages of new public
4960 symbols to expect 0 or 1 values rather than 1 or undefined.
4961 i.e. change #ifdef to #if, etc.
4962
4963 * iselect.h: fix various preprocessor usages of new public
4964 symbols to expect 0 or 1 values rather than 1 or undefined.
4965 i.e. change #ifdef to #if, etc.
4966
4967 * init.c: fix various preprocessor usages of new public
4968 symbols to expect 0 or 1 values rather than 1 or undefined.
4969 i.e. change #ifdef to #if, etc.
4970
4971 * gh_data.c: fix various preprocessor usages of new public
4972 symbols to expect 0 or 1 values rather than 1 or undefined.
4973 i.e. change #ifdef to #if, etc.
4974
4975 * gh.h: fix various preprocessor usages of new public
4976 symbols to expect 0 or 1 values rather than 1 or undefined.
4977 i.e. change #ifdef to #if, etc.
4978
4979 * gen-scmconfig.c: change most new public symbols to be defined to
4980 0 or 1 rather than being either 1 or undefined.
4981
4982 * gc_os_dep.c: fix various preprocessor usages of new public
4983 symbols to expect 0 or 1 values rather than 1 or undefined.
4984 i.e. change #ifdef to #if, etc.
4985 (STACK_GROWS_DOWN): define to 0 or 1 rather than 1 or undef.
4986
4987 * gc.h: fix various preprocessor usages of new public
4988 symbols to expect 0 or 1 values rather than 1 or undefined.
4989 i.e. change #ifdef to #if, etc.
4990
4991 * gc-card.c: fix various preprocessor usages of new public
4992 symbols to expect 0 or 1 values rather than 1 or undefined.
4993 i.e. change #ifdef to #if, etc.
4994
4995 * gc-mark.c: fix various preprocessor usages of new public
4996 symbols to expect 0 or 1 values rather than 1 or undefined.
4997 i.e. change #ifdef to #if, etc.
4998
4999 * feature.c: fix various preprocessor usages of new public
5000 symbols to expect 0 or 1 values rather than 1 or undefined.
5001 i.e. change #ifdef to #if, etc.
5002
5003 * evalext.c: fix various preprocessor usages of new public
5004 symbols to expect 0 or 1 values rather than 1 or undefined.
5005 i.e. change #ifdef to #if, etc.
5006
5007 * eval.h: fix various preprocessor usages of new public
5008 symbols to expect 0 or 1 values rather than 1 or undefined.
5009 i.e. change #ifdef to #if, etc.
5010
5011 * eval.c: fix various preprocessor usages of new public
5012 symbols to expect 0 or 1 values rather than 1 or undefined.
5013 i.e. change #ifdef to #if, etc.
5014
5015 * eq.c: fix various preprocessor usages of new public
5016 symbols to expect 0 or 1 values rather than 1 or undefined.
5017 i.e. change #ifdef to #if, etc.
5018
5019 * coop.c: fix various preprocessor usages of new public
5020 symbols to expect 0 or 1 values rather than 1 or undefined.
5021 i.e. change #ifdef to #if, etc.
5022
5023 * coop-threads.c: fix various preprocessor usages of new public
5024 symbols to expect 0 or 1 values rather than 1 or undefined.
5025 i.e. change #ifdef to #if, etc.
5026
5027 * coop-pthreads.c: fix various preprocessor usages of new public
5028 symbols to expect 0 or 1 values rather than 1 or undefined.
5029 i.e. change #ifdef to #if, etc.
5030
5031 * coop-defs.h: fix various preprocessor usages of new public
5032 symbols to expect 0 or 1 values rather than 1 or undefined.
5033 i.e. change #ifdef to #if, etc.
5034
5035 * convert.i.c: fix various preprocessor usages of new public
5036 symbols to expect 0 or 1 values rather than 1 or undefined.
5037 i.e. change #ifdef to #if, etc.
5038
5039 * continuations.c: fix various preprocessor usages of new public
5040 symbols to expect 0 or 1 values rather than 1 or undefined.
5041 i.e. change #ifdef to #if, etc.
5042
5043 * _scm.h: fix various preprocessor usages of new public symbols to
5044 expect 0 or 1 values rather than 1 or undefined. i.e. change
5045 #ifdef to #if, etc.
5046
5047 2003-03-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
5048
5049 * init.c (scm_init_guile_1): Call scm_i_init_deprecated.
5050
5051 * deprecated.c, deprecated.h: New files, to collect deprecated
5052 things in one place.
5053 * Makefile.am: Added them in all the right places.
5054
5055 * Makefile.am (EXTRA_DIST): Added "scmconfig.h.top".
5056 (scmconfig.h): Get "scmconfig.h.top" from $(srcdir) so that VPATH
5057 builds work.
5058 (DOT_X_FILES): Removed "iselect.x".
5059 (DOT_DOC_FILES): Removed "iselect.doc".
5060
5061 2003-03-25 Rob Browning <rlb@defaultvalue.org>
5062
5063 * win32-socket.h: #include "libguile/__scm.h". Replace usage of
5064 HAVE_WINSOCK2_H with SCM_HAVE_WINSOCK2_H.
5065
5066 * win32-socket.c: #include <config.h> if HAVE_CONFIG_H.
5067
5068 * vports.c: #include <config.h> if HAVE_CONFIG_H.
5069
5070 * unif.c: #include <config.h> if HAVE_CONFIG_H. Replace usage of
5071 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
5072
5073 * threads.h: replace usage of struct timespect with
5074 scm_t_timespec. Replace usage of USE_PTHREAD_THREADS with
5075 SCM_USE_PTHREAD_THREADS. Remove typedef for struct timespec in
5076 favor of scm_t_timespec from scmconfig.h.
5077
5078 * threads.c: move libguile/_scm.h include to the top so we pick up
5079 any critical defines like _GNU_SOURCE early. Replace usage of
5080 struct timespect with scm_t_timespec. Replace usage of
5081 STACK_GROWS_UP with SCM_STACK_GROWS_UP. Replace usage of
5082 USE_PTHREAD_THREADS with SCM_USE_PTHREAD_THREADS.
5083
5084 * threads-plugin.h: replace usage of struct timespect with
5085 scm_t_timespec.
5086
5087 * threads-plugin.c: #include <config.h> if HAVE_CONFIG_H. Replace
5088 usage of struct timespect with scm_t_timespec.
5089
5090 * tags.h: move HAVE_STDINT_H handling to scmconfig.h. Move
5091 HAVE_INTTYPES_H handling to scmconfig.h. #include
5092 "libguile/__scm.h". Rework handling for scm_t_bits,
5093 scm_t_signed_bits, SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
5094 SCM_T_SIGNED_BITS_MIN, and SIZEOF_SCM_T_BITS to use scm_t_intptr,
5095 scm_t_uintptr, SCM_SIZEOF_INTPTR_T, and SCM_SIZEOF_UINTPTR_T, and
5096 SCM_SIZEOF_UNSIGNED_LONG. Rename usage of HAVE_ARRAYS to
5097 SCM_HAVE_ARRAYS.
5098
5099 * symbols.c: #include <config.h> if HAVE_CONFIG_H.
5100
5101 * struct.c: #include <config.h> if HAVE_CONFIG_H.
5102
5103 * strports.c: #include <config.h> if HAVE_CONFIG_H.
5104
5105 * strop.c: #include <config.h> if HAVE_CONFIG_H.
5106
5107 * stime.h: move handling of time related headers to scmconfig.h.
5108
5109 * stime.c: #include <config.h> if HAVE_CONFIG_H.
5110
5111 * stacks.c: replace usage of STACK_GROWS_UP with
5112 SCM_STACK_GROWS_UP.
5113
5114 * sort.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
5115 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5116
5117 * socket.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
5118 of uint32 and HAVE_UINT_32 with scm_t_int32.
5119
5120 * smob.c: #include <config.h> if HAVE_CONFIG_H.
5121
5122 * simpos.c: #include <config.h> if HAVE_CONFIG_H.
5123
5124 * script.c: #include <config.h> if HAVE_CONFIG_H.
5125
5126 * scmsigs.c: #include <config.h> if HAVE_CONFIG_H.
5127
5128 * scmconfig.h.top: new file -- preamble for scmconfig.h.
5129
5130 * rw.c: #include <config.h> if HAVE_CONFIG_H.
5131
5132 * regex-posix.c: #include <config.h> if HAVE_CONFIG_H.
5133
5134 * read.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5135
5136 * rdelim.c: #include <config.h> if HAVE_CONFIG_H.
5137
5138 * random.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
5139 of LONG32, LONG64, SIZEOF_LONG, and HAVE_LONG_LONGS with
5140 scm_t_int32, scm_t_int64, and SCM_HAVE_T_INT64. Rename usage of
5141 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5142
5143 * ramap.c: replace usage of HAVE_LONG_LONGS with
5144 "SCM_SIZEOF_LONG_LONG != 0".
5145
5146 * putenv.c: #include <config.h> if HAVE_CONFIG_H. #include
5147 "libguile/scmconfig.h".
5148
5149 * pthread-threads.c: #include <config.h> if HAVE_CONFIG_H.
5150
5151 * print.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5152 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
5153
5154 * posix.c: #include <config.h> if HAVE_CONFIG_H.
5155
5156 * ports.c: #include <config.h> if HAVE_CONFIG_H.
5157
5158 * objects.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5159
5160 * numbers.h: replace usage of HAVE_FLOATINGPOINT_H with
5161 SCM_HAVE_FLOATINGPOINT_H. Replace usage of HAVE_IEEEFP_H with
5162 SCM_HAVE_IEEEFP_H. Replace usage of HAVE_NAN_H with
5163 SCM_HAVE_NAN_H. Replace usage of STDC_HEADERS with
5164 SCM_HAVE_STDC_HEADERS. Replace usage of ptrdiff_t with
5165 scm_t_ptrdiff. Replace usage of HAVE_LONG_LONGS with
5166 "SCM_SIZEOF_LONG_LONG != 0".
5167
5168 * numbers.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
5169 of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0". Replace
5170 usage of ptrdiff_t with scm_t_ptrdiff. Replace usage of
5171 SIZEOF_PTRDIFF_T with SCM_SIZEOF_SCM_T_PTRDIFF.
5172
5173 * num2integral.i.c: #include <config.h> if HAVE_CONFIG_H.
5174
5175 * null-threads.h: replace usage of struct timespect with
5176 scm_t_timespec.
5177
5178 * net_db.c: #include <config.h> if HAVE_CONFIG_H.
5179
5180 * mkstemp.c: #include <config.h> if HAVE_CONFIG_H. #include
5181 "libguile/__scm.h". Remove definition of gcc_uint64_t in favor of
5182 scm_t_uint64 and rename usages.
5183
5184 * mallocs.c: #include <config.h> if HAVE_CONFIG_H.
5185
5186 * load.c: #include <config.h> if HAVE_CONFIG_H.
5187
5188 * iselect.h: move handling of time related headers to scmconfig.h.
5189 Rename usage of HAVE_SYS_SELECT_H to SCM_HAVE_SYS_SELECT_H.
5190 Rename usage of HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Rename
5191 usage of USE_COOP_THREADS to SCM_USE_COOP_THREADS.
5192
5193 * iselect.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
5194 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
5195 USE_NULL_THREADS to SCM_USE_NULL_THREADS.
5196
5197 * ioext.c: #include <config.h> if HAVE_CONFIG_H.
5198
5199 * inline.h: #include "libguile/__scm.h" at the top. Change code
5200 to use SCM_C_INLINE and SCM_INLINE_C_INCLUDINT_INLINE_H to decide
5201 what to do instead of creating a new public #define. Rename usage
5202 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
5203 USE_NULL_THREADS to SCM_USE_NULL_THREADS. Rename usage of
5204 USE_COPT_THREADS to SCM_USE_COPT_THREADS.
5205
5206 * inline.c: rearrange handling -- now we just #define
5207 SCM_INLINE_C_INCLUDING_INLINE_H to 1 and #include
5208 "libguile/inline.h". scmconfig.h will define SCM_C_INLINE as
5209 appropriate, and we use that in inline.h along with the above
5210 define to determine how to respond.
5211
5212 * init.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
5213 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5214
5215 * guile.c: #include <config.h> if HAVE_CONFIG_H.
5216
5217 * gh_data.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
5218 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5219
5220 * gh.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5221
5222 * gen-scmconfig.h.in: new file -- see gen-scmconfig.c for details.
5223
5224 * gen-scmconfig.c: new file -- see comments in file for details.
5225
5226 * gdbinit.c: #include <config.h> if HAVE_CONFIG_H.
5227
5228 * gc_os_dep.c: #include <config.h> if HAVE_CONFIG_H. Replace
5229 usage of STACK_GROWS_UP with SCM_STACK_GROWS_UP.
5230
5231 * gc.h: replace usage of SIZEOF_LONG with
5232 SCM_SIZEOF_UNSIGNED_LONG. Replace usage of USE_PTHREAD_THREADS
5233 with SCM_USE_PTHREAD_THREADS. Remove SCM_SIZEOF_LONG definition
5234 since we handle that in scmconfig.h now.
5235
5236 * gc.c: #include <config.h> if HAVE_CONFIG_H.
5237
5238 * gc-mark.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
5239 of HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of
5240 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
5241
5242 * gc-malloc.c: #include <config.h> if HAVE_CONFIG_H.
5243
5244 * gc-card.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5245 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
5246
5247 * fports.c: #include <config.h> if HAVE_CONFIG_H.
5248
5249 * filesys.c: #include <config.h> if HAVE_CONFIG_H.
5250
5251 * feature.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
5252 of USE_NULL_THREADS to SCM_USE_NULL_THREADS.
5253
5254 * extensions.c: #include <config.h> if HAVE_CONFIG_H.
5255
5256 * evalext.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5257 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
5258
5259 * eval.c: #include <config.h> if HAVE_CONFIG_H. #include
5260 "libguile/__scm.h" rather than scmconfig.h. Rename usage of
5261 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
5262 with "SCM_SIZEOF_LONG_LONG != 0".
5263
5264 * error.c: #include <config.h> if HAVE_CONFIG_H.
5265
5266 * eq.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
5267 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
5268 with "SCM_SIZEOF_LONG_LONG != 0".
5269
5270 * deprecation.c: #include <config.h> if HAVE_CONFIG_H.
5271
5272 * coop.c: replace usage of struct timespect with scm_t_timespec.
5273 #include <config.h> if HAVE_CONFIG_H.
5274
5275 * coop-threads.c: #include "libguile/_scm.h" early. Replace
5276 usage of struct timespect with scm_t_timespec. Replace usage of
5277 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
5278
5279 * coop-pthreads.c: #include "libguile/_scm.h" early. Replace
5280 usage of struct timespect with scm_t_timespec. Replace usage of
5281 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
5282
5283 * coop-defs.h: move handling of time related headers to
5284 scmconfig.h. Add #include "libguile/__scm.h". Rename usage of
5285 HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Replace usage of struct
5286 timespect with scm_t_timespec.
5287
5288 * convert.i.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5289
5290 * convert.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5291
5292 * convert.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
5293 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
5294
5295 * continuations.c: move libguile/_scm.h include to the top so we
5296 pick up any critical defines like _GNU_SOURCE early.
5297
5298 * backtrace.c: #include <config.h> if HAVE_CONFIG_H.
5299
5300 * async.c: #include <config.h> if HAVE_CONFIG_H.
5301
5302 * alloca.c: #include <config.h> if HAVE_CONFIG_H.
5303
5304 * _scm.h: #include <config.h> if HAVE_CONFIG_H.
5305 Rename usage of USE_PTHREAD_THREADS to SCM_USE_PTHREAD_THREADS.
5306
5307 * __scm.h: move libguile/scmconfig.h include up to the top, so
5308 we're sure to pick up any critical defines like _GNU_SOURCE early.
5309 #include <limits.h> removed in favor of scmconfig.h inclusion when
5310 appropriate. STDC_HEADERS based inclusion of stdlib.h,
5311 sys/types.h, stddef.h, and sys/stdtypes.h removed in favor of
5312 scmconfig.h inclusion when appropriate. Various Win32 related
5313 definitions removed in favor of scmconfig.h inclusion when
5314 appropriate.
5315 (HAVE_UINTPTR_T): definition removed (see NEWS).
5316 (SIZEOF_PTRDIFF_T): definition removed (see NEWS).
5317 (HAVE_LONG_LONGS): definition removed (see NEWS).
5318 (HAVE_LONG_LONG): definition removed (see NEWS).
5319 (HAVE_PTRDIFF_T): definition removed (see NEWS).
5320
5321 * Makefile.am: scmconfig.h is now generated by building and
5322 running gen-scmconfig.h and capturing its output. gen-scmconfig
5323 uses config.h and the configure.in generated gen-scmconfig.h to
5324 decide what to output. See gen-scmconfig.c for details.
5325 (noinst_PROGRAMS): add gen-scmconfig.
5326 (gen_scmconfig_SOURCES): new variable.
5327 (gen-scmconfig.$(OBJEXT)): new target - be careful to handle
5328 cross-compiling right.
5329 (scmconfig.h): build scmconfig.h from gen-scmconfig's output.
5330 (BUILT_SOURCES): add scmconfig.h.
5331
5332 2003-03-19 Marius Vollmer <mvo@zagadka.de>
5333
5334 * gc_os_dep.c: Added defines for sparc-unknown-netbsdelf1.5 from
5335 Adrian Bunk. Thanks!
5336
5337 2003-03-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5338
5339 * goops.c (make_class_from_template): New fourth arg:
5340 applicablep.
5341 (scm_class_extended_generic_with_setter, scm_class_self): Fixed
5342 cpls.
5343
5344 * smob.c (scm_set_smob_apply): Call scm_i_inherit_applicable.
5345
5346 * goops.c, objects.c, objects.h (scm_make_extended_class): New
5347 second arg: applicablep.
5348 (scm_i_inherit_applicable): New function.
5349
5350 * goops.c, goops.h (scm_class_applicable,
5351 scm_class_extended_accessor): New classes.
5352
5353 2003-03-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
5354
5355 * procs.c (scm_procedure_documentation): Removed redundant
5356 SCM_NIMP test and replaced other calls to SCM_IMP by more explicit
5357 predicates.
5358
5359 2003-03-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5360
5361 * list.c, list.h (scm_filter, scm_filter_x): New functions.
5362
5363 * modules.c (scm_module_import_interface): New function.
5364
5365 * goops.c, goops.h (scm_class_accessor_method): Renamed from
5366 scm_class_accessor.
5367 (scm_class_accessor): New class.
5368
5369 2003-03-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5370
5371 * goops.c (scm_primitive_generic_generic): Enable primitive
5372 generic if not enabled.
5373 (scm_sys_goops_loaded): Setup unextended primitive generics.
5374
5375 * goops.c, goops.h (scm_c_extend_primitive_generic): New function.
5376
5377 * snarf.h (SCM_PRIMITIVE_GENERIC, SCM_PRIMITIVE_GENERIC_1): New
5378 snarf macros.
5379
5380 * numbers.c (scm_abs): Use SCM_PRIMITIVE_GENERIC. (This is only a
5381 testing example. All uses of SCM_GPROC should be converted.)
5382
5383 * procprop.c (scm_stand_in_scm_proc): Use scm_assq instead of
5384 scm_assoc.
5385
5386 * eq.c (scm_equal_p): Turned into a primitive generic.
5387
5388 2003-02-27 Rob Browning <rlb@defaultvalue.org>
5389
5390 * Makefile.am (scmconfig.h): new target -- generate file from
5391 ../config.h.
5392 (modinclude_HEADERS): remove version.h.
5393 (nodist_modinclude_HEADERS): add version.h.
5394
5395 2003-02-24 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5396
5397 This fixes a serious GC bug, introduced during the latest
5398 reorganization of the GC, which disabled freeing of structs and
5399 GOOPS objects:
5400
5401 * struct.c (scm_struct_prehistory): Init scm_i_structs_to_free to
5402 SCM_EOL.
5403 (scm_struct_prehistory): Move scm_free_structs to
5404 scm_before_mark_c_hook.
5405
5406 * gc-card.c (sweep_card): Check that we haven't swept structs on
5407 this card before. That can happen if scm_i_sweep_all_segments has
5408 been called from some other place than scm_igc.
5409
5410 2003-02-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5411
5412 * environments.c (DEFAULT_OBARRAY_SIZE): Changed from 137 to 31
5413 (since hash tables now adapt their size).
5414
5415 * modules.c (scm_modules_prehistory): Changed from 2001 to 1533
5416 (current number of prehistory bindings; hashtable code will select
5417 a prime which is greater than this value).
5418
5419 * symbols.c (scm_symbols_prehistory): Changed from 1009 to 2139
5420 (current number of initial symbols).
5421
5422 * properties.c (scm_init_properties): Don't specify size of
5423 scm_properties_whash.
5424
5425 * objprop.c (scm_init_objprop): Don't specify size of
5426 scm_object_whash.
5427
5428 * keywords.c (scm_init_keywords): Don't specify a hash table size.
5429
5430 * hooks.c (scm_c_hook_add): Fixed bug in append mode.
5431
5432 The following changes introduce the use of resizable hash tables
5433 throughout Guile. It also renames the old *-hash-table* functions
5434 to *-alist-vector* and places them, together with the rest of the
5435 weak vector support, in the module (ice-9 weak-vector). We should
5436 probably introduce a new, better, API for weak references, for
5437 example "weak pairs" a la MIT-Scheme. (In Chez scheme, they even
5438 look like and are used like ordinary pairs.)
5439
5440 * environments.c (obarray_enter, obarray_retrieve, obarray_remove,
5441 leaf_environment_fold, obarray_remove_all): Use hashtable
5442 accessors.
5443
5444 * gc.c (scm_init_storage): Moved hook initialization to
5445 scm_storage_prehistory.
5446 (scm_storage_prehistory): New function.
5447 (scm_igc): Added commentary about placement of
5448 scm_after_sweep_c_hook.
5449
5450 * gc-mark.c (scm_mark_all): Use hashtable accessors.
5451 (scm_gc_mark_dependencies): Use SCM_WVECT_WEAK_KEY_P and
5452 SCM_WVECT_WEAK_VALUE_P.
5453
5454 * hashtab.c, hashtab.h (scm_hash_for_each, scm_hash_map): New
5455 functions.
5456 (scm_vector_to_hash_table, scm_c_make_resizing_hash_table):
5457 Removed.
5458 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table,
5459 scm_make_doubly_weak_hash_table): Moved here from weaks.c.
5460
5461 * init.c (scm_init_guile_1): Removed call to scm_init_weaks; Added
5462 calls to scm_storage_prehistory and scm_hashtab_prehistory.
5463
5464 * modules.c (module-reverse-lookup): Use hashtable accessors.
5465
5466 * symbols.c, symbols.h (scm_i_hash_symbol): New function.
5467
5468 * weaks.c, weaks.h (scm_make_weak_key_alist_vector,
5469 scm_make_weak_value_alist_vector,
5470 scm_make_doubly_weak_alist_vector): New functions.
5471
5472 * weaks.c (scm_init_weaks_builtins): New function.
5473
5474 * weaks.h (SCM_WVECTF_WEAK_KEY, SCM_WVECTF_WEAK_VALUE,
5475 SCM_WVECTF_NOSCAN, SCM_WVECT_WEAK_KEY_P, SCM_WVECT_WEAK_VALUE_P,
5476 SCM_WVECT_NOSCAN_P): New macros.
5477
5478 * weaks.c (scm_scan_weak_vectors): Use SCM_WVECT_WEAK_KEY_P
5479 and SCM_WVECT_WEAK_VALUE_P.
5480
5481 * weaks.c, weaks.h (scm_i_allocate_weak_vector): Renamed from
5482 allocate_weak_vector and exported.
5483
5484 2003-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5485
5486 * hashtab.c: Undid thread safety. (We decided that it's better to
5487 let the user explicitly protect the tables (or not) according what
5488 is suitable for the application.)
5489
5490 2003-02-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5491
5492 * hashtab.c (scm_hash_fn_remove_x, scm_internal_hash_fold): Made
5493 thread safe and handle resizing tables.
5494 (scm_ihashx, scm_sloppy_assx, scm_delx_x): Removed
5495 SCM_DEFER/ALLOW_INTS.
5496
5497 2003-02-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5498
5499 * hashtab.c (scm_vector_to_hash_table,
5500 scm_c_make_resizing_hash_table, scm_make_hash_table): New
5501 functions.
5502 (scm_hash_fn_get_handle, scm_hash_fn_create_handle_x): Made thread
5503 safe and handle resizing tables.
5504
5505 * weaks.c (scm_make_weak_key_hash_table,
5506 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
5507 Size argument made optional. Return resizable table if not
5508 specified.
5509
5510 2003-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5511
5512 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
5513 Fixed formals tests for closures. (Thanks to Kevin Ryde.)
5514
5515 2003-02-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5516
5517 * debug.c (scm_procedure_source): Handle all objects for which
5518 procedure? is #t. (Thanks to Bill Schottstaedt.)
5519
5520 2003-01-23 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5521
5522 * futures.c (mark_futures): Don't need to mark data of recycled
5523 futures.
5524 (scan_futures, cleanup_undead): Be smarter about marking
5525 futures---avoid unnecessary passes through future lists.
5526
5527 * futures.h, futures.c: New files; Introduced recycling of
5528 futures. For fine-grained threading this lifts performance to
5529 another level. We can now use parallelization in inner loops of
5530 Guile programs without impossible overhead.
5531
5532 * threads.h, threads.c: Moved futures to their own file.
5533
5534 * Makefile.am (libguile_la_SOURCES): Added futures.c.
5535 (DOT_X_FILES): Added futures.x.
5536 (DOT_DOC_FILES): Added futures.doc.
5537 (modinclude_HEADERS): Added futures.h.
5538
5539 * threads.c, threads.h (scm_i_create_thread): Renamed from
5540 create_thread and made global.
5541
5542 * futures.c (scm_make_future): New procedure.
5543
5544 * eval.c: #include "libguile/futures.h".
5545
5546 * init.c: #include "futures.h"
5547 (scm_init_guile_1): Call scm_init_futures.
5548
5549 * stime.c (SCM_TIME_UNITS_PER_SECOND): Renamed from CLKTCK.
5550
5551 * stime.h (SCM_TIME_UNITS_PER_SECOND): Definition moved here.
5552
5553 * eval.c, eval.h (scm_trampoline_0, scm_i_call_closure_0): New
5554 functions.
5555
5556 * eval.c (scm_trampoline_1): Fixed arguments test for closures.
5557
5558 2003-01-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5559
5560 * threads.c (create_thread): Don't unwind dynwind chain of parent
5561 thread before creation. Just start the new thread with an empty
5562 dynwind chain.
5563
5564 2003-01-20 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5565
5566 * evalext.c, evalext.h (scm_self_evaluating_p): New function.
5567
5568 2003-01-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5569
5570 * threads.c (scm_timed_wait_condition_variable): Support timed
5571 waiting also for simple condition variables.
5572
5573 * goops.c (TEST_CHANGE_CLASS): Use scm_change_object_class instead
5574 of calling the procedure change-object-class.
5575
5576 2003-01-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5577
5578 * ramap.c (scm_ramapc): Typo in error message.
5579
5580 2003-01-08 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5581
5582 * goops.c (scm_sys_prep_layout_x): Bugfix: Only create layout for
5583 slots with instance allocation.
5584
5585 * goops.c, goops.h (scm_class_extended_generic_with_setter): New
5586 class.
5587 (scm_compute_applicable_methods): Use scm_generic_function_methods.
5588
5589 * goops.c (scm_generic_function_methods): Support extended
5590 generic functions.
5591
5592 2002-12-29 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5593
5594 * eval.c (unmemocopy): Bugfix: scm_sym_delay --> scm_sym_future.
5595 Thanks to Neil for pointing this out!
5596
5597 2002-12-29 Neil Jerram <neil@ossau.uklinux.net>
5598
5599 * lang.h: Remove declarations matching definitions removed from
5600 lang.c (just below).
5601
5602 2002-12-28 Neil Jerram <neil@ossau.uklinux.net>
5603
5604 * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null,
5605 scm_m_while, scm_nil_eq): Remove definitions that were superfluous
5606 and already commented out.
5607
5608 * read.h (scm_lreadparen), read.c (scm_lreadr, scm_read_token,
5609 scm_lreadparen): Support reading vectors with Elisp syntax if
5610 SCM_ELISP_READ_EXTENSIONS is defined. (SCM_ELISP_READ_EXTENSIONS
5611 is not currently defined, and there isn't even a configure switch
5612 to enable it yet.)
5613
5614 2002-12-26 Marius Vollmer <mvo@zagadka.ping.de>
5615
5616 * Makefile.am (c-tokenize.o): Refer to source via $< so that vpath
5617 builds work.
5618 (EXTRA_DIST): Added version.h.in.
5619
5620 2002-12-21 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5621
5622 This change makes it possible for one thread to do lazy sweeping
5623 while other threads are running. Now only the mark phase need to
5624 have all threads asleep. We should look further into this issue.
5625 Presently, I've put the locking of scm_i_sweep_mutex at
5626 "conservative" places due to my current lack of knowledge about
5627 the garbage collector. Please feel free to restrict these regions
5628 further to allow for maximal parallelism!
5629
5630 * gc.c, gc.h (scm_i_sweep_mutex): New mutex.
5631
5632 * gc.c (scm_gc_for_newcell), gc-malloc.c (scm_realloc,
5633 scm_gc_register_collectable_memory): Substitute locking of
5634 scm_i_sweep_mutex for calls to scm_i_thread_put_to_sleep.
5635 (scm_igc): Lock sweep mutex here instead of in callers; Calls to
5636 scm_i_thread_put_to_sleep/scm_i_thread_wake_up used to demarkate
5637 the single-thread section (which now only contains the mark
5638 phase).
5639 (scm_gc): Don't lock sweeo mutex here since scm_igc locks it;
5640 Removed SCM_DEFER/ALLOW_INTS. Simply call scm_igc directly.
5641
5642 * threads.c (gc_section_mutex): Removed.
5643
5644 2002-12-19 Mikael Djurfeldt <mdj@kvast.blakulla.net>
5645
5646 * threads.c (create_thread): Clear parent field in root state in
5647 order not to unnecessarily remember dead threads.
5648
5649 * eval.c (call_subr2o_1, call_lsubr2_2): New functions.
5650 (scm_trampoline_1, scm_trampoline_2): Use them.
5651
5652 2002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
5653
5654 Partial introduction of real plugin interface.
5655
5656 * Makefile.am (modinclude_HEADERS): Added threads-plugin.h.
5657 (EXTRA_DIST): Added threads-plugin.c.
5658
5659 * threads-plugin.h, threads-plugin.c: New files.
5660
5661 * threads.h: #include "libguile/threads-plugin.h".
5662
5663 * threads.c: #include "libguile/threads-plugin.c".
5664
5665 * pthread-threads.c: Temporarily remove debugging functions.
5666
5667 * threads.c, threads.h (scm_yield): Added back.
5668
5669 2002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
5670
5671 * threads.c (really_launch): Detach before unlocking
5672 thread_admin_mutex in order not to risk being joined.
5673 (scm_i_thread_put_to_sleep, scm_i_thread_wake_up): Keep
5674 thread_admin_mutex locked during GC.
5675
5676 * pthread-threads.c, pthread-threads.h: Improvements to debugging
5677 functions.
5678
5679 2002-12-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
5680
5681 * pthread-threads.c, pthread-threads.h (SCM_DEBUG_THREADS): Added
5682 support for debugging mutex operations.
5683
5684 * threads.c (scm_thread): Removed filed joining_threads.
5685 (thread_print): Print thread number as well as address of thread
5686 structure.
5687 (scm_join_thread): Bugfix.
5688 (scm_lock_mutex, scm_try_mutex, scm_unlock_mutex,
5689 scm_timed_wait_condition_variable, scm_signal_condition_variable,
5690 scm_broadcast_condition_variable): Use the low-level API.
5691 (scm_all_threads): Return copy of thread list (to prevent
5692 unintended destruction).
5693 (scm_threads_prehistory): Initialize heap_mutex of fake thread.
5694
5695 * pthread-threads.c, pthread-threads.h, threads.c: Fixes to
5696 pthread "native" recursive mutex support.
5697
5698 2002-12-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5699
5700 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): New definitions.
5701 Simply lock a thread C API recursive mutex.
5702 (SCM_NONREC_CRITICAL_SECTION_START,
5703 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
5704 SCM_REC_CRITICAL_SECTION_END): Removed.
5705
5706 * eval.c: Replaced SOURCE_SECTION_START / SOURCE_SECTION_END with
5707 direct calls to scm_rec_mutex_lock / unlock around the three calls
5708 to scm_m_expand_body.
5709
5710 * eval.c, eval.h (promise_free): New function.
5711 (scm_force): Rewritten; Now thread-safe; Removed
5712 SCM_DEFER/ALLOW_INTS.
5713
5714 * pthread-threads.h: Added partially implemented plugin interface
5715 for recursive mutexes. These are, for now, only intended to be
5716 used internally within the Guile implementation.
5717
5718 * pthread-threads.c: New file.
5719
5720 * threads.c: Conditionally #include "pthread-threads.c".
5721
5722 * eval.c, eval.h (scm_makprom, scm_force): Rewritten to be
5723 thread-safe;
5724
5725 * snarf.h (SCM_MUTEX, SCM_GLOBAL_MUTEX, SCM_REC_MUTEX,
5726 SCM_GLOBAL_REC_MUTEX): New macros.
5727
5728 * eval.c, threads.c, threads.h, snarf.h: Rewrote critical section
5729 macros---use mutexes instead.
5730
5731 * tags.h (SCM_IM_FUTURE): New tag.
5732
5733 * eval.c (scm_m_future): New primitive macro.
5734 (SCM_CEVAL): Support futures.
5735 (unmemocopy): Support unmemoization of futures.
5736
5737 * print.c (scm_isymnames): Name of future isym.
5738
5739 * version.c: Unmade some changes to my private copy that got
5740 committed by mistake.
5741
5742 2002-12-11 Mikael Djurfeldt <mdj@kvast.blakulla.net>
5743
5744 * gc-malloc.c, gc.h, init.c: Reverted gc-malloc change of
5745 2002-12-10.
5746
5747 * gc.c (scm_igc): Don't call scm_i_thread_invalidate_freelists.
5748
5749 * gc.c (scm_gc_sweep): Call it here instead, which is a more
5750 logical place.
5751
5752 * threads.c (create_thread): Remember root object until the handle
5753 of the new thread is on all_threads list.
5754
5755 * root.c (scm_make_root): Moved copying of fluids until after
5756 creation of root handle so that the fluids are GC protected. Also
5757 removed the critical section.
5758
5759 2002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
5760
5761 * gc-malloc.c, gc.h (scm_gc_malloc_prehistory): New function.
5762
5763 * gc-malloc.c (malloc_mutex): New mutex.
5764 (scm_gc_malloc_prehistory): Initialize it.
5765 (scm_realloc): Serialize call to realloc
5766 (scm_calloc): Same for calloc.
5767 Thanks to Wolfgang Jaehrling!
5768 (Now we have to make sure all calls to malloc/realloc are made
5769 through scm_malloc.)
5770
5771 * init.c (scm_init_guile_1): Call scm_gc_malloc_prehistory.
5772
5773 * threads.c (really_launch): Release heap (to prevent deadlock).
5774 (create_thread): Release heap before locking thread admin mutex.
5775
5776 2002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
5777
5778 * threads.c (scm_i_thread_invalidate_freelists): New
5779 function.
5780
5781 * gc.c (scm_igc): Call scm_i_thread_invalidate_freelists.
5782
5783 * modules.c (scm_export): Inserted a return statement.
5784
5785 2002-12-10 Han-Wen Nienhuys <hanwen@cs.uu.nl>
5786
5787 * modules.c (scm_export): new function
5788
5789 * gc-card.c: add a note about malloc()/free() overhead.
5790
5791 2002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
5792
5793 * Makefile.am (c-tokenize.$(OBJEXT)): Don't look for c-tokenize.c
5794 in srcdir.
5795
5796 2002-12-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5797
5798 These changes remove scm_ints_disabled (which hasn't has any
5799 effect in Guile for quite some time).
5800
5801 * async.c, error.h (scm_ints_disabled): Removed.
5802
5803 * gc.c (scm_gc_for_newcell), init.c (scm_init_guile_1),
5804 root.c (scm_internal_cwdr), gdbint.c (SCM_BEGIN_FOREIGN_BLOCK,
5805 SCM_END_FOREIGN_BLOCK): Don't touch scm_ints_disabled.
5806 (old_ints): Removed.
5807
5808 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Define as a recursive
5809 critical section.
5810 (SCM_REDEFER_INTS, SCM_ALLOW_INTS): Define as SCM_DEFER_INTS and
5811 SCM_ALLOW_INTS.
5812
5813 2002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5814
5815 * threads.c (scm_mutex_lock, scm_cond_wait, scm_cond_timedwait):
5816 Removed accidental #if 0 around these functions.
5817
5818 These changes are the start of support for preemptive
5819 multithreading. Marius and I have agreed that I commit this code
5820 into the repository although it isn't thoroughly tested and surely
5821 introduces many bugs. The bugs should only be exposed when using
5822 threads, though. Signalling and error handling for threads is
5823 very likely broken. Work on making the implementation cleaner and
5824 more efficient is needed.
5825
5826 * __scm.h (SCM_ALLOW_INTS_ONLY): Removed.
5827 (SCM_NONREC_CRITICAL_SECTION_START,
5828 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
5829 SCM_REC_CRITICAL_SECTION_END): New macros.
5830 (SCM_CRITICAL_SECTION_START/END): Defined here.
5831
5832 * eval.c: Insert SOURCE_SECTION_START / SOURCE_SECTION_END around
5833 the three calls to scm_m_expand_body.
5834
5835 * gc.h: #include "libguile/pthread-threads.h";
5836 (SCM_FREELIST_CREATE, SCM_FREELIST_LOC): New macros.
5837
5838 * gc.c (scm_i_freelist, scm_i_freelist2): Defined to be of type
5839 scm_t_key;
5840
5841 * gc.c, gc-freelist.c, inline.h: Use SCM_FREELIST_LOC for freelist
5842 access.
5843
5844 * gc-freelist.c (scm_gc_init_freelist): Create freelist keys.
5845
5846 * gc-freelist.c, threads.c (really_launch): Use
5847 SCM_FREELIST_CREATE.
5848
5849 * gc-malloc.c (scm_realloc, scm_gc_register_collectable_memory):
5850
5851 * gc.c (scm_i_expensive_validation_check, scm_gc,
5852 scm_gc_for_newcell): Put threads to sleep before doing GC-related
5853 heap administration so that those pieces of code are executed
5854 single-threaded. We might consider rewriting these code sections
5855 in terms of a "call_gc_code_singly_threaded" construct instead of
5856 calling the pair of scm_i_thread_put_to_sleep () and
5857 scm_i_thread_wake_up (). Also, we would want to have as many of
5858 these sections eleminated.
5859
5860 * init.c (scm_init_guile_1): Call scm_threads_prehistory.
5861
5862 * inline.h: #include "libguile/threads.h"
5863
5864 * pthread-threads.h: Macros now conform more closely to the
5865 pthreads interface. Some of them now take a second argument.
5866
5867 * threads.c, threads.h: Many changes.
5868
5869 2002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
5870
5871 * Makefile.am (version.h): Changed $^ --> $< in rule for
5872 version.h.
5873
5874 2002-12-08 Rob Browning <rlb@defaultvalue.org>
5875
5876 * version.h.in (SCM_MICRO_VERSION): use @--@ substitution now.
5877 (SCM_MINOR_VERSION): use @--@ substitution now.
5878 (SCM_MICRO_VERSION): use @--@ substitution now.
5879 (scm_effective_version): new function prototype.
5880
5881 * version.c (scm_effective_version): new function, also add
5882 effective-version.
5883
5884 * Makefile.am (schemelibdir): VERSION -> GUILE_EFFECTIVE_VERSION.
5885 (libpath.h): use GUILE_EFFECTIVE_VERSION to compute
5886 SCM_LIBRARY_DIR.
5887 (version.h): generate this here rather than configure.in. This
5888 approach tracks source edits better (i.e. more immediately).
5889 Might be worth considering for other .in files too.
5890
5891 2002-12-02 Marius Vollmer <mvo@zagadka.ping.de>
5892
5893 Reorganized thread package selection. A thread package now only
5894 implements a small set of pthread like functions and Guile
5895 implements the rest on top of that. Guile's implementation is
5896 what the "coop-pthreads" package has been previously. Support for
5897 "coop" threads has been removed until I get time to add it again.
5898
5899 * Makefile.am (libguile_la_SOURCES): Removed iselect.c.
5900 (noinst_HEADERS): Removed coop-threads.c, coop-threads.h, coop.c,
5901 null-threads.c, coop-pthreads.c.
5902 (modinclude_HEADERS): Removed coop-defs.h, coop-pthreads.h. Added
5903 pthread-threads.h.
5904
5905 * validate.h (SCM_VALIDATE_THREAD): Moved to threads.h.
5906
5907 * threads.h: Do not include "libguile/coop-defs.h". Include
5908 "libguile/pthread-threads.h" for USE_COPT_THREADS. Removed
5909 (previously deprecated) C level thread API prototypes. They are
5910 now in the thread package specific headers, "null-threads.h" and
5911 "pthread-threads.h".
5912 (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR):
5913 New.
5914 (scm_threads_init): Removed.
5915 (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END,
5916 SCM_THREAD_SWITCHING_CODE, scm_i_switch_counter,
5917 SCM_I_THREAD_SWITCH_COUNT): Define here.
5918 (scm_single_thread_p): Removed.
5919 (scm_call_with_new_thread): Take two args directly instead of list
5920 of two args.
5921 (scm_i_thread_data, scm_i_set_thread_data, SCM_THREAD_LOCAL_DATA,
5922 SCM_SET_THREAD_LOCAL_DATA): Define here.
5923
5924 * threads.c: Merged with "coop-pthreads.c".
5925
5926 * null-threads.h: Implement pthread-like API as a set of macros.
5927
5928 * pthread-threads.h: New, implement pthread-like API by deferring
5929 to pthread itself.
5930
5931 * init.c (scm_init_guile_1): Do not call scm_init_iselect, which
5932 has been lost in the reorganization.
5933
5934 2002-12-01 Mikael Djurfeldt <mdj@linnaeus>
5935
5936 The following change makes it possible to move procedure
5937 application dispatch outside inner loops. The motivation was
5938 clean implementation of efficient replacements of R5RS primitives
5939 in SRFI-1.
5940
5941 The semantics is clear: scm_trampoline_N returns an optimized
5942 version of scm_call_N (or NULL if the procedure isn't applicable
5943 on N args).
5944
5945 Applying the optimization to map and for-each increases efficiency
5946 noticeably. For example, (map abs ls) is 8 times faster than
5947 before.
5948
5949 * eval.h (scm_t_trampoline_1, scm_t_trampoline_2): New types.
5950
5951 * eval.c, eval.h (scm_trampoline_1, scm_trampoline_2): New functions.
5952
5953 * eval.c (call_subr2_2, call_lsubr_2, call_closure_2): New functions;
5954 (map, for-each): Handle also application on two args as a special
5955 case; Use trampolines.
5956
5957 Other changes:
5958
5959 * sort.c (scm_cmp_function): Choose subr2less for scm_tc7_subr_2o;
5960 (subr2oless): Removed.
5961 (scm_restricted_vector_sort_x): Use scm_return_first to keep the
5962 vector GC protected.
5963
5964 * eval.c (check_map_args): Use scm_out_of_range_pos instead of
5965 scm_out_of_range.
5966
5967 2002-11-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
5968
5969 * evalext.[ch] (scm_m_undefine, undefine): Deprecated.
5970
5971 2002-11-17 Mikael Djurfeldt <mdj@linnaeus>
5972
5973 * debug.c (scm_make_iloc): Added missing "return".
5974
5975 2002-11-17 Marius Vollmer <mvo@zagadka.ping.de>
5976
5977 * strports.c (scm_eval_string_in_module): Validate second arg to
5978 be a module. Thanks to Arno Peters!
5979
5980 2002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
5981
5982 * .cvsignore: remove goops.c
5983
5984 2002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
5985
5986 * modules.c (scm_env_top_level, scm_lookup_closure_module,
5987 module_variable, scm_module_lookup_closure,
5988 scm_module_transformer, scm_sym2var, scm_module_reverse_lookup,
5989 scm_system_module_env_p): Don't compare SCM values with C
5990 operators == or !=. Avoid SCM_IMP predicates. Prefer !SCM_FALSEP
5991 over SCM_NFALSEP.
5992
5993 2002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
5994
5995 * eval.h (SCM_MAKE_ILOC): New macro.
5996
5997 * debug.c (scm_make_iloc): Use SCM_MAKE_ILOC instead of computing
5998 the iloc bitpattern here.
5999
6000 2002-11-14 Mikael Djurfeldt <mdj@linnaeus>
6001
6002 * coop-pthreads.c, coop-pthreads.h: scm_internal_select should be
6003 part of the API, otherwise it's difficult to write Guile
6004 extensions using non-blocking I/O => moved #include
6005 "libguile/iselect.h" from coop-pthreads.c --> coop-pthreads.h.
6006
6007 * coop-pthreads.c (scm_unlock_mutex): Changed s_lock_mutex -->
6008 s_unlock_mutex.
6009
6010 2002-11-10 Marius Vollmer <mvo@zagadka.ping.de>
6011
6012 * __scm.h (USE_THREADS, GUILE_ISELECT): Do not define here. They
6013 are defined in configure.in.
6014
6015 * threads.c: Removed SCM_API from function definitions. SCM_API
6016 is only for declarations.
6017
6018 2002-11-07 Mikael Djurfeldt <mdj@linnaeus>
6019
6020 * coop-pthreads.h: Added support for thread specific data to the
6021 generic C API for the coop-pthreads case.
6022
6023 * threads.c, threads.h (scm_cond_init): Undo unintentional API
6024 change.
6025 (scm_cond_broadcast): Added missing function.
6026
6027 2002-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6028
6029 * coop.c (coop_next_runnable_thread): Removed, wich should have
6030 happened when GUILE_ISELECT was hard-wired.
6031
6032 2002-11-03 Marius Vollmer <mvo@zagadka.ping.de>
6033
6034 * Makefile.am (libguile_la_SOURCES): Added threads.c
6035 (DOT_DOC_FILES): Added threads.doc.
6036 (DOT_X_FILES): Added threads.x.
6037 (EXTRA_libguile_la_SOURCES): Removed threads.c.
6038 (noinst_HEADERS): Added coop-pthreads.c.
6039 (modinclude_HEADERS): Added coop-pthreads.h.
6040
6041 * __scm.h (USE_THREADS, GUILE_ISELECT): Define when
6042 SCM_DEBUG_DEPRECATED. Removed their use thru-out Guile.
6043
6044 * iselect.c: Include "_scm.h" before testing HAVE_UNISTD_H.
6045 Thanks to Bill Schottstaedt!
6046
6047 * numbers.c (scm_integer_expt): Make 0^z == 0 for z != 0.
6048
6049 * _scm.h (HAVE_RESTARTABLE_SYSCALLS): Do define even when
6050 SCM_COPT_THREADS is defined.
6051 (SCM_SYSCALL): Use EINTR-expection version when SCM_COPT_THREADS
6052 is defined.
6053
6054 * coop-pthreads.c: Some harmless renamings of internal stuff.
6055 (create_thread): New, generalized version of
6056 scm_call_with_new_thread.
6057 (scm_call_with_new_thread): Use it.
6058 (scm_spawn_thread): New, use create_thread.
6059
6060 2002-11-02 Marius Vollmer <mvo@zagadka.ping.de>
6061
6062 * coop-pthreads.c, coop-pthreads.h: Redone completely, you might
6063 start testing it now.
6064
6065 * _scm.h: Include <errno.h< so that SCM_SYSCALL is correctly
6066 defined when HAVE_RESTARTABLE_SYSCALLS is not defined.
6067 (HAVE_RESTARTABLE_SYSCALLS): Do not define when USE_COPT_THREADS
6068 is defined.
6069
6070 2002-10-27 Marius Vollmer <mvo@zagadka.ping.de>
6071
6072 * scmsigs.c (signal_cell_handlers, install_handler_data,
6073 scm_delq_spine_x, really_install_handler, install_handler): New
6074 scheme for triggering signal handlers, to simplify take_signal.
6075 (take_signal): Simplified, to avoid race conditions.
6076 (scm_sigaction_for_thread): Use new Scheme. Validate that thread
6077 hasn't exited yet.
6078
6079 * async.c (scm_async_click): Reset pending_asyncs, handle
6080 signal_asyncs. Don't set cdr of a non-signal async to #f.
6081 (scm_i_queue_async_cell): Do not check cdr of cell for #f, queue
6082 always. Set pending_asyncs.
6083 (scm_system_async_mark_for_thread): Check that thread has not
6084 exited.
6085 (scm_unmask_signals, decrease_block): Call scm_async_click after
6086 block_asyncs becomes zero.
6087
6088 * __scm.h (SCM_ASYNC_CLICK): Check pending_asyncs instead of
6089 active_asyncs.
6090
6091 * root.h (scm_root_state): Added pending_asyncs and signal_asyncs
6092 fields.
6093 * root.c (root_mark): Mark them.
6094 (make_root): Initialize them.
6095
6096 * iselect.c, iselect.h: Replaced GUILE_ISELECT with
6097 USE_COOP_THREADS.
6098 (scm_internal_select): Define one version for USE_COOP_THREADS and
6099 one for USE_NULL_THREADS.
6100 (scm_init_iselect): Likewise.
6101
6102 * inline.h (scm_cell, scm_double_cell): Also allow
6103 USE_COPT_THREADS to not protect the slot initializers.
6104
6105 * init.c (scm_init_guile_1): Call scm_init_thread_procs. This is
6106 because threads need to be initialized before the stack, but
6107 gsubrs such as scm_timed_condition_variable_wait can only be
6108 created later.
6109
6110 * threads.h: Include "coop-pthreads.h" when requested.
6111 (scm_threads_make_mutex, scm_threads_lock_mutex,
6112 scm_threads_unlock_mutex, scm_threads_monitor): Removed, they were
6113 not implemented anyway.
6114 (scm_init_thread_procs, scm_try_mutex,
6115 scm_timed_condition_variable_wait,
6116 scm_broadcast_condition_variable, scm_c_thread_exited_p,
6117 scm_thread_exited_p): New prototypes.
6118 (struct timespec): Define if not already defined.
6119 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
6120 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
6121 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
6122 scm_cond_broadcast, scm_cond_destroy): Declarations moved here and
6123 deprecated.
6124
6125 * threads.c: Include <errno.h>. Include "coop-pthreads.c" when
6126 requested.
6127 (scm_thread_exited_p): New.
6128 (scm_try_mutex, scm_broadcast_condition_variable): Newly
6129 registered procedures.
6130 (scm_wait_condition_variable, scm_timed_wait_condition_variable):
6131 Use the latter as the procedure for "wait-condition-variable",
6132 thus offering a optional timeout parameter to Scheme.
6133 (scm_wait_condition_variable): Implement in terms of
6134 scm_timed_wait_condition_variable.
6135 (scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
6136 scm_mutex_unlock, scm_mutex_destroy, scm_cond_init,
6137 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
6138 scm_cond_broadcast, scm_cond_destroy): Implement in terms of
6139 scm_make_mutex, etc, and deprecate.
6140 (scm_init_threads): Do not create smobs, leave this to
6141 scm_threads_init. Do not include "threads.x" file.
6142 (scm_init_thread_procs): New, include "threads.x" here.
6143
6144 * null-threads.h (scm_null_mutex, scm_null_mutex_init,
6145 scm_null_mutex_lock, scm_null_mutex_unlock,
6146 scm_null_mutex_destroy, scm_null_condvar, scm_null_condvar_init,
6147 scm_null_condvar_wait, scm_null_condvar_signal,
6148 scm_null_condvar_destroy): Removed.
6149 (scm_mutex_init, scm_mutex_lock, scm_mutex_unlock, scm_cond_init,
6150 scm_cond_wait, scm_cond_signal, scm_cond_broadcast,
6151 scm_cond_destory): Do not define, they are now deprecated and
6152 handled by threads.{h,c}.
6153
6154 * null-threads.c (scm_null_mutex, scm_null_cond): Define here.
6155 (scm_threads_init): Create smobs here, using the appropriate
6156 sizes.
6157 (block): Removed, now unused.
6158 (scm_c_thread_exited_p): New.
6159 (scm_null_mutex_init, scm_null_mutex_lock, scm_null_mutex_unlock,
6160 scm_null_mutex_destroy, scm_null_condvar_init,
6161 scm_null_condvar_wait, scm_null_condvar_signal,
6162 scm_null_condvar_destroy): Removed and updated users to do their
6163 task directly.
6164 (scm_try_mutex, timeval_subtract,
6165 scm_timed_wait_condition_variable,
6166 scm_broadcast_condition_variable): New.
6167 (scm_wait_condition_variable): Removed.
6168
6169 * coop-defs.h (coop_m): Added 'level' field.
6170 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
6171 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
6172 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
6173 scm_cond_broadcast, scm_cond_destroy, struct timespec): Do not
6174 define.
6175 (coop_condition_variable_broadcast): New.
6176
6177 * coop-threads.c (scm_threads_init): Create smobs here, using the
6178 appropriate sizes.
6179 (scm_c_thread_exited_p, scm_try_mutex,
6180 scm_timed_wait_condition_variable,
6181 scm_broadcast_condition_variable): New.
6182 (scm_wait_condition_variable): Removed.
6183
6184 * coop.c (coop_new_mutex_init): Initialize level.
6185 (coop_mutex_trylock, coop_mutex_lock, coop_mutex_unlock): maintain
6186 level.
6187 (coop_condition_variable_signal): Renamed to
6188 coop_condition_variable_broadcast and reimplemented in terms of
6189 that. Thus...
6190 (coop_condition_variable_broadcast): New.
6191
6192 * goops.c (hell_mutex): Reimplemented using scm_make_mutex, etc.
6193
6194 * coop-pthreads.h, coop-pthreads.c: New, but unfinished.
6195
6196 2002-10-21 Marius Vollmer <mvo@zagadka.ping.de>
6197
6198 * null-threads.c: Include <time.h>. Also, use <...> for inclusion
6199 of system headers.
6200
6201 * async.c, goops.h, modules.h, validate.h (SCM_MAKE_VALIDATE_MSG):
6202 New. Use it instead of SCM_MAKE_VALIDATE in lots of places to
6203 give better error messages. Thanks to Bill Schottstaedt!
6204
6205 2002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
6206
6207 * evalext.h, evalext.c (scm_definedp, scm_defined_p): Renamed
6208 scm_definedp to scm_defined_p and deprecated scm_definedp.
6209
6210 2002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
6211
6212 * async.h, async.c (scm_system_async): Fixed deprecation to work
6213 correctly when deprecated features are excluded.
6214
6215 2002-10-16 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6216
6217 * async.c (scm_system_async_mark_for_thread): Validate thread
6218 argument.
6219
6220 * coop-threads.c (scm_i_thread_root): Do not validate argument.
6221
6222 * feature.c (scm_init_feature): Don't add 'threads' for
6223 USE_NULL_THREADS.
6224
6225 * inline.h (scm_cell, scm_double_cell): Also allow
6226 USE_NULL_THREADS to not protect the slot initializers.
6227
6228 * scmsigs.c (scm_sigaction_for_thread): It's "USE_THREADS" not
6229 "USE_THREAD".
6230
6231 * Makefile.am (noinst_HEADERS): Added null-threads.c.
6232 (modinclude_HEADERS): Added null-threads.h.
6233
6234 * threads.h: Include null-threads.h when !USE_COOP_THREADS.
6235 * threads.c: Include null-threads.c when !USE_COOP_THREADS.
6236 (scm_init_threads): Use generic type names scm_t_mutex and
6237 scm_t_cond instead of coop_m and coop_c.
6238
6239 * null-threads.c, null-threads.h: New files.
6240
6241 2002-10-15 Marius Vollmer <mvo@zagadka.ping.de>
6242
6243 * Makefile.am: Replaced "$<" in non-pattern rules with its value.
6244 This is to support makes that know about "$<" only in pattern
6245 rules, like Sun's make.
6246
6247 2002-10-13 Marius Vollmer <mvo@zagadka.ping.de>
6248
6249 * Makefile.am (libpath.h): Fixed typo in top_srcdir_absolute
6250 substitution. Thanks to David Allouche!
6251
6252 2002-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
6253
6254 * evalext.h: Replaced SCM_DEBUG_DEPRECATED with
6255 !SCM_ENABLE_DEPRECATED.
6256
6257 2002-10-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6258
6259 * async.c (scm_system_async_mark_for_thread): Only call
6260 scm_i_thread_root when USE_THREADS is defined. Use scm_root
6261 otherwise.
6262
6263 * scmsigs.c (take_signal): Only call scm_i_thread_root when
6264 USE_THREADS is defined. Use scm_root otherwise.
6265 (scm_sigaction_for_thread): Ignore THREAD argument when
6266 USE_THREADS is not defined. Also, move THREAD argument defaulting
6267 out of HAVE_SIGACTION section, which was a bug.
6268
6269 2002-10-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6270
6271 * scmsigs.c (scm_sigaction_for_thread): Store original handler in
6272 signal_handlers, not the closure that is used as the async.
6273 The closure is stored in signal_handler_cells, as previously.
6274
6275 2002-10-10 Marius Vollmer <mvo@zagadka.ping.de>
6276
6277 * root.h (scm_root_state): Added 'block_async' slot.
6278 (scm_active_asyncs): Removed abbrev.
6279 * root.c (scm_make_root): Initialize 'block_asyncs' slot.
6280
6281 * __scm.h (SCM_ASYNC_TICK): Do without the scm_active_asyncs
6282 abbrev.
6283
6284 * async.h (scm_call_with_blocked_asyncs,
6285 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
6286 scm_c_call_with_unblocked_asyncs): New prototypes.
6287 (scm_mask_signals, scm_unmask_signals): Deprecated.
6288 (scm_mask_ints): Turned into a macro.
6289 * async.c (scm_mask_ints): Removed.
6290 (scm_run_asyncs): Do not set scm_mask_ints while running an async.
6291 this should not be necessary.
6292 (scm_async_click): Test block_asyncs instead of scm_mask_ints.
6293 (scm_mask_signals, scm_unmask_signals): Deprecated. Emit
6294 deprecation warning and check for errornous use. Set block_asyncs
6295 instead of scm_mask_ints.
6296 (increase_block, decrease_block, scm_call_with_blocked_asyncs,
6297 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
6298 scm_c_call_with_unblocked_asyncs): New.
6299
6300 * script.c (scm_compile_shell_switches): Do not set scm_mask_ints.
6301 Asyncs are enabled by default.
6302
6303 2002-10-09 Neil Jerram <neil@ossau.uklinux.net>
6304
6305 * vports.c (scm_make_soft_port): Allow vector argument to carry a
6306 6th element: an input waiting thunk.
6307 (sf_input_waiting): New.
6308
6309 2002-10-05 Marius Vollmer <mvo@zagadka.ping.de>
6310
6311 * root.c (root_mark): Mark active_asyncs slot.
6312
6313 * async.c (scm_async_click): Set the cdr of a executed handler
6314 cell to SCM_BOOL_F, not SCM_EOL.
6315 (scm_i_queue_async_cell): Queue the cell at the end of the list,
6316 and only if the handler procedure is not already present.
6317 (scm_system_async_mark_for_thread): Initialize cdr of handler cell
6318 with SCM_BOOL_F.
6319 * scmsigs.c (scm_sigaction_for_thread): Likewise.
6320
6321 2002-10-04 Rob Browning <rlb@defaultvalue.org>
6322
6323 * guile.c (main): switch to scm_lt_dlset_preloaded_symbols;
6324
6325 * dynl.c (sysdep_dynl_link): switch to scm_lt_dlhandle,
6326 scm_lt_dlopenext, and scm_lt_dlerror.
6327 (sysdep_dynl_unlink): switch to scm_lt_dlhandle, scm_lt_dlclose,
6328 and scm_lt_dlerror.
6329 (sysdep_dynl_func): switch to scm_lt_dlhandle, scm_lt_dlsym,
6330 and scm_lt_dlerror.
6331 (sysdep_dynl_init): switch to scm_lt_dlinit();
6332
6333 * Makefile.am (libguile_la_LIBADD): switch to use
6334 libguile-ltdl.la.
6335
6336 * numbers.c (scm_integer_expt): (expt 0 1) should be 1.
6337
6338 2002-10-04 Marius Vollmer <mvo@zagadka.ping.de>
6339
6340 * scmsigs.h (scm_sigaction_for_thread): New prototype.
6341 * scmsigs.c (got_signal): Removed.
6342 (signal_handler_cells, signal_handler_threads): New.
6343 (take_signal): Queue the cell of the signal for the specified
6344 thread. Reset the signal handler on systems that don't have
6345 sigaction.
6346 (sys_deliver_signals): Removed.
6347 (close_1): New.
6348 (scm_sigaction_for_thread): Renamed from scm_sigaction and
6349 extended to also set the thread of a signal and allocate a cell
6350 for it. Keep the Scheme name "sigaction". Check that signum is
6351 within range. Also, use SCM_VECTOR_REF instead of SCM_VELTS.
6352 (scm_sigaction): Implement in terms of scm_sigaction_for_thread.
6353 (scm_init_scmsigs): Allocate signal_handler_cells and
6354 signal_handler_threads vectors.
6355
6356 * async.c: Removed GUILE_OLD_ASYNC_CLICK code. Reorganized so
6357 that system asnycs and user asyncs are separated. Reimplemented
6358 system asyncs to work per-thread.
6359
6360 * gc.c (scm_init_gc): Do not use scm_system_async.
6361
6362 * async.h (scm_asyncs_pending, scm_set_tick_rate,
6363 scm_set_switch_rate, scm_system_async_mark_from_signal_handler):
6364 Removed prototypes.
6365 (scm_i_queue_async_cell): New.
6366
6367 * __scm.h (scm_asyncs_pending_p): Removed.
6368 (SCM_ASYNC_CLICK): Check scm_active_asyncs instead of
6369 scm_asyncs_pending_p.
6370
6371 * async.h (scm_system_async_mark_for_thread): New prototype.
6372
6373 * __scm.h: Removed GUILE_OLD_ASYNC_CLICK code.
6374
6375 * root.h (scm_root_state): Added new "active_asyncs" slot.
6376 * root.c (scm_make_root): Initialize it to SCM_EOL.
6377
6378 * coop-defs.h (coop_t): Added new "handle" slot.
6379 * coop-threads.c (all_threads, scm_current_thread,
6380 scm_all_threads, scm_i_thread_root): New.
6381 (scm_threads_init): Add main thread to all_threads.
6382 (scheme_launch_thread): Remove thread from all_threads when it
6383 terminates.
6384 (scm_call_with_new_thread): Initialize handle slot of coop_t
6385 structure and add new thread to all_threads.
6386 (scm_spawn_thread): Likewise.
6387
6388 * threads.h (scm_current_thread, scm_all_threads): New prototypes.
6389 * threads.c (scm_current_thread, scm_all_threads): Register as
6390 primitives.
6391
6392 * dynl.c: Use scm_lt_ prefix for libltdl functions.
6393
6394 2002-09-29 Neil Jerram <neil@ossau.uklinux.net>
6395
6396 * script.c (scm_compile_shell_switches): Fix bad spelling of
6397 `explicitly' in comment.
6398
6399 2002-09-28 Neil Jerram <neil@ossau.uklinux.net>
6400
6401 * posix.c (scm_geteuid, scm_getegid, scm_seteuid, scm_setegid):
6402 Refer to provided? in doc string rather than deprecated feature?.
6403
6404 2002-09-24 Gary Houston <ghouston@arglist.com>
6405
6406 * inline.h (scm_double_cell): prevent reordering of statements
6407 with any following code (for GCC 3 strict-aliasing).
6408 * numbers.c (scm_make_real), num2float.i.c (FLOAT2NUM): removed
6409 the earlier version of the reordering prevention.
6410
6411 2002-09-19 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6412
6413 * inline.h (scm_double_cell): move SET_GCMARK set out of if body.
6414
6415 2002-09-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6416
6417 * gc-malloc.c (scm_gc_register_collectable_memory): more overflow
6418 protection.
6419
6420 2002-09-08 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6421
6422 * inline.h: include stdio.h
6423
6424 * smob.c (free_print): abort if scm_debug_cell_accesses_p is set
6425
6426 2002-09-05 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6427
6428 * gc-segment.c (scm_i_make_initial_segment): check user settings
6429 for sanity.
6430
6431 * gc-malloc.c (scm_gc_init_malloc): check user settings for
6432 sanity.
6433
6434 * gc-freelist.c (scm_init_freelist): check user settings for sanity.
6435
6436 * struct.h: change scm_structs_to_free to scm_i_structs_to_free
6437
6438 * gc-malloc.c (scm_gc_register_collectable_memory): use floats;
6439 these won't ever wrap around with high memory usage. Thanks to
6440 Sven Hartrumpf for finding this.
6441
6442 * gc-freelist.c: include <stdio.h>
6443
6444 * gc-malloc.c: add DEBUGINFO for mtrigger GCs.
6445
6446 2002-09-01 Marius Vollmer <mvo@zagadka.ping.de>
6447
6448 * vectors.h (SCM_VECTOR_REF): New.
6449
6450 * snarf.h (SCM_DEFINE_PUBLIC): New.
6451
6452 2002-08-30 Marius Vollmer <mvo@zagadka.ping.de>
6453
6454 * socket.c (scm_addr_vector): Added size of address to arguments.
6455 Use it to avoid accessing a non-existent path in a sockaddr_un.
6456 Changed all callers.
6457
6458 2002-08-29 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6459
6460 * gc.h: remove DOUBLECELL card flags.
6461
6462 * gc-malloc.c (scm_calloc): try to use calloc() before calling
6463 scm_realloc().
6464
6465 * gc-segment.c (scm_i_initialize_heap_segment_data): remove card
6466 init loop; handle this from scm_init_card_freelist()
6467
6468 * gc-card.c (scm_init_card_freelist): init bit vector here.
6469
6470 * numbers.c (scm_make_real): prevent reordering of statements
6471 num2float.i.c (FLOAT2NUM): idem
6472
6473 2002-08-27 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6474
6475 * eval.h: prepend libguile/ to include path
6476
6477 2002-08-26 Marius Vollmer <mvo@zagadka.ping.de>
6478
6479 * script.c (scm_compile_shell_switches): Added "2002" to Copyright
6480 years. Thanks to Martin Grabmüller!
6481
6482 2002-08-25 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6483
6484 * gc-segment.c (scm_i_get_new_heap_segment): use float in stead of
6485 unsigned numbers for computing minimum heap increment. This
6486 prevents weird results when a a negative minimum increment is
6487 computed.
6488
6489 2002-08-24 Marius Vollmer <mvo@zagadka.ping.de>
6490
6491 * gc_os_dep.c: When we have __libc_stack_end, use that directly
6492 instead of the old tricks.
6493
6494 * guile-snarf.in: Do not expect the input file to be the first
6495 argument after the optional "-o" option, just pass everything to
6496 the pre-processor without extracting the input file name.
6497
6498 2002-08-23 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6499
6500 * gc-segment.c (scm_i_get_new_heap_segment): Oops. We want segment
6501 length *at* least SCM_MIN_HEAP_SEG_SIZE, not at most.
6502
6503 2002-08-22 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6504
6505 * gc.h, gc.c: make scm_cells_allocated unsigned again. Thanks to
6506 Bill Schottstaedt for the bug report
6507
6508 2002-08-20 Marius Vollmer <mvo@zagadka.ping.de>
6509
6510 * print.c (scm_iprin1): Print primitives generics always as
6511 "primitive-generic" even when they have no primitive methods yet.
6512
6513 2002-08-17 Gary Houston <ghouston@arglist.com>
6514
6515 * coop.c (coop_create): removed bogus 2nd argument in scm_malloc
6516 call.
6517
6518 2002-08-17 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6519
6520 * ports.c (scm_add_to_port_table): small bugfix.
6521
6522 * mallocs.c (scm_malloc_obj): use scm_gc_malloc in stead of
6523 malloc.
6524
6525 * gc-segment.c (scm_i_get_new_heap_segment): remove cluster cruft:
6526 only use SCM_MIN_HEAP_SEG_SIZE.
6527
6528 * ports.c (scm_add_to_port_table): add backwards compatibility
6529 function
6530
6531 * ports.h: use scm_i_ prefix for port table and port table size.
6532
6533 2002-08-15 Mikael Djurfeldt <mdj@linnaeus>
6534
6535 * vports.c (scm_make_soft_port): Initialize pt variable.
6536
6537 2002-08-13 Marius Vollmer <mvo@zagadka.ping.de>
6538
6539 * strports.h (scm_c_eval_string_in_module,
6540 scm_eval_string_in_module): New prototypes.
6541 * strports.c (scm_eval_string_in_module): New, but use
6542 "eval-string" as the Scheme name and make second parameter
6543 optional.
6544 (scm_eval_string): Implement using scm_eval_string_in_module.
6545 (scm_c_eval_string_in_module): New.
6546 Thanks to Ralf Mattes for the suggestion!
6547
6548 2002-08-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6549
6550 * gc-card.c ("sweep_card"): remove SCM_MISC_ERROR messages: print
6551 message and abort.
6552
6553 * gc-mark.c ("scm_gc_mark_dependencies"): idem.
6554
6555 * ports.c ("scm_new_port_table_entry"): return a boxed SCM in
6556 stead of scm_t_port*. The function now takes a tag argument.
6557
6558 2002-08-08 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6559
6560 * gc.h: add scm_debug_cells_gc_interval to public interface
6561
6562 * gc-card.c ("sweep_card"): set scm_gc_running while sweeping.
6563
6564 * gc.c (scm_i_expensive_validation_check): separate expensive
6565 validation checks from cheap ones.
6566
6567 2002-08-06 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6568
6569 * read.c (scm_input_error): new function: give meaningful error
6570 messages, and throw read-error
6571
6572 * gc-malloc.c (scm_calloc): add scm_calloc.
6573
6574 2002-08-05 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6575
6576 * tags.h: remove GC bits documentation from the tags table.
6577
6578 * read.c (INPUT_ERROR): Prepare for file:line:column error
6579 messages for errors in scm_lreadr() and friends.
6580
6581 2002-08-04 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6582
6583 * gc-malloc.c (scm_malloc): use scm_realloc() (simplifies
6584 implementation).
6585 (scm_gc_calloc): new function
6586
6587 2002-08-04 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6588
6589 * ports.c (scm_new_port_table_entry): init port entry to 0
6590 completely.
6591
6592 * ports.c (scm_new_port_table_entry): change function from
6593 scm_add_to_port_table. This prevents cells with null-pointers from
6594 being exposed to GC.
6595
6596 * vports.c (scm_make_soft_port) strports.c (scm_mkstrport),
6597 fports.c (scm_fdes_to_port): Use scm_new_port_table_entry().
6598
6599 * gc.c (scm_gc_stats): add cell-yield and malloc-yield statistic
6600 to gc-stats.
6601
6602 * numbers.c (big2str): return "0" for 0 iso. ""
6603
6604 * gc-segment.c, gc-malloc.c gc-mark.c, gc-freelist.c, gc-card.c,
6605 private-gc.h: new file
6606
6607 * gc.c: completely revised and cleaned up the GC. It now uses lazy
6608 sweeping. More documentation in workbook/newgc.text
6609
6610 2002-07-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
6611
6612 * random.c (rstate_free): Return zero.
6613
6614 2002-07-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
6615
6616 * environments.c (remove_key_from_alist): Removed.
6617
6618 (obarray_remove): Simplified.
6619
6620 2002-07-24 Stefan Jahn <stefan@lkcc.org>
6621
6622 * continuations.h: ia64: Include <signal.h> before
6623 <sys/ucontext.h>.
6624
6625 2002-07-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6626
6627 * modules.c (scm_sym2var): Don't compare SCM values with ==.
6628
6629 2002-07-21 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6630
6631 * goops.c (scm_compute_applicable_methods): use
6632 scm_remember_upto_here_1 iso scm_remember_upto_here
6633
6634 * macros.c: include deprecation.h
6635
6636 * vectors.c (scm_vector_move_right_x): remove side effect in
6637 macro arg.
6638 (scm_vector_move_left_x): idem.
6639
6640 * net_db.c, posix.c, socket.c: variable naming: change ans to
6641 result.
6642
6643 * sort.c (scm_merge_vector_x): accept vector as argument
6644 iso. SCM*. This is needed for full GC correctness.
6645
6646 * gc.h: undo previous undocumented changes related to #ifdef
6647 GENGC.
6648
6649 2002-07-20 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6650
6651 * *.c: add space after commas everywhere.
6652
6653 * *.c: use SCM_VECTOR_SET everywhere, where a vector is written.
6654 Document cases where SCM_WRITABLE_VELTS() is used.
6655
6656 * vectors.h (SCM_VELTS): prepare for write barrier, and let
6657 SCM_VELTS() return a const pointer
6658 (SCM_VECTOR_SET): add macro.
6659
6660 2002-07-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
6661
6662 * eval.c (SCM_CEVAL), macros.c (macro_print, scm_makmacro,
6663 scm_sym_macro, scm_macro_type), macros.h (scm_makmacro):
6664 Deprecated the special kind of built-in dynamic syntax transformer
6665 that was inaccurately named "macro". Note: The built-in syntax
6666 transformers that are named "mmacro" or "memoizing-macro" still
6667 exist, and it is these which come much closer to what one would
6668 call a macro.
6669
6670 2002-07-13 Neil Jerram <neil@ossau.uklinux.net>
6671
6672 * eval.c (unmemocopy): Fix for
6673 1001-local-eval-error-backtrace-segfaults (unmemoization crash
6674 with internal definitions and local-eval).
6675
6676 2002-07-12 Gary Houston <ghouston@arglist.com>
6677
6678 * dynl.c: Don't define stub procedures if DYNAMIC_LINKING is not
6679 defined. They don't do anything useful, especially since the
6680 only case where DYNAMIC_LINKING is undefined seems to be
6681 when --with-modules=no is given to configure, which is basically
6682 requesting that the "dynamic linking module" be omitted.
6683
6684 * Makefile.am (libguile_la_SOURCES): move dynl.c from
6685 libguile_la_SOURCES to EXTRA_libguile_la_SOURCES.
6686
6687 * extensions.c (load_extension): check DYNAMIC_LINKING for
6688 scm_dynamic_call.
6689 * init.c (scm_init_guile_1): check DYNAMIC_LINKING for
6690 scm_init_dynamic_linking.
6691
6692 2002-07-10 Marius Vollmer <mvo@zagadka.ping.de>
6693
6694 * guile.c, iselect.h, net_db.c, posix.c, socket.c: No need to
6695 check for Cygwin when including <winsock2.h>, this is already
6696 check for by configure. Thus, revert change from 2002-07-07.
6697
6698 2002-07-10 Gary Houston <ghouston@arglist.com>
6699
6700 * eq.c: include <string.h>
6701 * dynl.c: docstring editing.
6702
6703 2002-07-09 Gary Houston <ghouston@arglist.com>
6704
6705 * dynl.c (scm_dynamic_call): docstring editing.
6706
6707 2002-07-08 Rob Browning <rlb@defaultvalue.org>
6708
6709 * gc_os_dep.c: HURD fixes.
6710
6711 2002-07-07 Marius Vollmer <mvo@zagadka.ping.de>
6712
6713 Crosscompiling and Cygwin fixes by Jan Nieuwenhuizen. Thanks!
6714
6715 * Makefile.am: Override default rule for c-tokenize.$(OBJECT);
6716 this should be compiled for BUILD host.
6717 Override default rule for
6718 guile_filter_doc_snarfage$(EEXECT); this should run on BUILD host.
6719 Add missing $(EXEEXT) to guile_filter_doc_snarfage invocation.
6720 (snarf2checkedtexi): Use GUILE_FOR_BUILD instead of preinstguile.
6721
6722 * guile.c, iselect.h, net_db.c, posix.c, socket.c: Do not include
6723 <winsock2.h> on Cygwin even when we have it.
6724
6725 2002-07-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
6726
6727 * __scm.h (SCM_CAUTIOUS), eval.c (scm_eval_args, deval_args,
6728 SCM_CEVAL): Removed compile time option SCM_CAUTIOUS to clean up
6729 the code. Full number of arguments checking of closures is
6730 mandatory now. However, the option to disable the checking has
6731 most probably not been used anyway.
6732
6733 2002-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
6734
6735 * __scm.h (SCM_RECKLESS), backtrace.c (SCM_ASSERT), debug.c
6736 (scm_debug_options), eval.c (scm_lookupcar, scm_lookupcar1,
6737 scm_badargsp, SCM_CEVAL, SCM_APPLY, scm_map, scm_for_each),
6738 feature.c (scm_init_feature), gsubr.c (scm_gsubr_apply), numbers.c
6739 (scm_logand, scm_logior, scm_logxor, scm_i_dbl2big), srcprop.c
6740 (scm_source_properties, scm_set_source_properties_x,
6741 scm_source_property): Removed compile time option SCM_RECKLESS to
6742 clean up the code. Full number of arguments checking of closures
6743 is mandatory now. However, the option to disable the checking has
6744 most probably not been used anyway.
6745
6746 * srcprop.c (scm_source_properties, scm_set_source_properties_x,
6747 scm_source_property): Use !SCM_CONSP instead of SCM_NCONSP.
6748
6749 2002-06-30 Gary Houston <ghouston@arglist.com>
6750
6751 * dynl.c: Removed all SCM_DEFER_INTS/SCM_ALLOW_INTS, which won't
6752 do anything useful. Added a comment about need for a mutex if
6753 pre-emptive threading is supported.
6754
6755 * posix.c (scm_convert_exec_args), dynl.c
6756 (scm_make_argv_from_stringlist): static procs: 1) renamed both to
6757 allocate_string_pointers. 2) simplified: don't reallocate the
6758 strings, just make an array of pointers 3) avoid memory leaks on
6759 error 4) let the procedure report errors in its own name.
6760 Consequences: 1) the procedures now assume that SCM strings are
6761 nul-terminated, which should always be the case. 2) Since strings
6762 are not reallocated, it's now possible for strings passed to
6763 dynamic-args-call to be mutated.
6764
6765 2002-06-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
6766
6767 * __scm.h, eval.c, eval.h: Removed compile time option
6768 MEMOIZE_LOCALS to clean up the code. Now, caching of local
6769 variable positions during memoization is mandatory. However, the
6770 option to disable the caching has most probably not been used
6771 anyway.
6772
6773 2002-06-18 Marius Vollmer <mvo@zagadka.ping.de>
6774
6775 * print.c (scm_simple_format): Print missing part of format before
6776 ~% control. Thanks to Daniel Skarda!
6777
6778 2002-06-01 Marius Vollmer <mvo@zagadka.ping.de>
6779
6780 * mkstemp.c: Added exception notice to license statement.
6781
6782 2002-05-22 Marius Vollmer <mvo@zagadka.ping.de>
6783
6784 * numbers.c (mem2ureal): When returning an inexact zero, make sure
6785 it is represented as a floating point value so that we can change
6786 its sign.
6787
6788 From John W. Eaton <jwe@bevo.che.wisc.edu>
6789
6790 * numbers.c (idbl2str): Don't omit sign when printing negative zero.
6791
6792 2002-05-14 Thien-Thi Nguyen <ttn@giblet.glug.org>
6793
6794 * gc_os_dep.c: For I386/OPENBSD, allow for `__i386__'
6795 in addition to `i386'. Thanks to Dale P. Smith.
6796
6797 2002-05-08 Marius Vollmer <mvo@zagadka.ping.de>
6798
6799 * eq.c (real_eqv): New.
6800 (scm_eqv_p): Use it when comparing reals and complexes.
6801
6802 * numbers.c: Include <string.h>, for strncmp.
6803 (mem2complex): Do not create negative NaNs.
6804 (scm_leq_p, scm_geq_p): Explicitely return #f when comparing a
6805 NaN.
6806 (scm_inexact_to_exact): Signal error when converting a NaN.
6807
6808 2002-05-06 Marius Vollmer <mvo@zagadka.ping.de>
6809
6810 * posix.c (scm_putenv): Handle removing variables explicitely by
6811 calling unsetenv.
6812
6813 From John W. Eaton.
6814
6815 * numbers.h: Conditionally include floatingpoint.h, ieeefp.h, and
6816 nan.h. Provide declarations for scm_inf_p, scm_nan_p, scn_inf,
6817 and scm_nan.
6818 * numbers.c: [SCO && ! HAVE_ISNAN] (isnan): New function.
6819 [SCO && ! HAVE_ISINF] (isinf): New function.
6820 (xisinf, xisnan): New functions.
6821 (IS_INF): Delete.
6822 (isfinite): Define in terms of xisinf.
6823 (scm_inf_p, scm_nan_p): New functions.
6824 (guile_Inf, guile_NaN): New file-scope vars.
6825 (guile_ieee_init): New function.
6826 (scm_inf, scm_nan): New functions.
6827 (idbl2str): Handle Inf and NaN. Remove funny label and
6828 corresponding gotos.
6829 (ALLOW_DIVIDE_BY_ZERO): New macro.
6830 (scm_divide): Allow division by zero to occur if
6831 ALLOW_DIVIDE_BY_ZERO is defined.
6832 Handle bignums and ints as special cases.
6833
6834 Additional stuff by me:
6835
6836 numbers.c (mem2ureal): Recognize "inf.0" and "nan.xxx".
6837 (scm_even_p, scm_odd_p): Treat infinity as even and odd.
6838 (iflo2str): Don't output a '+' for negative numbers or for Inf and
6839 NaN. They will provide their own sign.
6840 (scm_divide): Only allow divides by inexact zeros. Dividing by
6841 exact zeros still signals an errors.
6842
6843 2002-04-22 Thien-Thi Nguyen <ttn@giblet.glug.org>
6844
6845 * goops.h (scm_slot_exists_p): Rename from scm_slots_exists_p.
6846 * goops.c (scm_slot_exists_p): Rename from scm_slots_exists_p.
6847 (scm_slot_exists_p): Rename from scm_slots_exists_p.
6848 Thanks to Andreas Rottmann.
6849
6850 2002-04-20 Gary Houston <ghouston@arglist.com>
6851
6852 * removal of unused fields in root state (thanks to Christopher
6853 Cramer for pointing out the disuse.)
6854 * root.h (scm_root_state): removed def_inp, def_outp, def_errp.
6855 (scm_def_inp, scm_def_outp, scm_def_errp): removed.
6856
6857 * root.c (root_mark): don't mark them.
6858 (scm_make_root): don't set them to #f.
6859 * init.c (scm_init_standard_ports): don't initialise with the
6860 default ports.
6861
6862 2002-04-17 Marius Vollmer <mvo@zagadka.ping.de>
6863
6864 * Makefile.am (EXTRA_DIST): Added cpp_err_symbols.c and
6865 cpp_sig_symbols.c.
6866
6867 2002-04-16 Marius Vollmer <mvo@zagadka.ping.de>
6868
6869 * guile-snarf.in: Do not clean input file. This would write to
6870 the $(srcdir) during a VPATH build, which is not allowed. It also
6871 isn't needed since it only works when an output filename has been
6872 specified and in that case we don't need to clean the input file
6873 because the output file will already exist.
6874
6875 2002-03-31 Marius Vollmer <mvo@zagadka.ping.de>
6876
6877 * guile-snarf: Install the trap for removing $cleanfile only when
6878 the value of $cleanfile is actually known.
6879
6880 2002-04-10 Rob Browning <rlb@defaultvalue.org>
6881
6882 * .cvsignore: add versiondat.h and *.c.clean.c.
6883
6884 2002-03-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
6885
6886 * srcprop.[ch] (scm_c_source_property_breakpoint_p): New
6887 function, replaces macro SRCBRKP.
6888
6889 (SRCBRKP): Deprecated.
6890
6891 * eval.c (SCM_CEVAL): Replaced use of SRCBRKP by call to
6892 scm_c_source_property_breakpoint_p. Removed some use of arg1 as
6893 temporary variable.
6894
6895 2002-03-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
6896
6897 * debug.h, eval.c: Deprecated CHECK_ENTRY, CHECK_APPLY and
6898 CHECK_EXIT and removed all references to them.
6899
6900 2002-03-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
6901
6902 * debug.h (scm_ready_p, debug_print): Removed declarations.
6903
6904 * eval.c (EVALCELLCAR): Removed.
6905
6906 (SCM_CEVAL): Eliminated label loopnoap. Removed side-effecting
6907 operation from condition.
6908
6909 2002-03-24 Marius Vollmer <mvo@zagadka.ping.de>
6910
6911 * guile-snarf.in: When the output filename is "-", write to
6912 stdout. When no "-o" option is given, use "-" as the output
6913 filename (i.e., stdout). Only 'clean' the inputfile or remove the
6914 output file on error when the output file name is not "-". Define
6915 the preprocessor macro SCM_MAGIC_SNARFER while snarfing.
6916
6917 * Makefile.am (.c.x): Pass "-o $@" to guile-snarf.
6918
6919 2002-03-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
6920
6921 * eval.c (SCM_CEVAL, SCM_APPLY): Eliminated labels wrongnumargs
6922 and the corresponding goto statements. Removed redundant code.
6923
6924 2002-03-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
6925
6926 * eval.c (SCM_CEVAL): Minimized scope of variable arg2.
6927 Eliminated redundant SCM_IMP check. Exlined call to EVALCAR.
6928 Re-enabled handing of rpsubrs and asubrs.
6929
6930 2002-03-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
6931
6932 * eval.c (SIDEVAL): Removed.
6933
6934 (SCM_CEVAL): Minimized scope of variable orig_sym. Eliminated
6935 goto-labels cdrxnoap, cdrxbegin and nontoplevel_cdrxnoap. Changed
6936 argument checking order for set! to locals, variables and symbols.
6937 Improvements to control structure. Removed some uses of arg1 and
6938 arg2 as temporary variables.
6939
6940 2002-03-15 Thien-Thi Nguyen <ttn@giblet.glug.org>
6941
6942 * guile-snarf.in: Remove "--compat=1.4" support.
6943 Add "-d" and "-D" support.
6944
6945 (deprecated_list): New var.
6946 (compat_mode_clean_xxx): Delete.
6947 (grep_deprecated): New func.
6948 ("main"): If "-d" or "-D", call `grep_deprecated'.
6949
6950 2002-03-15 Neil Jerram <neil@ossau.uklinux.net>
6951
6952 * hooks.h: Change scm_t_c_hookype_t everywhere to
6953 scm_t_c_hook_type.
6954
6955 Docstring fixes:
6956
6957 * strings.c (scm_string_p): Change unnecessary `iff' to `if'.
6958
6959 * ports.c (scm_sys_make_void_port): Use `@file'.
6960
6961 * numbers.c (scm_number_p, scm_real_p): Use `otherwise' rather
6962 than `else'.
6963
6964 * macros.c (scm_makmacro): Don't say that the form replaces its
6965 source, because it doesn't.
6966 (scm_makmmacro): Clarify difference between this and scm_makmacro.
6967
6968 * backtrace.c (scm_display_error), filesys.c (scm_umask,
6969 scm_select, scm_basename), goops.c (scm_method_generic_function),
6970 numbers.c (scm_integer_length), posix.c (scm_getgroups, scm_execl,
6971 scm_setlocale, scm_flock), socket.c (scm_shutdown): Correct
6972 spelling mistakes.
6973
6974 * debug.c (scm_debug_options), eval.c
6975 (scm_eval_options_interface), read.c (scm_read_options): Change
6976 incorrect @var in docstring to @code.
6977
6978 2002-03-14 Marius Vollmer <mvo@zagadka.ping.de>
6979
6980 * unif.c (singp): Use SCM_REALP instead of SCM_SLOPPY_REALP.
6981
6982 * snarf.h (SCM_SNARF_INIT): Add "^:^" after code so that
6983 guile-snarf can remove trailing non-init code.
6984
6985 * guile-snarf.in (modern_snarf): Remove everything following and
6986 including "^:^" from the output.
6987
6988 2002-03-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
6989
6990 * eval.c (SCM_CEVAL), srcprop.h (SRCBRKP): Eliminated union 't'.
6991
6992 * eval.c (SCM_CEVAL): Exlined call to EVALCAR.
6993
6994 2002-03-13 Thien-Thi Nguyen <ttn@giblet.glug.org>
6995
6996 * guile-snarf.in: Update copyright.
6997 Rewrite to internalize error handling.
6998 Add "--compat=1.4" handling.
6999 Add commentary.
7000
7001 * Makefile.am (libpath.h): Use @top_srcdir_absolute@.
7002 (snarfcppopts): New var.
7003 (.c.x): Use $(snarfcppopts). Rework guile-snarf usage.
7004 (.c.doc): Use $(snarfcppopts).
7005
7006 * alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,
7007 continuations.c, debug-malloc.c, debug.c, deprecation.c, dynl.c,
7008 dynwind.c, environments.c, eq.c, error.c, eval.c, evalext.c,
7009 extensions.c, feature.c, filesys.c, fluids.c, fports.c, gc.c,
7010 goops.c, gsubr.c, guardians.c, hash.c, hashtab.c, hooks.c,
7011 ioext.c, iselect.c, keywords.c, lang.c, list.c, load.c, macros.c,
7012 modules.c, net_db.c, numbers.c, objects.c, objprop.c, options.c,
7013 pairs.c, ports.c, posix.c, print.c, procprop.c, procs.c,
7014 properties.c, ramap.c, random.c, rdelim.c, read.c, regex-posix.c,
7015 root.c, rw.c, scmsigs.c, script.c, simpos.c, socket.c, sort.c,
7016 srcprop.c, stackchk.c, stacks.c, stime.c, strings.c, strop.c,
7017 strorder.c, strports.c, struct.c, symbols.c, threads.c, throw.c,
7018 unif.c, values.c, variable.c, vectors.c, version.c, vports.c,
7019 weaks.c: Retire inclusion guard macro SCM_MAGIC_SNARFER.
7020
7021 2002-03-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
7022
7023 * eval.c (SCM_CEVAL): Got rid of the last reference to t.lloc.
7024 The next step will be to remove the union 't' and simplify the
7025 code of SCM_CEVAL that way.
7026
7027 2002-03-12 Neil Jerram <neil@ossau.uklinux.net>
7028
7029 * iselect.c (collisionp, gnfds, greadfds, gwritefds, gexceptfds,
7030 rreadfds, rwritefds, rexceptfds): Made static.
7031
7032 * gc.c (terminating), fports.c (terminating): Renamed
7033 scm_i_terminating.
7034
7035 2002-03-11 Marius Vollmer <mvo@zagadka.ping.de>
7036
7037 * numbers.c (scm_divide): Adapt code from libstdc++/f2c to void
7038 potential overflow problems. Thanks to John W Eaton!
7039
7040 * strop.c (string_capitalize_x): Treat characters as unsigned so
7041 that 8-bit chars work. Thanks to David Pirotte!
7042
7043 2002-03-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
7044
7045 * eval.c (SCM_CEVAL): Cleaned up the handling of 'slot-ref',
7046 'slot-set!' and 'nil-cond'. Removed some uses of t.arg1, arg2 and
7047 proc as temporary variables. Introduced temporary variables with
7048 hopefully descriptive names for clarification. Replaced SCM_N?IMP
7049 by a more explicit predicate in some places.
7050
7051 2002-03-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
7052
7053 * eval.c (SCM_CEVAL): Cleaned up the handling of #@dispatch.
7054 Added lots of comments regarding the implementation of #@dispatch.
7055 Changed intra-procedure communication to use t.arg1 instead of
7056 arg2. Removed some uses of t.arg1, t.lloc and proc as temporary
7057 variables. Introduced temporary variables with hopefully
7058 descriptive names for clarification. Replaced SCM_N?IMP by a more
7059 explicit predicate in some places. Use SCM_INSTANCE_HASH instead
7060 of computing the expression explicitly. Eliminate now unused
7061 label nontoplevel_cdrxbegin.
7062
7063 * goops.h (SCM_INSTANCE_HASH): New macro.
7064
7065 * objects.h (SCM_CMETHOD_FORMALS, SCM_CMETHOD_BODY): New macros.
7066
7067 2002-03-08 Thien-Thi Nguyen <ttn@giblet.glug.org>
7068
7069 * Makefile.am (bin_SCRIPTS): Revive this decl, w/ initial element
7070 "guile-snarf" moved back from `noinst_SCRIPTS'.
7071
7072 2002-03-08 Neil Jerram <neil@ossau.uklinux.net>
7073
7074 * srcprop.c (scm_set_source_property_x): If SRCPROPS obj already
7075 exists when adding a source property other than those that are
7076 handled explicitly, add the new property to the SRCPROPS obj's
7077 plist.
7078
7079 * debug.h (SCM_MAX_FRAME_SIZE): Remove incorrect comment about use
7080 of SCM_MAX_FRAME_SIZE as a bit mask; it isn't used like this.
7081
7082 * eval.c (SCM_CEVAL): Don't store scm_debug_eframe_size in
7083 debug.status. It isn't needed, and it can overflow the bits
7084 reserved for it (which may lead to a segv or a GC abort).
7085
7086 2002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
7087
7088 * eval.c (SCM_CEVAL): Cleaned up the handling of 'apply'. Removed
7089 side-effecting operations from conditions and macro calls.
7090 Replaced SCM_N?IMP by a more explicit predicate in some places.
7091 Minimized the scope of some variables.
7092
7093 2002-03-02 Stefan Jahn <stefan@lkcc.org>
7094
7095 * convert.i.c: Fixed int <-> long conversions which would have
7096 failed if their sizes were different.
7097
7098 2002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
7099
7100 * eval.c (SCM_CEVAL): Cleaned up the handling of 'if', 'let',
7101 'letrec' and 'set*': Removed some uses of t.arg1, t.lloc and proc
7102 as temporary variables. Removed side-effecting operations from
7103 conditions and macro calls. Introduced temporary variables with
7104 hopefully descriptive names for clarification. Replaced SCM_N?IMP
7105 by a more explicit predicate in some places. Removed code that
7106 was conditionally compiled if SICP was defined - which it never
7107 is.
7108
7109 2002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
7110
7111 * eval.c (SCM_CEVAL): Cleaned up the handling of 'cons' and 'do':
7112 Removed some uses of t.arg1 and proc as temporary variables.
7113 Removed side-effecting operations from conditions and macro calls.
7114 Introduced temporary variables with hopefully descriptive names
7115 for clarification. Replaced SCM_N?IMP by a more explicit
7116 predicate in some places.
7117
7118 2002-03-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
7119
7120 * eval.c (scm_badargsp, SCM_CEVAL): Replaced SCM_N?IMP by a more
7121 explicit predicate in some places.
7122
7123 (CHECK_EQVISH): Removed.
7124
7125 (SCM_CEVAL): Removed some uses of t.arg1 and proc as temporary
7126 variables. Removed side-effecting operations from conditions and
7127 macro calls. Introduced temporary variables for clarification.
7128 Sorted if-else-if check for the type of the last form in a list by
7129 frequency. Avoided some unnecessary tail-recursion calls.
7130
7131 2002-03-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
7132
7133 * gc.c (SCM_HEAP_SEG_SIZE, CELL_UP, CELL_DN, NEXT_DATA_CELL,
7134 init_heap_seg, alloc_some_heap), gc.h (struct scm_cell, struct
7135 scm_t_cell, SCM_CELLPTR, SCM_GC_CARD_SIZE,
7136 SCM_GC_IN_CARD_HEADERP), tags.h (SCM_CELLP): Renamed the struct
7137 scm_cell and all its uses to scm_t_cell in accordance to Guile's
7138 naming scheme for types.
7139
7140 * alist.c (scm_acons), convert.i.c (CTYPES2UVECT,
7141 CTYPES2UVECT_OPTIONAL), coop-threads.c (scm_call_with_new_thread,
7142 scm_spawn_thread), debug.c (scm_make_debugobj), environments.c
7143 (scm_make_environment), eval.c (scm_closure), fports.c
7144 (scm_fdes_to_port), gc.c (scm_deprecated_newcell,
7145 scm_deprecated_newcell2), inline.h (scm_alloc_cell, scm_cell),
7146 list.c (SCM_I_CONS), numbers.c (scm_i_mkbig), pairs.c (scm_cons),
7147 ports.c (scm_void_port), procs.c (scm_c_make_subr, scm_makcclo),
7148 smob.c (scm_make_smob), smob.h (SCM_NEWSMOB), strings.c
7149 (scm_take_str, scm_allocate_string), strports.c (scm_mkstrport),
7150 unif.c (scm_make_uve), variable.c (make_variable), vectors.c
7151 (scm_c_make_vector), vports.c (scm_make_soft_port): Renamed
7152 scm_alloc_cell to scm_cell.
7153
7154 * environments.c (core_environments_observe), gc.c
7155 (scm_deprecated_newcell2), goops.c (wrap_init, scm_wrap_object),
7156 inline.h (scm_alloc_double_cell, scm_double_cell), num2float.i.c
7157 (FLOAT2NUM), numbers.c (scm_make_real), procs.c
7158 (scm_make_procedure_with_setter), smob.h (SCM_NEWSMOB2,
7159 SCM_NEWSMOB3), struct.c (scm_make_struct, scm_make_vtable_vtable),
7160 symbols.c (scm_mem2symbol, scm_mem2uninterned_symbol), weaks.c
7161 (allocate_weak_vector): Renamed scm_alloc_double_cell to
7162 scm_double_cell.
7163
7164 2002-02-27 Stefan Jahn <stefan@lkcc.org>
7165
7166 * convert.i.c, convert.c: Better range checking.
7167
7168 * inet_aton.c, fports.c: Commented the inclusion of <winsock2.h>.
7169
7170 * deprecation.c (vsnprintf): Define to `_vsnprintf' for
7171 Windows (MinGW).
7172
7173 2002-02-26 Thien-Thi Nguyen <ttn@giblet.glug.org>
7174
7175 * Makefile.am: Update path to pre-inst-guile automake frag.
7176
7177 2002-02-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
7178
7179 * gc.c (scm_gc_sweep): Make it compile even when deprecated
7180 features are excluded.
7181
7182 2002-02-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
7183
7184 * num2integral.i.c (NUM2INTEGRAL): Fixed signedness problem.
7185
7186 2002-02-25 Gary Houston <ghouston@arglist.com>
7187
7188 * convert.c: include <string.h> for convert_i.c.
7189
7190 2002-02-24 Rob Browning <rlb@defaultvalue.org>
7191
7192 * .cvsignore: add stamp-h1.
7193
7194 2002-02-21 Neil Jerram <neil@ossau.uklinux.net>
7195
7196 * unif.c (scm_array_to_list): Correct name, which had been
7197 accidentally changed to scm_t_arrayo_list!
7198
7199 2002-02-20 Mikael Djurfeldt <mdj@linnaeus>
7200
7201 * gc.c (scm_gc_sweep): Print an error message when aborting due to
7202 underflowing scm_mallocated.
7203
7204 2002-02-14 Marius Vollmer <marius.vollmer@uni-dortmund.de>
7205
7206 * gc.h, gc.c (scm_must_malloc, scm_must_realloc, scm_must_strdup,
7207 scm_must_strndup, scm_done_malloc, scm_done_free, scm_must_free):
7208 Reimplemented using the new scm_gc_malloc, etc., functions and
7209 deprecated.
7210
7211 2002-02-11 Thien-Thi Nguyen <ttn@giblet.glug.org>
7212
7213 * Makefile.am (bin_PROGRAMS): Move `guile_filter_doc_snarfage'
7214 to `noinst_PROGRAMS'.
7215 (bin_SCRIPTS): Move all values to `noinst_SCRIPTS'; delete.
7216 (noinst_PROGRAMS, noinst_SCRIPTS): New.
7217
7218 2002-02-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
7219
7220 * gc.h, gc.c (scm_gc_sweep): Issue deprecation warning when
7221 non-zero is returned from a port or smob free function.
7222 (scm_malloc, scm_realloc, scm_strndup, scm_strdup,
7223 scm_gc_register_collectable_memory,
7224 scm_gc_unregister_collectable_memory, scm_gc_malloc,
7225 scm_gc_realloc, scm_gc_free, scm_gc_strndup, scm_gc_strdup): New.
7226
7227 * backtrace.c, continuations.c, convert.i.c, coop-threads.c,
7228 debug-malloc.c, dynl.c, environments.c, environments.h,
7229 extensions.c, filesys.c, fports.c, gc.c, gc.h, gh_data.c, goops.c,
7230 guardians.c, hooks.c, init.c, keywords.c, load.c, numbers.c,
7231 ports.c, posix.c, procs.c, rdelim.c, regex-posix.c, root.c,
7232 smob.c, stime.c, strings.c, struct.c, struct.h, symbols.c, unif.c,
7233 vectors.c, weaks.c: Use scm_gc_malloc/scm_malloc and
7234 scm_gc_free/free instead of scm_must_malloc and scm_must_free, as
7235 appropriate. Return zero from smob and port free functions.
7236
7237 * debug-malloc.c (scm_malloc_reregister): Handle "old == NULL".
7238
7239 * deprecation.h, deprecation.c: Reimplemented to allow deprecation
7240 messages while the GC is running.
7241 (scm_c_issue_deprecation_warning_fmt): New.
7242
7243 * fports.c (scm_setvbuf): Reset read buffer to saved values when
7244 it is pointing to the putback buffer.
7245
7246 2002-02-08 Thien-Thi Nguyen <ttn@giblet.glug.org>
7247
7248 * gsubr.c (create_gsubr): On "too many args" error,
7249 also display arg count and name. Thanks to Bill Schottstaedt.
7250
7251 2002-02-05 Thien-Thi Nguyen <ttn@giblet.glug.org>
7252
7253 * Makefile.am: Include $(top_srcdir)/pre-inst-guile.am.
7254
7255 (bin_SCRIPTS): Remove guile-snarf-docs-texi.
7256 (alldotdocfiles, snarf2checkedtexi, dotdoc2texi): New vars.
7257 (guile.texi, guile-procedures.texi): Use $(dotdoc2texi).
7258
7259 * guile-snarf-docs-texi.in: Bye bye.
7260
7261 2002-02-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
7262
7263 * symbols.c (scm_make_symbol): Fix typo in docstring.
7264
7265 * symbols.h (scm_mem2uninterned_symbol, scm_symbol_interned_p,
7266 scm_make_symbol): New prototypes.
7267
7268 2002-02-03 Marius Vollmer <mvo@zagadka.ping.de>
7269
7270 * symbols.h (SCM_SET_SYMBOL_HASH): Removed.
7271 (SCM_SYMBOL_INTERNED_P): New.
7272 * symbols.c (scm_symbol_hash): Use scm_ulong2num instead of
7273 SCM_MAKINUM since hash values can well be bignums.
7274 (scm_mem2symbol): Only use hash values below SCM_T_BITS_MAX/2.
7275 This signals a interned symbol.
7276 (scm_mem2uninterned_symbol, scm_symbol_interned_p,
7277 scm_make_symbol): New.
7278
7279 * print.c (scm_iprin1): Print uninterned symbols unreadably.
7280
7281 2002-02-02 Thien-Thi Nguyen <ttn@giblet.glug.org>
7282
7283 * __scm.h (HAVE_UINTPTR_T): Only define if UINTPTR_T attributes
7284 are defined: UINTPTR_MAX, INTPTR_MAX, INTPTR_MIN.
7285 Thanks to Dave Love.
7286
7287 2002-01-31 Marius Vollmer <mvo@zagadka.ping.de>
7288
7289 * symbols.c (scm_gensym): Use " g" as default prefix, not "g".
7290 This might help to make unintended clashes less likely.
7291 (scm_string_to_symbol): Protect the string until the symbols is
7292 created.
7293
7294 2002-01-31 Stefan Jahn <stefan@lkcc.org>
7295
7296 * convert.c, convert.h, convert.i.c: New files containing C
7297 array to Scheme conversion helpers meant to be replacement
7298 functions for the deprecated gh interface.
7299
7300 * Makefile.am: Setup rules for new `convert.*' files.
7301
7302 2002-01-28 Stefan Jahn <stefan@lkcc.org>
7303
7304 * symbols.c (scm_c_symbol2str): New function, replacement for
7305 `gh_scm2newsymbol()'.
7306
7307 * strings.c (scm_c_substring2str): New function. Proper
7308 replacement for `gh_get_substr()'.
7309
7310 * socket.c: Include `stdint.h' if available for the `uint32_t'
7311 declaration.
7312
7313 * scmsigs.c (scm_sigaction): Initialize `chandler' (inhibits
7314 compiler warning).
7315
7316 * backtrace.c: Include `lang.h' for GUILE_DEBUG conditional.
7317
7318 2002-01-22 Neil Jerram <neil@ossau.uklinux.net>
7319
7320 Other changes unrelated to Elisp...
7321
7322 * eval.c (scm_m_if): Use s_if rather than repeating string literal
7323 "if".
7324 (comments): Fix a few typos.
7325 (scm_for_each): Add parentheses around oddly unparenthesized
7326 if/while conditions.
7327
7328 * read.c (scm_read_opts): Add full stop at end of doc for
7329 `keywords' option.
7330
7331 * script.c (scm_compile_shell_switches): Use scm_str2symbol
7332 instead of gh_symbol2scm.
7333
7334 * srcprop.h (SRCPROPBRK): Return C type rather than SCM.
7335 (SRCBRKP): Use SRCPROPBRK rather than duplicating its logic.
7336
7337 * srcprop.c (scm_srcprops_to_plist, scm_source_property): Change
7338 SRCPROPBRK (x) to SCM_BOOL (SRCPROPBRK (x)).
7339
7340 First batch of changes for Elisp support...
7341
7342 * alist.c, async.c, boolean.c, dynl.c, eval.c, filesys.c,
7343 fluids.c, list.c, load.c, options.c, posix.c, print.c, sort.c,
7344 throw.c, vectors.c, weaks.c: Add #include for lang.h.
7345
7346 * eval.c, eval.h, init.c, lang.c, lang.h: Use SCM_ENABLE_ELISP to
7347 conditionalize compilation and initialization of Elisp support
7348 function.
7349
7350 * alist.c (scm_assq, scm_assv, scm_assoc), async.c
7351 (scm_asyncs_pending, scm_run_asyncs, noop), backtrace.c
7352 (scm_set_print_params_x), dynl.c (scm_make_argv_from_stringlist),
7353 filesys.c (fill_select_type, retrieve_select_type), fluids.c
7354 (scm_swap_fluids, scm_swap_fluids_reverse), list.c (scm_null_p,
7355 scm_ilength, scm_append_x, scm_last_pair, scm_reverse,
7356 scm_reverse_x, scm_list_ref, scm_list_set_x, scm_list_cdr_set_x,
7357 scm_c_memq, scm_memv, scm_member), load.c (scm_search_path),
7358 options.c (change_option_setting, scm_options), posix.c
7359 (environ_list_to_c), print.c (scm_iprlist), throw.c
7360 (scm_exit_status), vectors.c (scm_vector), weaks.c
7361 (scm_weak_vector): Use SCM_NULL_OR_NIL_P instead of SCM_NULLP.
7362
7363 * boolean.c (scm_not): Use `SCM_FALSEP || SCM_NILP' instead of
7364 just SCM_FALSEP.
7365
7366 * boolean.c (scm_boolean_p): Use `SCM_BOOLP || SCM_NILP' instead
7367 of just SCM_BOOLP.
7368
7369 * eval.c (scm_lisp_nil, scm_lisp_t, s_nil_ify, scm_m_nil_ify,
7370 s_t_ify, scm_m_t_ify, s_0_cond, scm_m_0_cond, s_0_ify,
7371 scm_m_0_ify, s_1_ify, scm_m_1_ify): Removed.
7372 (scm_m_atfop): Support function aliasing. Support both function
7373 args, which need transformation, and macro args, which do not.
7374 Add explanatory comments.
7375 (SCM_CEVAL): In switch cases for SCM_IM_AND, SCM_IM_COND,
7376 SCM_IM_DO, SCM_IM_IF and SCM_IM_OR, add `|| SCM_NILP' to existing
7377 checks for SCM_FALSEP. In switch case for SCM_IM_NIL_COND, use
7378 SCM_NULLP || SCM_NILP instead of checks against (removed)
7379 scm_lisp_nil. Removed switch cases for SCM_IM_NIL_IFY,
7380 SCM_IM_T_IFY, SCM_IM_0_COND, SCM_IM_0_IFY, SCM_IM_1_IFY.
7381
7382 * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null,
7383 scm_m_while, scm_nil_eq): Commented out; I don't think we need
7384 these, but I don't want to remove them yet, just in case.
7385 (scm_init_lang): Define `%nil' variable on Scheme level to hold
7386 Elisp nil value.
7387
7388 * lang.h (SCM_NILP): Test against Elisp nil value instead of
7389 against (removed) scm_lisp_nil.
7390 (SCM_NILNULLP, SCM_NIL2EOL, SCM_EOL2NIL): Commented out.
7391 (SCM_NULL_OR_NIL_P): New.
7392
7393 * list.c (scm_append): Use SCM_VALIDATE_NULL_OR_NIL instead of
7394 SCM_VALIDATE_NULL.
7395
7396 * print.c (scm_isymnames): Fix comment. Remove #@nil-ify,
7397 #@t-ify, #@0-cond, #@0-ify, #@1-ify. Add #nil (for SCM_ELISP_NIL
7398 value).
7399
7400 * sort.c (scm_sorted_p, scm_merge, scm_merge_list_x, scm_merge_x,
7401 scm_sort_x, scm_sort, scm_stable_sort_x, scm_stable_sort): Use
7402 SCM_NULL_OR_NIL_P instead of SCM_NULLP. In constructions like `if
7403 (SCM_NULLP (x)) return SCM_EOL;', return x rather than SCM_EOL.
7404
7405 * tags.h (SCM_IM_NIL_IFY, SCM_IM_T_IFY, SCM_IM_0_COND,
7406 SCM_IM_0_IFY, SCM_IM_1_IFY): Removed.
7407 (SCM_IM_BIND, SCM_IM_DELAY, SCM_IM_CALL_WITH_VALUES, SCM_UNBOUND):
7408 Numbering shifted down accordingly.
7409 (SCM_ELISP_NIL): New IFLAG.
7410
7411 * validate.h (SCM_VALIDATE_NULL_OR_NIL): New.
7412
7413 2002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
7414
7415 * eval.c: Removed outdated references to "everr". Improved some
7416 comments.
7417
7418 (scm_deval_args, deval_args): Renamed scm_deval_args to
7419 deval_args, since it is not part of the interface.
7420
7421 (SCM_CEVAL): Added (maybe somewhat verbose) comment. Avoid to
7422 use references to debug.vect[0] before it exists. Add parentheses
7423 to switch statement.
7424
7425 * goops.h: Added local emacs variables.
7426
7427 2002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
7428
7429 * eval.[ch] (scm_deval_args): Made static.
7430
7431 * srcprop.c (scm_source_property): Remove redundant SCM_IMP
7432 test.
7433
7434 * strings.c (scm_c_string2str): Clarified comment. Replaced
7435 THINKME by FIXME for uniformness. Removed question about whether
7436 arguments need to be protected from garbage collection: Arguments
7437 must be protected as any other variable.
7438
7439 2002-01-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
7440
7441 * procs.h (SCM_CLOSURE_BODY): New Macro.
7442
7443 * debug.c (scm_procedure_name, scm_procedure_source), eval.c
7444 (SCM_CEVAL, SCM_APPLY), goops.c (scm_sys_initialize_object,
7445 get_slot_value, set_slot_value), procs.c
7446 (scm_procedure_documentation), sort.c (closureless), stacks.c
7447 (get_applybody): Replace SCM_CDR (SCM_CODE (...)) by
7448 SCM_CLOSURE_BODY.
7449
7450 * sort.c (closureless): Prefer !SCM_FOOP over SCM_NFOOP.
7451
7452 2001-12-26 Marius Vollmer <mvo@zagadka.ping.de>
7453
7454 * Makefile.am (guile-procedures.txt): When we don't have makeinfo,
7455 use "cp" instead.
7456
7457 2001-12-16 Marius Vollmer <mvo@zagadka.ping.de>
7458
7459 * stacks.c, stacks.h (scm_t_stackype): Renamed to scm_stack_type
7460 everywhere.
7461
7462 * continuations.c (scm_make_continuation): Do not retain the
7463 throw_value when the continuation is invoked.
7464
7465 2001-12-08 Stefan Jahn <stefan@lkcc.org>
7466
7467 * strings.c (scm_c_string2str): New function. Converts a
7468 given Scheme string into a C string. Also put in two
7469 THINKME's regarding the malloc policy for the missing converter
7470 routines.
7471
7472 2001-12-01 Neil Jerram <neil@ossau.uklinux.net>
7473
7474 * gh_data.c (gh_module_lookup): Use scm_str2symbol rather than
7475 gh_symbol2scm.
7476
7477 2001-11-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
7478
7479 * gc.h (SCM_GC_CELL_WORD, SCM_GC_CELL_OBJECT,
7480 SCM_GC_SET_CELL_WORD, SCM_GC_SET_CELL_OBJECT): New macros.
7481
7482 (SCM_GC_CELL_TYPE, SCM_CELL_WORD, SCM_CELL_OBJECT,
7483 SCM_SET_CELL_WORD, SCM_SET_CELL_OBJECT, SCM_FREE_CELL_CDR,
7484 SCM_GC_SET_CELL_OBJECT): Express in terms of SCM_GC_CELL_*
7485 macros.
7486
7487 (SCM_FREE_CELL_P): Express in terms of SCM_GC_CELL_TYPE.
7488
7489 * inline.h (scm_alloc_cell, scm_alloc_double_cell): Use
7490 SCM_GC_CELL_* macros when accessing free cells.
7491
7492 2001-11-25 Marius Vollmer <mvo@zagadka.ping.de>
7493
7494 * vectors.h (SCM_MAKE_VECTOR_TAG): New.
7495 * unif.h (SCM_MAKE_BITVECTOR_TAG, SCM_MAKE_UVECTOR_TAG): New.
7496 * symbols.h (SCM_MAKE_SYMBOL_TAG): New.
7497 * strings.h (SCM_MAKE_STRING_TAG): New.
7498 * procs.h (SCM_MAKE_CCLO_TAG): New.
7499 * numbers.h (SCM_MAKE_BIGNUM_TAG): New.
7500
7501 * goops.h: Replaced SCM_DEBUG_DEPRECATED with
7502 !SCM_ENABLE_DEPRECATED.
7503
7504 * async.c, async.h (scm_system_async_mark_from_signal_handler):
7505 New.
7506
7507 * scmsigs.c (scm_take_signal): Removed all code that assumes that
7508 signal handlers are allowed to divert the flow of control. Call
7509 scm_system_async_mark_from_signal_handler instead of
7510 scm_system_async_mark.
7511
7512
7513 Deprecated SCM_NEWCELL and SCM_NEWCELL2. Added scm_alloc_cell and
7514 scm_alloc_double_cell in their place.
7515
7516 * gc.h (SCM_GC_SET_ALLOCATED, scm_debug_newcell,
7517 scm_debug_newcell2, scm_tc16_allocated): Removed from header.
7518 (scm_deprecated_newcell, scm_deprecated_newcell2): New.
7519 (SCM_NEWCELL, SCM_NEWCELL2): Implement in terms of
7520 scm_deprecated_newcell and scm_deprecated_newcell2.
7521
7522 gc.c (scm_tc16_allocated): Only define when including deprecated
7523 features.
7524 (scm_debug_newcell, scm_debug_newcell2): Removed.
7525 (scm_init_storage): Do not initialize scm_tc16_allocated.
7526 (scm_init_gc): Do it here.
7527 (allocated_mark): New, from old code.
7528 (scm_deprecated_newcell, scm_deprecated_newcell2): New.
7529
7530 * inline.c, inline.h: New files.
7531 * Makefile.am: Added them in all the right places.
7532
7533 * _scm.h: Include "libguile/inline.h".
7534
7535 * alist.c, coop-threads.c, debug.c, environments.c, eval.c,
7536 fports.c, gh_data.c, goops.c, guardians.c, lang.c, list.c,
7537 num2float.i.c, numbers.c, pairs.c, ports.c, print.c, procs.c,
7538 smob.c, smob.h, strings.c, strports.c, struct.c, symbols.c,
7539 unif.c, variable.c, vectors.c, vports.c, weaks.c: Replaced
7540 SCM_NEWCELL and SCM_NEWCELL2 with scm_alloc_cell and
7541 scm_alloc_double_cell, respectively.
7542
7543 2001-11-23 Marius Vollmer <mvo@zagadka.ping.de>
7544
7545 * modules.c (scm_c_use_module): Adapt to changes to
7546 `process-use-modules'.
7547
7548 2001-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
7549
7550 * numbers.c (scm_divide): Fix more division by zero errors.
7551
7552 2001-11-21 Gary Houston <ghouston@arglist.com>
7553
7554 * Makefile.am (OMIT_DEPENDENCIES): removed, since it seems to be
7555 obsolete. autogen.sh says:
7556 invalid unused variable name: `OMIT_DEPENDENCIES'
7557
7558 2001-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
7559
7560 * numbers.c (scm_divide): Fix (/ 0). Thanks to Keith Wright for
7561 reporting the bug.
7562
7563 2001-11-21 Marius Vollmer <mvo@zagadka.ping.de>
7564
7565 * Makefile.am (install-exec-hook): Prepend $(DESTDIR) to filename.
7566 Thanks to Eric Gillespie, Jr!
7567
7568 2001-11-21 Stefan Jahn <stefan@lkcc.org>
7569
7570 * win32-socket.c (getservent, setservent, endservent,
7571 getprotoent, setprotoent, endprotoent): New functions.
7572 Appropriate replacements for M$-Windows.
7573
7574 * numbers.c (SIZE_MAX, PTRDIFF_MAX, PTRDIFF_MIN): Reintroduced
7575 these definitions for GUILE_DEBUG.
7576
7577 * net_db.c: Include "win32-socket.h" if compiling with a native
7578 M$-Windows compiler. Include some pieces of code (protoent and
7579 servent interface) protected by HAVE_* macros when using a
7580 native M$-Windows compiler.
7581
7582 2001-11-20 Marius Vollmer <mvo@zagadka.ping.de>
7583
7584 * modules.c (scm_c_export): Do nothing when the first argument is
7585 already the terminating NULL. Thanks to Han-Wen Nienhuys!
7586
7587 2001-11-20 Thien-Thi Nguyen <ttn@glug.org>
7588
7589 * Makefile.am (libpath.h): In SCM_BUILD_INFO,
7590 also include `buildstamp'.
7591
7592 2001-11-18 Rob Browning <rlb@defaultvalue.org>
7593
7594 * version.c
7595 (s_scm_major_version): use SCM_MAJOR_VERSION.
7596 (s_scm_minor_version): use SCM_MINOR_VERSION.
7597 (s_scm_micro_version): use SCM_MICRO_VERSION.
7598 (s_scm_version): use SCM_MAJOR_VERSION, SCM_MINOR_VERSION, and
7599 SCM_MICRO_VERSION.
7600
7601 * version.h.in
7602 (SCM_MAJOR_VERSION): renamed from SCM_GUILE_MAJOR_VERSION.
7603 (SCM_MINOR_VERSION): renamed from SCM_GUILE_MINOR_VERSION.
7604 (SCM_MICRO_VERSION): renamed from SCM_GUILE_MICRO_VERSION.
7605
7606 2001-11-18 Neil Jerram <neil@ossau.uklinux.net>
7607
7608 * vectors.c (scm_vector_move_left_x, scm_vector_move_right_x):
7609 Rewrite docstrings without reference to substring-move-left/right,
7610 since the latter no longer exist.
7611
7612 2001-11-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
7613
7614 * eval.c: Removed bogus comment about acros.
7615
7616 (scm_unmemocar): Use !SCM_CONSP instead of SCM_IMP.
7617 Minimize scope of local variable. Eliminate dependency on
7618 macro DEBUG_EXTENSIONS.
7619
7620 (s_splicing): New error message string.
7621
7622 (scm_m_body): Issue 'bad body' message rather than 'missing
7623 expression' message.
7624
7625 (scm_m_quote): Eliminate unnecessary copying.
7626
7627 (scm_m_lambda, scm_m_letstar, scm_m_letrec, scm_m_let): Leave the
7628 checking of the body to scm_m_body.
7629
7630 (scm_m_do): Move comment to function header. Rename arg1 to
7631 binding. Made the code a bit easier to read.
7632
7633 (evalcar): Removed.
7634
7635 (iqq): Added a comment. Changed the depth parameter to
7636 unsigned. Use size_t for vector lengths. Make sure vector object
7637 is gc protected as long as its contents are read. Add some syntax
7638 checks. Get rid of unnecessary SCM_IMP test. Clean up the
7639 control structure a bit.
7640
7641 (scm_m_delay): Added comment about the implementation of
7642 scm_m_delay.
7643
7644 (scm_m_define): Add comment about guile's currying define
7645 syntax. Renamed 'proc' to 'name'. Eliminate dependency on macro
7646 DEBUG_EXTENSIONS. Simplified code a bit. Eliminate SICP code.
7647
7648 (scm_m_letrec1): Removed. Part of the functionality is taken
7649 over by the new function 'transform_bindings'.
7650
7651 (transform_bindings): New function. Takes over some of the
7652 functionality of removed function 'scm_m_letrec1', namely to split
7653 a list of bindings into a reversed list of variables and a list of
7654 initializers.
7655
7656 (scm_m_letrec): Call 'transform_bindings'.
7657
7658 (scm_m_let): Minimized scope of local variables. Renamed 'proc'
7659 to 'temp' and 'arg1' to 'binding'. Eliminated redundant SCM_NIMP
7660 test. Use 'transform_bindings'. Fixed scoping error with named
7661 let (Thanks to Aubrey Jaffer for reporting the bug and to Neil
7662 Jerram for suggesting the fix). Cleaned up the control structure
7663 a bit.
7664
7665 (scm_m_expand_body): Use 'transform_bindings'. Eliminated
7666 unnecessary consing. Eliminated unnecessary
7667 SCM_DEFER/ALLOW_INTS.
7668
7669 (SCM_CEVAL): Un-obfuscated some loops.
7670
7671 2001-11-16 Neil Jerram <neil@ossau.uklinux.net>
7672
7673 * gc.h (scm_unhash_name): Old declaration removed.
7674
7675 * eval.c (s_scm_eval): Change @var{primitive-eval} to
7676 @code{primitive-eval}.
7677
7678 * feature.c, vectors.c, net_db.c, unif.c, weaks.c, struct.c,
7679 version.c, alist.c, ports.c, ramap.c, unif.c, strings.c, list.c:
7680 Change @deffnx lines in docstrings to say {Scheme Procedure}
7681 rather than primitive or procedure.
7682
7683 * posix.c (scm_execl), filesys.c (scm_close), unif.c
7684 (scm_array_set_x, scm_array_contents, scm_uniform_array_read_x,
7685 scm_bit_set_star_x, scm_bit_invert_x), ramap.c (scm_array_fill_x,
7686 scm_array_for_each, scm_array_index_map_x), vectors.c (scm_vector,
7687 scm_make_vector, scm_vector_to_list, scm_vector_fill_x), strop.c
7688 (scm_string_split, scm_string_ci_to_symbol), strings.c
7689 (scm_string_p), sort.c (scm_merge), print.c (scm_newline),
7690 macros.c (scm_macro_type), alist.c (scm_acons, scm_assq):
7691 Docstring fixes and improvements reflecting edits that have been
7692 made in the reference manual source.
7693
7694 * objprop.c (scm_object_properties, scm_set_object_properties_x,
7695 scm_object_property, scm_set_object_property_x): Remove invalid
7696 @deffnx lines for corresponding procedure property primitives.
7697
7698 These changes add a @deffnx C function declaration and function
7699 index entries for each Guile primitive to the copy of the doc
7700 snarf output that is used for reference manual synchronization.
7701 Online help is unchanged.
7702
7703 * snarf.h (SCM_SNARF_DOCS): Output primitive's C function name.
7704 (SCM_DEFINE, SCM_DEFINE1, SCM_REGISTER_PROC): Supply to C function
7705 name to SCM_SNARF_DOCS.
7706
7707 * guile-snarf-docs-texi.in: Pass the shell script's arguments into
7708 snarf-check-and-output-texi.
7709
7710 * Makefile.am (guile-procedures.texi): New rule.
7711 (BUILT_SOURCES, guile.texi, guile-procedures.txt, CLEANFILES):
7712 Changed so that the last stage of doc snarfing is now performed
7713 twice, once to produce guile-procedures.txt for online help, and
7714 once to produce guile.texi for reference manual synchronization.
7715
7716 2001-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
7717
7718 * eval.c (RETURN): Wrap in do{}while(0) in order to make it
7719 safely usable as a single statement followed by a ';', for example
7720 in an if statement.
7721
7722 (SCM_CEVAL, SCM_APPLY): Clean up code using 'RETURN'.
7723
7724 2001-11-13 Neil Jerram <neil@ossau.uklinux.net>
7725
7726 * random.c (scm_random_solid_sphere_x,
7727 scm_random_hollow_sphere_x): Correct "shere" typos.
7728
7729 * hashtab.c (scm_hash_fold): Add missing apostrophe to docstring.
7730
7731 * version.c (scm_version): Update docstring to include
7732 `micro-version'.
7733
7734 2001-11-13 Marius Vollmer <mvo@zagadka.ping.de>
7735
7736 * modules.c (scm_c_export): Call va_end after collecting the
7737 symbols.
7738
7739 * strop.h, strop.c (scm_substring_move_left_x,
7740 scm_substring_move_right_x): Removed.
7741
7742 * __scm.h (HAVE_UINTPTR_T, HAVE_PTRDIFF_T, HAVE_LONG_LONG,
7743 HAVE_LONG_LONGS): Define to "1" when defining them, to mirror what
7744 configure does.
7745
7746 2001-11-12 Marius Vollmer <mvo@zagadka.ping.de>
7747
7748 * numbers.c: Document macros to define when including
7749 num2integral.i.c. MAX_VALUE and MIN_VALU are no longer used, we
7750 now rely on SIZEOF_ macros that have been figured out at
7751 configure time.
7752
7753 * num2integral.i.c: Adapt to new interface.
7754 (NUM2INTEGRAL): Test whether a fixnum can be represented in the
7755 target type by casting it and checking whether it is still the
7756 same. Do not try to handle bignums for integral types that are
7757 smaller than fixnums. When handling bignums, collect the
7758 magnituse first into a unsigned type, and correctly check for
7759 overflow.
7760 (INTEGRAL2BIG): Do not use MIN_VALUE explicitely by observing that
7761 only -MIN_VALUE can still be negative of all negative numbers (in
7762 twos-complement).
7763
7764 * tags.h (SIZEOF_SCM_T_BITS): Define it appropriately.
7765
7766 * __scm.h: Define HAVE_UINTPTR_T, HAVE_PTRDIFF_T and
7767 HAVE_LONG_LONG depending on whether their size is non-zero.
7768
7769 2001-11-11 Thien-Thi Nguyen <ttn@glug.org>
7770
7771 * strop.c (scm_string_null_p): Docfix; nfc.
7772 Thanks to Scott Lenser.
7773
7774 2001-11-07 Neil Jerram <neil@ossau.uklinux.net>
7775
7776 * extensions.c (scm_load_extension): Canonicalize docstring
7777 whitespace.
7778
7779 * unif.c (scm_uniform_array_write), ports.c
7780 (scm_current_output_port, scm_force_output), dynwind.c
7781 (scm_dynamic_wind), scmsigs.c (scm_setitimer, scm_getitimer),
7782 filesys.c (scm_open, scm_lstat), struct.c
7783 (scm_make_struct_layout), random.c (scm_random,
7784 scm_random_solid_sphere_x, scm_random_hollow_sphere_x, strop.c
7785 (scm_i_index): Remove superfluous whitespace from end of docstring
7786 lines.
7787
7788 * filesys.c (scm_select), guardians.c (scm_guardian_greedy_p),
7789 strings.c (scm_make_string), variable.c (scm_make_variable,
7790 scm_make_undefined_variable, scm_variable_p, scm_variable_set_x,
7791 scm_variable_bound_p), scmsigs.c (scm_setitimer, scm_getitimer),
7792 posix.c (scm_crypt), struct.c (scm_make_vtable_vtable), hashtab.c
7793 (scm_hash_fold), ports.c (scm_port_for_each): Remove superfluous
7794 newline at end of docstrings.
7795
7796 * modules.c (scm_set_current_module): Add missing newline to
7797 docstring.
7798
7799 2001-11-07 Stefan Jahn <stefan@lkcc.org>
7800
7801 * win32-socket.[ch]: New files. Defines Winsock-API error codes
7802 and makes them available through Guile. That is because the
7803 Winsock-API does not store its errors in `errno' and thus cannot
7804 return error messages via `strerror (errno)'.
7805
7806 * socket.c (scm_init_socket): Initialize `win32-socket' part
7807 here under M$-Windows.
7808
7809 * numbers.h: Added missing declaration of
7810 `scm_sys_check_number_conversions()'.
7811
7812 * error.c: Local definition of SCM_I_STRERROR and SCM_I_ERRNO
7813 and use in `(strerror)' and `(system-error)'.
7814
7815 * Makefile.am (EXTRA_libguile_la_SOURCES): Added
7816 `win32-socket.[ch]' to extra source and header files.
7817
7818 2001-11-06 Marius Vollmer <mvo@zagadka.ping.de>
7819
7820 * script.c (scm_shell_usage, scm_compile_shell_switches): Prepend
7821 a call to turn-on-debugging when --debug has been given instead of
7822 turning it on directly. Also, handle new `--no-debug' option,
7823 which might suppress the call to turn-on-debugging.
7824
7825 2001-11-05 Stefan Jahn <stefan@lkcc.org>
7826
7827 * struct.c (s_scm_struct_vtable_p): Corrected docstring.
7828
7829 2001-11-04 Stefan Jahn <stefan@lkcc.org>
7830
7831 * Makefile.am (libguile_la_LIBADD): Added $(THREAD_LIBS_LOCAL)
7832 here (was at guile_LDADD) which describes the dependency
7833 correctly and allows a clean build on Win32.
7834
7835 * __scm.h (SCM_API): Follow-up patch. Renamed __FOO__ macros
7836 into FOO.
7837
7838 * __scm.h: USE_DLL_IMPORT indicates the usage of the DLL
7839 import macros for external libraries (libcrypt, libqthreads,
7840 libreadline and libregex).
7841
7842 * coop-defs.h: Include <winsock2.h> for `struct timeval'.
7843
7844 * posix.c (flock): Added support for flock() in M$-Windows.
7845
7846 * guile.c (SCM_IMPORT): Follow-up patch. Use SCM_IMPORT instead
7847 of __SCM_IMPORT__.
7848
7849 * fports.c (getflags): Differentiate reading and writing pipes
7850 descriptors.
7851
7852 * filesys.c (S_IS*): Redefine all of the S_IS*() macros for
7853 M$-Windows.
7854
7855 * coop.c (coop_condition_variable_timed_wait_mutex): Use
7856 conditionalized error code if `ETIMEDOUT' is not available.
7857 (scm_thread_usleep): Remove bogus declaration of `struct timeval
7858 timeout'.
7859
7860 * numbers.c (PTRDIFF_MIN): Moved this definition where it actually
7861 belongs. That is because NO_PREPRO_MAGIC gets undefined after
7862 each inclusion of `num2integral.i.c'.
7863 (SIZE_MAX): Define NO_PREPRO_MAGIC if SIZE_MAX is undefined.
7864
7865 2001-11-03 Marius Vollmer <mvo@zagadka.ping.de>
7866
7867 * eval.c (scm_m_begin): Allow `(begin)`, with no subforms.
7868 (SCM_CEVAL): Evaluate an empty `begin' to SCM_UNSPECIFIED.
7869
7870 2001-11-02 Mikael Djurfeldt <mdj@linnaeus>
7871
7872 * print.c (scm_iprin1): Mark print state as revealed when
7873 dispatching to generic write or display.
7874
7875 * unif.c (scm_ra2contig): Fixed memory overwrite bug.
7876
7877 2001-11-02 Marius Vollmer <mvo@zagadka.ping.de>
7878
7879 Support for native Win32. Thanks to Stefan Jahn!
7880
7881 * Makefile.am: Add win32-uname.c, win32-uname.h, win32-dirent.c
7882 and win32-dirent.h to extra source and header files. These
7883 include the uname() and the POSIX dirent interface implementation
7884 for M$-Windows. Put `-no-undefined' into LDFLAGS to support
7885 linkers which do not allow unresolved symbols inside shared
7886 libraries. Corrected `guile_filter_doc_snarfage$(EXEEXT)'
7887 dependency.
7888
7889 * __scm.h: Defined SCM_API. This macro gets prepended to all
7890 function and data definitions which should be exported or imported
7891 in the resulting dynamic link library in the Win32 port.
7892
7893 * __scm.h, alist.h, arbiters.h, async.h, backtrace.h, boolean.h,
7894 chars.h, continuations.h, coop-defs.h, coop-threads.h,
7895 debug-malloc.h, debug.h, deprecation.h, dynl.h, dynwind.h,
7896 environments.h, eq.h, error.h, eval.h, evalext.h, extensions.h,
7897 feature.h, filesys.h, fluids.h, fports.h, gc.h, gdb_interface.h,
7898 gdbint.h, gh.h, goops.h, gsubr.h, guardians.h, hash.h, hashtab.h,
7899 hooks.h, init.h, ioext.h, iselect.h, keywords.h, lang.h, list.h,
7900 load.h, macros.h, mallocs.h, modules.h, net_db.h, numbers.h,
7901 objects.h, objprop.h, options.h, pairs.h, ports.h, posix.h, print.h,
7902 procprop.h, procs.h, properties.h, ramap.h, random.h, rdelim.h,
7903 read.h, regex-posix.h, root.h, rw.h, scmsigs.h, script.h, simpos.h,
7904 smob.h, socket.h, sort.h, srcprop.h, stackchk.h, stacks.h, stime.h,
7905 strings.h, strop.h, strorder.h, strports.h, struct.h, symbols.h,
7906 tags.h, threads.h, throw.h, unif.h, values.h, variable.h, vectors.h,
7907 vports.h, weaks.h:
7908 Prefixed each each exported symbol with SCM_API.
7909
7910 * continuations.c: Added comment about the use of the extern
7911 declarations of {get,set}context() functions used in the ia64 port.
7912
7913 * continuations.h, gc.c: `__libc_ia64_register_backing_store_base'
7914 is meant to be a `unsigned long *'.
7915
7916 * filesys.c: Include `direct.h' if possible. Use local
7917 `win32-dirent.h' for the native M$-Windows port. Define S_IS*()
7918 macros for M$-Windows. Implementation of `fstat_Win32()' which is
7919 able to differentiate between sockets and other file descriptors.
7920 Use this function as wrapper in `scm_fstat()'. Fixed typo in
7921 `scm_dirname()'.
7922
7923 * fports.c: Include `io.h' is possible. Put `*fp' into referring
7924 statement block in `scm_fport_buffer_add()'.
7925 Some corrections in `getflags()'.
7926
7927 * gdb_interface.h (GDB_INTERFACE): Also support __CYGWIN__.
7928
7929 * guile.c: Make sure to define __SCM_IMPORT__ for shared library
7930 build on Win32. Disable preloaded symbols on Win2 platforms.
7931
7932 * ioext.c, ports.c: Include `io.h' is possible.
7933
7934 * mkstemp.c: Include `process.h' is possible.
7935
7936 * net_db.c: Disable extern declaration of `h_errno' for __CYGWIN__,
7937 too.
7938 Put `scm_return_entry()' into HAVE_GETSERVENT conditional.
7939
7940 * posix.c: Remove unnecessary dirent includes and defines. Include
7941 local `win32-uname.h' for MinGW. Extern declaration of
7942 `mkstemp()' for systems where it does not exists. Make
7943 `getlogin()' available on M$-Windows.
7944
7945 * scmsigs.c: Made `usleep()' avalable on MinGW.
7946
7947 * stime.c: On M$-Windows `tzname[]' is known to be `_tzname[]'.
7948
7949 * win32-dirent.c: Include "win32-dirent.h", not "dirent.h".
7950
7951 * win32-uname.c: Include "win32-uname.h", not "uname.h".
7952
7953 2001-10-28 Mikael Djurfeldt <mdj@linnaeus>
7954
7955 * unif.c (scm_uniform_array_read_x, scm_uniform_array_write):
7956 Don't apply scm_uniform_vector_length on arrays.
7957
7958 2001-10-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
7959
7960 * eval.c (scm_lookupcar, scm_m_letstar, scm_m_do, iqq,
7961 scm_m_define, scm_m_letrec1, scm_m_let, scm_m_expand_body,
7962 scm_macroexp, unmemocopy, scm_eval_args, scm_deval_args,
7963 SCM_CEVAL, scm_map, scm_init_eval): When building lists, prefer
7964 scm_list_<n> over scm_cons[2]?.
7965
7966 (scm_unmemocar, scm_m_cond, scm_m_letstar, scm_m_letrec1,
7967 scm_m_let, scm_m_atbind, unmemocopy, SCM_CEVAL, SCM_APPLY): Use
7968 SCM_C[AD][AD]R instead of explicit form.
7969
7970 (scm_m_set_x, scm_m_cond, scm_m_letstar, scm_m_do): Reordered
7971 comparison parameters.
7972
7973 (scm_m_case, scm_m_cond, scm_m_letstar, scm_m_do, SCM_CEVAL): Use
7974 !SCM_NULLP instead of SCM_NIMP.
7975
7976 (scm_m_case): Don't copy the form. Renamed proc to clause and
7977 minimized its scope. Renamed x to clauses. Removed side
7978 effecting operation from macro call.
7979
7980 (scm_m_cond): Don't copy the form. Renamed arg1 to clause and
7981 minimized its scope. Renamed x to clauses. Minimized the scope
7982 of variable 'len'. Make sure the else clause is treated specially
7983 even in case of '=>' occurences. Don't change the else to #t in
7984 order to be able to distinguish this case in the evaluator. Leave
7985 type checking of the recipient to the evaluator.
7986
7987 (scm_c_improper_memq): Made the comment somewhat clearer.
7988
7989 (scm_m_lambda): Renamed proc to formals. Removed unnecessary
7990 test for SCM_IM_LET at the place of the formal parameters.
7991 Simplified the formal parameter checking.
7992
7993 (scm_m_letstar): Added Comment. Renamed proc to bindings.
7994 Renamed arg1 to binding and minimized its scope. Eliminated
7995 unnecessary consing.
7996
7997 (scm_m_do): Renamed proc to bindings. Minimized the scope of
7998 variable 'len'.
7999
8000 (build_binding_list): New static function.
8001
8002 (unmemocopy): Don't use SCM_TYP7 on pairs (it's unclean).
8003 Further, split up the 'letrec' unmemoizing code to the
8004 corresponding parts for 'do', 'let' and 'letrec', adding comments
8005 to each form. Cleanup the handling of the do form (This removes
8006 some *real* code :-).
8007
8008 (SCM_CEVAL): Removed side effecting operation from macro call.
8009 Handle the 'else clause of the 'cond form specially - the symbol
8010 'else is not replaced with #t any more.
8011
8012 2001-10-14 Gary Houston <ghouston@arglist.com>
8013
8014 * version.c (scm_version): use sprintf instead of snprintf,
8015 for portability. thanks to Bill Schottstaedt.
8016
8017 2001-10-14 Mikael Djurfeldt <mdj@linnaeus>
8018
8019 * read.c (scm_lreadr): When user-defined hash procedure returns
8020 SCM_UNSPECIFIED: Fall back to standard handling instead of raising
8021 an exception. (This prevents parsing of uniform vectors from
8022 interfering with parsing of numbers.)
8023
8024 2001-10-13 Marius Vollmer <mvo@zagadka.ping.de>
8025
8026 * numbers.c: Set NO_PREPRO_MAGIC when defining our version of
8027 PTRDIFF_MIN. Thanks to Ken Raeburn.
8028
8029 2001-10-07 Marius Vollmer <mvo@zagadka.ping.de>
8030
8031 * Makefile.am (EXTRA_libguile_la_SOURCES): Added "mkstemp.c".
8032
8033 * eval.c (scm_m_atbind): First try to find the variable without
8034 defining it locally; when it has not been found, define it
8035 locally.
8036
8037 * modules.c (module_variable): Pass over variables that exist but
8038 are unbound.
8039
8040 2001-10-06 Marius Vollmer <mvo@zagadka.ping.de>
8041
8042 * backtrace.c (display_backtrace_file_and_line): Only use
8043 scm_basename when POSIX support is compiled in. Thanks to Chris
8044 Cramer.
8045
8046 2001-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
8047
8048 * numbers.c (mem2uinteger): Return number read so far when coming
8049 across a hexdigit after having read a # or if not reading a hex
8050 value. This will enable the calling code to correctly handle
8051 forms like 1e2. (The background is, that the exponent markers d,
8052 e and f are also hexdigits.) Thanks to Mikael Djurfeldt for
8053 providing this patch.
8054
8055 (mem2complex): Fix erroneous double-negation. Now, numbers like
8056 1-i will be read correctly.
8057
8058 2001-10-12 Mikael Djurfeldt <mdj@linnaeus>
8059
8060 * debug.c (scm_mem_to_proc): Fixed typo in previous change.
8061
8062 * validate.h (SCM_VALIDATE_DOUBLE_DEF_COPY): New macro.
8063
8064 2001-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
8065
8066 * print.c (scm_print_state_vtable, print_state_pool):
8067 Initialize. These variables are now registered as gc roots.
8068
8069 (scm_current_pstate): Update documentation.
8070
8071 (scm_current_pstate, scm_make_print_state, scm_free_print_state,
8072 scm_prin1, scm_init_print): print_state_pool is registered as a
8073 gc root and thus does not need to be protected by a surrounding
8074 pair any more.
8075
8076 (make_print_state): The car of print_state_pool no longer holds
8077 the scm_print_state_vtable.
8078
8079 (scm_current_pstate, scm_make_print_state, print_circref,
8080 scm_iprin1, scm_prin1, scm_iprlist): Prefer !SCM_<foo> over
8081 SCM_N<foo>.
8082
8083 (scm_prin1): When building lists, prefer scm_list_<n> over
8084 scm_cons[2]?.
8085
8086 (scm_iprlist): Removed a redundant SCM_IMP test.
8087
8088 (scm_simple_format): Use SCM_EQ_P to compare SCM values.
8089
8090 2001-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
8091
8092 * debug.c (scm_make_iloc): Prefer !SCM_<foo> over SCM_N<foo>.
8093
8094 (scm_memcons, scm_mem_to_proc): When building lists, prefer
8095 scm_list_<n> over scm_cons[2]?.
8096
8097 (scm_mem_to_proc): Prefer SCM_CONSP over SCM_NIMP.
8098
8099 (scm_procedure_name): Use SCM_CADR instead of explicit form.
8100
8101 (debugobj_print): Coerce scm_intprint arg 1 to long, not int.
8102 Thanks to Rob Browning for the patch (see log entry 2001-09-21) -
8103 for some reason his patch didn't make it into the cvs.
8104
8105 2001-10-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
8106
8107 * numbers.c (mem2decimal_from_point): Cleaned up the parsing a
8108 little bit - should even be somewhat more accurate now.
8109
8110 2001-10-08 Rob Browning <rlb@defaultvalue.org>
8111
8112 * gc.c: support ia64 register backing store.
8113 (SCM_MARK_BACKING_STORE): new macro.
8114
8115 * continuations.h: support ia64 register backing store.
8116 (struct scm_t_contregs): add ia64 register backing store.
8117
8118 * continuations.c: support ia64 register backing store.
8119 (continuation_mark): mark ia64 register backing store.
8120 (continuation_free): free ia64 register backing store.
8121 (scm_make_continuation): capture ia64 register backing store.
8122 (copy_stack_and_call): copy ia64 register backing store.
8123
8124 2001-10-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
8125
8126 * hashtab.c (scm_hash_fn_create_handle_x): The result of assoc_fn
8127 is known to be #f if no entry is found. Thus, use !SCM_FALSEP
8128 instead of SCM_NIMP to test for that case.
8129
8130 * strings.h (SCM_SET_STRING_LENGTH): Cast the length to
8131 scm_t_bits instead of long.
8132
8133 2001-10-06 Marius Vollmer <mvo@zagadka.ping.de>
8134
8135 * tags.h (SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
8136 SCM_T_SIGNED_BITS_MIN): New.
8137 * numbers.h (SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM):
8138 Use them to make these macros computable by the preprocessor.
8139
8140 * num2integral.i.c (INTEGRAL2NUM): Let the preprocessor test
8141 whether the integral type fits in a fixnum, not the compiler.
8142 This removes a spurious compiler warning. Also, honor the
8143 NO_PREPRO_MAGIC flag to suppress any preprocessor tests. This is
8144 needed for `long long's.
8145
8146 * numbers.c: Define NO_PREPRO_MAGOC when including
8147 num2integral.c.i for `long long' and `signed long long'.
8148
8149 2001-10-06 Mikael Djurfeldt <mdj@linnaeus>
8150
8151 These changes fixes a race condition in the Guile coop - pthread
8152 compatibility code.
8153
8154 * coop.c (mother_awake_p): New variable.
8155 (coop_create): Set mother_awake_p before creating or signalling
8156 mother; wait until mother is going to sleep before returning.
8157 (mother): Reset mother_awake_p before going to sleep.
8158
8159 2001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
8160
8161 * options.c (protected_objects, scm_init_options): The content of
8162 protected_objects is now protected from garbage collection using
8163 scm_gc_register_root instead of scm_permanent_object.
8164
8165 (get_option_setting): New static function that computes an option
8166 setting as it was formerly done in the function scm_options.
8167
8168 (get_documented_option_setting): New static function that
8169 returns option documentation as it was formerly done in the
8170 function scm_options. Note that documentation C strings are no
8171 longer precomputed into SCM objects. Instead, they are converted
8172 into SCM strings every time get_documented_option_setting is
8173 called.
8174
8175 (change_option_setting): New static functions that modifies the
8176 option setting as it was formerly done in the function
8177 scm_options. The function is now exception safe, i. e. won't
8178 cause a memory leak when interrupted. Further, only non-immediate
8179 option values are added to the protection list.
8180
8181 (scm_options): This function now has only the purpose to dispatch
8182 to to get_option_setting, get_documented_option_setting or
8183 change_option_setting, depending on the arguments given to
8184 scm_options.
8185
8186 (scm_init_opts): Don't convert documentation C strings into SCM
8187 strings. Further, don't protect any object values: They _must_
8188 be immediate values, otherwise there is no guarantee that they
8189 have not been collected before anyway.
8190
8191 * options.[ch] (scm_t_option): Made type unsigned, name into a
8192 constant char* and val into a scm_t_bits type.
8193
8194 (scm_options, scm_init_opts): The number of options is guaranteed
8195 to be larger or equal to zero. Thus, the type is changed to
8196 unsigned.
8197
8198 2001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
8199
8200 * num2integral.i.c (NUM2INTEGRAL): Eliminated some warnings about
8201 testing an unsigned value for being >= 0.
8202
8203 2001-10-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
8204
8205 * numbers.h: Removed old comment about using SCM_CAR to access
8206 non-pair cells.
8207
8208 (SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM): Make sure
8209 the return value is signed. Thanks to Brian Crowder for the bug
8210 report.
8211
8212 (SCM_SRS): Avoid unnecessary casting and don't unpack input
8213 values. With this patch, SCM_SRS can be safely used for other
8214 types than scm_t_signed_bits. However, it should still better be
8215 an internal macro and thus be renamed to SCM_I_SRS.
8216
8217 (SCM_MAKINUM, SCM_INUM): Use proper casting.
8218
8219 2001-10-03 Gary Houston <ghouston@arglist.com>
8220
8221 * continuations.h, unif.h: in the descriptions of the bit patterns
8222 of the heap cells, make bit 0 the least significant.
8223
8224 2001-09-25 Thien-Thi Nguyen <ttn@glug.org>
8225
8226 * chars.h (SCM_MAKE_CHAR): Use `scm_t_bits' instead of `intptr_t'.
8227 Thanks to Golubev I. N.
8228
8229 2001-09-25 Gary Houston <ghouston@arglist.com>
8230
8231 * ports.c (scm_drain_input): extended the docstring. thanks to
8232 Alex Schroeder and Thien-Thi Nguyen.
8233
8234 2001-09-23 Mikael Djurfeldt <mdj@linnaeus>
8235
8236 * validate.h (SCM_NUM2FLOAT, SCM_NUM2DOUBLE,
8237 SCM_VALIDATE_FLOAT_COPY, SCM_VALIDATE_DOUBLE_COPY): New
8238 macros. (The NUM names might soon change.)
8239
8240 * numbers.h: Added missing declarations.
8241
8242 2001-09-22 Mikael Djurfeldt <mdj@linnaeus>
8243
8244 * Makefile.am: Distribute num2float.i.c.
8245
8246 * num2float.i.c: New file, multiply included by numbers.c, used
8247 to "templatize" the float <-> num conversion routines.
8248
8249 * numbers.c: New functions: scm_num2float, scm_float2num,
8250 scm_num2double, scm_double2num.
8251
8252 2001-09-21 Rob Browning <rlb@defaultvalue.org>
8253
8254 * .cvsignore: really add version.h
8255
8256 * strings.h (SCM_SET_STRING_LENGTH): coerce "l" to a long.
8257 Otherwise it fails on the alpha. However, we might rather choose
8258 this size conditionally.
8259
8260 * numbers.c (scm_gcd): change "k" to a long from an int.
8261 Otherwise it fails on the alpha. However, we might rather choose
8262 this size conditionally.
8263
8264 * error.c (scm_wta): coerce char* to intptr_t before int
8265 assignment.
8266
8267 * debug.c (debugobj_print): coerce scm_intprint arg 1 to long, not
8268 int.
8269
8270 * chars.h (SCM_MAKE_CHAR): coerce value to intptr_t.
8271
8272 2001-09-20 Mikael Djurfeldt <mdj@linnaeus>
8273
8274 * numbers.c (scm_integer_expt): Accept inexact integer in second
8275 argument. (Thanks to Bill Schottstaedt.)
8276
8277 2001-09-20 Rob Browning <rlb@defaultvalue.org>
8278
8279 * .cvsignore: add version.h
8280
8281 * versiondat.h.in: removed (obsolete).
8282
8283 * version.h.in: renamed from version.h.
8284 (SCM_GUILE_MAJOR_VERSION): new public macro.
8285 (SCM_GUILE_MINOR_VERSION): new public macro.
8286 (SCM_GUILE_MICRO_VERSION): new public macro.
8287
8288 * version.h: renamed to version.h.in.
8289
8290 * version.c
8291 (scm_major_version): support integer *_VERSION macros.
8292 (scm_minor_version): support integer *_VERSION macros.
8293 (scm_micro_version): support integer *_VERSION macros.
8294 (scm_version): support integer *_VERSION macros.
8295
8296 2001-09-20 Mikael Djurfeldt <mdj@linnaeus>
8297
8298 * error.c, error.h: Made error keys globally accessible.
8299 Applications might want to test for these or use them in a direct
8300 call to scm_error.
8301
8302 * num2integral.i.c (NUM2INTEGRAL): Report an error when these
8303 routines are passed an inexact. This change in behavior is
8304 motivated by concordance with R5RS: It is more common that a
8305 primitive doesn't want to accept an inexact for an exact.
8306
8307 2001-09-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
8308
8309 The following patch partially undoes my patch from 2001-06-30,
8310 where I added the function scm_gc_mark_cell_conservatively. The
8311 function is buggy, since it breaks guile during conservative
8312 marking if a pointer on the stack points directly into the list of
8313 free cells on the heap: With conservative cell marking this will
8314 cause the whole free list to be scanned and marked - boom!
8315
8316 * gc.c (allocated_mark, MARK, heap_segment,
8317 scm_gc_mark_cell_conservatively, scm_init_storage), gc.h
8318 (scm_gc_mark_cell_conservatively): Remove function
8319 scm_gc_mark_cell_conservatively and update the corresponding
8320 comments and uses accordingly. Thanks to Christopher Cramer for
8321 the patch. (Minor corrections by me.)
8322
8323 2001-09-15 Gary Houston <ghouston@arglist.com>
8324
8325 * root.h (scm_root_state): removed the continuation_stack and
8326 continuation_stack_ptr members, which have no apparent purpose.
8327 (scm_continuation_stack, scm_continuation_stack_ptr): #defines
8328 removed.
8329
8330 * root.c (root_mark), init.c (restart_stack, start_stack), gc
8331 (scm_igc): remove all references to contination_stack and
8332 continuation_stack_ptr, avoiding allocation of a vector and
8333 useless processing during gc.
8334
8335 2001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
8336
8337 * guardians.c (tconc_t, t_tconc): Renamed tconc_t to t_tconc.
8338
8339 (TCONC_IN): Make sure that the cell word 0 is initialized last.
8340
8341 (guardians_t, t_guardians): Renamed guardians_t to t_guardians.
8342
8343 (GUARDIAN, GUARDIAN_DATA): Renamed GUARDIAN to GUARDIAN_DATA.
8344
8345 (guardian_apply, scm_get_one_zombie, scm_make_guardian,
8346 mark_and_zombify): Prefer !SCM_<foo> over SCM_N<foo>.
8347
8348 2001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
8349
8350 * guardians.c (mark_dependencies_in_tconc,
8351 whine_about_self_centered_zombies, scm_init_guardians): Register
8352 the static global variable `self_centered_zombies' via
8353 scm_gc_register_root, to make some cdr-ing unnecessary.
8354
8355 2001-09-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
8356
8357 * backtrace.c (display_backtrace_file,
8358 display_backtrace_file_and_line): Use SCM_EQ_P when comparing SCM
8359 values, use SCM_FALSEP when comparing SCM values against #f.
8360 Thanks to Rob Browning for the bug report.
8361
8362 2001-09-12 Martin Baulig <martin@home-of-linux.org>
8363
8364 * strings.[ch] (scm_str2string): New function.
8365
8366 2001-09-06 Marius Vollmer <mvo@zagadka.ping.de>
8367
8368 * gc.c (scm_done_free): Always subtract size from scm_mallocated
8369 when computing nm, even if it's negative.
8370 (scm_must_malloc): Abort on overflow of scm_mtrigger.
8371 (scm_must_realloc): Likewise.
8372
8373 2001-09-01 Michael Livshin <mlivshin@bigfoot.com>
8374
8375 * numbers.c (scm_sys_check_number_conversions): new function,
8376 defined if Guile is compiled in debugging mode. currently checks
8377 `scm_num2ulong', should check much much more.
8378
8379 * num2integral.i.c (NUM2INTEGRAL): when converting a bignum to
8380 unsigned, ensure that it's positive. thanks to Martin Baulig!
8381
8382 2001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
8383
8384 * __scm.h: Added new section about compile time selectable
8385 features.
8386
8387 (long_long, ulong_long, scm_sizet, SCM_WNA, SCM_OUTOFRANGE,
8388 SCM_NALLOC, SCM_HUP_SIGNAL, SCM_INT_SIGNAL, SCM_FPE_SIGNAL,
8389 SCM_BUS_SIGNAL, SCM_SEGV_SIGNAL, SCM_ALRM_SIGNAL, SCM_GC_SIGNAL,
8390 SCM_TICK_SIGNAL, SCM_SIG_ORD, SCM_ORD_SIG, SCM_NUM_SIGS):
8391 Removed.
8392
8393 * deprecation.c (scm_include_deprecated_features): Simplified.
8394
8395 * eval.c (EVALCAR, unmemocopy), eval.h (SCM_XEVALCAR): Use
8396 `SCM_IMP´ instead of `!SCM_CELLP´.
8397
8398 * eval.c (unmemocopy): Eliminate redundant SCM_CELLP tests.
8399 Extract side-effecting operations from macros.
8400
8401 (scm_init_eval): Don't initialize *top-level-lookup-closure*,
8402 scm_top_level_lookup_closure_var and scm_system_transformer.
8403
8404 * gc.c (CELL_P): New local definition to replace SCM_CELLP.
8405
8406 (heap_segment): Use CELL_P instead of SCM_CELLP.
8407
8408 * init.c (start_stack): Don't initialize
8409 scm_top_level_lookup_closure_var and scm_system_transformer.
8410
8411 * modules.c (scm_set_current_module): Don't access
8412 scm_top_level_lookup_closure_var and scm_system_transformer.
8413
8414 (scm_sym2var): Don't call scm_variable_set_name_hint.
8415
8416 (scm_post_boot_init_modules): Removed deprecated initializations.
8417
8418 * print.c (scm_ipruk): Don't access cell contents of non cells.
8419
8420 * strings.c (scm_string_set_x): All strings are writable.
8421
8422 * strings.h (SCM_STRINGP): Use SCM_TYP7 to determine the string
8423 type. There is only one string type now.
8424
8425 (SCM_STRING_COERCE_0TERMINATION_X): Deprecated.
8426
8427 * tags.h: Remove comments about two different string types.
8428
8429 (SCM_CELLP, SCM_NCELLP): Deprecated.
8430
8431 * variable.c (make_variable): Remove code variant for vcells.
8432
8433 * variable.h (SCM_VARIABLE_REF, SCM_VARIABLE_SET,
8434 SCM_VARIABLE_LOC): Remove code variant for vcells.
8435
8436 * __scm.h, deprecation.[ch]: Renamed SCM_DEBUG_DEPRECATED to
8437 SCM_ENABLE_DEPRECATED with the logic reversed.
8438
8439 * dynl.c (moddata, registered_mods), dynl.[ch]
8440 (scm_register_module_xxx, scm_registered_modules,
8441 scm_clear_registered_modules), error.[ch] (scm_wta), eval.c
8442 (*top-level-lookup-closure*), eval.[ch]
8443 (scm_top_level_lookup_closure_var, scm_system_transformer,
8444 scm_eval_3, scm_eval2), gc.h (SCM_SETAND_CAR, SCM_SETOR_CAR,
8445 SCM_SETAND_CDR, SCM_SETOR_CDR, SCM_FREEP, SCM_NFREEP,
8446 SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16,
8447 SCM_GCCDR), gc.[ch] (scm_remember, scm_protect_object,
8448 scm_unprotect_object), modules.c (root_module_lookup_closure,
8449 scm_sym_app, scm_sym_modules, module_prefix, make_modules_in_var,
8450 beautify_user_module_x_var, try_module_autoload_var,
8451 scm_module_full_name), modules.[ch] (scm_the_root_module,
8452 scm_make_module, scm_ensure_user_module, scm_load_scheme_module),
8453 ports.h (scm_port, scm_ptob_descriptor, scm_port_rw_active),
8454 ports.[ch] (scm_close_all_ports_except), random.h (scm_rstate,
8455 scm_rng, scm_i_rstate), strings.h (SCM_SLOPPY_STRINGP,
8456 SCM_RWSTRINGP, SCM_STRING_UCHARS, SCM_STRING_CHARS), strings.[ch]
8457 (scm_read_only_string_p, scm_makstr, scm_makfromstr,
8458 scm_make_shared_substring), tags.h (scm_tc7_substring,
8459 SCM_SLOPPY_CONSP, SCM_SLOPPY_NCONSP, scm_tc7_ssymbol,
8460 scm_tc7_msymbol, scm_tcs_symbols), variable.c (sym_huh),
8461 variable.[ch] (scm_variable_set_name_hint, scm_builtin_variable),
8462 variable.h (SCM_VARVCELL, SCM_UDVARIABLEP, SCM_DEFVARIABLEP):
8463 Removed.
8464
8465 * dynl.c (scm_dynamic_link, scm_dynamic_func), error.c
8466 (scm_error_scm), filesys.c (scm_chown, scm_chmod, scm_open_fdes,
8467 scm_stat, scm_link, scm_rename, scm_delete_file, scm_mkdir,
8468 scm_rmdir, scm_opendir, scm_chdir, scm_symlink, scm_readlink,
8469 scm_lstat, scm_copy_file), fports.c (scm_open_file), ioext.c
8470 (scm_fdopen), net_db.c (scm_gethost, scm_getnet, scm_getproto,
8471 scm_getserv), ports.c (scm_truncate_file, scm_sys_make_void_port),
8472 posix.c (scm_getpwuid, scm_getgrgid, scm_execl, scm_execlp,
8473 scm_execle, scm_mkstemp, scm_utime, scm_access, scm_setlocale,
8474 scm_mknod, scm_crypt, scm_chroot, scm_getpass, scm_sethostname),
8475 regex-posix.c (scm_make_regexp, scm_regexp_exec), simpos.c
8476 (scm_system, scm_getenv), socket.c (scm_inet_aton), stime.c
8477 (setzone, scm_strftime, scm_strptime), vports.c
8478 (scm_make_soft_port): Remove calls to
8479 SCM_STRING_COERCE_0TERMINATION_X. Since the substring type is
8480 gone, all strings are 0-terminated anyway.
8481
8482 * dynl.h (LIBGUILE_DYNL_H, SCM_DYNL_H), random.h (RANDOMH,
8483 SCM_RANDOM_H): Renamed the macros that are defined to inhibit
8484 double inclusion of the same headers to the SCM_<filename>_H
8485 format.
8486
8487 * eval.c (SCM_CEVAL), gc.c (MARK, scm_gc_sweep), gh_data.c
8488 (gh_scm2chars), hash.c (scm_hasher), objects.c (scm_class_of),
8489 print.c (scm_iprin1): The type scm_tc7_substring does not exist
8490 any more.
8491
8492 * ports.h (SCM_PORTP, SCM_OPPORTP, SCM_OPINPORTP, SCM_OPOUTPORTP,
8493 SCM_INPUT_PORT_P, SCM_OUTPUT_PORT_P, SCM_OPENP), tags.h
8494 (SCM_TYP16_PREDICATE), variable.h (SCM_VARIABLEP): Prefer
8495 !SCM_<foo> over SCM_N<foo>.
8496
8497 2001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
8498
8499 * Makefile.am: Remove references to symbols-deprecated.c.
8500
8501 * symbols.c (scm_init_symbols): Don't initialize deprecated
8502 symbol functions.
8503
8504 * symbols-deprecated.c: Removed.
8505
8506 * fluids.[ch] (scm_internal_with_fluids), gsubr.[ch]
8507 (scm_make_gsubr, scm_make_gsubr_with_generic), hooks.[ch]
8508 (scm_create_hook), list.c (list*), list.h (SCM_LIST[0-9],
8509 scm_listify), list.[ch] (scm_sloppy_memq, scm_sloppy_memv,
8510 scm_sloppy_member), load.c (scm_end_of_file_key), load.[ch]
8511 (scm_read_and_eval_x), numbers.[ch] (scm_mkbig, scm_big2inum,
8512 scm_adjbig, scm_normbig, scm_copybig, scm_2ulong2big, scm_dbl2big,
8513 scm_big2dbl), numbers.h (SCM_FIXNUM_BIT), procs.h
8514 (scm_subr_entry, SCM_SUBR_DOC), procs.[ch] (scm_make_subr_opt,
8515 scm_make_subr, scm_make_subr_with_generic), root.c (setjmp_type,
8516 setjmp_type), root.[ch] (scm_call_catching_errors), smob.[ch]
8517 (scm_make_smob_type_mfpe, scm_set_smob_mfpe), strports.[ch]
8518 (scm_strprint_obj, scm_read_0str, scm_eval_0str), symbols.h
8519 (SCM_CHARS, SCM_UCHARS, SCM_SETCHARS, SCM_SLOPPY_SUBSTRP,
8520 SCM_SUBSTR_STR, SCM_SUBSTR_OFFSET, SCM_LENGTH_MAX, SCM_LENGTH,
8521 SCM_SETLENGTH, SCM_ROSTRINGP, SCM_ROLENGTH, SCM_ROCHARS,
8522 SCM_ROUCHARS, SCM_SUBSTRP, SCM_COERCE_SUBSTR, scm_strhash,
8523 scm_sym2vcell, scm_sym2ovcell_soft, scm_sym2ovcell,
8524 scm_intern_obarray_soft, scm_intern_obarray, scm_intern,
8525 scm_intern0, scm_sysintern, scm_sysintern0,
8526 scm_sysintern0_no_module_lookup, scm_symbol_value0,
8527 scm_string_to_obarray_symbol, scm_intern_symbol,
8528 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned_p,
8529 scm_symbol_bound_p, scm_symbol_set_x, scm_gentemp,
8530 scm_init_symbols_deprecated), vectors.c (s_vector_set_length_x),
8531 vectors.[ch] (scm_vector_set_length_x): Removed.
8532
8533 * fluids.h (FLUIDSH, SCM_FLUIDS_H), gsubr.c (GSUBRH, SCM_GSUBR_H),
8534 list.h (LISTH, SCM_LIST_H), load.h (LOADH, SCM_LOAD_H), root.h
8535 (ROOTH, SCM_ROOT_H), strports.h (STRPORTSH, SCM_STRPORTS_H):
8536 Renamed the macros that are defined to inhibit double inclusion of
8537 the same headers to the SCM_<filename>_H format.
8538
8539 * procs.h (SCM_CLOSUREP, SCM_PROCEDURE_WITH_SETTER_P), symbols.h
8540 (SCM_SYMBOLP), vectors.h (SCM_VECTORP): Prefer !SCM_<foo> over
8541 SCM_N<foo>.
8542
8543 2001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
8544
8545 * continuations.h (scm_contregs), debug.h (scm_debug_info,
8546 scm_debug_frame, SCM_DSIDEVAL), filesys.h (SCM_OPDIRP), fports.h
8547 (scm_fport), options.h (scm_option), snarf.h (SCM_CONST_LONG,
8548 SCM_VCELL, SCM_GLOBAL_VCELL, SCM_VCELL_INIT,
8549 SCM_GLOBAL_VCELL_INIT), srcprop.h (scm_srcprops,
8550 scm_srcprops_chunk), stacks.h (scm_info_frame, scm_stack), unif.h
8551 (scm_array, scm_array_dim, SCM_ARRAY_CONTIGUOUS, SCM_HUGE_LENGTH),
8552 validate.h (SCM_FUNC_NAME, SCM_WTA, RETURN_SCM_WTA,
8553 SCM_VALIDATE_NUMBER_COPY, SCM_VALIDATE_NUMBER_DEF_COPY,
8554 SCM_VALIDATE_STRINGORSUBSTR, SCM_VALIDATE_ROSTRING,
8555 SCM_VALIDATE_ROSTRING_COPY, SCM_VALIDATE_NULLORROSTRING_COPY,
8556 SCM_VALIDATE_RWSTRING, SCM_VALIDATE_OPDIR): Removed.
8557
8558 * continuations.h (CONTINUATIONSH, SCM_CONTINUATIONS_H), filesys.h
8559 (FILESYSH, SCM_FILESYS_H), fports.h (FPORTSH, SCM_FPORTS_H),
8560 options.h (OPTIONSH, SCM_OPTIONS_H), regex-posix.h (REGEXPOSIXH,
8561 SCM_REGEX_POSIX_H), snarf.h (LIBGUILE_SNARF_H, SCM_SNARF_H),
8562 srcprop.h (SCM_SOURCE_PROPERTIES_H, SCM_SRCPROP_H), unif.h
8563 (SCM_UNIFORM_VECTORS_H, SCM_UNIF_H), validate.h (SCM_VALIDATE_H__,
8564 SCM_VALIDATE_H): Renamed the macros that are defined to inhibit
8565 double inclusion of the same headers to the SCM_<filename>_H
8566 format.
8567
8568 * debug.h (SCM_RESET_DEBUG_MODE), regex-posix.h (SCM_RGXP),
8569 srcprop.h (SRCBRKP, PROCTRACEP), struct.h (SCM_STRUCTP),
8570 validate.h (SCM_VALIDATE_THUNK, SCM_VALIDATE_ARRAY,
8571 SCM_VALIDATE_VECTOR_OR_DVECTOR, SCM_VALIDATE_VTABLE): Prefer
8572 !SCM_<foo> over SCM_N<foo>.
8573
8574 2001-08-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
8575
8576 * _scm.h (_SCMH, SCM__SCM_H), alist.h (ALISTH, SCM_ALIST_H),
8577 arbiters.h (ARBITERSH, SCM_ARBITERS_H), backtrace.h (BACKTRACEH,
8578 SCM_BACKTRACE_H), boolean.h (BOOLEANH, SCM_BOOLEAN_H), chars.h
8579 (SCM_CHARSH, SCM_CHARS_H), coop-defs.h (COOP_DEFSH,
8580 SCM_COOP_DEFS_H), coop-threads.h (COOP_THREADSH,
8581 SCM_COOP_THREADS_H), debug-malloc.h (DEBUGMALLOCH,
8582 SCM_DEBUG_MALLOC_H), dynwind.h (DYNWINDH, SCM_DYNWIND_H),
8583 environments.h (ENVIRONMENTS_H, SCM_ENVIRONMENTS_H), eq.h (EQH,
8584 SCM_EQ_H), evalext.h (EVALEXTH, SCM_EVALEXT_H), extensions.h
8585 (LIBGUILE_EXTENSIONS_H, SCM_EXTENSIONS_H), feature.h (FEATUREH,
8586 SCM_FEATURE_H), gdbint.h (GDBINTH, SCM_GDBINT_H), guardians.h
8587 (SCM_GUARDIANH, SCM_GUARDIANS_H), hash.h (HASHH, SCM_HASH_H),
8588 hashtab.h (HASHTABH, SCM_HASHTAB_H), init.h (INITH, SCM_INIT_H),
8589 ioext.h (IOEXTH, SCM_IOEXT_H), iselect.h (ISELECTH,
8590 SCM_ISELECT_H), keywords.h (KEYWORDSH, SCM_KEYWORDS_H), lang.h
8591 (LANGH, SCM_LANG_H), mallocs.h (MALLOCSH, SCM_MALLOCS_H), net_db.h
8592 (SCM_NETDBH, SCM_NET_DB_H), objprop.h (OBJPROPH, SCM_OBJPROP_H),
8593 posix.h (POSIXH, SCM_POSIX_H), procprop.h (PROCPROPH,
8594 SCM_PROCPROP_H), properties.h (PROPERTIES_H, SCM_PROPERTIES_H),
8595 ramap.h (RAMAPH, SCM_RAMAP_H), rdelim.h (SCM_RDELIM,
8596 SCM_RDELIM_H), read.h (READH, SCM_READ_H), rw.h (SCM_RW,
8597 SCM_RW_H), scmsigs.h (SCMSIGSH, SCM_SCMSIGS_H), script.h (SCRIPTH,
8598 SCM_SCRIPT_H), simpos.h (SIMPOSH, SCM_SIMPOS_H), socket.h
8599 (SCM_SOCKETH, SCM_SOCKET_H), sort.h (SORTH, SCM_SORT_H),
8600 stackchk.h (STACKCHKH, SCM_STACKCHK_H), stime.h (STIMEH,
8601 SCM_STIME_H), strop.h (STROPH, SCM_STROP_H), strorder.h
8602 (STRORDERH, SCM_STRORDER_H), threads.h (THREADSH, SCM_THREADS_H),
8603 throw.h (THROWH, SCM_THROW_H), version.h (VERSIONH,
8604 SCM_VERSION_H), vports.h (VPORTSH, SCM_VPORTS_H): Renamed
8605 the macros that are defined to inhibit double inclusion of the
8606 same headers to the SCM_<filename>_H format.
8607
8608 2001-08-27 Marius Vollmer <mvo@zagadka.ping.de>
8609
8610 * ports.c, ports.h, fprots.c, gc.c, ioext.c: Replaced
8611 "scm_t_portable" with "scm_port_table" which was an artifact from
8612 the great "scm_*_t -> scm_t_" renaming.
8613
8614 2001-08-25 Thien-Thi Nguyen <ttn@revel.glug.org>
8615
8616 * gc_os_dep.c (GC_noop1): Move before `GC_find_limit' where it is
8617 used; nfc. Thanks to Bill Schottstaedt.
8618
8619 * validate.h (SCM_VALIDATE_USHORT_COPY, SCM_VALIDATE_SHORT_COPY,
8620 SCM_VALIDATE_UINT_COPY, SCM_VALIDATE_INT_COPY): New macros.
8621 Thanks to Chris Cramer.
8622
8623 2001-08-25 Marius Vollmer <mvo@zagadka.ping.de>
8624
8625 * Makefile.am (AUTOMAKE_OPTIONS): Change "foreign" to "gnu".
8626
8627 * eval.c (scm_m_atbind): Redesigned to behvae like `let', but with
8628 dynamic scope.
8629 * dynwind.h (scm_swap_bindings): Declare.
8630 * dynwind.c (scm_swap_bindings): Make non-static.
8631
8632 2001-08-25 Michael Livshin <mlivshin@bigfoot.com>
8633
8634 * gc.c (scm_gc_sweep): now can sweep unreachable variables (by
8635 doing exactly nothing about them). thanks Neil!
8636
8637 2001-08-18 Neil Jerram <neil@ossau.uklinux.net>
8638
8639 * __scm.h (SCM_ENABLE_VCELLS): Fix spelling mistake in comment.
8640
8641 2001-08-17 Thien-Thi Nguyen <ttn@revel.glug.org>
8642
8643 * gc.c: Fix omission bug: Add `heap_segment' forward decl
8644 (proto) in the case when either `GUILE_DEBUG' or
8645 `GUILE_DEBUG_FREELIST' preprocessor symbols are defined.
8646
8647 (map_free_list): Fix typo: Ref `f' correctly.
8648
8649 Thanks to Chris Cramer.
8650
8651 2001-08-15 Rob Browning <rlb@defaultvalue.org>
8652
8653 * Makefile.am (libguile_la_LDFLAGS): use libtool interface version
8654 variables.
8655 (libpath.h): change libguileversion to libguileinterface.
8656
8657 2001-08-07 Marius Vollmer <mvo@zagadka.ping.de>
8658
8659 * Makefile.am (EXTRA_DIST): Distribute ChangeLog-1996-1999 and
8660 ChangeLog-2000. Thanks to Daniel Skarda!
8661
8662 2001-08-07 Michael Livshin <mlivshin@bigfoot.com>
8663
8664 * guile-snarf-docs-texi.in: don't call the tokenizer here, we now
8665 do it from the Makefile.
8666
8667 * Makefile.am: rearrange the snarfing slightly, so that .doc files
8668 are of a reasonable size.
8669
8670 2001-08-02 Neil Jerram <neil@ossau.uklinux.net>
8671
8672 * stacks.c (scm_make_stack): Improve docstring by explaining use
8673 of cutting args.
8674
8675 2001-08-01 Marius Vollmer <mvo@zagadka.ping.de>
8676
8677 * chars.c (scm_char_alphabetic_p, scm_char_numeric_p,
8678 scm_char_whitespace_p, scm_char_upper_case_p,
8679 scm_char_lower_case_p, scm_char_is_both_p): Do not require
8680 characters to fulfill isascii in addition to the primary
8681 predicate.
8682
8683 2001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
8684
8685 * numbers.c (DIGITS, scm_small_istr2int, scm_istr2int,
8686 scm_istr2flo, scm_istring2number): Removed.
8687
8688 (iflo2str, scm_real_p, scm_integer_p): Use SCM_<foo> instead of
8689 SCM_SLOPPY_<foo>.
8690
8691 (t_exactness, t_radix, DIGIT2UINT, XDIGIT2UINT, mem2uinteger,
8692 mem2decimal_from_point, mem2ureal, mem2complex, scm_i_mem2number):
8693 Added.
8694
8695 (scm_string_to_number): Use new number parser.
8696
8697 (scm_exact_to_inexact): Replace dummy by a GPROC, which also
8698 handles complex numbers.
8699
8700 * numbers.h (NUMBERSH, SCM_NUMBERS_H): Rename <foo>H to
8701 SCM_<foo>_H.
8702
8703 (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Prefer !SCM_<pred> over
8704 SCM_N<pred>.
8705
8706 (scm_istr2int, scm_istr2flo, scm_istring2number): Removed.
8707
8708 (scm_i_mem2number): Added.
8709
8710 (scm_exact_to_inexact): Changed signature.
8711
8712 * read.c (scm_lreadr): Perform the shortcut test for '+ and '-
8713 here instead of within scm_i_mem2number. Call scm_i_mem2number
8714 instead of scm_istr2int and scm_istring2number.
8715
8716 2001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
8717
8718 * eval.c (scm_lookupcar, scm_m_body, scm_m_lambda, unmemocopy,
8719 scm_unmemocopy, scm_badargsp, scm_eval_body, CHECK_EQVISH,
8720 SCM_CEVAL, scm_nconc2last, SCM_APPLY, scm_copy_tree): Prefer
8721 !SCM_<pred> over SCM_N<pred>.
8722
8723 (scm_eval_body): Remove side effecting code from macro call.
8724
8725 (SCM_CEVAL, SCM_APPLY): Remove goto statement and redundant
8726 SCM_NIMP test.
8727
8728 2001-07-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
8729
8730 * pairs.h (SCM_VALIDATE_PAIR): Use SCM_CONSP, not SCM_ECONSP.
8731
8732 2001-07-29 Marius Vollmer <mvo@zagadka.ping.de>
8733
8734 Removed vcell slot from structs.
8735
8736 * struct.h (scm_vtable_index_vcell): Removed. Renumbered
8737 subsequent indices.
8738
8739 * struct.c (scm_struct_vtable_p): Do not check vcell slot for
8740 zero. Use scm_vtable_index_layout instead of "0" when accessing
8741 said slot.
8742 (scm_init_struct): Remove vcell slot layout code from
8743 required_vtable_fields.
8744
8745 * objects.h (scm_si_redefined, scm_si_hashsets): Renumbered.
8746
8747 * goops.c (build_class_class_slots): Removed vcell slot
8748 definition.
8749
8750 * goops.h: Renumbered slot indices. (SCM_CLASS_CLASS_LAYOUT):
8751 Removed vcell slot layout code.
8752 (scm_si_vcell): Removed.
8753
8754 2001-07-26 Marius Vollmer <mvo@zagadka.ping.de>
8755
8756 "Glocs" have been removed.
8757
8758 * tags.h: Update tag system docs.
8759 (scm_tc3_cons_gloc): Renamed to scm_tc3_struct. Changed all uses.
8760 (scm_tcs_cons_gloc): Renamed to scm_tcs_struct. Changed all uses.
8761 (SCM_ECONSP, SCM_NECONSP): Removed. Changed all uses to SCM_CONSP
8762 or SCM_NCONSP, respectively.
8763
8764 * struct.c, struct.h, srcprop.c, procs.c, procprop.c, print.c,
8765 objects.c. modules.c, goops.c, eval.c, debug.c: Changed all uses
8766 of scm_tc3_cond_gloc and scm_tcs_cons_gloc. See above.
8767
8768 * print.c (scm_iprin1): Remove printing of glocs. Do not try to
8769 tell glocs from structs.
8770
8771 * gc.c (scm_gc_mark, scm_gc_sweep): Remove handling of glocs.
8772
8773 * eval.c (scm_m_atbind): Make a list of variables, not glocs.
8774 (scm_ceval, scm_deval): For SCM_IM_BIND, fiddle with variables
8775 instead of with glocs.
8776 (EVALCAR): Do not test for glocs.
8777 (scm_lookupcar, scm_lookupcar1): Do not handle glocs in race
8778 condition.
8779 (scm_unmemocar): Do not handle glocs.
8780 (scm_m_atfop): Memoize as a variable, not as a gloc.
8781 (scm_eval_args, scm_deval_args): Do not handle glocs.
8782 (scm_ceval, scm_deval): Likewise.
8783
8784 * eval.h (SCM_XEVALCAR): Do not test for glocs.
8785 (SCM_GLOC_VAR, SCM_GLOC_VAL, SCM_GLOC_SET_VAL, SCM_GLOC_VAL_LOC):
8786 Removed.
8787
8788 * debug.h, debug.c (scm_make_gloc, scm_gloc_p): Removed.
8789
8790 * dynwind.c (scm_swap_bindings): Likewise.
8791 (scm_dowinds): Updated to recognize lists of variables instead of
8792 lists of glocs.
8793
8794 * __scm.h (SCM_CAUTIOS, SCM_RECKLESS): Update comments.
8795
8796
8797 * gc_os_dep.c (GC_noop1): Moved into the same #if/#endif context
8798 where it is needed.
8799
8800 2001-07-25 Gary Houston <ghouston@arglist.com>
8801
8802 * numbers.c (scm_logand, scm_logior, scm_logxor): adjusted the
8803 docstrings to reflect the n-ary implementation.
8804
8805 2001-07-26 Marius Vollmer <mvo@zagadka.ping.de>
8806
8807 * eval.c (scm_ceval, scm_deval): Use "RETURN" macro when returning
8808 value of a variable, not the plain "return" statement.
8809
8810 2001-07-25 Marius Vollmer <mvo@zagadka.ping.de>
8811
8812 * eval.c: Allow variables in memoized code (in addition to glocs).
8813 (scm_lookupcar): Handle variables in lost races. Replace symbol
8814 with variable directly, do not make a gloc.
8815 (scm_unmemocar): Rewrite variables using a reverse lookup, just
8816 like glocs.
8817 (scm_ceval, scm_deval): Deal with variables in SCM_IM_SET and in
8818 the main switch.
8819
8820 2001-07-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
8821
8822 * variable.c (scm_i_variable_print): Use "value" instead of
8823 "binding" since a binding is the mapping between symbols and
8824 variables, not between variables and their values.
8825
8826 * tags.h (scm_tc7_variable): New.
8827 * gc.c (scm_gc_mark): Handle scm_tc7_variable objects.
8828 * print.c (scm_iprin1): Likewise.
8829
8830 * variable.h (scm_tc16_variable): Removed.
8831 (SCM_VARIABLEP): Test for new tc7 code.
8832 (scm_i_variable_print): New.
8833 * variable.c (scm_tc16_variable): Removed.
8834 (variable_print): Renamed to scm_i_variable_print and made
8835 non-static.
8836 (variable_equal_p): Removed.
8837 (make_variable): Construct a tc7 object instead of a smob.
8838 (scm_init_variable): Do not register smob.
8839
8840 2001-07-22 Marius Vollmer <mvo@zagadka.ping.de>
8841
8842 * tags.h: Include inttypes.h when we have it.
8843
8844 2001-07-13 Marius Vollmer <mvo@zagadka.ping.de>
8845
8846 * tags.h (SCM_UNBOUND): Make it the 34th isym/iflag, the 33th slot
8847 is taken by the new SCM_IM_CALL_WITH_VALUES.
8848 * print.c (scm_isymnames): Update table accordingly.
8849
8850 2001-07-22 Gary Houston <ghouston@arglist.com>
8851
8852 * regex-posix.c (s_scm_regexp_exec): use scm_long2num not
8853 SCM_MAKINUM to convert regoff_t value to SCM.
8854
8855 2001-07-21 Gary Houston <ghouston@arglist.com>
8856
8857 * scmsigs.c: include sys/time.h for itimer stuff.
8858
8859 2001-07-19 Rob Browning <rlb@defaultvalue.org>
8860
8861 * gc_os_dep.c (GC_noop1): ifdef out (unused) to quiet warning.
8862
8863 * c-tokenize.lex: add option %nounput to quiet warning.
8864 Add prototype for yylex to quiet warning.
8865
8866 * scmconfig.h.in: add flags for setitimer and getitimer.
8867
8868 * scmsigs.h (scm_init_scmsigs): new prototype.
8869 (scm_init_scmsigs): new prototype.
8870
8871 * scmsigs.c (s_scm_setitimer): new function.
8872 (s_scm_setitimer): new function.
8873
8874 2001-07-18 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
8875
8876 * alist.c, arbiters.c, async.h, backtrace.h, boolean.c, chars.c,
8877 chars.h, continuations.h, debug-malloc.h, dynl.c, feature.c,
8878 feature.h, filesys.h, fluids.h, fports.h, gc_os_dep.c,
8879 gdb_interface.h, gh_eval.c, gh_funcs.c, gh_io.c, gh_list.c,
8880 gh_predicates.c, gsubr.c, gsubr.h, guardians.h,
8881 guile-func-name-check.in, guile-snarf-docs-texi.in,
8882 guile-snarf-docs.in, guile-snarf.awk.in, guile-snarf.in,
8883 hashtab.h, iselect.h, keywords.h, lang.c, list.h, load.h,
8884 objprop.c, objprop.h, options.c, options.h, random.h,
8885 regex-posix.h, root.c, root.h, script.c, snarf.h, stackchk.c,
8886 strerror.c, strop.h, strports.h, threads.h, values.c, values.h,
8887 version.c, version.h: Updated copyright notice.
8888
8889 2001-07-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
8890
8891 * goops.c (sym_layout, sym_vcell, sym_vtable, sym_print,
8892 sym_procedure, sym_setter, sym_redefined, sym_h0, sym_h1, sym_h2,
8893 sym_h3, sym_h4, sym_h5, sym_h6, sym_h7, sym_name,
8894 sym_direct_supers, sym_direct_slots, sym_direct_subclasses,
8895 sym_direct_methods, sym_cpl, sym_default_slot_definition_class,
8896 sym_slots, sym_getters_n_setters, sym_keyword_access, sym_nfields,
8897 sym_environment, scm_sym_change_class): New static variables to
8898 hold predefined symbols.
8899
8900 (build_class_class_slots): Build the list using scm_list_n
8901 instead of cons. Also, slots are already created as lists, thus
8902 making a call to maplist unnecessary.
8903
8904 (scm_class_name, scm_class_direct_supers, scm_class_direct_slots,
8905 scm_class_direct_subclasses, scm_class_direct_methods,
8906 scm_class_precedence_list, scm_class_slots, scm_class_environment,
8907 scm_method_procedure, create_standard_classes, purgatory): Use
8908 predefined symbols.
8909
8910 (build_slots_list, compute_getters_n_setters,
8911 scm_sys_initialize_object, scm_sys_inherit_magic_x,
8912 get_slot_value_using_name, set_slot_value_using_name,
8913 scm_sys_invalidate_method_cache_x, scm_generic_capability_p,
8914 scm_compute_applicable_methods, scm_sys_method_more_specific_p,
8915 make_struct_class): Prefer !SCM_<pred> over SCM_N<pred>.
8916
8917 (scm_sys_prep_layout_x): Minimize variable scopes.
8918
8919 (scm_sys_prep_layout_x, scm_sys_fast_slot_ref,
8920 scm_sys_fast_slot_set_x): Fix signedness.
8921
8922 (go_to_hell, go_to_heaven, purgatory, scm_change_object_class,
8923 lock_cache_mutex, unlock_cache_mutex, call_memoize_method,
8924 scm_memoize_method, scm_wrap_object): Use packing and unpacking
8925 when converting to and from SCM values.
8926
8927 (scm_enable_primitive_generic_x): Add rest argument checking.
8928
8929 (map, filter_cpl, maplist, scm_sys_initialize_object,
8930 scm_sys_prep_layout_x, slot_definition_using_name,
8931 scm_enable_primitive_generic_x, scm_compute_applicable_methods,
8932 call_memoize_method, scm_make, scm_make_class): Prefer explicit
8933 predicates over SCM_N?IMP tests.
8934
8935 (scm_sys_prep_layout_x): Fix typo in error message. Fix type
8936 checking.
8937
8938 (burnin, go_to_hell): Use SCM_STRUCT_DATA instead of the SCM_INST
8939 alias.
8940
8941 2001-07-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
8942
8943 * fports.c (fport_print): Don't use SCM_C[AD]R for non pairs.
8944
8945 * num2integral.i.c (INTEGRAL2NUM, INTEGRAL2BIG): Fix signedness.
8946
8947 * symbols-deprecated.c (scm_gentemp): Simplify vector test.
8948
8949 * vectors.c (scm_vector_p): Eliminate redundant IMP test.
8950
8951 2001-07-12 Michael Livshin <mlivshin@bigfoot.com>
8952
8953 * strings.c (s_scm_string): fix arg position in assert.
8954
8955 2001-07-11 Gary Houston <ghouston@arglist.com>
8956
8957 * strports.c (st_write): use memcpy, not strncpy. thanks to
8958 Dale P. Smith.
8959
8960 2001-07-09 Thien-Thi Nguyen <ttn@revel.glug.org>
8961
8962 * alist.c, alloca.c, arbiters.c, async.c, async.h, backtrace.c,
8963 boolean.c, chars.c, continuations.c, coop-defs.h, coop-threads.c,
8964 debug-malloc.h, debug.c, debug.h, dynl.c, dynwind.c, eq.c,
8965 error.c, eval.c, evalext.c, feature.c, feature.h, filesys.c,
8966 filesys.h, fluids.c, fluids.h, fports.c, fports.h, gc.c, gc.h,
8967 gdbint.c, gsubr.c, guardians.c, hash.c, hashtab.c, hooks.c,
8968 hooks.h, inet_aton.c, init.c, ioext.c, keywords.c, keywords.h,
8969 lang.c, list.c, load.c, macros.c, mallocs.c, memmove.c, modules.c,
8970 net_db.c, numbers.c, numbers.h, objects.c, objprop.c, options.c,
8971 pairs.c, pairs.h, ports.c, ports.h, posix.c, print.c, print.h,
8972 procprop.c, procs.c, procs.h, properties.c, putenv.c, ramap.c,
8973 random.c, random.h, read.c, regex-posix.c, regex-posix.h, root.c,
8974 root.h, scmsigs.c, script.c, simpos.c, smob.c, snarf.h, socket.c,
8975 sort.c, srcprop.c, srcprop.h, stackchk.c, stacks.c, stacks.h,
8976 stime.c, strerror.c, strings.c, strings.h, strop.c, strorder.c,
8977 strports.c, struct.c, struct.h, symbols-deprecated.c, symbols.c,
8978 symbols.h, tags.h, threads.c, threads.h, throw.c, unif.c, unif.h,
8979 variable.c, variable.h, vectors.c, vectors.h, version.c, vports.c,
8980 weaks.c, weaks.h: Remove "face-lift" comment.
8981
8982 2001-07-08 Rob Browning <rlb@defaultvalue.org>
8983
8984 * .cvsignore: add stamp-h.in.
8985
8986 2001-07-04 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
8987
8988 * hooks.c (scm_make_hook, scm_add_hook_x),
8989 (scm_remove_hook_x, scm_reset_hook_x, scm_run_hook): Added return
8990 value info to the docstrings.
8991
8992 2001-07-03 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
8993
8994 Some more compatibility patches for Windows.
8995
8996 * posix.c (getlogin): getlogin() implementation for Windows.
8997
8998 * backtrace.c, ioext.c: Include <stdio.h>.
8999
9000 * unif.c, script.c, rw.c, error.c: Include <io.h>, if it does
9001 exist.
9002
9003 * cpp_sig_symbols.in: Added SIGBREAK.
9004
9005 2001-07-01 Marius Vollmer <mvo@zagadka.ping.de>
9006
9007 * strports.c (scm_read_0str, scm_eval_0str): Call
9008 scm_c_read_string and scm_c_eval_string respectively, not
9009 themselves. Thanks to Dale P. Smith!
9010
9011 2001-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
9012
9013 * unif.c (scm_array_set_x): The variable args does not
9014 necessarily have to be a list. Further, got rid of a redundant
9015 SCM_NIMP test.
9016
9017 2001-06-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
9018
9019 * list.c (SCM_I_CONS): Make sure the cell type is initialized
9020 last.
9021
9022 * gc.c (s_scm_map_free_list, scm_igc, scm_gc_sweep,
9023 init_heap_seg): Fixed signedness.
9024
9025 (init_heap_seg): Replaced strange for-loop with a while loop.
9026
9027 * weaks.h (WEAKSH, SCM_WEAKS_H): Rename <foo>H to SCM_<foo>_H.
9028
9029 (SCM_WVECTP): Prefer !SCM_<pred> over SCM_N<pred>.
9030
9031 The following patch adds conservative marking for the elements of
9032 free or allocated cells.
9033
9034 * gc.c (allocated_mark, heap_segment): New static functions.
9035
9036 (which_seg): Deleted, since the functionality is now provided by
9037 function heap_segment.
9038
9039 (map_free_list): Use heap_segment instead of which_seg.
9040
9041 (MARK): If cell debugging is disabled, mark free cells
9042 conservatively.
9043
9044 (scm_mark_locations, scm_cellp): Extracted the search for the
9045 heap segment of a SCM value into function heap_segment.
9046
9047 (scm_init_storage): Allocated cells must be marked
9048 conservatively.
9049
9050 * gc.[ch] (scm_gc_mark_cell_conservatively): New function.
9051
9052 The following patch changes the representation of weak vectors to
9053 double cells instead of using an extension of the vector's
9054 allocated memory.
9055
9056 * gc.c (MARK): Use SCM_SET_WVECT_GC_CHAIN instead of assigning to
9057 the result of SCM_WVECT_GC_CHAIN.
9058
9059 (scm_gc_sweep): Weak vectors don't have extra fields any more.
9060
9061 * weaks.c (allocate_weak_vector): New static function. It does
9062 not patch any previously created vector object during the
9063 construction of a weak vector, and thus doesn't need to switch
9064 off interrupts during vector creation.
9065
9066 (scm_make_weak_vector, scm_make_weak_key_hash_table,
9067 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
9068 Use allocate_weak_vector to provide the new weak vector object.
9069
9070 * weaks.h (SCM_WVECT_TYPE, SCM_SET_WVECT_TYPE,
9071 SCM_SET_WVECT_GC_CHAIN): New macros. The weak vector subtype is
9072 now stored in the double cell.
9073
9074 (SCM_IS_WHVEC, SCM_IS_WHVEC_V, SCM_IS_WHVEC_B, SCM_IS_WHVEC_ANY):
9075 Use SCM_WVECT_TYPE.
9076
9077 (SCM_WVECT_GC_CHAIN): The weak objects are now chained together
9078 using an entry of the double cell.
9079
9080 2001-06-30 Thien-Thi Nguyen <ttn@revel.glug.org>
9081
9082 * stamp-h.in: bye bye
9083
9084 2001-06-30 Marius Vollmer <mvo@zagadka.ping.de>
9085
9086 * gh_eval.c (gh_eval_str): Use scm_c_eval_string instead of
9087 scm_eval_0str.
9088
9089 * load.c, load.h (scm_c_primitive_load,
9090 scm_c_primitive_load_path): New.
9091
9092 * strports.c, strports.h (scm_c_read_string): Renamed from
9093 scm_read_0str. Also, added "const" qualifier to argument.
9094 (scm_c_eval_string): Renamed from scm_eval_0str.
9095 (scm_read_0str, scm_eval_0str): Deprecated.
9096
9097 2001-06-28 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9098
9099 * fluids.c (scm_c_with_fluid): Use scm_list_1() instead of
9100 SCM_LIST1.
9101
9102 2001-06-28 Keisuke Nishida <kxn30@po.cwru.edu>
9103
9104 * list.h (scm_list_1, scm_list_2, scm_list_3, scm_list_4, scm_list_5,
9105 scm_list_n): New functions.
9106 (SCM_LIST0, SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5,
9107 SCM_LIST6, SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify): Deprecated.
9108 (lots of files): Use the new functions.
9109
9110 * goops.c (CALL_GF1, CALL_GF2, CALL_GF3, CALL_GF4): Use scm_call_N.
9111
9112 * strings.c: #include "libguile/deprecation.h".
9113
9114 2001-06-27 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9115
9116 * read.c (scm_lreadr): When reading a hash token, check for a
9117 user-defined hash procedure first, so that overriding the builtin
9118 hash characters is possible (this was needed for implementing
9119 SRFI-4's read synax `f32(...)').
9120
9121 * num2integral.i.c: Use scm_t_signed_bits instead of scm_t_bits,
9122 because the latter is unsigned now and breaks comparisons like
9123 (n < (scm_t_signed_bits)MIN_VALUE).
9124
9125 2001-06-26 Neil Jerram <neil@ossau.uklinux.net>
9126
9127 * eval.h, eval.c (scm_call_4): New function.
9128
9129 * eval.c (SCM_APPLY, SCM_CEVAL, ENTER_APPLY): Call trap handlers
9130 directly rather than dispatching to them via scm_ithrow and a lazy
9131 catch.
9132
9133 * eval.c (scm_evaluator_trap_table), eval.h (SCM_ENTER_FRAME_HDLR,
9134 SCM_APPLY_FRAME_HDLR, SCM_EXIT_FRAME_HDLR): Add three new options
9135 for trap handler procedures.
9136
9137 * debug.h (SCM_RESET_DEBUG_MODE): Add checks for trap handler
9138 procedures not being #f.
9139
9140 2001-06-27 Michael Livshin <mlivshin@bigfoot.com>
9141
9142 * Makefile.am (c-tokenize.c): add rule to generate it.
9143 (EXTRA_DIST): add c-tokenize.lex, so it gets distributed.
9144
9145 filter-doc-snarfage.c: remove.
9146
9147 2001-06-26 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9148
9149 * ports.c (scm_output_port_p): Use result of SCM_COERCE_OUTPORT.
9150
9151 The following set of changes makes compiling Guile under various
9152 Windows compilers easier. Compilation under GNU systems should
9153 not be affected at all.
9154
9155 Thanks to Stefan Jahn for all necessary information, patches and
9156 testing.
9157
9158 * posix.c: Conditialize getpwent, getgrent, kill, getppid, getuid,
9159 getpgrp, ttyname, primitive-fork and some header inclusion for
9160 Windows.
9161
9162 * random.c: Define M_PI, if not predefined and use __int64 for
9163 LONG64 under Windows.
9164
9165 * scmsigs.c: Emulate some functions (alarm, sleep, kill) under
9166 Windows and conditionalize some signal names.
9167
9168 * socket.c (scm_getsockopt): Added missing comma.
9169 Include socket library header under Windows.
9170
9171 * stime.c (CLKTCK): Add cast to int, to make it compile under
9172 Windows.
9173
9174 * ports.c (truncate): New function, compiled only under Windows.
9175
9176 * net_db.c: Do not declare errno under Windows.
9177
9178 * iselect.h, inet_aton.c: Include socket library headers under
9179 Windows.
9180
9181 * guile.c (inner_main): Under Windows, initialize socket library
9182 and initialize gdb_interface data structures.
9183
9184 * gdb_interface.h: Under Windows, gdb_interface cannot be
9185 initialized statically. Initialize at runtime instead.
9186
9187 * fports.c (write_all): ssize_t -> size_t.
9188 (fport_print): Conditionalize call to ttyname().
9189 (getflags): New function, compiled only under Windows.
9190
9191 * filesys.c: Conditionalize inclusion of <pwd.h>. Conditionalize
9192 primitives chown, link, fcntl.
9193 (scm_basename, scm_dirname): Under Windows, handle \ as well as /
9194 as path seperator.
9195
9196 * backtrace.c: Include <io.h> under Windows.
9197
9198 * async.h (ASYNCH, SCM_ASYNC_H): Rename <foo>H to SCM_<foo>_H.
9199
9200 * _scm.h: Added preprocessor conditional for __MINGW32__ for errno
9201 declaration.
9202
9203 2001-06-27 Keisuke Nishida <kxn30@po.cwru.edu>
9204
9205 * eval.c (scm_call_0, scm_call_1, scm_call_2, scm_call_3,
9206 scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3): New functions.
9207 * eval.h (scm_call_0, scm_call_1, scm_call_2, scm_call_3,
9208 scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3): Declared.
9209 * async.c (scm_run_asyncs), coop-threads.c (scheme_body_bootstrip,
9210 scheme_handler_bootstrip), debug.c (with_traps_inner), dynwind.c
9211 (scm_dynamic_wind, scm_dowinds), environments.c
9212 (import_environment_conflict), eval.c (scm_macroexp, scm_force,
9213 scm_primitive_eval_x, scm_primitive_eval), fluids.c (apply_thunk),
9214 goops.c (GETVAR, purgatory, make_class_from_template,
9215 scm_ensure_accessor), hashtab.c (scm_ihashx, scm_sloppy_assx,
9216 scm_delx_x, fold_proc), hooks.c (scm_c_run_hook), load.c
9217 (scm_primitive_load), modules.c (scm_resolve_module,
9218 scm_c_define_module, scm_c_use_module, scm_c_export,
9219 module_variable, scm_eval_closure_lookup, scm_sym2var,
9220 scm_make_module, scm_ensure_user_module, scm_load_scheme_module),
9221 ports.c (scm_port_for_each), print.c (scm_printer_apply),
9222 properties.c (scm_primitive_property_ref), ramap.c (ramap,
9223 ramap_cxr, rafe, scm_array_index_map_x, read.c (scm_lreadr),
9224 scmsigs.c (sys_deliver_signals), sort.c (applyless), strports.c
9225 (scm_object_to_string, scm_call_with_output_string,
9226 scm_call_with_input_string), throw.c (scm_body_thunk,
9227 scm_handle_by_proc, hbpca_body), unif.c (scm_make_shared_array,
9228 scm_make_shared_array), vports.c (sf_flush, sf_write,
9229 sf_fill_input, sf_close): Use one of the above functions.
9230 * goops.c, hashtab.c, scmsigs.c, sort.c: #include "libguile/root.h".
9231
9232 2001-06-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
9233
9234 * filesys.c (scm_close), ports.c (scm_close_port,
9235 scm_port_closed_p), strop.c (scm_string_null_p): Use SCM_BOOL
9236 instead of SCM_NEGATE_BOOL.
9237
9238 * filesys.c (scm_stat): Clean up type dispatch.
9239
9240 * filesys.c (scm_stat), ports.c (scm_input_port_p,
9241 scm_output_port_p): Get rid of redundant IM type check.
9242
9243 * filesys.c (scm_readdir, scm_getcwd, scm_readlink), gh_data.c
9244 (gh_str2scm), load.c (scm_primitive_load, scm_internal_parse_path,
9245 scm_search_path), net_db.c (scm_gethost, scm_getnet, scm_getproto,
9246 scm_return_entry), numbers.c (scm_number_to_string), objects.c
9247 (scm_make_subclass_object), ports.c (scm_port_mode), read.c
9248 (scm_lreadr), simpos.c (scm_getenv), socket.c (scm_inet_ntoa,
9249 scm_addr_vector), stime.c (scm_strftime), strings.c
9250 (scm_makfromstrs, scm_makfrom0str, scm_substring), strings.h
9251 (SCM_STRING_COERCE_0TERMINATION_X), strop.c (string_copy,
9252 scm_string_split), strports.c (scm_strport_to_string), symbols.c
9253 (scm_symbol_to_string), vports.c (sf_write): Use scm_mem2string
9254 instead of scm_makfromstr.
9255
9256 * net_db.c (scm_sethost, scm_setnet, scm_setproto, scm_setserv),
9257 ports.c (scm_close_all_ports_except), read.c (scm_lreadr,
9258 scm_read_hash_extend), stime.c (scm_strftime), strings.c
9259 (scm_string_append, scm_string), strings.h (SCM_STRINGP,
9260 SCM_STRING_COERCE_0TERMINATION_X, SCM_RWSTRINGP), strop.c
9261 (string_capitalize_x): Prefer explicit type check over SCM_N?IMP,
9262 !SCM_<pred> over SCM_N<pred>.
9263
9264 * strings.[ch] (scm_makfromstr): Deprecated.
9265
9266 (scm_mem2string): New function, replaces scm_makfromstr.
9267
9268 * strings.c (scm_substring), strop.c (string_copy,
9269 scm_string_split), strports.c (scm_strport_to_string), symbols.c
9270 (scm_symbol_to_string): Fix gc problem.
9271
9272 * strings.h (STRINGSH, SCM_STRINGS_H): Rename <foo>H to
9273 SCM_<foo>_H.
9274
9275 * validate.h (SCM_VALIDATE_SUBSTRING_SPEC_COPY): Eliminate
9276 warning about comparing signed and unsigned values. This fix is
9277 not optimal, since it won't work reliably if sizeof (c_start) >
9278 sizeof (size_t) or sizeof (c_end) > sizeof (size_t). A better
9279 solution is to define this macro as an inline function, thus
9280 allowing to specifiy the types of c_start and c_end.
9281
9282 2001-06-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
9283
9284 * debug.h (SCM_DEBUGOBJ_FRAME): Deliver result as a
9285 scm_t_debug_frame*.
9286
9287 * debug.h (DEBUGH, SCM_DEBUG_H), stacks.h (STACKSH, SCM_STACKSH):
9288 Rename <foo>H to SCM_<foo>_H.
9289
9290 * stacks.c (NEXT_FRAME, narrow_stack): Prefer explicit type check
9291 over SCM_N?IMP, !SCM_<pred> over SCM_N<pred>.
9292
9293 (narrow_stack): Make i unsigned. Don't use side-effecting
9294 operations in conditions.
9295
9296 (narrow_stack, scm_make_stack, scm_stack_id,
9297 scm_last_stack_frame): Get rid of redundant SCM_N?IMP checks.
9298
9299 (scm_make_stack, scm_stack_id, scm_last_stack_frame): Clean up
9300 type dispatch. No need to cast result of SCM_DEBUGOBJ_FRAME any
9301 more.
9302
9303 (scm_stack_ref, scm_frame_previous, scm_frame_next): Fix
9304 signedness.
9305
9306 (scm_last_stack_frame): Remove bogus `;´.
9307
9308 * stacks.h (SCM_FRAMEP): Fix type check.
9309
9310 2001-06-25 Michael Livshin <mlivshin@bigfoot.com>
9311
9312 * Makefile.am (MAINTAINERCLEANFILES): be sure to remove
9313 c-tokenize.c when doing maintainer-clean.
9314
9315 * snarf.h (SCM_SNARF_DOCS): change the "grammar" slightly.
9316
9317 * guile-snarf-docs.in, guile-snarf-docs-texi.in: rewrite &
9318 simplify.
9319
9320 * eval.c: all hash signs are in column 0.
9321
9322 * Makefile.am (guile_filter_doc_snarfage): build using
9323 c-tokenize.c, not filter-doc-snarfage.c.
9324 rearrange snarfing dependencies a bit.
9325
9326 * c-tokenize.lex: new file.
9327
9328 2001-06-25 Marius Vollmer <mvo@zagadka.ping.de>
9329
9330 * srcprop.h, srcprop.c (scm_srcprops_to_plist): Renamed from
9331 scm_t_srcpropso_plist. See the big type renaming.
9332 * coop-defs.h (scm_mutex_trylock, scm_cond_timedwait): Likewise.
9333 Thanks to Seth Alves!
9334
9335 * numbers.c (SIZE_MAX, PTRDIFF_MIN, PTRDIFF_MAX): Only define when
9336 they aren't defined already.
9337
9338 2001-06-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
9339
9340 * backtrace.c (display_backtrace_body): Use SCM_VALIDATE_STACK
9341 and SCM_VALIDATE_OPOUTPORT instead of SCM_ASSERT. Fix signedness
9342 problem.
9343
9344 * backtrace.c (display_expression, scm_set_print_params_x,
9345 display_application, display_frame, scm_backtrace), numbers.c
9346 (scm_istring2number), objects.c (scm_class_of,
9347 scm_mcache_lookup_cmethod, scm_mcache_compute_cmethod): Prefer
9348 explicit type check over SCM_N?IMP, !SCM_<pred> over SCM_N<pred>.
9349
9350 * fluids.c (scm_fluid_ref, scm_fluid_set_x): Fluid numbers are
9351 always positive.
9352
9353 * numbers.c (scm_i_mkbig): Remove unnecessary casts, remove
9354 unnecessary SCM_DEFER_INTS, SCM_ALLOW_INTS.
9355
9356 * objects.c (scm_class_of): Type fix.
9357
9358 (scm_mcache_lookup_cmethod): Improved comment, simplified,
9359 eliminated goto.
9360
9361 * pairs.h (scm_error_pair_access): The function can return if
9362 called recursively.
9363
9364 2001-06-20 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9365
9366 * init.c (scm_init_guile_1): Removed initialization of tag.c.
9367
9368 * gdbint.c, init.c: Removed inclusion of tag.h.
9369
9370 * tag.h, tag.c: Removed files.
9371
9372 * Makefile.am: Removed tag.{h,c,doc,x} in various places.
9373
9374 2001-06-20 Gary Houston <ghouston@arglist.com>
9375
9376 * deprecation.c, extensions.c, rw.c: include string.h.
9377
9378 2001-06-19 Gary Houston <ghouston@arglist.com>
9379
9380 * filter-doc-snarfage.c (process): added ungetc in
9381 MULTILINE_COOKIE case since otherwise it fails when there's no
9382 space between the '(' and the quote of the following string
9383 (gcc 3.0).
9384
9385 2001-06-14 Marius Vollmer <mvo@zagadka.ping.de>
9386
9387 Throughout: replace "scm_*_t" with "scm_t_*", except "scm_lisp_t".
9388
9389 2001-06-14 Marius Vollmer <mvo@zagadka.ping.de>
9390
9391 * unif.h (SCM_ARRAY_NDIM): Shift then cast so that no sign
9392 extension takes place.
9393 * strings.h (SCM_STRING_LENGTH): Likewise.
9394 (SCM_STRING_MAX_LENGTH): Use unsigned numbers.
9395
9396 * __scm.h (ptrdiff_t): Typedef to long when configure didn't find
9397 it.
9398
9399 * tags.h: Include <stdint.h> when we have it.
9400 (scm_bits_t): Changed to be a unsigned type. Use uintptr_t when
9401 available. Else use "unsigned long".
9402 (scm_signed_bits_t): New.
9403
9404 * numbers.h (SCM_SRS): Cast shiftee to scm_signed_bits_t.
9405 (SCM_INUM): Cast result to scm_signed_bits_t.
9406
9407 2001-06-13 Thien-Thi Nguyen <ttn@revel.glug.org>
9408
9409 * mkstemp.c: Update path to #include file scmconfig.h.
9410 Thanks to Golubev I. N.
9411
9412 2001-06-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
9413
9414 * struct.h (SCM_STRUCT_VTABLE_FLAGS): New macro.
9415
9416 * goops.h (SCM_NUMBER_OF_SLOTS): Removed bogus `\´ at the end of
9417 the macro definition.
9418
9419 (SCM_CLASSP, SCM_INSTANCEP, SCM_PUREGENERICP, SCM_ACCESSORP,
9420 SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Use SCM_STRUCT_VTABLE_FLAGS
9421 instead of SCM_INST_TYPE.
9422
9423 (SCM_ACCESSORP, SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Make sure
9424 the object is a struct before accessing its struct flags.
9425
9426 (SCM_INST_TYPE, SCM_SIMPLEMETHODP, SCM_FASTMETHODP): Deprecated.
9427
9428 2001-06-10 Gary Houston <ghouston@arglist.com>
9429
9430 * rdelim.c (scm_init_rdelim_builtins): don't try to activate the
9431 (ice-9 rdelim) module in (guile) and (guile-user). it didn't
9432 work reliably anymore. try it from boot-9.scm instead.
9433
9434 2001-06-09 Marius Vollmer <mvo@zagadka.ping.de>
9435
9436 * ports.c (scm_lfwrite): Maintain columnd and row count in port.
9437 Thanks to Matthias Köppe!
9438
9439 2001-06-08 Michael Livshin <mlivshin@bigfoot.com>
9440
9441 * snarf.h, filter-doc-snarfage.c: more changes to cope with
9442 space-happy C preprocessors.
9443
9444 * filter-doc-snarfage.c, guile-snarf.in: try to cope with spaces
9445 inside cookies. thanks to Matthias Köppe!
9446
9447 2001-06-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
9448
9449 * keywords.c (keyword_print): Don't use SCM_C[AD]R to access
9450 keywords. Fix gc protection.
9451
9452 * objects.c (scm_mcache_lookup_cmethod): Don't use side effecting
9453 operations in macro calls.
9454
9455 * pairs.c (scm_error_pair_access): Avoid recursion.
9456
9457 Thanks to Matthias Koeppe for reporting the bugs that correspond
9458 to the following set of patches.
9459
9460 * unif.c (scm_bit_set_star_x, scm_bit_invert_x), vectors.h
9461 (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR): Obtain the
9462 bitvector base address using SCM_BITVECTOR_BASE.
9463
9464 * unif.h (SCM_BITVECTOR_BASE): Return the base address as an
9465 unsigned long*.
9466
9467 2001-06-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
9468
9469 * goops.c (SCM_CLASS_REDEF): Removed.
9470
9471 * vectors.h (VECTORSH, SCM_VECTORS_H): Renamed <foo>H to
9472 SCM_<foo>_H.
9473
9474 Thanks to Matthias Koeppe for reporting the bugs that correspond
9475 to the following set of patches.
9476
9477 * goops.c (scm_sys_prep_layout_x, scm_basic_basic_make_class,
9478 create_basic_classes, scm_sys_fast_slot_set_x, set_slot_value,
9479 scm_sys_allocate_instance, clear_method_cache,
9480 scm_sys_invalidate_method_cache_x, scm_make,
9481 create_standard_classes, scm_make_port_classes, scm_make_class,
9482 scm_add_slot): Use SCM_SET_SLOT to set slot values.
9483
9484 (prep_hashsets): Use SCM_SET_HASHSET to set class hash values.
9485
9486 * goops.h (SCM_SET_SLOT, SCM_SET_HASHSET): New macros.
9487
9488 * ramap.c (BINARY_ELTS_CODE, BINARY_PAIR_ELTS_CODE,
9489 UNARY_ELTS_CODE): Remove bogus break statement.
9490
9491 * vectors.h (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR):
9492 Don't access bit vectors elements as SCM objects.
9493
9494 * weaks.c (scm_make_weak_vector, scm_make_weak_key_hash_table,
9495 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
9496 Don't assign to an unpacked value.
9497
9498 2001-06-07 Dirk Herrmann <D.Herrmann@tu-bs.de>
9499
9500 * __scm.h (SCM_NORETURN): Moved here from error.h.
9501
9502 (SCM_UNUSED): New macro.
9503
9504 (SCM_DEBUG_PAIR_ACCESSES): New macro.
9505
9506 * backtrace.c (display_error_handler), continuations.c
9507 (continuation_print), debug.c (debugobj_print), dynwind.c
9508 (guards_print), environments.c (observer_print,
9509 core_environments_finalize, leaf_environment_cell,
9510 leaf_environment_print, eval_environment_print,
9511 eval_environment_observer, import_environment_define,
9512 import_environment_undefine, import_environment_print,
9513 import_environment_observer, export_environment_define,
9514 export_environment_undefine, export_environment_print,
9515 export_environment_observer), eval.c (scm_m_quote, scm_m_begin,
9516 scm_m_if, scm_m_set_x, scm_m_and, scm_m_or, scm_m_case,
9517 scm_m_cond, scm_m_lambda, scm_m_letstar, scm_m_do, scm_m_delay,
9518 scm_m_letrec1, scm_m_apply, scm_m_cont, scm_m_nil_cond,
9519 scm_m_nil_ify, scm_m_t_ify, scm_m_0_cond, scm_m_0_ify,
9520 scm_m_1_ify, scm_m_atfop, scm_m_at_call_with_values), evalext.c
9521 (scm_m_generalized_set_x), fluids.c (fluid_print), fports.c
9522 (fport_print), gc.c (gc_start_stats, scm_remember_upto_here_1,
9523 scm_remember_upto_here_2, scm_remember_upto_here, mark_gc_async),
9524 gh_init.c (gh_standard_handler), goops.c (get_slot_value,
9525 set_slot_value, test_slot_existence, scm_change_object_class,
9526 scm_m_atslot_ref, scm_m_atslot_set_x, make_struct_class,
9527 default_setter), guardians.c (guardian_print, guardian_gc_init,
9528 guardian_zombify, whine_about_self_centered_zombies), guile.c
9529 (inner_main), init.c (stream_handler), keywords.c (keyword_print),
9530 mallocs.c (malloc_print), numbers.c (scm_print_real,
9531 scm_print_complex, scm_bigprint), ports.c (flush_port_default,
9532 end_input_default, scm_port_print, fill_input_void_port,
9533 write_void_port), root.c (root_print), smob.c (scm_mark0,
9534 scm_free0, scm_smob_print, scm_smob_apply_1_error,
9535 scm_smob_apply_2_error, scm_smob_apply_3_error, free_print),
9536 stime.c (restorezone), strings.c (scm_makfromstr), struct.c
9537 (scm_struct_free_0, scm_struct_free_standard,
9538 scm_struct_free_entity, scm_struct_gc_init, scm_free_structs),
9539 throw.c (jmpbuffer_print, lazy_catch_print, ss_handler,
9540 scm_handle_by_throw, scm_ithrow), weaks.c
9541 (scm_weak_vector_gc_init, scm_mark_weak_vector_spines,
9542 scm_scan_weak_vectors), ramap.c (scm_array_fill_int), filesys.c
9543 (scm_dir_print): Mark unused parameters with SCM_UNUSED.
9544
9545 * error.h (SCM_NORETURN): Moved to __scm.h.
9546
9547 * error.h (ERRORH, SCM_ERROR_H), pairs.h (PAIRSH, SCM_PAIRS_H):
9548 Renamed <foo>H to SCM_<foo>_H.
9549
9550 * gc.c (debug_cells_gc_interval): New static variable.
9551
9552 (scm_assert_cell_valid): If selected by the user, perform
9553 additional garbage collections.
9554
9555 (scm_set_debug_cell_accesses_x): Extended to let the user specify
9556 if additional garbage collections are desired.
9557
9558 (mark_gc_async): If additional garbage collections are selected
9559 by the user, don't call the after-gc-hook. Instead require the
9560 user to run the hook manually.
9561
9562 * pairs.c (scm_error_pair_access): New function. Only compiled
9563 if SCM_DEBUG_PAIR_ACCESSES is set to 1.
9564
9565 * pairs.h (SCM_VALIDATE_PAIR): New macro.
9566
9567 (SCM_CAR, SCM_CDR, SCM_SETCAR, SCM_SETCDR): If
9568 SCM_DEBUG_PAIR_ACCESSES is set to 1, make sure that the argument
9569 is a real pair object. (Glocs are also accepted, but that may
9570 change.) If not, abort with an error message.
9571
9572 2001-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
9573
9574 * eval.c (SCM_VALIDATE_NON_EMPTY_COMBINATION): New macro.
9575
9576 (SCM_CEVAL, SCM_APPLY): Replace calls to SCM_EVALIM2 with calls
9577 to SCM_VALIDATE_NON_EMPTY_COMBINATION.
9578
9579 2001-06-05 Marius Vollmer <mvo@zagadka.ping.de>
9580
9581 * extensions.c (scm_c_register_extension): Allow NULL as library
9582 name.
9583 (load_extension): Ignore NULL library names when comparing.
9584
9585 * hash.c (scm_hasher): Use SCM_UNPACK in the case labels so that
9586 non-pointers are being compared. Thanks to Alexander Klimov!
9587
9588 2001-06-04 Gary Houston <ghouston@arglist.com>
9589
9590 * rw.c (scm_write_string_partial): new procedure implementing
9591 write-string/partial in (ice-9 rw).
9592 * rw.h: declare scm_write_string_partial.
9593
9594 2001-06-04 Marius Vollmer <mvo@zagadka.ping.de>
9595
9596 * keywords.c (keyword_print): Substract 1 from length of symbol
9597 name, accounting for the silly dash.
9598
9599 * dynl.c (scm_registered_modules, scm_clear_registered_modules):
9600 Do not emit deprecation warning.
9601
9602 Added exception notice to all files.
9603
9604 * dynl.c: Include "deprecation.h".
9605
9606 2001-06-03 Marius Vollmer <mvo@zagadka.ping.de>
9607
9608 * dynl.c (scm_register_module_xxx, scm_registered_modules,
9609 scm_clear_registered_modules): Deprecated.
9610
9611 2001-06-02 Rob Browning <rlb@cs.utexas.edu>
9612
9613 * .cvsignore: add guile_filter_doc_snarfage guile-snarf-docs
9614 guile-snarf-docs-texi.
9615
9616 * fports.c: HAVE_ST_BLKSIZE changed to
9617 HAVE_STRUCT_STAT_ST_BLKSIZE.
9618 (scm_fport_buffer_add): HAVE_ST_BLKSIZE changed to
9619 HAVE_STRUCT_STAT_ST_BLKSIZE.
9620
9621 * filesys.c (scm_stat2scm): HAVE_ST_RDEV changed to
9622 HAVE_STRUCT_STAT_ST_RDEV.
9623 (scm_stat2scm): HAVE_ST_BLKSIZE changed to
9624 HAVE_STRUCT_STAT_ST_BLKSIZE.
9625 (scm_stat2scm): HAVE_ST_BLOCKS changed to
9626 HAVE_STRUCT_STAT_ST_BLOCKS.
9627
9628 2001-06-02 Marius Vollmer <mvo@zagadka.ping.de>
9629
9630 * strports.c (scm_eval_string): Use scm_primitive_eval_x instead
9631 of scm_eval_x to allow module changes between the forms in the
9632 string. Set/restore module using scm_c_call_with_current_module.
9633
9634 * mkstemp.c: New file, slightly modified from libiberties
9635 mkstemps.c.
9636
9637 2001-05-31 Michael Livshin <mlivshin@bigfoot.com>
9638
9639 * guile-snarf-docs.in, guile-snarf-docs-texi.in,
9640 filter-doc-snarfage.c: new files.
9641
9642 * Makefile.am: add stuff to [build,] use and distribute
9643 guile-snarf-docs, guile-snarf-docs-texi, guile_filter_doc_snarfage.
9644
9645 * guile-snarf.in: grok the new snarf output.
9646
9647 * snarf.h: make the output both texttools- and `read'-friendly.
9648
9649 * guile-doc-snarf.in: reimplement in terms of guile-snarf and
9650 guile-snarf-docs. (should also deprecate, I guess. maybe not).
9651
9652 2001-05-31 Marius Vollmer <mvo@zagadka.ping.de>
9653
9654 * print.c (scm_simple_format): Support "~~" and "~%". Signal
9655 error for unsupported format controls and for superflous
9656 arguments. Thanks to Daniel Skarda!
9657
9658 * print.h, print.c (scm_print_symbol_name): Factored out of
9659 scm_iprin1.
9660 (scm_iprin1): Call it.
9661
9662 * keywords.c (keyword_print): Use scm_print_symbol_name so that
9663 weird names are printed correctly.
9664
9665 * print.c (scm_print_symbol_name): Symbols whose name starts with
9666 `#' or `:' or ends with `:' are considered weird.
9667
9668 2001-05-30 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9669
9670 * numbers.c (scm_difference, scm_divide): Clarified comments for -
9671 and /.
9672
9673 2001-05-29 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9674
9675 * debug.h: Removed prototype for scm_eval_string.
9676
9677 2001-05-28 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9678
9679 * symbols.c (scm_gensym): Fix buffer overrun (try `(gensym
9680 (make-string 2000 #\!))' in an older version).
9681
9682 Change strncpy to memcpy to allow embedded NUL characters in
9683 symbol prefix.
9684
9685 2001-05-28 Michael Livshin <mlivshin@bigfoot.com>
9686
9687 * hooks.c (scm_create_hook): deprecated.
9688 (make_hook): deleted.
9689 (scm_make_hook): all the hook creation code is now here.
9690
9691 * gc.c (scm_init_gc): don't call `scm_create_hook'. instead make
9692 a hook, make it permanent, and do a `scm_c_define' on it.
9693
9694 * strop.c (s_scm_string_capitalize_x): fix docstring quoting.
9695
9696 * socket.c (s_scm_inet_pton): fix docstring quoting.
9697 (s_scm_inet_ntop): ditto.
9698
9699 * num2integral.i.c (INTEGRAL2NUM): cast to fix a warning.
9700
9701 * hashtab.c (scm_internal_hash_fold): fix argument position in
9702 SCM_ASSERT.
9703
9704 * environments.c (s_scm_import_environment_set_imports_x): fix
9705 argument position in SCM_ASSERT.
9706
9707 * debug.c (s_scm_make_gloc): fix SCM packing/unpacking.
9708 (s_scm_make_iloc): ditto.
9709
9710 2001-05-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
9711
9712 * __scm.h (SCM_DEBUG_TYPING_STRICTNESS): Make 1 the default.
9713
9714 * eval.c (promise_print): Read the promise's value as an object.
9715
9716 (SCM_CEVAL): Don't perform side-effecting operations in macro
9717 parameters.
9718
9719 * eval.h (SCM_EVALIM2): Fix the typing strictness of the
9720 conditional expression.
9721
9722 * gc.c (scm_master_freelist, scm_master_freelist2): Added missing
9723 initializer.
9724
9725 * gh_data.c (gh_set_substr): Removed redundant unsigned >= 0
9726 text, removed redundant computation of effective_length and fixed
9727 the overflow check.
9728
9729 * goops.c (test_slot_existence): Use SCM_EQ_P to compare SCM
9730 values.
9731
9732 (wrap_init): Don't use SCM_C[AD]R for non pairs.
9733
9734 (hell): Make it a scm_bits_t pointer rather than a SCM pointer.
9735
9736 * goops.c (scm_sys_modify_class), strports.c (st_resize_port),
9737 struct.h (SCM_SET_STRUCT_PRINTER): Store unpacked values.
9738
9739 * goops.h (SCM_ACCESSORS_OF, SCM_SLOT): Return a SCM value.
9740
9741 * goops.h (GOOPSH, SCM_GOOPS_H), modules.h (MODULESH,
9742 SCM_MODULES_H), objects.h (OBJECTSH, SCM_OBJECTS_H), struct.h
9743 (STRUCTH, SCM_STRUCT_H), symbols.h (SYMBOLSH, SCM_SYMBOLS_H),
9744 __scm.h (__SCMH, SCM___SCM_H): Change <foo>H to SCM_<foo>_H.
9745
9746 * modules.[ch] (scm_module_tag): Make it a scm_bits_t value.
9747
9748 * objects.h (SCM_SET_CLASS_INSTANCE_SIZE): Fixed typing.
9749
9750 * ramap.c (ramap_rp): Removed bogus `;´.
9751
9752 * sort.c (scm_restricted_vector_sort_x): Fixed signedness
9753 problem.
9754
9755 * symbols.h (SCM_PROP_SLOTS, SCM_SET_PROP_SLOTS, SCM_SYMBOL_FUNC,
9756 SCM_SET_SYMBOL_FUNC, SCM_SYMBOL_PROPS, SCM_SET_SYMBOL_PROPS):
9757 Read SCM objects rather than scm_bits_t values.
9758
9759 * tags.h (SCM_VOIDP_TEST): Removed.
9760
9761 (SCM_DEBUG_TYPING_STRICTNESS): Now takes values 0, 1, 2. The
9762 value of 2 now corresponds to the former 1, the current 1
9763 corresponds to the former situation that SCM_VOIDP_TEST was
9764 defined.
9765
9766 (SCM): Now defined as typedef struct scm_unused_struct * SCM;
9767 If this appears to be not ANSI compliant, we will change it to
9768 typedef struct scm_unused_struct { } * SCM;
9769 Thanks to Han-Wen Nienhuys for the suggestion.
9770
9771 * unif.c (scm_array_set_x): Fix typing problem, and use
9772 SCM_UVECTOR_BASE instead of SCM_VELTS or SCM_CELL_WORD_1 when
9773 dealing with uniform vectors.
9774
9775 2001-05-27 Michael Livshin <mlivshin@bigfoot.com>
9776
9777 * gc.c (scm_init_storage): init `scm_gc_registered_roots'.
9778 (scm_igc): mark from them, too (precisely, not conservatively!).
9779
9780 * root.h (scm_gc_registered_roots): new object in
9781 scm_sys_protects.
9782
9783 * hooks.c (scm_create_hook): call `scm_gc_protect_object' instead
9784 `scm_protect_object'. shouldn't call it at all, though, it seems.
9785
9786 * gc.c (scm_[un]protect_object): deprecated.
9787 (scm_gc_[un]protect_object): new names for scm_[un]protect_object.
9788 (scm_gc_[un]register_root[s]): new.
9789
9790 * gc.h: add prototypes for scm_gc_[un]protect_object,
9791 scm_gc_[un]register_root[s].
9792
9793 2001-05-26 Michael Livshin <mlivshin@bigfoot.com>
9794
9795 revert the controversial part of the 2001-05-24 changes.
9796
9797 2001-05-25 Marius Vollmer <mvo@zagadka.ping.de>
9798
9799 * modules.c (scm_env_module): Exported to Scheme.
9800
9801 * eval.c (scm_debug_opts): New option `show-file-name'.
9802
9803 * debug.h (SCM_SHOW_FILE_NAME): New.
9804
9805 * backtrace.c: Include "libguile/filesys.h".
9806 (sym_base, display_backtrace_get_file_line,
9807 display_backtrace_file, display_backtrace_file_and_line): New.
9808 (display_frame): Call display_backtrace_file_and_line if that is
9809 requested.
9810 (display_backtrace_body): Call scm_display_backtrace_file if
9811 requested.
9812
9813 * debug.h (scm_lookup_cstr, scm_lookup_soft, scm_evstr):
9814 Prototypes removed since there's no definition for these
9815 functions.
9816
9817 2001-05-24 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
9818
9819 * unif.c (scm_make_ra, array_free), unif.h (SCM_ARRAY_DIMS):
9820 Changed use of scm_array->scm_array_t and
9821 scm_array_dim->scm_array_dim_t to enable build with
9822 --disable-deprecated.
9823
9824 2001-05-24 Michael Livshin <mlivshin@bigfoot.com>
9825
9826 The purpose of this set of changes is to regularize Guile's usage
9827 of ANSI C integral types, with the following ideas in mind:
9828
9829 - SCM does not nesessarily have to be long.
9830 - long is not nesessarily enough to store pointers.
9831 - long is not nesessarily the same size as int.
9832
9833 The changes are incomplete and possibly buggy. Please test on
9834 something exotic.
9835
9836 * validate.h
9837 (SCM_NUM2{SIZE,PTRDIFF,SHORT,USHORT,BITS,UBITS,INT,UINT}[_DEF]):
9838 new macros.
9839
9840 * unif.h: type renaming:
9841 scm_array -> scm_array_t
9842 scm_array_dim -> scm_array_dim_t
9843 the old names are deprecated, all in-Guile uses changed.
9844
9845 * tags.h (scm_ubits_t): new typedef, representing unsigned
9846 scm_bits_t.
9847
9848 * stacks.h: type renaming:
9849 scm_info_frame -> scm_info_frame_t
9850 scm_stack -> scm_stack_t
9851 the old names are deprecated, all in-Guile uses changed.
9852
9853 * srcprop.h: type renaming:
9854 scm_srcprops -> scm_srcprops_t
9855 scm_srcprops_chunk -> scm_srcprops_chunk_t
9856 the old names are deprecated, all in-Guile uses changed.
9857
9858 * gsubr.c, procs.c, print.c, ports.c, read.c, rdelim.c, ramap.c,
9859 rw.c, smob.c, sort.c, srcprop.c, stacks.c, strings.c, strop.c,
9860 strorder.c, strports.c, struct.c, symbols.c, unif.c, values.c,
9861 vectors.c, vports.c, weaks.c:
9862 various int/size_t -> size_t/scm_bits_t changes.
9863
9864 * random.h: type renaming:
9865 scm_rstate -> scm_rstate_t
9866 scm_rng -> scm_rng_t
9867 scm_i_rstate -> scm_i_rstate_t
9868 the old names are deprecated, all in-Guile uses changed.
9869
9870 * procs.h: type renaming:
9871 scm_subr_entry -> scm_subr_entry_t
9872 the old name is deprecated, all in-Guile uses changed.
9873
9874 * options.h (scm_option_t.val): unsigned long -> scm_bits_t.
9875 type renaming:
9876 scm_option -> scm_option_t
9877 the old name is deprecated, all in-Guile uses changed.
9878
9879 * objects.c: various long -> scm_bits_t changes.
9880 (scm_i_make_class_object): flags: unsigned long -> scm_ubits_t
9881
9882 * numbers.h (SCM_FIXNUM_BIT): deprecated, renamed to
9883 SCM_I_FIXNUM_BIT.
9884
9885 * num2integral.i.c: new file, multiply included by numbers.c, used
9886 to "templatize" the various integral <-> num conversion routines.
9887
9888 * numbers.c (scm_mkbig, scm_big2num, scm_adjbig, scm_normbig,
9889 scm_copybig, scm_2ulong2big, scm_dbl2big, scm_big2dbl):
9890 deprecated.
9891 (scm_i_mkbig, scm_i_big2inum, scm_i_adjbig, scm_i_normbig,
9892 scm_i_copybig, scm_i_short2big, scm_i_ushort2big, scm_i_int2big,
9893 scm_i_uint2big, scm_i_long2big, scm_i_ulong2big, scm_i_bits2big,
9894 scm_i_ubits2big, scm_i_size2big, scm_i_ptrdiff2big,
9895 scm_i_long_long2big, scm_i_ulong_long2big, scm_i_dbl2big,
9896 scm_i_big2dbl, scm_short2num, scm_ushort2num, scm_int2num,
9897 scm_uint2num, scm_bits2num, scm_ubits2num, scm_size2num,
9898 scm_ptrdiff2num, scm_num2short, scm_num2ushort, scm_num2int,
9899 scm_num2uint, scm_num2bits, scm_num2ubits, scm_num2ptrdiff,
9900 scm_num2size): new functions.
9901
9902 * modules.c (scm_module_reverse_lookup): i, n: int -> scm_bits_t.
9903
9904 * load.c: change int -> size_t in various places (where the
9905 variable is used to store a string length).
9906 (search-path): call scm_done_free, not scm_done_malloc.
9907
9908 * list.c (scm_ilength): return a scm_bits_t, not long.
9909 some other {int,long} -> scm_bits_t changes.
9910
9911 * hashtab.c: various [u]int -> scm_bits_t changes.
9912 scm_ihashx_closure -> scm_ihashx_closure_t (and made a typedef).
9913 (scm_ihashx): n: uint -> scm_bits_t
9914 use scm_bits2num instead of scm_ulong2num.
9915
9916 * gsubr.c: various int -> scm_bits_t changes.
9917
9918 * goops.[hc]: various {int,long} -> scm_bits_t changes.
9919
9920 * gh_data.c (gh_num2int): no loss of precision any more.
9921
9922 * gh.h (gh_str2scm): len: int -> size_t
9923 (gh_{get,set}_substr): start: int -> scm_bits_t,
9924 len: int -> size_t
9925 (gh_<num>2scm): n: int -> scm_bits_t
9926 (gh_*vector_length): return scm_[u]size_t, not unsigned long.
9927 (gh_length): return scm_bits_t, not unsigned long.
9928
9929 * gc.[hc]: various small changes relating to many things stopping
9930 being long and starting being scm_[u]bits_t instead.
9931 scm_mallocated should no longer wrap around.
9932
9933 * fports.h: type renaming:
9934 scm_fport -> scm_fport_t
9935 the old name is deprecated, all in-Guile uses changed.
9936
9937 * fports.c (fport_fill_input): count: int -> scm_bits_t
9938 (fport_flush): init_size, remaining, count: int -> scm_bits_t
9939
9940 * debug.h (scm_lookup_cstr, scm_lookup_soft, scm_evstr): removed
9941 those prototypes, as the functions they prototype don't exist.
9942
9943 * fports.c (default_buffer_size): int -> size_t
9944 (scm_fport_buffer_add): read_size, write_size: int -> scm_bits_t
9945 default_size: int -> size_t
9946 (scm_setvbuf): csize: int -> scm_bits_t
9947
9948 * fluids.c (n_fluids): int -> scm_bits_t
9949 (grow_fluids): old_length, i: int -> scm_bits_t
9950 (next_fluid_num, scm_fluid_ref, scm_fluid_set_x): n: int ->
9951 scm_bits_t
9952 (scm_c_with_fluids): flen, vlen: int -> scm_bits_t
9953
9954 * filesys.c (s_scm_open_fdes): changed calls to SCM_NUM2LONG to
9955 the new and shiny SCM_NUM2INT.
9956
9957 * extensions.c: extension -> extension_t (and made a typedef).
9958
9959 * eval.h (SCM_IFRAME): cast to scm_bits_t, not int. just so
9960 there are no nasty surprises if/when the various deeply magic tag
9961 bits move somewhere else.
9962
9963 * eval.c: changed the locals used to store results of SCM_IFRAME,
9964 scm_ilength and such to be of type scm_bits_t (and not int/long).
9965 (iqq): depth, edepth: int -> scm_bits_t
9966 (scm_eval_stack): int -> scm_bits_t
9967 (SCM_CEVAL): various vars are not scm_bits_t instead of int.
9968 (check_map_args, scm_map, scm_for_each): len: long -> scm_bits_t
9969 i: int -> scm_bits_t
9970
9971 * environments.c: changed the many calls to scm_ulong2num to
9972 scm_ubits2num.
9973 (import_environment_fold): proc_as_ul: ulong -> scm_ubits_t
9974
9975 * dynwind.c (scm_dowinds): delta: long -> scm_bits_t
9976
9977 * debug.h: type renaming:
9978 scm_debug_info -> scm_debug_info_t
9979 scm_debug_frame -> scm_debug_frame_t
9980 the old names are deprecated, all in-Guile uses changed.
9981 (scm_debug_eframe_size): int -> scm_bits_t
9982
9983 * debug.c (scm_init_debug): use scm_c_define instead of the
9984 deprecated scm_define.
9985
9986 * continuations.h: type renaming:
9987 scm_contregs -> scm_contregs_t
9988 the old name is deprecated, all in-Guile uses changed.
9989 (scm_contregs_t.num_stack_items): size_t -> scm_bits_t
9990 (scm_contregs_t.num_stack_items): ulong -> scm_ubits_t
9991
9992 * continuations.c (scm_make_continuation): change the type of
9993 stack_size from long to scm_bits_t.
9994
9995 * ports.h: type renaming:
9996 scm_port_rw_active -> scm_port_rw_active_t (and made a typedef)
9997 scm_port -> scm_port_t
9998 scm_ptob_descriptor -> scm_ptob_descriptor_t
9999 the old names are deprecated, all in-Guile uses changed.
10000 (scm_port_t.entry): int -> scm_bits_t.
10001 (scm_port_t.line_number): int -> long.
10002 (scm_port_t.putback_buf_size): int -> size_t.
10003
10004 * __scm.h (long_long, ulong_long): deprecated (they pollute the
10005 global namespace and have little value beside that).
10006 (SCM_BITS_LENGTH): new, is the bit size of scm_bits_t (i.e. of an
10007 SCM handle).
10008 (ifdef spaghetti): include sys/types.h and sys/stdtypes.h, if they
10009 exist (for size_t & ptrdiff_t).
10010 (scm_sizet): deprecated.
10011
10012 * Makefile.am (noinst_HEADERS): add num2integral.i.c
10013
10014 2001-05-23 Marius Vollmer <mvo@zagadka.ping.de>
10015
10016 * snarf.h (SCM_CONST_LONG): Use SCM_VCELL_INIT instead of
10017 SCM_VARIABLE_INIT since that it what it used to be.
10018
10019 * deprecation.c (scm_include_deprecated_features): Make docstring
10020 ANSIsh. Thanks to Matthias Köppe!
10021
10022 2001-05-21 Marius Vollmer <mvo@zagadka.ping.de>
10023
10024 * symbols.c (scm_mem2symbol): Re-introduce indirect cell. It is
10025 needed for weak-key hashtables.
10026
10027 * procs.c (scm_make_subr_with_generic): Add missing last argument
10028 in call to scm_c_define_gsubr_with_generic. Thanks to Ariel Rios.
10029
10030 * eval.c: Use SCM_EQ_P instead of `==' or `!=' in certain
10031 places. (scm_c_improper_memq): Return 1 instead of SCM_BOOL_T.
10032
10033 * eval.h (SCM_EVALIM2): Use SCM_EQ_P instead of `=='.
10034
10035 2001-05-20 Marius Vollmer <mvo@zagadka.ping.de>
10036
10037 * symbols.c (scm_mem2symbol): Call `scm_must_strndup' instead of
10038 `duplicate_string'. Do not use an indirect cell, store symbol
10039 directly in collision list of hash table.
10040 (duplicate_string): Removed.
10041
10042 * init.c (scm_init_guile_1): Call scm_init_extensions.
10043
10044 * Makefile.am: Add "extensions.c" and related files in all the
10045 right places.
10046
10047 * extensions.h, extension.c: New files.
10048
10049 * gc.h, gc.c (scm_must_strdup, scm_must_strndup): New.
10050
10051 * modules.h (scm_system_module_env_p): Move out of deprecated
10052 section.
10053
10054 * rw.h (scm_init_rw): Added prototype.
10055
10056 * gsubr.h, gsubr.c (scm_c_make_gsubr, scm_c_define_gsubr,
10057 scm_c_make_gsubr_with_generic, scm_c_define_gsubr_with_generic):
10058 New functions. They replace scm_make_gsubr and
10059 scm_make_gsubr_with_generic. The `make' variants only create the
10060 gsubr object, while the `define' variants also put it into the
10061 current module. Changed all callers.
10062 (scm_make_gsubr, scm_make_gsubr_with_generic): Deprecated.
10063
10064 * procs.h, procs.c (scm_c_make_subr, scm_c_define_subr,
10065 scm_c_make_subr_with_generic, scm_c_define_subr_with_generic): New
10066 functions. They replace scm_make_subr, scm_make_subr_opt and
10067 scm_make_subr_with_generic. The `make' variants only create the
10068 subr object, while the `define' variants also put it into the
10069 current module. Changed all callers.
10070 (scm_make_subr, scm_make_subr_opt, scm_make_subr_with_generic):
10071 Deprecated.
10072
10073 * eval.c, gc.c, gh_funcs.c, goops.c, macros.c, pairs.c, ramap.c,
10074 rdelim.c, rw.c, scmsigs.c, snarf.h, values.c: Changed according to
10075 the comments above.
10076
10077 2001-05-19 Neil Jerram <neil@ossau.uklinux.net>
10078
10079 * throw.c (scm_lazy_catch): Slight docstring clarification.
10080
10081 2001-05-19 Marius Vollmer <mvo@zagadka.ping.de>
10082
10083 * throw.c: Lazy-catch handlers are no longer allowed to return.
10084 Fixed comments throughout.
10085 (scm_ithrow): Signal an error when a lazy-catch handler returns.
10086 Moved actual jump to jmpbuf into if-branch where the jmpbuf is
10087 recognized as such.
10088
10089 * version.c (s_scm_micro_version): Fix typo in FUNC_NAME, it
10090 refered to s_scm_minor_version previously.
10091
10092 * modules.h, modules.c: Moved around a lot of code so that
10093 deprecated features appear at the bottom.
10094 (root_module_lookup_closure, scm_sym_app, scm_sym_modules,
10095 module_prefix, make_modules_in_var, beautify_user_module_x_var,
10096 scm_the_root_module, scm_make_module, scm_ensure_user_module,
10097 scm_load_scheme_module): Deprecated.
10098 (scm_system_module_env_p): Return SCM_BOOL_T directly for
10099 environments corresponding to the root module.
10100 (convert_module_name, scm_c_resolve_module,
10101 scm_c_call_with_current_module, scm_c_define_module,
10102 scm_c_use_module, scm_c_export): New.
10103 (the_root_module): New static variant of scm_the_root_module. Use
10104 it everywhere instead of scm_the_root_module.
10105
10106 * fluids.h, fluids.c (scm_internal_with_fluids): Deprecated.
10107 (scm_c_with_fluids): Renamed from scm_internal_with_fluids.
10108 (scm_c_with_fluid): New.
10109 (scm_with_fluids): Use scm_c_with_fluids instead of
10110 scm_internal_with_fluids.
10111
10112 * goops.h, goops.c (scm_init_goops_builtins): Renamed from
10113 `scm_init_goops'. Do not explicitly create/switch modules.
10114 Return SCM_UNSPECIFIED.
10115 (scm_init_goops): Only register `%init-goops-builtins' procedure.
10116 (scm_load_goops): Use scm_c_resolve_module instead of
10117 scm_resolve_module.
10118
10119 * init.c (scm_init_guile_1): Call `scm_init_goops' instead of
10120 `scm_init_oop_goops_goopscore_module'. Call `scm_init_rdelim' and
10121 `scm_init_rw' prior to loading the startup files.
10122
10123 * rdelim.h, rdelim.c: (scm_init_rdelim_builtins): Renamed from
10124 scm_init_rdelim. Do not explicitly create/switch modules.
10125 Return SCM_UNSPECIFIED.
10126 (scm_init_rdelim): Only register `%init-rdelim-builtins'
10127 procedure.
10128
10129 * rw.c (scm_init_rw_builtins): Renamed from scm_init_rw. Do not
10130 explicitly create/switch modules. Return SCM_UNSPECIFIED.
10131 (scm_init_rw): Only register `%init-rw-builtins' procedure.
10132
10133 * script.c (scm_shell): Evaluate the compiled switches in the
10134 current module, not in the root module.
10135
10136 2001-05-18 Marius Vollmer <mvo@zagadka.ping.de>
10137
10138 * fluids.c (scm_c_with_fluids): Rename from
10139 scm_internal_with_fluids.
10140 (scm_internal_with_fluids): Deprecated.
10141 (scm_c_with_fluid): New.
10142
10143 2001-05-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
10144
10145 * print.h (PRINTH, SCM_PRINT_H): Renamed PRINTH to SCM_PRINT_H.
10146
10147 (SCM_PORT_WITH_PS_PORT, SCM_PORT_WITH_PS_PS): Only pairs may be
10148 accessed with SCM_C[AD]R.
10149
10150 (SCM_COERCE_OUTPORT): Removed redundant SCM_NIMP test.
10151
10152 2001-05-16 Rob Browning <rlb@cs.utexas.edu>
10153
10154 * version.c (s_scm_major_version): doc fixes.
10155 (s_scm_minor_version): doc fixes.
10156 (s_scm_minor_version): new function.
10157
10158 * version.h (scm_init_version): new function.
10159
10160 * versiondat.h.in: add GUILE_MICRO_VERSION.
10161
10162 2001-05-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
10163
10164 * deprecation.c (scm_init_deprecation): Renamed
10165 GUILE_WARN_DEPRECATED_DEFAULT to SCM_WARN_DEPRECATED_DEFAULT.
10166
10167 2001-05-16 Marius Vollmer <mvo@zagadka.ping.de>
10168
10169 * Makefile.am (cpp_sig_symbols.c, cpp_err_symbols.c): Make
10170 dependent on cpp_cnvt.awk
10171
10172 2001-05-15 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10173
10174 * script.c (scm_compile_shell_switches): New command line option
10175 `--use-srfi' for loading a list of SRFIs on startup.
10176 (scm_shell_usage): Added `--use-srfi' to help message.
10177
10178 2001-05-10 Marius Vollmer <mvo@zagadka.ping.de>
10179
10180 Merged from mvo-vcell-cleanup-1-branch.
10181
10182 The concept of vcells has been removed from Guile. With it,
10183 explicit obarrays and associated operations are gone. Use
10184 hashtables instead of obarrays.
10185
10186 Throughout: use scm_sym2var instead of scm_sym2vcell and treat
10187 result as variable instead of vcell. Glocs no longer point to a
10188 vcell but to a variable. Use scm_c_define instead of
10189 scm_sysintern and treat the result as a variable (which it is),
10190 not a vcell.
10191
10192 * variable.c, variable.h (SCM_VARVCELL, SCM_UDVARIABLEP,
10193 SCM_DEFVARIABLEP): Deprecated.
10194 (SCM_VARIABLE_REF, SCM_VARIABLE_SET, SCM_VARIABLE_LOC): New.
10195 (variable_print): Do not print name of variable.
10196 (variable_equalp): Compare values, not vcells.
10197 (anonymous_variable_sym): Removed.
10198 (make_vcell_variable): Removed.
10199 (make_variable): New, as replacement.
10200 (scm_make_variable, scm_make_undefined_variable): Do not take name
10201 hint parameter.
10202 (scm_variable_ref): Check for SCM_UNDEFINED and throw "unbound"
10203 error in that case.
10204 (scm_builtin_variable): Deprecated.
10205
10206 * symbols.c, symbols.h (scm_sym2vcell, scm_sym2ovcell_soft,
10207 scm_sym2ovcell, scm_intern_obarray_soft, scm_intern_obarray,
10208 scm_intern, scm_intern0, scm_sysintern0_no_module_lookup,
10209 scm_sysintern, scm_sysintern0, scm_symbol_value0,
10210 scm_string_to_obarray_symbol, scm_intern_symbol,
10211 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned,
10212 scm_symbol_bound_p, scm_symbol_set_x, scm_gentmp, gentmp_counter):
10213 Deprecated and moved to "symbols-deprecated.c".
10214 (copy_and_prune_obarray, scm_builtin_bindings): Removed.
10215 (scm_init_symbols): Call scm_init_symbols_deprecated.
10216 * symbols-deprecated.c: New file.
10217 * Makefile.am: Added symbols-deprecated.c and related files in all
10218 the right places.
10219
10220 * snarf.h (SCM_VCELL, SCM_GLOBAL_VCELL, SCM_VCELL_INIT,
10221 SCM_GLOBAL_VCELL_INIT): Deprecated.
10222 (SCM_VARIABLE, SCM_GLOBAL_VARIABLE, SCM_VARIABLE_INIT,
10223 SCM_GLOBAL_VARIABLE_INIT): New, as replacement. Changed all uses.
10224
10225 * print.c (scm_iprin1): Use scm_module_reverse_lookup instead of
10226 SCM_GLOC_SYM.
10227
10228 * evalext.c, filesys.c, fports.c, gdbint.c, gh_data.c, gsubr.c,
10229 hooks.c, load.c, numbers.c, objects.c, ports.c, posix.c, procs.c,
10230 ramap.c, random.c, read.c, regex-posix.c, scmsigs.c, script.c,
10231 socket.c, srcprop.c, stacks.c, stime.c, struct.c, tag.c, throw.c:
10232 Changed according to the `throughout' comments.
10233
10234 * modules.h, modules.c (scm_module_system_booted_p): Changed type
10235 to `int'.
10236 (scm_module_type): Removed.
10237 (the_root_module): Renamed to the_root_module_var. Now points to
10238 a variable instead of a vcell. Updated all uses.
10239 (scm_the_root_module): Return SCM_BOOL_F when module systems
10240 hasn't been booted yet.
10241 (SCM_VALIDATE_STRUCT_TYPE): Removed.
10242 (scm_post_boot_init_modules): Made static.
10243 (scm_set_current_module): Call scm_post_boot_init_modules on first
10244 call.
10245 (make_modules_in, beautify_user_module_x, resolve_module,
10246 try_module_autoload, module_make_local_var_x): Tacked on "_var"
10247 suffix. Now point to variables instead of vcells. Updated all
10248 uses.
10249 (scm_module_lookup_closure): Deal with the module being SCM_BOOL_F
10250 and return SCM_BOOL_F in that case.
10251 (scm_module_transformer): Likewise.
10252 (sym_module, scm_lookup_closure_module, scm_env_module): New.
10253 (SCM_F_EVAL_CLOSURE_INTERFACE, SCM_EVAL_CLOSURE_INTERFACE_P): New.
10254 (scm_eval_closure_lookup): Do not allow new definitions when
10255 `interface' flag is set.
10256 (scm_standard_interface_eval_closure): New.
10257 (scm_pre_modules_obarray, scm_sym2var, scm_module_lookup,
10258 scm_lookup, scm_module_define, scm_define, scm_c_module_lookup,
10259 scm_c_lookup, scm_c_module_define, scm_c_define,
10260 scm_module_reverse_lookup, scm_get_pre_modules_obarray,
10261 scm_modules_prehistory): New.
10262 (scm_post_boot_init_modules): Use scm_c_define and scm_c_lookup
10263 instead of scm_intern0.
10264
10265 * macros.c (scm_make_synt): Return SCM_UNSPECIFIED instead of the
10266 symbol.
10267
10268 * keywords.c (s_scm_make_keyword_from_dash_symbol): Use a regular
10269 hashtable operations to maintain the keywords, not obarray ones.
10270
10271 * init.c (scm_load_startup_files): Do not call
10272 scm_post_boot_init_modules. This is done by
10273 scm_set_current_module now.
10274 (scm_init_guile_1): Call scm_modules_prehistory. Call
10275 scm_init_variable early on.
10276
10277 * goops.c (s_scm_sys_goops_loaded): Get
10278 var_compute_applicable_methods from scm_sym2var, not from a direct
10279 invocation of scm_goops_lookup_closure.
10280
10281 * gh_funcs.c (gh_define): Return SCM_UNSPECIFIED instead of vcell.
10282
10283 * gc.c: Added simple debugging hack to mark phase of GC: When
10284 activated, do not tail-call scm_gc_mark. This gives nice
10285 backtraces.
10286 (scm_unhash_name): Removed.
10287
10288 * feature.c (features): Renamed to features_var. Now points to a
10289 variable instead of a vcell. Updated all uses.
10290
10291 * eval.h (SCM_TOP_LEVEL_LOOKUP_CLOSURE): Use
10292 `scm_current_module_lookup_closure' which will do the right thing
10293 when the module system hasn't been booted yet.
10294 (SCM_GLOC_SYM): Removed.
10295 (SCM_GLOC_VAR, SCM_GLOC_SET_VAL): New.
10296 (SCM_GLOC_VAL, SCM_GLOC_LOC): Reimplemented in terms of variables.
10297
10298 * eval.c (scm_lookupcar, scm_lookupcar1): Deal with variables
10299 instead of with vcells. Do not overwrite `var' with the result of
10300 the lookup, use the new `real_var' instead. Remove `var2' in
10301 exchange (which was only used with threads).
10302 (sym_three_question_marks): New.
10303 (scm_unmemocar): Use `scm_module_reverse_lookup' instead of
10304 `SCM_GLOC_SYM'.
10305 (scm_lisp_nil, scm_lisp_t): Directly define as symbols.
10306 (scm_m_atfop): Expect the function definition to be a variable
10307 instead of a vcell.
10308 (scm_macroexp): Do not use `unmemocar', explicitely remember the
10309 symbol instead.
10310 (scm_unmemocopy): Removed thoughts about anti-macro interface.
10311 (scm_eval_args): Use more explicit code in the gloc branch of the
10312 atrocious struct ambiguity test. The optimizer will sort this
10313 out.
10314 (scm_deval_args): Likewise.
10315 (SCM_CEVAL): Likewise. Also, do not use unmemocar, explicitely
10316 remember the symbol instead. Added some comments where
10317 scm_tc3_cons_gloc really exclusively refers to structs.
10318 (scm_init_eval): Use scm_define to initialize "nil" and "t" to
10319 scm_lisp_nil and scm_lisp_t, respectively. Use scm_define instead
10320 of scm_sysintern in general.
10321
10322 * dynwind.c (scm_swap_bindings): Use SCM_GLOC_SET_VAL instead of
10323 explicit magic.
10324
10325 * debug.c (s_scm_make_gloc): Only allow proper variables, no
10326 pairs. Put the variable directly in the gloc.
10327 (s_scm_gloc_p): Use `scm_tc3_cons_gloc' instead of the magic `1'.
10328 (scm_init_debug): Use scm_c_define instead scm_sysintern.
10329
10330 * cpp_cnvt.awk: Emit "scm_c_define" instead of "scm_sysintern".
10331
10332 * backtrace.h, backtrace.c (scm_the_last_stack_fluid): Renamed to
10333 scm_the_last_stack_fluid_var. It now points to a variable instead
10334 of a vcell. Updated all uses.
10335 (scm_has_shown_backtrace_hint_p_var): Now points to a variable
10336 instead of a vcell. Updated all uses.
10337
10338 * _scm.h: Include "variables.h" and "modules.h" since almost
10339 everybody needs them now.
10340
10341 * root.h (scm_symhash, scm_symhash_vars): Removed.
10342 * gc.c (scm_init_storage): Do not initialize them.
10343
10344 2001-05-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
10345
10346 * eval.c (scm_init_eval): Initialize scm_undefineds and
10347 scm_listofnull.
10348
10349 * gc.c (scm_debug_newcell, scm_debug_newcell2): Fixed to behave
10350 like the SCM_NEWCELL macro counterparts.
10351
10352 (scm_init_storage, scm_init_gc): Moved initialization of
10353 scm_tc16_allocated from scm_init_gc to scm_init_storage.
10354
10355 (scm_init_storage): Moved initialization of scm_undefineds and
10356 scm_listofnull to eval.c, initializion of scm_nullstr to
10357 strings.c, initializion of scm_nullvect to vectors.c.
10358
10359 * gc.h (SCM_NEWCELL, SCM_NEWCELL2): Prefer SCM_NULLP over
10360 SCM_IMP, as in scm_debug_newcell and scm_debug_newcell2.
10361
10362 * init.c (scm_init_guile_1): Reordered some initializations and
10363 added dependcy information comments.
10364
10365 * load.c (scm_init_load): Use scm_nullstr.
10366
10367 * strings.c (scm_init_strings): Initialize scm_nullstr.
10368
10369 * vectors.c (scm_init_vectors): Initialize scm_nullvect.
10370
10371 2001-05-15 Marius Vollmer <mvo@zagadka.ping.de>
10372
10373 * values.c (print_values): Print as a unreadable object, not as
10374 multiple lines. Thanks to Matthias Köppe!
10375
10376 2001-05-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
10377
10378 * deprecation.c: Fixed copyright date.
10379
10380 * deprecation.h (DEPRECATION_H, SCM_DEPRECATION_H): Renamed
10381 DEPRECATION_H to SCM_DEPRECATION_H.
10382
10383 2001-05-10 Thien-Thi Nguyen <ttn@revel.glug.org>
10384
10385 * guile-doc-snarf.in: Update copyright.
10386 Fix relative path bug. Thanks to Sergey Poznyakoff.
10387
10388 2001-05-10 Marius Vollmer <mvo@zagadka.ping.de>
10389
10390 * ports.c (scm_port_revealed, scm_set_port_revealed_x): Only
10391 accept open ports. Thanks to Quetzalcoatl Bradley!
10392
10393 2001-05-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10394
10395 * procs.c: Increased `scm_subr_table_room' to 800 because Guile now
10396 has 779 primitives on startup.
10397
10398 2001-05-09 Marius Vollmer <mvo@zagadka.ping.de>
10399
10400 * eval.c (scm_i_eval): Copy expression before passing it to
10401 SCM_XEVAL. The copy operation was removed unintendedly during my
10402 change on 2001-03-25.
10403
10404 2001-05-09 Michael Livshin <mlivshin@bigfoot.com>
10405
10406 from Matthias Köppe (thanks!):
10407
10408 * ports.c (scm_c_read): pointer arithmetic on void pointers isn't
10409 portable.
10410
10411 * deprecation.c (s_scm_include_deprecated_features): ANSI'fied the
10412 docstring.
10413
10414 2001-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
10415
10416 * gc.c (scm_init_gc): Added FIXME comment.
10417
10418 * hooks.c: Since hooks don't have a name any more, it is not
10419 necessary to include objprop.h.
10420
10421 (hook_print, scm_add_hook_x): Replace SCM_NFALSEP by !SCM_FALSEP.
10422
10423 (symbol_name, scm_make_hook_with_name): Removed.
10424
10425 (scm_create_hook): Don't set the hook's name property.
10426
10427 * hooks.h (HOOKSH, SCM_HOOKS_H): Renamed HOOKSH to SCM_HOOKS_H.
10428
10429 (SCM_HOOK_NAME, scm_make_hook_with_name): Removed.
10430
10431 * init.c (scm_init_guile_1): Hooks don't use objprops any more.
10432
10433 * numbers.c (SCM_FLOBUFLEN, FLOBUFLEN, scm_number_to_string,
10434 scm_print_real, scm_print_complex): Renamed SCM_FLOBUFLEN to
10435 FLOBUFLEN and define it unconditionally.
10436
10437 2001-05-07 Marius Vollmer <mvo@zagadka.ping.de>
10438
10439 * gh_data.c (gh_lookup): Call gh_module_lookup with
10440 `scm_current_module ()', not `#f'.
10441 (gh_module_lookup): Expect a module instead of an obarray as first
10442 argument and do lookup in that module.
10443
10444 * ramap.c (raeql_1): Do not call scm_uniform_vector_length on
10445 arrays. The length of array is already determined differently and
10446 scm_uniform_vector_length does not work on arrays.
10447
10448 2001-05-06 Marius Vollmer <mvo@zagadka.ping.de>
10449
10450 * snarf.h (SCM_FUNC_CAST_ARBITRARY_ARGS): Use "SCM (*)()" for C++
10451 as well. "SCM (*)(...)" does not work on RedHat 7.1.
10452
10453 * __scm.h (SCM_WTA_DISPATCH_0): Removed ARG and POS parameters,
10454 they are not used. Changed `wrong type' error into `wrong num
10455 args' error. Changed all callers.
10456
10457 * numbers.c (scm_difference): Call SCM_WTA_DISPATCH_0 when zero
10458 arguments are supplied.
10459
10460 2001-05-05 Thien-Thi Nguyen <ttn@revel.glug.org>
10461
10462 * regex-posix.c (scm_regexp_exec): Expand docstring to briefly
10463 describe `regexp/notbol' and `regexp/noteol' execution flags.
10464
10465 * strop.c (scm_substring_move_x): Doc fix; nfc.
10466
10467 2001-05-05 Marius Vollmer <mvo@zagadka.ping.de>
10468
10469 * objects.c, objects.h (scm_valid_object_procedure_p): New.
10470 (scm_set_object_procedure_x): Use it to check argument. Fix
10471 docstring.
10472
10473 * evalext.c (scm_definedp): Fix docstring.
10474
10475 2001-05-05 Gary Houston <ghouston@arglist.com>
10476
10477 * socket.c: use HAVE_IPV6 instead of AF_INET6 to enable IPv6
10478 support.
10479
10480 2001-05-04 Neil Jerram <neil@ossau.uklinux.net>
10481
10482 * eval.c (scm_promise_p), list.c (scm_append_x, scm_reverse_x),
10483 symbols.c (scm_symbol_to_string), vports.c (scm_make_soft_port):
10484 Change R4RS references to R5RS.
10485
10486 * guile-snarf.awk.in: Fixes so that (i) blank lines in the
10487 docstring source are correctly reproduced in the output (ii)
10488 we don't anymore get occasional trailing quotes. Also reorganized
10489 and commented the code a little.
10490
10491 * scmsigs.c (scm_raise), throw.c (scm_throw): Docstring format
10492 fixes.
10493
10494 2001-05-04 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10495
10496 * strop.c (scm_string_split): New procedure.
10497
10498 * strop.h (scm_string_split): Added prototype.
10499
10500 2001-05-04 Gary Houston <ghouston@arglist.com>
10501
10502 * socket.c: define uint32_t if netdb.h doesn't. thanks to
10503 Dale P. Smith.
10504
10505 2001-05-02 Marius Vollmer <mvo@zagadka.ping.de>
10506
10507 * rw.c: Include "modules.h" and "strports.h".
10508
10509 * net_db.h (scm_gethost): Added prototype.
10510
10511 * deprecation.h, deprecation.c: New.
10512 * Makefile.am (libguile_la_SOURCES): Added "deprecation.c".
10513 (DOT_X_FILES): Added "deprecation.x".
10514 (modinclude_HEADERS): Added "deprecation.h".
10515
10516 * init.c: Include "deprecation.h".
10517 (scm_init_guile_1): Call scm_init_deprecation.
10518
10519 2001-05-01 Marius Vollmer <mvo@zagadka.ping.de>
10520
10521 * gh.h (gh_init_guile, gh_make_string, gh_string_length,
10522 gh_string_ref, gh_string_set_x, gh_substring, gh_string_append):
10523 New.
10524
10525 2001-04-29 Gary Houston <ghouston@arglist.com>
10526
10527 * rw.c: new file, implementing C part of module (ice-9 rw).
10528 (scm_read_string_x_partial): moved from ioext.c
10529 (scm_init_rw): new proc.
10530 * rw.h: new file.
10531 init.c: include rw.h and call scm_init_rw.
10532 Makefile.am: include rw.c and rw.h.
10533
10534 2001-04-28 Rob Browning <rlb@cs.utexas.edu>
10535
10536 * numbers.c: enabled local definition of SCM_FLOBUFLEN until we
10537 know what's supposed to happen to it.
10538
10539 * list.h (scm_list_star): deprecation expired - removed.
10540
10541 * numbers.h (scm_dblproc): deprecation expired - removed.
10542 (SCM_UNEGFIXABLE): deprecation expired - removed.
10543 (SCM_FLOBUFLEN): deprecation expired - removed.
10544 (SCM_INEXP): deprecation expired - removed.
10545 (SCM_CPLXP): deprecation expired - removed.
10546 (SCM_REAL): deprecation expired - removed.
10547 (SCM_IMAG): deprecation expired - removed.
10548 (SCM_REALPART): deprecation expired - removed.
10549 (scm_makdbl): deprecation expired - removed.
10550 (SCM_SINGP): deprecation expired - removed.
10551 (SCM_NUM2DBL): deprecation expired - removed.
10552 (SCM_NO_BIGDIG): deprecation expired - removed.
10553
10554 * tags.h (SCM_DOUBLE_CELLP): deprecation expired - removed.
10555 (scm_tc_dblr): deprecation expired - removed.
10556 (scm_tc_dblc): deprecation expired - removed.
10557 (scm_tc16_flo): deprecation expired - removed.
10558 (scm_tc_flo): deprecation expired - removed.
10559
10560 * tag.h (scm_tag): deprecation expired - removed.
10561
10562 * tag.c: (scm_tag): deprecation expired - removed.
10563
10564 * ioext.c: (scm_fseek): deprecation expired - removed.
10565
10566 * ioext.h (scm_fseek): deprecation expired - removed.
10567
10568 * gh_data.c (gh_int2scmb): deprecation expired - removed.
10569
10570 * gh.h (gh_int2scmb): deprecation expired - removed.
10571
10572 2001-04-28 Neil Jerram <neil@ossau.uklinux.net>
10573
10574 * stacks.c (scm_make_stack): Fix typo in docstring.
10575
10576 2001-04-27 Rob Browning <rlb@cs.utexas.edu>
10577
10578 * error.c (scm_sysmissing): deprecation expired - removed.
10579
10580 * error.h (scm_sysmissing): deprecation expired - removed.
10581
10582 * gc.c
10583 (scm_init_gc): gc-thunk deprecation expired - removed.
10584 (scm_gc_vcell): deprecation expired - removed.
10585 (gc_async_thunk): scm_gc_vcell related code removed.
10586
10587 * vectors.h (SCM_NVECTORP): deprecation expired - removed.
10588
10589 * strings.h
10590 (SCM_NSTRINGP): deprecation expired - removed.
10591 (SCM_NRWSTRINGP): deprecation expired - removed.
10592
10593 * continuations.h (SCM_SETJMPBUF): deprecation expired - removed.
10594
10595 * chars.h
10596 (SCM_ICHRP): deprecation expired - removed.
10597 (SCM_ICHR): deprecation expired - removed.
10598 (SCM_MAKICHR): deprecation expired - removed.
10599
10600 * ports.h
10601 (SCM_INPORTP): deprecation expired - removed.
10602 (SCM_OUTPORTP): deprecation expired - removed.
10603
10604 2001-04-25 Marius Vollmer <mvo@zagadka.ping.de>
10605
10606 * modules.c (scm_module_type): New.
10607 (scm_post_boot_init_modules): Initialize from Scheme value.
10608 (the_module, scm_current_module, scm_init_modules): the_module is
10609 now a C only fluid.
10610 (scm_current_module): Export to Scheme.
10611 (scm_set_current_module): Do not call out to Scheme, do all the
10612 work in C. Export procedure to Scheme. Only accept modules, `#f'
10613 is no longer valid as the current module. Only set
10614 scm_top_level_lookup_closure_var and scm_system_transformer when
10615 they are not deprecated.
10616 (scm_module_transformer, scm_current_module_transformer): New.
10617
10618 * modules.h (scm_module_index_transformer, SCM_MODULE_TRANSFORMER,
10619 scm_current_module_transformer, scm_module_transformer): New.
10620
10621 * gh_data.c: Removed FIXME comment about gh_lookup returning
10622 SCM_UNDEFINED. That's the right thing to do.
10623
10624 * eval.h, eval.c (scm_system_transformer): Deprecated by moving it
10625 into the conditionally compiled sections.
10626 * eval.c (scm_primitive_eval_x, scm_primitive_eval): Use
10627 scm_current_module_transformer instead of scm_system_transformer.
10628 * init.c (start_stack): Move initialization of
10629 scm_system_transformer to the deprecated section.
10630
10631 2001-04-22 Neil Jerram <neil@ossau.uklinux.net>
10632
10633 * throw.c (scm_throw): Correct docstring.
10634
10635 2001-04-22 Gary Houston <ghouston@arglist.com>
10636
10637 * socket.c: attempted to improve the docstrings slightly.
10638
10639 * net_db.c: remove bogus "close" declaration.
10640 (inet_aton declaration, scm_inet_aton, scm_inet_ntoa,
10641 scm_inet_netof, scm_lnaof, scm_inet_makeaddr, INADDR_ANY etc.):
10642 moved to socket.c.
10643 * net_db.h: declarations moved too.
10644
10645 * socket.c (scm_htonl, scm_ntohl): use uint32_t instead of unsigned
10646 long.
10647 (ipv6_net_to_num, ipv6_num_to_net): new static procedures.
10648 (VALIDATE_INET6): new macro.
10649 (scm_inet_pton, scm_inet_ntop): new procedures, implementing
10650 inet-pton and inet-ntop.
10651 (scm_fill_sockaddr): use VALIDATE_INET6 and ipv6_num_to_net.
10652 (scm_addr_vector): use ipv6_net_to_num.
10653
10654 2001-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
10655
10656 * eq.c (scm_equal_p), ramap.c (scm_init_ramap): Don't compute the
10657 smob number explicitly. Use SCM_TC2SMOBNUM instead.
10658
10659 * gc.c (MARK, scm_gc_sweep): Only check for illegal heap objects
10660 when compiled in debug mode.
10661
10662 (scm_gc_sweep): Only call smob's free function if it is defined.
10663
10664 * print.c (scm_iprin1): No need to check for validity of smob
10665 type or existence of print function.
10666
10667 * smob.[ch] (scm_smobs): Made into a fixed size global array.
10668 Resizing will not work well with preemptive threading.
10669
10670 * smob.c (scm_smob_print): Don't use SCM_CDR to access smob data.
10671
10672 (scm_make_smob_type): Extracted initialization of smob
10673 descriptors to scm_smob_prehistory. Don't use scm_numsmob outside
10674 of the critical section.
10675
10676 (scm_smob_prehistory): Initialize all smob descriptors. By
10677 default, don't assign a smob free function: Most smob types don't
10678 need one.
10679
10680 * smob.h (SMOBH, SCM_SMOB_H): Renamed SMOBH to SCM_SMOB_H.
10681
10682 2001-04-21 Gary Houston <ghouston@arglist.com>
10683
10684 * socket.c (FLIP_NET_HOST_128): new macro.
10685 (scm_fill_sockaddr): use new macro.
10686 (scm_addr_vector): completed IPv6 address support. added const
10687 to the address parameter.
10688
10689 2001-04-20 Gary Houston <ghouston@arglist.com>
10690
10691 * socket.c (scm_fill_sockaddr): call htons for sin6_port.
10692 Don't assign sin6_scope_id in structure unless HAVE_SIN6_SCOPE_ID
10693 is defined.
10694 (scm_addr_vector): use a switch instead of multiple if statements.
10695 Add support for IPv6 (incomplete) .
10696 MAX_ADDR_SIZE: increase to size of struct sockaddr_in6 if needed.
10697
10698 2001-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
10699
10700 * struct.c (scm_free_structs): Only pairs may be accessed with
10701 SCM_C[AD]R.
10702
10703 2001-04-19 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
10704
10705 * unif.h (SCM_ARRAY_CONTIGUOUS): Reintroduced as deprecated.
10706
10707 * __scm.h (SCM_WTA_DISPATCH_0, SCM_WTA_DISPATCH_1,
10708 SCM_WTA_DISPATCH_2, SCM_WTA_DISPATCH_n): Inserted required
10709 parentheses in order to get the correct associativity.
10710
10711 2001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
10712
10713 * unif.c (scm_array_to_list): Added missing handling of arrays of
10714 bytes. Thanks to Masao Uebayashi for the bug report.
10715
10716 2001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
10717
10718 * debug.c (scm_procedure_source): Use SCM_CLOSURE_FORMALS more
10719 consistently.
10720
10721 2001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
10722
10723 * procs.h (SCM_CLOSURE_FORMALS): New macro.
10724
10725 * debug.c (scm_procedure_source), eval.c (scm_badformalsp,
10726 SCM_CEVAL, SCM_APPLY), goops.c (get_slot_value, set_slot_value),
10727 procprop.c (scm_i_procedure_arity), sort.c (closureless): Use
10728 SCM_CLOSURE_FORMALS.
10729
10730 * eval.c (scm_badformalsp, SCM_CEVAL), procprop.c
10731 (scm_i_procedure_arity): Prefer stronger predicates like
10732 SCM_NULLP or SCM_FALSEP over SCM_IMP.
10733
10734 * macros.c (macro_print): Extracted macro printing code from
10735 print.c and simplified it.
10736
10737 (scm_macro_type): Use SCM_MACRO_TYPE;
10738
10739 (scm_init_macros): Use macro_print for printing macros.
10740
10741 * print.c (scm_print_opts): Improved option documentation.
10742
10743 (scm_iprin1): Extracted printing of macros to macros.c.
10744 Simplified printing of ordinary closures.
10745
10746 * procs.c (scm_thunk_p): Fixed handling of closures. Thanks to
10747 Martin Grabmueller for the bug report.
10748
10749 2001-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
10750
10751 This patch eliminates some further applications of SCM_C[AD]R to
10752 non pair cells.
10753
10754 * gc.h (SCM_SETAND_CAR, SCM_SETOR_CAR): Deprecated. These have
10755 never been applied to real pairs.
10756
10757 * srcprop.h (SCM_SOURCE_PROPERTY_FLAG_BREAK): Added.
10758
10759 (SRCPROPBRK): Use SCM_SOURCE_PROPERTY_FLAG_BREAK.
10760
10761 * unif.h (SCM_ARRAY_CONTIGUOUS, SCM_ARRAY_FLAG_CONTIGUOUS,
10762 SCM_ARRAY_CONTP): Renamed SCM_ARRAY_CONTIGUOUS to
10763 SCM_ARRAY_FLAG_CONTIGUOUS and use it.
10764
10765 (SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG):
10766 Added.
10767
10768 * srcprop.h (SRCPROPH), unif.h (UNIFH): Renamed to
10769 SCM_SOURCE_PROPERTIES_H and SCM_UNIFORM_VECTORS_H, respectively.
10770
10771 * srcprop.h (SETSRCPROPBRK, CLEARSRCPROPBRK), unif.c
10772 (scm_dimensions_to_uniform_array, scm_ra_set_contp): Don't use
10773 SCM_SET{AND,OR}_CAR.
10774
10775 2001-04-17 Gary Houston <ghouston@arglist.com>
10776
10777 * some initial support for IPv6:
10778
10779 * socket.c (scm_fill_sockaddr): improve the argument validation.
10780 don't allocate memory until all args are checked. instead of
10781 unconditional memset of soka, try setting sin_len to 0 if
10782 SIN_LEN is defined. add support for AF_INET6. define FUNC_NAME.
10783 (scm_socket, scm_connect): extend docstrings for IPv6.
10784 (scm_init_socket): intern AF_INET6 and PF_INET6.
10785
10786 2001-04-17 Niibe Yutaka <gniibe@m17n.org>
10787
10788 * srcprop.c (scm_make_srcprops): Added SCM_ALLOW_INTS which
10789 matches SCM_DEFER_INTS at the beginning of the function.
10790
10791 * mallocs.c (scm_malloc_obj): Remove un-matched SCM_ALLOW_INTS.
10792
10793 * gc.c (scm_igc): Unconditionally call
10794 SCM_CRITICAL_SECTION_START/END.
10795
10796 * fluids.c (next_fluid_num): Unconditionally call
10797 SCM_CRITICAL_SECTION_START/END.
10798 (s_scm_make_fluid): Remove un-matched SCM_DEFER_INTS.
10799
10800 * coop-defs.h (SCM_THREAD_DEFER, SCM_THREAD_ALLOW,
10801 SCM_THREAD_REDEFER, SCM_THREAD_REALLOW_1, SCM_THREAD_REALLOW_2):
10802 Removed.
10803
10804 * __scm.h (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END):
10805 Defined as nothing for the case of !defined(USE_THREADS).
10806 (SCM_THREAD_DEFER, SCM_THREAD_ALLOW, SCM_THREAD_REDEFER):
10807 Removed.
10808 (<stdio.h>): Include when (SCM_DEBUG_INTERRUPTS == 1).
10809 (SCM_CHECK_NOT_DISABLED, SCM_CHECK_NOT_ENABLED): Print FILE and
10810 LINE.
10811 (SCM_DEFER_INTS, SCM_ALLOW_INTS_ONLY, SCM_ALLOW_INTS,
10812 SCM_REDEFER_INTS, SCM_REALLOW_INTS): Don't use
10813 SCM_THREAD_DEFER/SCM_THREAD_ALLOW. Instead, use
10814 SCM_CRITICAL_SECTION_START/END.
10815 (SCM_REALLOW_INTS: Bug fix. Don't call
10816 SCM_THREAD_SWITCHING_CODE.
10817 (SCM_TICK): Don't use SCM_DEFER_INTS/SCM_ALLOW_INTS. Instead, use
10818 SCM_THREAD_SWITCHING_CODE directly.
10819 (SCM_ENTER_A_SECTION): Unconditionally use
10820 SCM_CRITICAL_SECTION_START/END. (was:
10821 SCM_DEFER_INTS/SCM_ALLOW_INTS when SCM_POSIX_THREADS defined).
10822
10823 2001-04-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
10824
10825 * __scm.h (SCM_CAREFUL_INTS, SCM_DEBUG_INTERRUPTS): Replaced the
10826 macro SCM_CAREFUL_INTS by the macro SCM_DEBUG_INTERRUPTS and
10827 allowed to explicitly set this macro via the CFLAGS variable
10828 during make.
10829
10830 * fluids.c (next_fluid_num), gc.c (scm_igc), coop-defs.h
10831 (SCM_THREAD_CRITICAL_SECTION_START,
10832 SCM_THREAD_CRITICAL_SECTION_END): Renamed
10833 SCM_THREAD_CRITICAL_SECTION_START/END to
10834 SCM_CRITICAL_SECTION_START/END.
10835
10836 2001-04-11 Keisuke Nishida <kxn30@po.cwru.edu>
10837
10838 * debug-malloc.c (grow, scm_debug_malloc_prehistory): Use memset
10839 instead of bzero.
10840
10841 * coop.c, iselect.c (FD_ZERO_N): Unconditionally use memset.
10842 (MISSING_BZERO_DECL): Remove the declaration.
10843
10844 Thanks to NIIBE Yutaka.
10845
10846 2001-04-10 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
10847
10848 * init.c, goops.c, goops.h: Reverted change of 2001-03-29. (The
10849 goops module should be registered in order to work for an
10850 application which uses libguile statically linked.)
10851
10852 2001-04-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
10853
10854 * numbers.[ch] (scm_num2long, scm_num2long_long,
10855 scm_num2ulong_long, scm_num2ulong): Argument position is an
10856 unsigned integer.
10857
10858 * environments.c (eval_environment_folder,
10859 import_environment_folder), gh_data.c (gh_scm2longs,
10860 gh_scm2floats, gh_scm2doubles): Distinguish between 0 and NULL
10861 for integers and pointers, respectively.
10862
10863 * gh_data.c (gh_scm2ulong, gh_scm2long, gh_scm2int), socket.c
10864 (scm_fill_sockaddr), unif.c (scm_array_set_x), validate.h
10865 (SCM_NUM2ULONG, SCM_NUM2LONG, SCM_NUM2LONG_DEF,
10866 SCM_NUM2LONG_LONG): Don't pass argument positions as pointers.
10867
10868 * filesys.c (scm_open_fdes, scm_open), net_db (scm_inet_ntoa,
10869 scm_inet_netof, scm_lnaof, scm_gethost, scm_getproto), posix.c
10870 (scm_utime), ramap.c (scm_array_fill_int), scmsigs.c
10871 (scm_sigaction), socket.c (scm_htonl, scm_ntohl, scm_sendto),
10872 stime.c (scm_localtime, scm_gmtime), struct.c (scm_struct_set_x),
10873 validate.h (SCM_VALIDATE_LONG_COPY): Whitespace fixes.
10874
10875 2001-04-09 Neil Jerram <neil@ossau.uklinux.net>
10876
10877 * strings.c (scm_read_only_string_p): Update docstring to reflect
10878 current (non-)usage of "read only" strings.
10879 (scm_make_shared_substring): Clarify docstring by changing
10880 "semantics" to "arguments".
10881
10882 2001-04-06 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10883
10884 * hooks.c (scm_make_hook, scm_make_hook_with_name),
10885 (scm_hook_p, scm_hook_empty_p, scm_run_hook): Docstring
10886 improvements.
10887
10888 2001-04-03 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
10889
10890 The following changes make the documentation more consistent.
10891
10892 * rdelim.c (scm_write_line), posix.c (scm_utime), ports.c
10893 (scm_seek), net_db.c (scm_inet_aton, scm_inet_ntoa),
10894 (scm_inet_netof, scm_lnaof, scm_inet_makeaddr), ioext.c
10895 (scm_ftell): Changed @smalllisp ... @end smalllisp to @lisp
10896 ... @end lisp.
10897
10898 * vports.c (scm_make_soft_port), version.c (scm_version), unif.c
10899 (scm_array_dimensions, scm_make_shared_array),
10900 (scm_transpose_array, scm_enclose_array, scm_bit_count_star),
10901 throw.c (scm_catch), struct.c (scm_make_vtable_vtable), strop.c
10902 (scm_string_rindex, scm_string_index, scm_substring_fill_x),
10903 (scm_string_null_p), strings.c (scm_read_only_string_p), root.c
10904 (scm_call_with_dynamic_root), ramap.c (scm_array_index_map_x),
10905 posix.c (scm_mknod), numbers.c (scm_logtest, scm_logbit_p),
10906 macros.c (scm_makmmacro), list.c (scm_append), environments.c
10907 (scm_environment_fold), dynwind.c (s_scm_dynamic_wind): Changed
10908 @example ... @end example to @lisp ... @end lisp.
10909
10910 * weaks.c (scm_weak_vector): Corrected docstring.
10911
10912 * hashtab.c (scm_hashq_ref, scm_hashq_set_x, scm_hashq_remove_x),
10913 (scm_hashv_ref, scm_hashv_set_x, scm_hashv_remove_x),
10914 (scm_hash_ref, scm_hash_set_x, scm_hash_remove_x, scm_hashx_ref),
10915 (scm_hashx_set_x, scm_hashx_get_handle),
10916 (scm_hashx_create_handle_x), regex-posix.c (scm_make_regexp),
10917 (scm_regexp_exec, scm_regexp_p), numbers.c (scm_logtest),
10918 vectors.c (scm_vector_fill_x), strings.c
10919 (scm_make_shared_substring), symbols.c (scm_string_to_symbol),
10920 objprop.c (scm_set_object_properties_x):
10921 (scm_set_object_property_x), throw.c (scm_catch, scm_lazy_catch),
10922 strports.c (scm_call_with_input_string), ports.c
10923 (scm_truncate_file), ioext.c (scm_ftell), ports.c (scm_seek),
10924 list.c (scm_append_x), dynwind.c (scm_dynamic_wind), error.c
10925 (scm_error_scm), vports.c (scm_make_soft_port), weaks.c
10926 (scm_make_weak_vector,scm_weak_vector_p),
10927 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table),
10928 (scm_make_doubly_weak_hash_table, scm_weak_key_hash_table_p),
10929 (scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
10930 macros.c (scm_macro_type), dynl.c (scm_dynamic_link),
10931 (scm_dynamic_unlink, scm_dynamic_call, scm_dynamic_args_call):
10932 Made parameter names match documentation by renaming parameters
10933 and/or fixing docstrings.
10934
10935 * numbers.c (scm_ash): Corrected Texinfo markup.
10936
10937 * strop.c (scm_string_index, scm_string_rindex),
10938 (scm_substring_fill_x, scm_string_null_p): Removed `qdocs'.
10939
10940 * vports.c (scm_make_soft_port), unif.c
10941 (scm_uniform_vector_length, scm_array_p, scm_array_rank),
10942 (scm_dimensions_to_uniform_array, scm_transpose_array),
10943 (scm_array_in_bounds_p, scm_uniform_vector_ref),
10944 (scm_bit_count, scm_bit_position, scm_bit_count_star),
10945 (scm_array_to_list, scm_list_to_uniform_array),
10946 (scm_array_prototype, symbols.c (scm_string_to_symbol), strports.c
10947 (scm_open_input_string, scm_open_output_string),
10948 (scm_get_output_string), strop.c (scm_string_copy),
10949 (scm_string_fill_x), strings.c (scm_string_p, scm_string), stime.c
10950 (scm_get_internal_real_time, scm_times),
10951 (scm_get_internal_run_time, scm_current_time, scm_gettimeofday),
10952 (scm_localtime, scm_gmtime), socket.c (scm_htons, scm_ntohs),
10953 (scm_htonl, scm_ntohl, scm_socket, scm_socketpair),
10954 (scm_getsockopt, scm_getsockname, scm_getpeername, scm_recvfrom),
10955 simpos.c (scm_system), random.c (scm_random_uniform),
10956 (scm_random_normal, scm_random_exp), ramap.c
10957 (scm_array_equal_p), posix.c (scm_pipe, scm_getgroups),
10958 (scm_status_exit_val, scm_status_term_sig, scm_status_stop_sig),
10959 (scm_getppid, scm_getuid, scm_getgid, scm_geteuid, scm_getegid),
10960 (scm_getpgrp, scm_ttyname, scm_ctermid, scm_tcgetpgrp, scm_uname),
10961 (scm_environ, scm_tmpnam, scm_mkstemp, scm_access, scm_getpid),
10962 (scm_setlocale), ports.c (scm_char_ready_p, scm_drain_input),
10963 (scm_pt_size, scm_pt_member, scm_port_revealed, scm_port_mode),
10964 (scm_close_port, scm_input_port_p, scm_output_port_p, scm_port_p),
10965 (scm_port_closed_p, scm_eof_object_p, scm_read_char),
10966 (scm_peek_char), pairs.c (scm_pair_p, scm_cons), numbers.c
10967 (scm_logand, scm_logior, scm_logxor, scm_lognot),
10968 (scm_integer_expt, scm_bit_extract, scm_logcount),
10969 (scm_integer_length, scm_string_to_number, scm_inexact_to_exact),
10970 net_db.c (scm_inet_netof, scm_lnaof), modules.c
10971 (scm_interaction_environment), macros.c (scm_makacro),
10972 (scm_makmacro, scm_makmmacro), keywords.c (scm_keyword_p), ioext.c
10973 (scm_ftell, scm_dup_to_fdes, scm_fileno, scm_isatty_p),
10974 (scm_fdopen, scm_fdes_to_ports), gc.c (scm_gc_stats), fluids.c
10975 (scm_fluid_ref), filesys.c (scm_open_fdes),
10976 (scm_stat, scm_directory_stream_p, scm_getcwd, scm_readlink):
10977 Docstring correction: `Returns' -> `Return'
10978
10979 * gc.c (scm_set_debug_cell_accesses_x):
10980 (s_scm_gc_set_debug_check_freelist_x):
10981 * fluids.c (scm_fluid_p): Added texinfo markup.
10982
10983 * error.c (scm_strerror): Made docstring more precise.
10984
10985 * vectors.c (scm_vector_p, scm_vector, scm_make_vector),
10986 (scm_vector_to_list, _scm_vector_fill_x), symbols.c
10987 (scm_symbol_p, scm_symbol_to_string), strorder.c
10988 (scm_string_equal_p, scm_string_ci_equal_p, scm_string_less_p),
10989 (scm_string_leq_p, scm_string_gr_p, scm_string_geq_p),
10990 (scm_string_ci_less_p, scm_string_ci_leq_p, scm_string_ci_gr_p):
10991 (scm_string_ci_geq_p), strop.c (scm_string_copy),
10992 (scm_string_fill_x): Removed `(r5rs)' from docstrings.
10993
10994 2001-04-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
10995
10996 * gc.c (MARK): Re-introduce a cheap sanity test for non debug
10997 mode, as suggested by Michael Livshin.
10998
10999 2001-03-31 Michael Livshin <mlivshin@bigfoot.com>
11000
11001 * backtrace.c (display_backtrace_body): since the `print_state'
11002 variable is not used (instead its data field is used directly as
11003 `pstate'), protect it from the hungry compiler optimizations.
11004 thanks to Bill Schottstaedt for the report.
11005
11006 2001-03-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
11007
11008 * gc.[ch] (scm_tc16_allocated): New type tag for allocated cells.
11009 It is only defined and used if guile is compiled with
11010 SCM_DEBUG_CELL_ACCESSES set to true. It's purpose is, to never
11011 let cells with a free_cell type tag be visible outside of the
11012 garbage collector when in debug mode.
11013
11014 * gc.c (scm_debug_cell_accesses_p): Set to true as default.
11015
11016 (scm_assert_cell_valid): Use a local static variable to avoid
11017 recursion.
11018
11019 (MARK): Only check for rogue cell pointers in debug mode. Use
11020 scm_cellp for this purpose and place all checks for rogue pointers
11021 into that function. Further, since due to conservative scanning
11022 we may encounter free cells during marking, don't use the standard
11023 cell type accessor macro to determine the cell type.
11024
11025 (scm_cellp): Check if the cell pointer actually points into a
11026 card header.
11027
11028 (scm_init_gc): Initalize scm_tc16_allocated.
11029
11030 * gc.h (GCH): Renamed to SCM_GC_H.
11031
11032 (SCM_VALIDATE_CELL): Enclose the expression in brackets. This
11033 might be unnecessary, but I feel better this way :-)
11034
11035 (SCM_GC_CELL_TYPE): New macro.
11036
11037 (SCM_SETAND_CDR, SCM_SETOR_CDR): Deprecated. These are not used
11038 in guile, and it is unlikely that they will be applied to real
11039 pairs anyway.
11040
11041 (SCM_SET_FREE_CELL_TYPE): Removed. It was not used.
11042
11043 (SCM_GC_SET_ALLOCATED): New macro. Only non-empty if guile is
11044 compiled with SCM_DEBUG_CELL_ACCESSES set to true.
11045
11046 (SCM_NEWCELL, SCM_NEWCELL2): Use of SCM_GC_SET_ALLOCATED will
11047 make sure that in debug mode no free cell will ever be visible
11048 outside of the garbage collector.
11049
11050 2001-03-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
11051
11052 * async.c (scm_asyncs_pending): Don't use != to compare SCM
11053 values.
11054
11055 * async.c (scm_system_async), variable.c (scm_make_variable,
11056 scm_make_undefined_variable): Use scm_cons to create a pair.
11057
11058 * debug.c (scm_reverse_lookup): Perform proper type checking.
11059 Remove suspicious use of SCM_SLOPPY_CONSP.
11060
11061 * eq.c (scm_equal_p), tags.h (SCM_ECONSP): Use SCM_CONSP instead
11062 of SCM_SLOPPY_CONSP. A sane compiler should be able to perform
11063 the corresponding optimization.
11064
11065 * eval.c (iqq): Use proper type check.
11066
11067 (scm_m_expand_body): Remove redundant type checks.
11068
11069 (promise_print): Don't access promise cells as pairs.
11070
11071 * eval.c (EVALCAR, iqq, scm_m_expand_body, scm_eval_args,
11072 scm_deval_args SCM_CEVAL), guardians.c (scm_guard), hashtab.c
11073 (scm_internal_hash_fold), print.c (scm_iprlist): Use !SCM_CELLP
11074 for SCM_NCELLP, !SCM_CONSP for SCM_NCONSP, !SCM_IMP for SCM_NIMP,
11075 !SCM_FALSEP for SCM_NFALSEP, !SCM_NULLP for SCM_NNULLP
11076
11077 * eval.c (scm_m_define, scm_macroexp, SCM_CEVAL), print.c
11078 (scm_iprin1): Use new macro predicate and accessors.
11079
11080 * eval.h (scm_tc16_macro): Removed declaration. It is declared
11081 in macros.h.
11082
11083 * eval.h (EVALH), macros.h (MACROSH), ports.h (PORTSH), procs.h
11084 (PROCSH), tags.h (TAGSH), variable.h (VARIABLEH): Renamed to
11085 SCM_EVAL_H, SCM_MACROS_H, SCM_PORTS_H, SCM_PROCS_H, SCM_TAGS_H and
11086 SCM_VARIABLE_H. Even the macros that are used to inhibit
11087 including a header file twice should be in the SCM_ namespace.
11088
11089 * fluids.c (scm_swap_fluids, scm_swap_fluids_reverse),
11090 properties.c (scm_primitive_property_ref,
11091 scm_primitive_property_del_x): Prefer stronger predicates like
11092 SCM_NULLP or SCM_FALSEP over SCM_IMP.
11093
11094 * gc.c (MARK): Use proper macros to access procedure-with-setter
11095 cell elements and closure cell elements.
11096
11097 (gc_sweep_freelist_finish, scm_gc_sweep, init_heap_seg): Don't
11098 access free cells as pairs.
11099
11100 (scm_unprotect_object): scm_hashq_get_handle returns #f if
11101 no hashtab entry is found.
11102
11103 * gc.c (scm_gc_sweep), ports.c (scm_close_port): Use new macro
11104 SCM_CLR_PORT_OPEN_FLAG.
11105
11106 * guardians.c (TCONC_IN), print.c (scm_free_print_state): Don't
11107 use SCM_SET_C[AD]R for uninitialized cells.
11108
11109 * hashtab.c (scm_hash_fn_get_handle): Use SCM_VALIDATE_VECTOR.
11110 If the hashtable has no slots, return #f instead of '(). This
11111 unifies the return value with most assoc-functions.
11112
11113 (scm_hash_fn_ref): Use proper type check.
11114
11115 (scm_hashq_get_handle, scm_hashv_get_handle, scm_hash_get_handle):
11116 Removed references to non-existing functions from documentation.
11117
11118 * keywords.c (scm_keyword_dash_symbol): Use proper macros to
11119 access keyword cell elements.
11120
11121 * macros.h (SCM_MACROP, SCM_MACRO_TYPE, SCM_MACRO_CODE): New
11122 macros.
11123
11124 * ports.h (SCM_CLR_PORT_OPEN_FLAG): New macro.
11125
11126 * print.c (scm_iprlist): Added comment. Improved loop
11127 conditions.
11128
11129 * procs.h (SCM_ENV, SCM_SETENV): Don't access closure cells as
11130 pairs.
11131
11132 * smob.c (scm_markcdr): Don't access smob cells as pairs.
11133
11134 * tags.h (SCM_SLOPPY_CONSP, SCM_SLOPPY_NCONSP): Deprecated.
11135
11136 * throw.c (ACTIVATEJB, DEACTIVATEJB): Don't access jump buffer
11137 cells as pairs.
11138
11139 * variable.c (variable_print, variable_equalp, scm_variable_ref,
11140 scm_variable_set_x): Use proper macros to access variable cell
11141 elements.
11142
11143 (scm_variable_bound_p): Don't use SCM_NEGATE_BOOL.
11144
11145 * variable.h (SCM_VARVCELL): Don't access variable cells as
11146 pairs.
11147
11148 * vectors.c (scm_vector), weaks.c (scm_weak_vector): Simplified,
11149 added FIXME comment, removed register specifier.
11150
11151 2001-03-29 Keisuke Nishida <kxn30@po.cwru.edu>
11152
11153 * goops.c, goops.h (scm_init_oop_goops_goopscore_module): Deprecated.
11154 * init.c (scm_init_guile_1): Don't init goopscore module.
11155
11156 2001-03-27 Marius Vollmer <mvo@zagadka.ping.de>
11157
11158 * eval.c (SCM_APPLY): Check that arg1 is bound for scm_tc7_cxr.
11159
11160 2001-03-27 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11161
11162 * strop.c (scm_string_to_list): Fixed docstring markup.
11163 (scm_string_upcase_x, scm_string_upcase, scm_string_downcase_x),
11164 (scm_string_downcase, scm_string_capitalize_x),
11165 (scm_string_capitalize): Rewrote and corrected docstrings.
11166 (scm_string_ci_to_symbol): Made docstring more explicit.
11167
11168 2001-03-27 Marius Vollmer <mvo@zagadka.ping.de>
11169
11170 * values.h (scm_values_vtable, SCM_VALUESP): Moved here so that
11171 eval.c can use it.
11172 (scm_call_with_values): Removed.
11173 * values.c (values_vtable, scm_values_vtable): Added "scm_" prefix
11174 so that it can be exported.
11175 (scm_call_with_values): Removed.
11176
11177 * tags.h (SCM_IM_CALL_WITH_VALUES): New isym.
11178 * eval.c: Include "libguile/values.h"
11179 (scm_m_at_call_with_values, scm_sym_at_call_with_values):
11180 New.
11181 (unmemocopy, scm_ceval, scm_deval): Handle new isym.
11182 * eval.h (scm_sym_at_call_with_values, scm_m_at_call_with_values):
11183 New delcarations to support above change.
11184
11185 * eval.c (scm_primitive_eval_x, scm_primitive_eval): Fix syntax
11186 errors with last change.
11187
11188 2001-03-25 Marius Vollmer <mvo@zagadka.ping.de>
11189
11190 * eval.c (scm_primitive_eval_x, scm_primitive_eval, scm_i_eval_x,
11191 scm_i_eval): Moved the application of the system transformer from
11192 scm_i_eval to scm_primitive_eval.
11193
11194 2001-03-23 Neil Jerram <neil@ossau.uklinux.net>
11195
11196 * guile-snarf.awk.in: Substitute "\\" with "\" in .doc output.
11197
11198 * strop.c (scm_string_index): Fix docstring line break
11199 regression.
11200
11201 * list.c (scm_cons_star): Fix docstring typo.
11202
11203 2001-03-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
11204
11205 * gc.c (scm_init_storage), gdbint.c (scm_init_gdbint), numbers.c
11206 (big2str), ports.c (scm_drain_input), read.c (scm_read,
11207 scm_grow_tok_buf), strings.c (scm_string, scm_makfromstr,
11208 scm_make_string, scm_string_append), strports.c (st_resize_port,
11209 scm_object_to_string), unif.c (scm_make_uve): Replace calls to
11210 scm_makstr with calls to scm_allocate_string.
11211
11212 * strings.[ch] (scm_allocate_string): New function.
11213
11214 * strings.[ch] (scm_makstr): Deprecated.
11215
11216 2001-03-18 Gary Houston <ghouston@arglist.com>
11217
11218 * posix.c (scm_tmpnam): check that return value from tmpnam is not
11219 NULL. rewrote the docstring.
11220 (scm_mkstemp): new procedure implementing "mkstemp!".
11221 * posix.h: declare scm_mkstemp.
11222
11223 * net_db.c: declare h_errno if configure didn't define HAVE_H_ERRNO.
11224 normally it would be found in netdb.h.
11225
11226 2001-03-17 Gary Houston <ghouston@arglist.com>
11227
11228 * sort.c (scm_sort): move sortvec variable to avoid a compiler
11229 warning when HAVE_ARRAYS is not defined. move len too.
11230
11231 * Makefile.am (DOT_X_FILES): remove net_db.x, posix.x, socket.x.
11232 (EXTRA_DOT_X_FILES): let configure set the value.
11233 (DOT_DOC_FILES): remove net_db.doc, posix.doc, socket.doc.
11234
11235 * gc.c (scm_must_malloc): changed the comment explaining when
11236 scm_must variants of malloc/free etc., should be used, based on
11237 explanation from Dirk Herrmann.
11238 * fports.c (scm_fport_buffer_add): use FUNC_NAME instead of a local
11239 string with procedure name. use scm_must_malloc instead of malloc.
11240 (scm_setvbuf, scm_fdes_to_port, fport_close): use scm_must variants
11241 of malloc/free.
11242 * ports.c (scm_add_to_port_table, scm_remove_from_port_table,
11243 scm_ungetc): use scm_must variants of malloc/realloc/free.
11244 (scm_add_to_port_table, scm_ungetc): define FUNC_NAME.
11245
11246 2001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
11247
11248 * __scm.h (SCM_ASSERT, SCM_WTA_DISPATCH_0, SCM_WTA_DISPATCH_1,
11249 SCM_WTA_DISPATCH_2, SCM_WTA_DISPATCH_n): Don't call scm_wta, call
11250 scm_wrong_type_arg instead.
11251
11252 (SCM_WNA): Deprecated.
11253
11254 * error.[ch] (scm_wta): Deprecated.
11255
11256 * numbers.c (s_i_log): Minor comment fix.
11257
11258 * read.c (scm_lreadr), unif.c (scm_aind, scm_shap2ra,
11259 scm_make_shared_array, scm_transpose_array, scm_enclose_array,
11260 scm_array_in_bounds_p): Don't use SCM_ASSERT to check for
11261 wrong-num-args or misc errors.
11262
11263 * unif.c (scm_make_shared_array, scm_transpose_array,
11264 scm_enclose_array, scm_array_in_bounds_p, scm_array_set_x):
11265 Validate the rest argument (note: this is only done when guile is
11266 built with SCM_DEBUG_REST_ARGUMENT=1)
11267
11268 (scm_array_in_bounds_p, scm_uniform_vector_ref, scm_array_set_x):
11269 Replace calls to scm_wrong_num_args by SCM_WRONG_NUM_ARGS.
11270
11271 * validate.h (SCM_FUNC_NAME, SCM_VALIDATE_NUMBER_COPY,
11272 SCM_VALIDATE_NUMBER_DEF_COPY): Deprecated.
11273
11274 2001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
11275
11276 * validate.h (SCM_WRONG_NUM_ARGS): Call scm_error_num_args_subr
11277 instead of scm_wrong_num_args.
11278
11279 * coop-threads.c: Don't include libguile/strings.h. (Was only
11280 needed for former implementation of SCM_WRONG_NUM_ARGS.)
11281
11282 * debug.c (scm_m_start_stack): Don't use SCM_ASSERT to check for
11283 wrong-num-args errors.
11284
11285 2001-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
11286
11287 * error.[ch] (scm_error_num_args_subr): New function.
11288
11289 2001-03-16 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11290
11291 * list.c (scm_list, scm_cons_star, scm_null_p, scm_list_p),
11292 (scm_length, scm_append, scm_reverse, scm_list_ref),
11293 (scm_memq, scm_memv, scm_member, scm_delv_x, scm_delete_x),
11294 (scm_delq, scm_delv, scm_delete, scm_delq1_x, scm_delv1_x),
11295 (scm_delete1_x), gc.c (scm_map_free_list),
11296 (scm_free_list_length), hash.c (scm_hashq, scm_hashv),
11297 (scm_hash), hashtab.c (scm_hashq_ref, scm_hashq_set_x),
11298 (scm_hashq_remove_x, scm_hashv_ref, scm_hashv_set_x),
11299 (scm_hashv_remove_x, scm_hash_ref, scm_hash_set_x),
11300 (scm_hash_remove_x), ports.c (scm_pt_size, scm_pt_member), print.c
11301 (scm_current_pstate), scmsigs.c (scm_usleep), goops.c
11302 (scm_get_keyword, scm_sys_compute_slots): Added texinfo markup.
11303
11304 * weaks.c (scm_weak_vector_p, scm_weak_key_hash_table_p),
11305 (scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
11306 rdelim.c (scm_read_delimited_x), strop.c (scm_string_index),
11307 symbols.c (scm_symbol_interned_p), numbers.c
11308 (scm_string_to_number), ports.c (scm_port_p): Corrected texinfo
11309 markup.
11310
11311 2001-03-16 Keisuke Nishida <kxn30@po.cwru.edu>
11312
11313 * snarf.h (SCM_CONST_LONG): Deprecated.
11314 * tag.c (CONST_INUM): New macro. Use it to define scm_utag_*.
11315
11316 2001-03-15 Marius Vollmer <marius.vollmer@uni-dortmund.de>
11317
11318 * numbers.c (scm_num2ulong): Check that a bignum is positive
11319 before looking at the magnitude. Correctly check for overflow
11320 during conversion.
11321 (scm_num2long_long): Likewise.
11322 (scm_num2ulong_long): New.
11323 (ULONG_LONG_MAX): Define if not already defined.
11324 * numbers.h: (scm_num2ulong_long): New prototype.
11325
11326 2001-03-15 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11327
11328 * validate.h (SCM_VALIDATE_OPOUTSTRPORT): New macro.
11329
11330 * strports.h (SCM_STRPORTP, SCM_OPSTRPORTP, SCM_OPINSTRPORTP),
11331 (SCM_OPOUTSTRPORTP): New predicate macros.
11332 (scm_open_input_string, scm_open_output_string),
11333 (scm_get_output_string): New prototypes.
11334
11335 * strports.c (scm_open_input_string, scm_open_output_string),
11336 (scm_get_output_string): New procedures (SRFI-6 compliant).
11337 Made scm_tc16_strport non-static.
11338
11339 2001-03-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
11340
11341 * macros.h (SCM_ASSYNT): Removed unused object argument from
11342 signature.
11343
11344 * eval.c (scm_m_body, scm_m_quote, scm_m_begin, scm_m_if,
11345 scm_m_set_x, scm_m_and, scm_m_or, scm_m_case, scm_m_cond,
11346 scm_m_letstar, scm_m_do, scm_m_quasiquote, scm_m_delay,
11347 scm_m_define, scm_m_letrec1, scm_m_letrec, scm_m_let, scm_m_apply,
11348 scm_m_cont, scm_m_nil_cond, scm_m_nil_ify, scm_m_t_ify,
11349 scm_m_0_cond, scm_m_0_ify, scm_m_1_ify, scm_m_atfop, scm_m_atbind,
11350 scm_m_expand_body), evalext.c (scm_m_generalized_set_x,
11351 scm_m_undefine), goops.c (scm_m_atslot_ref, scm_m_atslot_set_x,
11352 scm_m_atdispatch): Removed unused object argument from call to
11353 SCM_ASSYNT.
11354
11355 2001-03-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
11356
11357 * gh.h/gh_data.c (gh_ints2scm): Changed the signature to use a
11358 const int* to reflect that the input array of integers remains
11359 unchanged. Thanks to Brett Viren for the hint.
11360
11361 2001-03-14 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11362
11363 * gh_data.c (gh_scm2chars, gh_scm2shorts, gh_scm2longs),
11364 (gh_scm2floats, gh_scm2doubles): Check for malloc() returning NULL
11365 in various places.
11366 (gh_scm2newstr, gh_symbol2newstr): Change call to
11367 scm_must_malloc() to malloc(), because user-free()able memory is
11368 allocated.
11369
11370 * gc.c: Added declaration of `scm_debug_check_freelist'.
11371
11372 2001-03-13 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11373
11374 * ports.c (scm_port_mode): Changed `mode' array size to 4.
11375
11376 2001-03-12 Keisuke Nishida <kxn30@po.cwru.edu>
11377
11378 * strports.c (scm_object_to_string): New procedure.
11379 (scm_strprint_obj): Deprecated.
11380 * strports.h: Reflect the changes.
11381
11382 2001-03-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
11383
11384 * goops.h (SCM_VALIDATE_PUREGENERIC): New macro.
11385
11386 * goops.c (scm_m_atslot_ref, scm_m_atslot_set_x,
11387 scm_m_atdispatch): Provide definitions for FUNC_NAME. Don't use
11388 SCM_ASSYNT to check for correct argument types. Either use some
11389 SCM_VALIDATE_* macro or an explicit test.
11390
11391 (scm_make_foreign_object): Don't use SCM_ASSERT to check for
11392 misc-errors.
11393
11394 * macros.h (SCM_ASSYNT): On assertion failure, issue a misc-error
11395 instead of calling scm_wta.
11396
11397 2001-03-12 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11398
11399 * load.c (scm_primitive_load, scm_primitive_load_path),
11400 (scm_sys_search_load_path): Corrected docstrings (file ->
11401 filename).
11402
11403 * eval.c (scm_force): Added texinfo markup to docstring.
11404 (scm_promise_p): Renamed parameter to `obj' to match docstring.
11405
11406 * debug-malloc.c: Reinserted #include <stdio.h>.
11407
11408 2001-03-11 Keisuke Nishida <kxn30@po.cwru.edu>
11409
11410 * list.c (s_scm_reverse_x): Use SCM_VALIDATE_LIST.
11411
11412 * environments.c, error.c, eval.c, filesys.c, hashtab.c, load.c,
11413 net_db.c, procprop.c, read.c, scmsigs.c, socket.c, struct.c:
11414 Use SCM_LISTn instead of scm_listify.
11415
11416 2001-03-10 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11417
11418 * _scm.h: Removed #include <errno.h>.
11419
11420 * error.c, net_db.c, putenv.c, stime.c: Removed declaration of
11421 errno variable (can be a macro on some systems, for example when
11422 using linux libc with threads).
11423
11424 * error.c, filesys.c, gc.c, ioext.c, iselect.c, net_db.c, ports.c,
11425 posix.c, print.c, putenv.c, scmsigs.c, script.c, simpos.c, smob.c,
11426 socket.c, srcprop.c, stime.c, strop.c, unif.c, vports.c: Added
11427 #include <errno.h> in these 20 out of 100 files.
11428
11429 2001-03-10 Gary Houston <ghouston@arglist.com>
11430
11431 * socket.c: add a definition of SUN_LEN (from glibc) for when it's
11432 not already defined.
11433
11434 2001-03-09 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11435
11436 * coop.c: Inserted #include <stdio.h>.
11437
11438 * iselect.c: Reinserted #include <stdio.h>.
11439
11440 2001-03-10 Marius Vollmer <mvo@zagadka.ping.de>
11441
11442 * posix.c: Replaced `#define' of __USE_XOPEN right before
11443 including unistd.h with a define of _GNU_SOURCE at the very top of
11444 the file.
11445
11446 2001-03-09 Keisuke Nishida <kxn30@po.cwru.edu>
11447
11448 * alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,
11449 continuations.c, debug-malloc.c, debug.c, dynwind.c, eq.c, eval.c,
11450 feature.c, filesys.h, gc_os_dep.c, gh_data.c, gh_eval.c,
11451 gh_funcs.c, gh_io.c, gh_list.c, gh_predicates.c, hash.c,
11452 hashtab.c, iselect.c, keywords.c, list.c, load.c, mallocs.c,
11453 net_db.c, numbers.c, objprop.c, objprop.h, options.c, pairs.c,
11454 print.c, procprop.c, procs.c, properties.c, ramap.c,
11455 regex-posix.c, root.c, scmsigs.c, simpos.c, socket.c, srcprop.c,
11456 stackchk.c, stacks.c, strings.c, strop.c, strorder.c, struct.c,
11457 symbols.c, tag.c, threads.c, variable.c, vectors.c, weaks.c:
11458 Remove #include <stdio.h>
11459 * gc.c, gdbint.c, root.c, sort.c, unif.c: Add #include <string.h>.
11460
11461 * procs.c (scm_make_subr_opt): Init symcell to avoid warning.
11462
11463 2001-03-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11464
11465 * posix.c (scm_gethostname): Set initial name length to 256 for
11466 Solaris.
11467
11468 2001-03-09 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11469
11470 * posix.h (scm_crypt, scm_chroot, scm_getlogin, scm_cuserid),
11471 (scm_getpriority, scm_setpriority, scm_getpass, scm_flock),
11472 (scm_sethostname, scm_gethostname): New prototypes.
11473
11474 * posix.c: Added inclusion of <crypt.h>, <sys/resource.h> and
11475 <sys/file.h>, if present.
11476 (scm_init_posix): [PRIO_PROCESS, PRIO_PGRP, PRIO_USER, LOCK_SH,
11477 LOCK_EX, LOCK_UN, LOCK_NB]: New variables.
11478 (scm_crypt, scm_chroot, scm_getlogin, scm_cuserid),
11479 (scm_getpriority, scm_setpriority, scm_getpass, scm_flock),
11480 (scm_sethostname, scm_gethostname): New procedures.
11481
11482 2001-03-08 Neil Jerram <neil@ossau.uklinux.net>
11483
11484 * ports.c (scm_port_column): Docstring fixes: (i) port-line arg is
11485 not optional (ii) "recommend" spelling correction.
11486
11487 2001-03-08 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11488
11489 * ramap.c (racp): Removed optimization which caused array copying
11490 to fail if the two arrays shared storage. Re-inserted the IVDEP
11491 macros removed in the change of 2000-03-09. (Don't really have a
11492 complete grasp of what they are for, but they seem to be necessary
11493 on Crays. This needs testing!) Thanks to Miroslav Silovic.
11494
11495 * hash.c (scm_string_hash): Don't downcase characters.
11496
11497 2001-03-07 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11498
11499 * symbols.c (scm_symbols_prehistory): Changed symbol hash table
11500 size from 277 --> 1009.
11501
11502 * symbols.c, symbols.h (scm_sys_symbols): New function GUILE_DEBUG
11503 function.
11504
11505 * coop-threads.c: Fixed change of 2001-03-06.
11506
11507 * validate.h: Code formatting.
11508
11509 2001-03-07 Keisuke Nishida <kxn30@po.cwru.edu>
11510
11511 * Makefile.am (*.x): Add dependency on snarf.h and guile-doc-snarf.in.
11512 (*.doc): Add dependency on guile-snarf.awk.in.
11513
11514 * guile-snarf.awk.in: Neglect spaces at the end of
11515 SCM_SNARF_DOCSTRING_END. Skip lines "# NN ..." in the
11516 middle of docstrings. (To avoid the problem with gcc-2.96.)
11517
11518 2001-03-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
11519
11520 * coop-threads.c (scm_call_with_new_thread), load.c
11521 (scm_primitive_load, scm_sys_search_load_path), random.c
11522 (scm_c_default_rstate), struct.c (scm_make_struct_layout,
11523 scm_struct_ref, scm_struct_set_x): Don't use SCM_ASSERT to
11524 (potentially) issue a scm-misc-error or wrong-num-args error
11525 message.
11526
11527 * load.c (scm_search_path): Use SCM_ASSERT_TYPE to give details
11528 about the expected type with the wrong-type-arg error message.
11529
11530 * smob.c (scm_make_smob): Abort on misuse of smob - it indicates
11531 a C level bug that can't be fixed from scheme anyway.
11532
11533 2001-03-05 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11534
11535 * eval.c (scm_m_letstar): Removed check for duplicate bindings.
11536 Duplicate bindings are OK in a let* since a let* is semantically
11537 equivalent to a nested set of let:s.
11538
11539 2001-03-05 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11540
11541 * print.c (scm_print_options): Fixed texinfo in docstring.
11542
11543 * net_db.c (scm_getserv, scm_getproto, scm_getnet): Return #f if
11544 the underlying functions getservent, getprotoent or getnetent
11545 return NULL instead of signalling an error.
11546
11547 2001-03-04 Gary Houston <ghouston@arglist.com>
11548
11549 * socket.c (scm_fill_sockaddr): don't allow buffer overflows when
11550 taking an unexpectedly large filename for an AF_UNIX socket from
11551 bind/connect/sendto (thanks to Martin Grabmueller).
11552
11553 * socket.c (scm_sock_fd_to_port, SCM_SOCK_FD_TO_PORT): removed the
11554 former and adjusted the latter.
11555 (scm_socket, scm_socketpair): cosmetic changes.
11556 (scm_getsockopt, scm_setsockopt): declare optlen as int, not
11557 size_t as socklen_t substitute. don't restrict args/return values
11558 to INUM: allow full range of int or size_t.
11559 (scm_fill_sockaddr): check arguments before allocating memory, to
11560 avoid leakage. use malloc, not scm_must_malloc.
11561 (scm_connect, scm_bind, scm_sendto): use int, not size_t as socklen_t
11562 substitute. free the sockaddr structure before throwing an error.
11563 (scm_init_add_buffer): procedure removed, together with its static
11564 buffer scm_addr_buffer, which wouldn't be thread safe. instead,
11565 define a macro MAX_ADDR_SIZE and declare the buffer where needed.
11566 (scm_accept, scm_getpeername, scm_getsockname, scm_recvfrom,
11567 scm_sendto): use a local buffer instead of scm_addr_buffer.
11568 adjust for new SCM_SOCK_FD_TO_PORT. use int for address size,
11569 not size_t.
11570 (scm_recvfrom): set addr->sa_family to AF_UNSPEC before the recvfrom
11571 call to detect whether recvfrom could be bothered to set the address.
11572 (scm_init_socket): don't call scm_init_addr_buffer.
11573
11574 2001-03-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
11575
11576 * debug.c (scm_procedure_source, scm_procedure_environment),
11577 print.c (scm_get_print_state), ramap.c (scm_array_fill_int,
11578 scm_array_index_map_x), sort.c (scm_sort_x, scm_sort,
11579 scm_stable_sort_x, scm_stable_sort), stacks.c (scm_make_stack,
11580 scm_last_stack_frame), symbols.c (scm_sym2vcell, scm_sym2ovcell),
11581 unif.c (scm_list_to_uniform_array, scm_uniform_vector_length,
11582 scm_transpose_array, scm_enclose_array, scm_array_in_bounds_p,
11583 scm_uniform_vector_ref, scm_array_set_x, scm_uniform_array_read_x,
11584 scm_uniform_array_write, scm_bit_set_star_x, scm_bit_count_star,
11585 scm_array_to_list, scm_array_prototype), validate.h
11586 (SCM_VALIDATE_NUMBER_COPY): Don't call function scm_wta, call
11587 scm_misc_error or scm_wrong_type_arg instead.
11588
11589 * validate.h (SCM_WTA, RETURN_SCM_WTA): Deprecated.
11590
11591 2001-03-04 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11592
11593 * goops.c, goops.h (scm_sys_pre_expand_closure_x): Removed.
11594 (scm_sys_tag_body): Added.
11595
11596 2001-03-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
11597
11598 * continuations.c (continuation_apply), eval.c (scm_m_lambda,
11599 scm_m_letstar, scm_m_letrec1, scm_m_let, SCM_APPLY), eval.h
11600 (SCM_EVALIM2), evalext.c (scm_m_generalized_set_x), gc.c
11601 (get_bvec, MARK), goops.c (scm_primitive_generic_generic),
11602 options.c (scm_options), ports.c (scm_remove_from_port_table),
11603 ramap.c (scm_ramapc), read.c (skip_scsh_block_comment, scm_lreadr,
11604 scm_lreadparen, scm_lreadrecparen), script.c (script_get_octal,
11605 script_get_backslash, script_read_arg), unif.c (scm_cvref): Don't
11606 call function scm_wta, call scm_misc_error or scm_wrong_type_arg
11607 instead.
11608
11609 2001-03-04 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11610
11611 * goops.c (scm_sys_pre_expand_closure_x): New procedure.
11612
11613 2001-03-04 Marius Vollmer <mvo@zagadka.ping.de>
11614
11615 * eval.c (scm_s_duplicate_bindings): New error message.
11616 (scm_m_letrec1, scm_m_letstar): Check for duplicate bindings.
11617
11618 2001-03-03 Marius Vollmer <mvo@zagadka.ping.de>
11619
11620 * eval.h (SCM_EVALIM2): New macro. Use it when a
11621 immediate, literal constant should be evaluated.
11622 * eval.c (scm_s_duplicate_formals): New error message string.
11623 (scm_c_improper_memq): New function.
11624 (scm_m_lambda): Check for duplicate arguments.
11625 (scm_ceval, scm_deval): When executing a body: only cons a new
11626 toplevel environment frame when it is different from the
11627 existing one; use EVALCAR instead of SIDEVAL so that we can properly
11628 check for empty combinations; use SCM_EVALIM2 for the same reason
11629 in the non-toplevel loop.
11630 (nontoplevel_cdrxnoap, nontoplevel_cdrxbegin, nontoplevel_begin):
11631 New labels with the meaning of their non-"nontoplevel" partners,
11632 but they are used when it is known that the body is not evaluated at
11633 top-level.
11634 (scm_apply, scm_dapply): use SCM_EVALIM2 to get proper error
11635 reporting for empty combinations.
11636
11637 2001-03-02 Keisuke Nishida <kxn30@po.cwru.edu>
11638
11639 * Remove dump facilities.
11640 * dump.c, dump.h: Removed.
11641 * Makefile.am: Remove dump.c, dump.h, dump.x, dump.doc.
11642 * init.c: Remove #include "libguile/dump.h".
11643 (scm_init_guile_1): Remove scm_init_dump.
11644 * smob.h (scm_smob_descriptor): Remove slots: dump, undump.
11645 (scm_set_smob_dump, scm_set_smob_undump): Remove declaration.
11646 * smob.c (scm_make_smob_type): Remove initialization: dump, undump.
11647 (scm_set_smob_dump, scm_set_smob_undump): Removed.
11648
11649 * keywords.c: Remove #include "libguile/dump.h".
11650 (keyword_dump, keyword_undump): Removed.
11651 (scm_init_keywords): Remove scm_set_smob_dump and scm_set_smob_undump.
11652
11653 2001-03-02 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11654
11655 * vectors.c (s_scm_vector_p, list->vector, scm_vector)
11656 (scm_vector_ref, scm_vector_set_x, scm_vector_to_list)
11657 (scm_vector_fill_x), strorder.c (scm_string_equal_p)
11658 (scm_string_ci_equal_p, scm_string_less_p, scm_string_leq_p)
11659 (scm_string_gr_p, scm_string_geq_p, scm_string_ci_less_p)
11660 (scm_string_ci_geq_p), symbols.c (scm_symbol_p)
11661 (scm_symbol_to_string, scm_string_to_symbol): Changed use of @t{}
11662 to @code{} as the texinfo manual recommends, converted the
11663 examples to use a @lisp{}-environment.
11664
11665 * strports.c (scm_eval_string): Cleaned up the docstring.
11666
11667 * struct.c (scm_struct_p, scm_struct_vtable_p): Added texinfo
11668 markup.
11669
11670 * numbers.c (scm_exact_p, scm_odd_p, scm_even_p)
11671 (scm_number_to_string, scm_string_to_number, scm_number_p)
11672 (scm_real_p, scm_integer_p, scm_inexact_p, scm_make_rectangular)
11673 (scm_make_polar, scm_inexact_to_exact): Added texinfo markup.
11674 (scm_ash): Added texinfo markup and removed obsolete @refill.
11675 (scm_gr_p): Corrected comment.
11676 (scm_gr_p, scm_leq_p, scm_geq_p): Added texinfo markup to (future
11677 docstring) comments.
11678 (scm_positive_p, scm_less_p, scm_num_eq_p, scm_real_p)
11679 (scm_number_p, scm_negative_p, scm_max, scm_min, scm_sum)
11680 (scm_difference, scm_product, scm_divide, scm_asinh, scm_acosh)
11681 (scm_atanh, scm_truncate, scm_round, scm_exact_to_inexact)
11682 (floor, ceiling, $sqrt, $abs, $exp, $log, $sin, $cos, $tan, $asin)
11683 ($acos, $atan, $sinh, $cosh, $tanh, scm_real_part, scm_imag_part)
11684 (scm_magnitude, scm_angle, scm_abs, scm_quotient, scm_remainder)
11685 (scm_modulo, scm_gcd, scm_lcm): Added (future docstring) comments.
11686
11687 2001-02-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
11688
11689 * __scm.h (SCM_ASSERT_TYPE): Add missing macro parameter.
11690 (Obviously nobody compiles with SCM_RECKLESS defined...)
11691
11692 * validate.h (SCM_ASSERT_RANGE): Use the argument number.
11693
11694 2001-02-23 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
11695
11696 * ports.c, ports.h (scm_c_read, scm_c_write): New functions.
11697
11698 * ports.h (SCM_READ_BUFFER_EMPTY_P): New macro.
11699
11700 2001-02-24 Neil Jerram <neil@ossau.uklinux.net>
11701
11702 * numbers.c (scm_two_doubles, scm_sys_expt, scm_sys_atan2,
11703 scm_make_polar): Rename arguments `z1' and `z2' to `x' and `y',
11704 since use of `z' suggests that the arguments may be complex.
11705
11706 * goops.c (scm_make), numbers.c (scm_sys_expt): Fix docstring
11707 typos.
11708
11709 2001-02-23 Neil Jerram <neil@ossau.uklinux.net>
11710
11711 * dump.c (scm_binary_write, scm_binary_read), eval.c
11712 (scm_primitive_eval), guardians.c (scm_guardian_destroyed_p,
11713 scm_guardian_greedy_p, scm_make_guardian), fports.c
11714 (scm_file_port_p): Minor docstring fixes.
11715
11716 2001-02-22 Marius Vollmer <mvo@zagadka.ping.de>
11717
11718 * load.c (load): Use scm_primitive_eval_x instead of scm_i_eval_x.
11719
11720 * goops.c (scm_add_method, DEFVAR): Use scm_eval instead of
11721 scm_i_eval.
11722 (make_class_from_template): Do not bother to set the current
11723 module around the call to DEFVAR, scm_eval takes care of that.
11724 (scm_init_goops): Make scm_module_goops and
11725 scm_goops_lookup_closure permanent objects.
11726
11727 * eval.c (scm_ceval, scm_deval): When evaluating expressions on
11728 top level, create a fresh top-level environment for each
11729 expression instead of mutating the exisint frame. This is
11730 important when that frame is closed over.
11731
11732 * numbers.c (s_scm_logior) [SCM_DIGSTOOBIG]: Also use
11733 SCM_DIGSPERLONG instead of DIGSPERLONG.
11734
11735 2001-02-21 Marius Vollmer <mvo@zagadka.ping.de>
11736
11737 * eval.c (scm_ceval, scm_deval): Check for wrong number of args
11738 before applying arrow procedure in `cond' and before applying
11739 receiver procedure in call-with-current-continuation.
11740 (scm_i_eval): Do not invoke scm_copy_tree in argument in SCM_XEVAL
11741 macro. The argument is expanded more than one time.
11742
11743 * numbers.c (scm_logior) [SCM_DIGSTOOBIG]: Correctly use
11744 SCM_BIGDIG instead of BIGDIG. Thanks to Steven G. Johnson!
11745
11746 2001-02-20 Marius Vollmer <mvo@zagadka.ping.de>
11747
11748 * guile-doc-snarf.in, guile-func-name-check.in: Added copyright
11749 notice and license.
11750
11751 2001-02-17 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11752
11753 * variable.c (scm_make_variable, scm_make_undefined_variable)
11754 (scm_variable_ref, scm_variable_set_x, scm_builtin_variable)
11755 (scm_variable_bound_p), values.c (scm_values)
11756 (scm_call_with_values), unif.c (scm_bit_count)
11757 (scm_bit_set_star_x), symbols.c (scm_gentemp)
11758 (scm_gensym), strings.c (scm_string_p, scm_make_string)
11759 (scm_read_only_string_p, scm_string_length, scm_string_ref)
11760 (scm_string_set_x, scm_substring, scm_string_append), stime.c
11761 (scm_strptime, scm_mktime), random.c (scm_seed_to_random_state)
11762 (scm_copy_random_state, scm_random), print.c (scm_newline)
11763 (scm_write_char, scm_simple_format), debug-malloc.c
11764 (scm_malloc_stats), environments.c (scm_environment_p)
11765 (scm_environment_bound_p, scm_environment_ref)
11766 (scm_environment_fold, scm_environment_define)
11767 (scm_environment_undefine, scm_environment_set_x)
11768 (scm_environment_cell, scm_environment_observe)
11769 (scm_environment_observe_weak, scm_environment_unobserve)
11770 (scm_make_eval_environment, scm_eval_environment_p)
11771 (scm_eval_environment_set_local_x, scm_eval_environment_local)
11772 (scm_eval_environment_imported)
11773 (scm_eval_environment_set_imported_x, scm_make_import_environment)
11774 (scm_import_environment_p, scm_import_environment_imports)
11775 (scm_import_environment_set_imports_x, scm_make_export_environment)
11776 (scm_export_environment_p, scm_export_environment_private)
11777 (scm_export_environment_set_private_x)
11778 (scm_export_environment_signature)
11779 (scm_export_environment_set_signature_x, scm_leaf_environment_p):
11780 Added texinfo markup.
11781
11782 * ports.c (scm_drain_input): Lowercased argument to @var.
11783 (scm_current_input_port, scm_current_output_port): Filled in
11784 missing explanation.
11785 (scm_current_load_port, scm_set_current_output_port)
11786 (scm_set_current_error_port, scm_port_line, scm_set_port_line_x):
11787 Added texinfo markup.
11788
11789 * arbiters.c (scm_make_arbiter, scm_try_arbiter)
11790 (scm_release_arbiter): Added texinfo markup to docstrings.
11791 Changed `Returns' to `Return'.
11792 (arbiter_print): Changed SCM_CDR to SCM_SMOB_DATA.
11793
11794 2001-02-16 Neil Jerram <neil@ossau.uklinux.net>
11795
11796 * guile-snarf.awk.in: Quote any `@'s that occur in Scheme names,
11797 by doubling them to `@@'.
11798
11799 2001-02-16 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
11800
11801 * numbers.c (scm_lognot), random.c (scm_random,
11802 scm_random_normal, scm_random_solid_sphere_x,
11803 scm_random_hollow_sphere_x, scm_random_normal_vector_x,
11804 scm_random_exp), dynwind.c
11805 (scm_dynamic_wind): Removed unnecessary "" from docstrings.
11806
11807 * goops.c (scm_sys_initialize_object, scm_instance_p,
11808 scm_class_name, scm_class_precedence_list, scm_class_slots,
11809 scm_class_environment, scm_generic_function_name,
11810 scm_generic_function_methods, scm_method_generic_function,
11811 scm_method_specializers, scm_method_procedure, scm_make_unbound,
11812 scm_unbound_p, scm_assert_bound, scm_at_assert_bound_ref,
11813 scm_sys_fast_slot_ref, scm_sys_fast_slot_set_x, scm_slot_ref,
11814 scm_slot_set_x, _scm_slot_bound_p, scm_slots_exists_p,
11815 scm_sys_allocate_instance, scm_make, scm_pure_generic_p,
11816 scm_class_direct_supers, scm_class_direct_slots,
11817 scm_class_direct_subclasses, scm_class_direct_methods,
11818 scm_accessor_method_slot_definition, scm_sys_goops_loaded),
11819 debug.c (scm_with_traps, scm_memoized_p, scm_make_gloc,
11820 scm_gloc_p, scm_make_iloc, scm_iloc_p, scm_memcons,
11821 scm_mem_to_proc, scm_proc_to_mem, scm_unmemoize,
11822 scm_memoized_environment, scm_procedure_name,
11823 scm_procedure_source, scm_procedure_environment, scm_debug_hang),
11824 objects.c
11825 (scm_class_of, scm_entity_p, scm_operator_p,
11826 scm_set_object_procedure_x, scm_object_procedure,
11827 scm_make_class_object), hooks.c (scm_make_hook_with_name,
11828 scm_make_hook, scm_hook_p, scm_hook_empty_p, scm_add_hook_x,
11829 scm_remove_hook_x, scm_reset_hook_x, scm_run_hook,
11830 scm_hook_to_list), lang.c
11831 (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null, scm_nil_eq),
11832 numbers.c (scm_sys_expt, scm_sys_atan2), print.c
11833 (scm_print_options, scm_port_with_print_state,
11834 scm_get_print_state), procs.c (scm_make_cclo, scm_procedure_p,
11835 scm_closure_p, scm_thunk_p, scm_procedure_with_setter_p,
11836 scm_make_procedure_with_setter, scm_procedure), throw.c
11837 (scm_lazy_catch), modules.c (scm_standard_eval_closure), load.c
11838 (scm_parse_path, scm_search_path), stacks.c (scm_make_stack,
11839 scm_stack_ref, scm_stack_length, scm_frame_p,
11840 scm_last_stack_frame, scm_frame_number, scm_frame_source,
11841 scm_frame_procedure, scm_frame_arguments, scm_frame_previous,
11842 scm_frame_next, scm_frame_real_p, scm_frame_procedure_p,
11843 scm_frame_evaluating_args_p, scm_frame_overflow_p), filesys.c
11844 (scm_dirname, scm_basename), dynwind.c
11845 (scm_wind_chain), read.c (scm_read_options, scm_read,
11846 scm_read_hash_extend), gc.c
11847 (scm_unhash_name), eval.c (scm_eval_options_interface,
11848 scm_evaluator_traps, s_scm_nconc2last), backtrace.c
11849 (scm_display_error, scm_set_print_params_x,
11850 scm_display_application, scm_display_backtrace, scm_backtrace),
11851 async.c (scm_async, scm_system_async, scm_async_mark,
11852 scm_system_async_mark, scm_run_asyncs, scm_noop,
11853 scm_set_tick_rate, scm_set_switch_rate, scm_unmask_signals,
11854 scm_mask_signals): Added docstrings.
11855
11856 2001-02-15 Keisuke Nishida <kxn30@po.cwru.edu>
11857
11858 * dump.c (scm_undump): Use SCM_CARLOC/SCM_CDRLOC to obtain the
11859 address of car/cdr. (Thanks to Dirk Herrmann)
11860 Use scm_sizet to obtain the length of strings.
11861 (Thanks to Matthias Koeppe)
11862
11863 2001-02-15 Marius Vollmer <mvo@zagadka.ping.de>
11864
11865 * symbols.c (scm_mem2symbol): Put a empty statement after the
11866 next_symbol label. This is mandated by ANSI, appearantly.
11867
11868 2001-02-13 Marius Vollmer <marius.vollmer@uni-dortmund.de>
11869
11870 * gc_os_dep.c: Do not include <linux/version.h>. It makes no
11871 sense to compile for a specific kernel version. Do not include
11872 <asm/signal.h> while defining __KERNEL__. This hack should no
11873 longer be needed and caused problems.
11874
11875 2001-02-13 Marius Vollmer <mvo@zagadka.ping.de>
11876
11877 * eval.c (scm_ceval, scm_deval): use `SIDEVAL' instead of
11878 SCM_CEVAL when evaluating subforms of `begin' forms. SCM_CEVAL
11879 can not deal with immediates.
11880
11881 2001-02-12 Keisuke Nishida <kxn30@po.cwru.edu>
11882
11883 * list.c (scm_list_copy): Validate the first argument.
11884
11885 2001-02-11 Marius Vollmer <mvo@zagadka.ping.de>
11886
11887 Fix evaluator so that top-level expressions are correctly
11888 evaluated with respect to the module system.
11889
11890 * modules.h. modules.c (scm_current_module_lookup_closure): New
11891 function.
11892
11893 * eval.h (scm_primitive_eval, scm_primitive_eval_x): New
11894 prototypes.
11895 (scm_i_eval, scm_i_eval_x, scm_eval, scm_eval_x): Changed argument
11896 names to better reflect their meaning.
11897
11898 * eval.c (scm_ceval, scm_deval): Recognize when `begin' is being
11899 evaluated at top-level and synronize lookup closure before
11900 executing every subform.
11901 (scm_primitve_eval_x, scm_primitive_eval): New functions.
11902 (scm_eval_x, scm_eval): Reimplement in terms of
11903 scm_primitive_eval_x and scm_primitive_eval, respectively.
11904
11905 2001-02-09 Marius Vollmer <mvo@zagadka.ping.de>
11906
11907 * macros.c (scm_macro_name, scm_macro_transformer): Use
11908 SCM_SMOB_DATA instead of SCM_CDR. Provided by Martin Grabmueller.
11909 Thanks!
11910
11911 2001-02-10 Keisuke Nishida <kxn30@po.cwru.edu>
11912
11913 * dump.c (scm_store_bytes): Store data size before data.
11914 (scm_restore_bytes): Restore data size. Takes a pointer to size.
11915 * dump.h (scm_restore_bytes): Updated.
11916
11917 2001-02-09 Keisuke Nishida <kxn30@po.cwru.edu>
11918
11919 * dump.c: Use double cells for update schedule.
11920
11921 2001-02-08 Keisuke Nishida <kxn30@po.cwru.edu>
11922
11923 * ports.c (scm_unread_char): Take an optional argument.
11924
11925 2001-02-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
11926
11927 * modules.h (scm_selected_module, scm_current_module): Renamed
11928 scm_selected_module to scm_current_module to synchronize Scheme
11929 and C names.
11930 (scm_select_module, scm_set_current_module): Likewise. Changed
11931 all uses.
11932
11933 * ports.c (scm_port_for_each): Make a snapshot of the port table
11934 before iterating over it. The table might change while the user
11935 code is running. With the snapshot, the user can depend on the
11936 fact that each port that existed at the start of the iteration is
11937 encountered exactly once. (ice-9 popen) depends on this.
11938
11939 2001-02-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
11940
11941 * strings.h (SCM_STRING_MAX_LENGTH): New macro.
11942
11943 * strings.c (scm_makstr, scm_take_str, scm_make_string): Added
11944 range checking for the size parameter. Thanks to Martin
11945 Grabmueller for the hint.
11946
11947 (scm_makstr): Reordered string initialization to make interrupt
11948 deferring unnecessary.
11949
11950 * vectors.c (scm_make_vector): Fixed range checking.
11951
11952 2001-02-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
11953
11954 * vectors.h (SCM_VECTOR_MAX_LENGTH): New macro.
11955
11956 * vectors.c (scm_make_vector, scm_c_make_vector): Improved the
11957 checking of the size parameter for type correctness and valid
11958 range. Thanks to Rob Browning for reporting the problem. Instead
11959 of deferring interrupts, scm_remember_upto_here_1 is used.
11960
11961 2001-02-05 Keisuke Nishida <kxn30@po.cwru.edu>
11962
11963 * dump.c (scm_store_cell_object, scm_restore_cell_object): Removed.
11964 (scm_dump_cell_update): Removed.
11965 (scm_dump_update): Renamed from scm_dump_object_update.
11966 (scm_restore_string, scm_restore_bytes, scm_restore_word): Takes
11967 a pointer instead of returning a value.
11968 * keywords.c (keyword_undump): Updated.
11969
11970 2001-02-05 Keisuke Nishida <kxn30@po.cwru.edu>
11971
11972 * dump.c, dump.h: Modified a lot.
11973 (SCM_DUMP_COOKIE): Version 0.1
11974 (scm_dump_mark): Removed.
11975 (scm_restore_cell_object, scm_store_cell_object): New functions.
11976
11977 * smob.h (scm_smob_descriptor): Removed slots: dump_mark,
11978 dump_dealloc, dump_store, undump_alloc, undump_restore, undump_init.
11979 New slots: dump, undump.
11980 * smob.c (scm_make_smob_type, scm_set_smob_dump, scm_set_smob_undump):
11981 Updated.
11982
11983 * keywords.c (keyword_dump): Renamed from keyword_dealloc.
11984 (keyword_undump): Renamed from keyword_alloc.
11985 (scm_init_keywords): Set keyword_dump and keyword_undump.
11986
11987 2001-02-03 Michael Livshin <mlivshin@bigfoot.com>
11988
11989 * gc.c (DOUBLECELL_ALIGNED_P): new macro, a better-named analog of
11990 the deprecated SCM_DOUBLE_CELLP.
11991
11992 * tags.h (SCM_DOUBLE_CELLP): deprecated.
11993
11994 2001-02-02 Keisuke Nishida <kxn30@po.cwru.edu>
11995
11996 * dump.c, dump.h: New files.
11997 * Makefile.am: Added dump.c, dump.h, dump.x, dump.doc.
11998 * init.c: #include "libguile/dump.h".
11999 (scm_init_guile_1): Call scm_init_dump.
12000 * smob.h (scm_smob_descriptor): New slots: dump_mark,
12001 dump_dealloc, dump_store, undump_alloc, undump_restore,
12002 undump_init.
12003 * smob.c (scm_make_smob_type): Init the new slots.
12004 (scm_set_smob_dump, scm_set_smob_undump): New functions.
12005 * smob.h (scm_set_smob_dump, scm_set_smob_undump): Declared.
12006
12007 * keywords.c: #include "libguile/dump.h".
12008 (keyword_dealloc, keyword_alloc): New functions.
12009 (scm_init_keywords): Set smob_dump and smob_undump.
12010
12011 2001-02-01 Keisuke Nishida <kxn30@po.cwru.edu>
12012
12013 * vectors.c (scm_c_make_vector): New function.
12014 * vectors.h (scm_c_make_vector): Declared.
12015 * eval.c (scm_copy_tree), filesys.c (scm_stat2scm), fluids.c
12016 (scm_make_initial_fluids, grow_fluids), gc.c (scm_init_storage),
12017 gh_data.c (gh_ints2scm, gh_doubles2scm): goops.c
12018 (scm_make_method_cache, scm_i_vector2list,
12019 scm_compute_applicable_methods, scm_sys_method_more_specific_p),
12020 init.c (start_stack), net_db.c (scm_gethost, scm_getnet,
12021 scm_getproto, scm_return_entry), posix.c (scm_getgroups,
12022 scm_getpwuid, scm_getgrgid, scm_uname), print.c (make_print_state,
12023 grow_ref_stack), regex-posix.c (scm_regexp_exec), scmsigs.c
12024 (scm_init_scmsigs), socket.c (scm_addr_vector, scm_addr_vector),
12025 stime.c (scm_times, filltime), unif.c (scm_make_uve), vectors.c
12026 (scm_vector, scm_make_vector): Use scm_c_make_vector.
12027
12028 * hashtab.c (scm_c_make_hash_table): New function.
12029 * hashtab.h (scm_c_make_hash_table): Declared.
12030 * environments.c (scm_make_leaf_environment,
12031 scm_make_eval_environment), gc.c (scm_init_storage),
12032 keywords.c (scm_init_keywords), symbols.c (scm_builtin_bindings):
12033 Use scm_c_make_hash_table.
12034
12035 2001-01-31 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12036
12037 * unif.c (rapr1): Don't apply scm_uniform_vector_length on arrays.
12038
12039 2001-01-29 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
12040
12041 * struct.c (scm_make_vtable_vtable): Removed unnecessary "" from
12042 end of docstring.
12043
12044 * struct.c (scm_struct_set_x, scm_struct_vtable_tag,
12045 scm_struct_vtable_name, scm_set_struct_vtable_name_x), weaks.c
12046 (scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table,
12047 scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
12048 srcprop.c (scm_source_properties, scm_set_source_properties_x,
12049 scm_source_property, scm_set_source_property_x), sort.c
12050 (scm_sort_list_x, scm_restricted_vector_sort_x, scm_sorted_p,
12051 scm_merge, scm_merge_x, scm_sort_x, scm_sort, scm_stable_sort_x,
12052 scm_stable_sort, scm_sort_list_x, scm_sort_list): Added
12053 docstrings.
12054
12055 2001-01-29 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12056
12057 * eval.c (SCM_APPLY): Check that primitives which take 1 arg
12058 really get that arg.
12059
12060 2001-01-26 Keisuke Nishida <kxn30@po.cwru.edu>
12061
12062 * goops.c (s_scm_get_keyword): Bug fix.
12063
12064 2001-01-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
12065
12066 The following patch was sent by Martin Grabmueller. It makes sure
12067 that in case of parameter errors the correct function name is
12068 shown, and that parameter types are only checked once.
12069
12070 * strop.c (string_copy, string_upcase_x, string_downcase_x,
12071 string_capitalize_x): New functions. Each one performs the core
12072 functionality of the corresponding scm_* function.
12073
12074 (scm_string_copy, scm_string_upcase_x, scm_string_upcase,
12075 scm_string_downcase_x, scm_string_downcase,
12076 scm_string_capitalize_x, scm_string_capitalize): Reduced to
12077 parameter checking wrappers of the above functions.
12078
12079 2001-01-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
12080
12081 * continuations.c, dynl.c, keywords.c, load.c: Include
12082 strings.h. Thanks to Bill Schottstaedt for the bug report.
12083
12084 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
12085
12086 * backtrace.c (display_header): Make sure that line and column
12087 information is shown independent of whether the port the code was
12088 read from had an associated filename. Thanks to Martin
12089 Grabmueller for providing this patch.
12090
12091 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
12092
12093 * fports.[ch] (scm_file_port_p): New primitive.
12094
12095 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
12096
12097 * tags.h (scm_tc16_fport, scm_tc16_strport, scm_tc16_sfport):
12098 These are now defined in fports.c, strports.c and vports.c.
12099
12100 * fports.[ch] (scm_tc16_fport), strports.c (scm_tc16_strport),
12101 vports.c (scm_tc16_sfport): Made variables (were macros defined in
12102 tags.h).
12103
12104 fports.c (scm_make_fptob), strports.c (scm_make_stptob), vports.c
12105 (scm_make_sfptob): Made static. These return a type code now.
12106
12107 fports.c (scm_init_fports), strports.c (scm_init_strports),
12108 vports.c (scm_init_vports): Create the corresponding port types.
12109
12110 * fports.h (SCM_FPORTP, SCM_OPFPORTP, SCM_OPINFPORTP,
12111 SCM_OPOUTFPORTP): Redefined in terms of scm_tc16_fport.
12112
12113 * init.c (scm_init_guile_1): Make sure strports are initialized
12114 before gdbint.
12115
12116 * ports.[ch] (scm_make_port_type): Changed the return type to
12117 scm_bits_t.
12118
12119 * ports.c (scm_ports_prehistory): Don't create any port types
12120 here.
12121
12122 * posix.c (scm_ttyname): Use SCM_FPORTP instead of comparing
12123 against scm_tc16_fport directly.
12124
12125 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
12126
12127 * srcprop.c (scm_set_source_property_x): Fix to handle
12128 (set-source-property! <obj> 'copy <datum>) correctly.
12129
12130 2001-01-24 Gary Houston <ghouston@arglist.com>
12131
12132 * filesys.c (scm_link): docstring fix.
12133 * fports.h (scm_setfileno): obsolete declaration removed.
12134 * posix.c: bogus popen declaration removed.
12135
12136 * rdelim.c: new file, split from ioext.c.
12137 * rdelim.h: new file, split from ioext.h
12138 * Makefile.am: add rdelim.c and related files.
12139 * init.c: call scm_init_rdelim. include rdelim.h.
12140
12141 2001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
12142
12143 This patch was sent by Martin Grabmueller and makes sure that
12144 parameter errors are reported correctly by the lexicographic
12145 ordering predicates.
12146
12147 * strorder.c (string_less_p, string_ci_less_p): New functions.
12148
12149 (scm_string_less_p, scm_string_ci_less_p): Extracted the core
12150 functionality into string_less_p, string_ci_less_p respectively.
12151 The remaining code is just a wrapper to do the parameter
12152 checking.
12153
12154 (scm_string_leq_p, scm_string_gr_p, scm_string_geq_p): Check the
12155 parameters and call string_less_p instead of scm_string_less_p.
12156
12157 (scm_string_ci_leq_p, scm_string_ci_gr_p, scm_string_ci_geq_p):
12158 Check the parameters and call string_less_ci_p instead of
12159 scm_string_ci_less_p.
12160
12161 2001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
12162
12163 This patch modifies scm_display_error to perform parameter
12164 checking. Thanks to Neil Jerram for the bug report.
12165
12166 * backtrace.[ch] (scm_i_display_error): New function.
12167
12168 * backtrace.c (scm_display_error): Added parameter check and
12169 extracted the core functionality into function
12170 scm_i_display_error.
12171
12172 * throw.c (handler_message): Call scm_i_display_error to display
12173 the error message.
12174
12175 2001-01-23 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
12176
12177 * eval.c (SCM_APPLY): Added # args check for application of
12178 procedures with arity 3. (Thanks to Anders Holst.)
12179
12180 2001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
12181
12182 * filesys.h (SCM_DIR_FLAG_OPEN, SCM_DIR_OPEN_P): Added.
12183
12184 (SCM_OPDIRP): Deprecated.
12185
12186 * filesys.c (scm_opendir): Use SCM_DIR_FLAG_OPEN instead of
12187 SCM_OPN.
12188
12189 (scm_readdir, scm_rewinddir): Don't use SCM_VALIDATE_OPDIR.
12190 Instead, give an explicit error message in case the directory is
12191 closed.
12192
12193 (scm_closedir, scm_dir_print): Rewritten to use SCM_DIR_OPEN_P
12194 instead of SCM_OPENP and SCM_CLOSEDP.
12195
12196 * validate.h (SCM_VALIDATE_OPDIR): Deprecated.
12197
12198 2001-01-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
12199
12200 * eval.c (inner_eval, scm_eval): Move all real functionality into
12201 inner_eval. Avoid to copy the expression twice by inlining some
12202 code from scm_i_eval.
12203
12204 2001-01-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
12205
12206 * eval.c (scm_m_case): The 'else' clause of a 'case' statement
12207 now has to be the last clause, as required by R5RS. Thanks to
12208 Martin Grabmueller for the patch.
12209
12210 2001-01-18 Gary Houston <ghouston@arglist.com>
12211
12212 * ioext.c: further simplify scm_read_string_x_partial by defining
12213 a macro SCM_EBLOCK.
12214
12215 2001-01-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
12216
12217 * gh_data.c (gh_ints2scm): Simplified using SCM_FIXABLE.
12218
12219 2001-01-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
12220
12221 * __scm.h: Added comment about architecture and compiler
12222 properties that are required by guile.
12223
12224 (SCM_FIXNUM_BIT, SCM_MOST_POSITIVE_FIXNUM,
12225 SCM_MOST_NEGATIVE_FIXNUM): Moved to numbers.h.
12226
12227 (SCM_CHAR_BIT, SCM_LONG_BIT): Moved here from numbers.h.
12228
12229 * numbers.h (SCM_CHAR_BIT, SCM_LONG_BIT): Moved to __scm.h.
12230
12231 (SCM_FIXNUM_BIT, SCM_MOST_POSITIVE_FIXNUM,
12232 SCM_MOST_NEGATIVE_FIXNUM): Moved here from __scm.h.
12233
12234 2001-01-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
12235
12236 * __scm.h (SCM_FIXNUM_BIT): Added. The name is chosen in analogy
12237 to the names in limits.h.
12238
12239 * numbers.c (abs_most_negative_fixnum): Added.
12240
12241 (scm_quotient, scm_remainder): Fixed the fixnum-min / (abs
12242 fixnum-min) special case.
12243
12244 (scm_big_and): Fix for negative first parameter.
12245
12246 (scm_bit_extract): Fix for fixnum paramters.
12247 Thanks to Rob Browning for the bug report.
12248
12249 (scm_init_numbers): Initialize abs_most_negative_fixnum.
12250
12251 2001-01-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
12252
12253 * symbols.c (scm_symbol_bound_p): Fixed comment.
12254 Thanks to Chris Cramer.
12255
12256 2001-01-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
12257
12258 * smob.[ch] (scm_make_smob_type): Return type is scm_bits_t now.
12259 Thanks to Bill Schottstaedt.
12260
12261 2001-01-11 Michael Livshin <mlivshin@bigfoot.com>
12262
12263 from Matthias Köppe:
12264
12265 * objects.h (SCM_SET_ENTITY_SETTER): new macro. SCM_ENTITY_SETTER
12266 casts its result, so doesn't yield an lvalue per ANSI C.
12267
12268 * goops.c (s_scm_sys_set_object_setter_x): use
12269 SCM_SET_ENTITY_SETTER.
12270 (clear_method_cache): use SCM_SET_ENTITY_PROCEDURE.
12271
12272 * gc.h (SCM_GC_SET_CARD_BVEC): new macro. SCM_GC_CARD_BVEC casts
12273 its result, so doesn't yield an lvalue per ANSI C.
12274 (SCM_GC_SET_CARD_FLAGS): ditto for SCM_GC_GET_CARD_FLAGS.
12275 (SCM_GC_CLR_CARD_FLAGS): redefined in terms of
12276 SCM_GC_SET_CARD_FLAGS.
12277 (SCM_GC_SET_CARD_FLAG, SCM_GC_CLR_CARD_FLAGS): ditto.
12278
12279 * gc.c (INIT_CARD): use the explicit setter macro to set the bvec.
12280
12281 2001-01-08 Gary Houston <ghouston@arglist.com>
12282
12283 * validate.h (SCM_VALIDATE_SUBSTRING_SPEC_COPY): new macro.
12284 * ioext.c (scm_read_string_x_partial, scm_read_delimited_x),
12285 socket.c (scm_recvfrom): use the new macro, plus minor docstring
12286 changes.
12287 * ioext.c (scm_read_string_x_partial): don't crash if -1 is supplied
12288 for fdes. if current input port is used, check that it's a file
12289 port.
12290
12291 2001-01-06 Gary Houston <ghouston@arglist.com>
12292
12293 * ioext.c (scm_read_string_x_partial): new procedure, implements
12294 read-string!/partial.
12295 * ports.c (scm_take_from_input_buffers): new procedure used by
12296 scm_read_string_x_partial.
12297 (scm_drain_input): use scm_take_from_input_buffers.
12298
12299 2001-01-06 Marius Vollmer <mvo@zagadka.ping.de>
12300
12301 * validate.h (SCM_VALIDATE_NUMBER): New.
12302
12303 2001-01-03 Michael Livshin <mlivshin@bigfoot.com>
12304
12305 * guardians.c (F_GREEDY, F_LISTED, F_DESTROYED, GREEDY_P,
12306 SET_GREEDY, LISTED_P, SET_LISTED, CLR_LISTED, DESTROYED_P,
12307 SET_DESTROYED): new defines/macros.
12308 (GUARDIAN_LIVE, GUARDIAN_ZOMBIES, GUARDIAN_NEXT): deleted.
12309 (add_to_live_list): takes a `guardian_t *' now, not SCM.
12310 (guardian_print): print more info.
12311 (guardian_apply): check if the guardian is destroyed, and throw an
12312 error if so. take one more optional argument `throw_p'.
12313 (scm_guard): depending on the value of `throw_p', return a boolean
12314 result.
12315 (scm_get_one_zombie): remove redundant property test.
12316 (guardian_t): represent the various (currently 3, I hope nothing
12317 more gets added) boolean fields as bit flags.
12318 (scm_guardian_destroyed_p, scm_guardian_greedy_p): new predicates.
12319 (scm_destroy_guardian_x): new procedure.
12320
12321 * guardians.h: added prototypes for `scm_guardian_greedy_p' and
12322 `scm_guardian_destroyed_p'. changed prototype for `scm_guard'.
12323
12324 2001-01-01 Gary Houston <ghouston@arglist.com>
12325
12326 * fports.c (fport_write): bugfix: handle short writes for
12327 unbuffered ports too. optimize the buffered case by minimizing
12328 the number of write/flush calls.
12329 (write_all): new helper procedure.
12330
12331 The ChangeLog continues in the file: "ChangeLog-2000"