*** empty log message ***
[bpt/guile.git] / libguile / ChangeLog
Content-type: text/html HCoop Git - bpt/guile.git/blame - libguile/ChangeLog


500 - Internal Server Error

Malformed UTF-8 character (fatal) at (eval 8) line 1, <$fd> line 2931.
CommitLineData
d1c38e11
MV
12005-03-09 Marius Vollmer <mvo@zagadka.de>
2
3 * script.c (scm_compile_shell_switches): Added 2005 to Copyright
4 years.
5
99ec43c1
MV
62005-03-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
7
8 * gc-card.c (scm_i_sweep_card): Do not increase/decrease
9 scm_gc_running_p. Sweeping can happen in parallel with
10 allocation.
11
12 * inline.h: Updated comments for current threading implementation.
13
14 * threads.h, threads.c (scm_i_frame_single_threaded): Removed.
15 (scm_i_thread): Removed unused signal_asyncs field.
16 (threads_mark): Do not mark it.
17 (guilify_self_1): Do not initialize it. Do initialize
18 continuation_root field.
19 (do_thread_exit): Do not remove thread from all_threads list.
20 (on_thread_exit): Do it here, after leaving guile mode.
21 (sleep_level): Removed.
22 (scm_i_thread_put_to_sleep): Leave thread_admin_mutex locked when
23 returning. Do not support recursive sleeps.
24 (scm_i_thread_wake_up): Expect thread_admin_mutex to be locked on
25 entry. Do not support recursive sleeps.
26
27 * fluids.c (ensure_state_size, ensure_all_state_sizes,
28 resize_all_states): Collapsed ensure_state_size and
29 ensure_all_state_sizes into one function named resize_all_states.
30 Allocate new vectors outside of single threaded region. Do only
31 simple things inside that region.
32 (scm_make_fluid, scm_make_dynamic_state): Lock fluid_admin_mutex
33 while adding to the global lists.
34
35
461f34aa
MV
362005-03-08 Marius Vollmer <mvo@zagadka.de>
37
38 libltdl is no longer distributed. We expect it to be installed
39 already.
40
41 * Makefile.am (INCLUDES): Removed @LTDLINCL@.
42 (libguile_la_LIBADD): Removed @LIBLTDL@.
43
4e047c3e
MV
442005-03-07 Marius Vollmer <mvo@zagadka.de>
45
46 * threads.h, async.h, threads.c (SCM_CRITICAL_SECTION_START,
47 SCM_CRITICAL_SECTION_END): Moved here from threads.h since now
48 they also block/unblock execution of asyncs and call
49 scm_async_click which is declared in async.h but threads.h can not
50 include async.h since async.h already includes threads.h.
51 (scm_i_critical_section_level): New, for checking mistakes in the
52 use of the SCM_CRITICAL_SECTION_* macros.
53 (scm_i_critical_section_mutex): Make it a recursive mutex so that
54 critical sections can be nested.
55
56 * throw.c (scm_ithrow): Abort when scm_i_critical_section_level is
57 not zero.
58
59 * threads.h, threads.c (scm_frame_lock_mutex): New.
60 (scm_frame_critical_section): Take mutex as argument.
61 (framed_critical_section_mutex): New, used as default for above.
62 (scm_init_threads): Initialize it.
63 (scm_threads_prehistory): Do not initialize thread_admin_mutex and
64 scm_i_critical_section_mutex; both are initialized statically.
65
66 * continuation.c, deprecated.c, goops.c, guardians.c keywords.c,
67 libguile_la-arrays.loT, objprop.c, ports.c, smob.c, sort.s,
b9d9ad3a
MV
68 srcprop.c, stime.c, struct.c, throw.c, regex-posix.c: Include
69 "libguile/async.h" for SCM_CRITICAL_SECTION_START/END.
4e047c3e
MV
70
71 * debug.c (scm_debug_options): Replace
72 SCM_CRITICAL_SECTION_START/END with a frame and
73 scm_frame_critical_section.
74
75 * continuations.c (scm_make_continuation): No longer a critical
76 section.
77 (scm_dynthrow): Abort when scm_i_critical_section_level is
78 not zero.
79
d0a45bff
MV
802005-03-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
81
db6673e5
MV
82 * threads.c (scm_try_mutex): Renamed argument for consistency.
83
d0a45bff
MV
84 * root.c (scm_call_with_dynamic_root): New docstring.
85
86 * eval.c: Define _GNU_SOURCE.
87
9de87eea
MV
882005-03-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
89
90 Big merge from the mvo-thread-cleanup branch. The main changes
91 are:
92
93 - The dynamic roots functionality has been split into dynamic
94 states and continuations barriers. Fluids have been
95 reimplemented and can now be garbage collected.
96
97 - Initialization of Guile now works in a multi-thread friendly
98 manner. Threads can freely enter and leave guile mode.
99
100 - Blocking on mutexes or condition variables or while selecting
101 can now be reliably interrupted via system asyncs.
102
103 - The low-level threading interface has been removed.
104
105 - Signals are delivered via a pipe to a dedicated 'signal delivery
106 thread'.
107
108 - SCM_DEFER_INTS, SCM_ALLOW_INTS etc have been deprecated.
109
110 * throw.c (scm_handle_by_message): Exit only the current thread,
111 not the whole process.
112 (scm_handle_by_message_noexit): Exit when catching 'quit.
113
114 * scmsigs.c (take_signal, signal_delivery_thread,
115 start_signal_delivery_thread, ensure_signal_delivery_thread,
116 install_handler): Reimplemented signal delivery as explained in
117 the comments.
118
119 * pthreads-threads.h (scm_i_pthread_t, scm_i_pthread_self,
120 scm_i_pthread_create, scm_i_pthread_detach, scm_i_pthread_exit,
121 scm_i_sched_yield, scm_i_pthread_sigmask,
122 SCM_I_PTHREAD_MUTEX_INITIALIZER,
123 SCM_I_PTHREAD_RECURSIVE_MUTEX_INITIALIZER, scm_i_pthread_mutex_t ,
124 scm_i_pthread_mutex_init, scm_i_pthread_mutex_destroy,
125 scm_i_pthread_mutex_trylock, scm_i_pthread_mutex_lock,
126 scm_i_pthread_mutex_unlock, SCM_I_PTHREAD_COND_INITIALIZER,
127 scm_i_pthread_cond_t, scm_i_pthread_cond_init,
128 scm_i_pthread_cond_destroy, scm_i_pthread_cond_signal,
129 scm_i_pthread_cond_broadcast, scm_i_pthread_cond_wait,
130 scm_i_pthread_cond_timedwait, scm_i_pthread_once_t,
131 SCM_I_PTHREAD_ONCE_INIT, scm_i_pthread_once, scm_i_pthread_key_t ,
132 scm_i_pthread_key_create, scm_i_pthread_setspecific,
133 scm_i_pthread_getspecific, scm_i_scm_pthread_mutex_lock,
134 scm_i_frame_pthread_mutex_lock, scm_i_scm_pthread_cond_wait,
135 scm_i_scm_pthread_cond_timedwait): Provide the obvious mapping
136 when using pthreads.
137 * null-threads.c, null-threads.h: Provide dummy definitions for
138 the above symbols when not using pthreads.
139
140 * modules.h, modules.c (scm_frame_current_module): New.
141
142 * load.c (scm_primitive_load): Use scm_i_frame_current_load_port
143 instead of scm_internal_dynamic_wind.
144
145 * init.h, init.c (restart_stack, start_stack): Removed.
146 (scm_boot_guile, invoke_main_func): Simply use scm_with_guile.
147 (scm_boot_guile_1): Removed.
148 (scm_i_init_mutex): New.
149 (really_cleanup_for_exit, cleanup_for_exit): New.
150 (scm_init_guile_1, scm_i_init_guile): Renamed former to latter.
151 Moved around some init funcs. Call
152 scm_init_threads_default_dynamic_state. Register cleanup_for_exit
153 with atexit.
154
155 * hashtab.c (scm_hash_fn_create_handle_x, scm_hash_fn_remove_x):
156 Use "!scm_is_eq" instead of "!=".
157
158 * ge-scmconfig.c, gen-scmconfig.h.in (SCM_I_GSC_USE_COOP_THREADS,
159 SCM_USE_COOP_THREADS): Removed.
160
161 * gc.c (scm_igc): Take care that scm_gc_running_p is properly
162 maintained. Unlock scm_i_sweep_mutex before running
163 scm_after_gc_c_hook.
164 (scm_permanent_object): Allocate outside of critical section.
165 (cleanup): Removed.
166
167 * fluids.h, fluids.c: Reimplemented completely.
168 (SCM_FLUID_NUM, SCM_FAST_FLUID_REF,
169 SCM_FAST_FLUID_SET): Reimplemented as functions.
170 (scm_is_fluid): New.
171 (scm_i_make_initial_fluids, scm_i_copy_fluids): Removed.
172 (scm_make_dynamic_state, scm_dynamic_state_p,
173 scm_is_dynamic_state, scm_current_dynamic_state,
174 scm_set_current_dynamic_state, scm_frame_current_dynamic_state,
175 scm_c_with_dynamic_state, scm_with_dynamic_state,
176 scm_i_make_initial_dynamic_state, scm_fluids_prehistory): New.
177
178 * feature.c (progargs_fluid): New.
179 (scm_program_arguments, scm_set_program_arguments): Use it instead
180 of scm_progargs.
181 (scm_init_feature): Allocate it. Also, only add "threads" feature
182 when SCM_USE_PTHREAD_THREADS is true.
183
184 * eval.c (scm_makprom): Use scm_make_recursive_mutex instead of
185 scm_make_rec_mutex, with all the consequences.
186 (scm_eval_x, scm_eval): Use scm_frame_begin etc instead of
187 scm_internal_dynamic_wind. Handle dynamic states as second
188 argument.
189
190 * threads.h, threads.c (scm_internal_select): Renamed to
191 scm_std_select and discouraged old name.
192 (scm_thread_sleep, scm_thread_usleep): Likewise, as scm_std_sleep
193 and scm_std_usleep.
194 (scm_tc16_fair_mutex, scm_tc16_fair_condvar, SCM_MUTEXP,
195 SCM_FAIR_MUTEX_P, SCM_MUTEX_DATA, SCM_CONDVARP,
196 SCM_FAIR_CONDVAR_P, SCM_CONDVAR_DATA, SCM_THREADP,
197 SCM_THREAD_DATA): Removed.
198 (SCM_I_IS_THREAD, SCM_I_THREAD_DATA): New.
199 (scm_i_thread): New.
200 (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR):
201 Use scm_assert_smob_type.
202 (scm_c_scm2thread, scm_thread_join, scm_thread_detach,
203 scm_thread_self, scm_thread_yield, scm_mutex_init,
204 scm_mutex_destroy, scm_mutex_trylock, scm_mutex_unlock,
205 scm_rec_mutex_init, scm_rec_mutex_destroy, scm_make_rec_mutex,
206 scm_rec_mutex_free, scm_rec_mutex_lock, scm_rec_mutex_trylock,
207 scm_cond_init, scm_cond_destroy, scm_cond_wait,
208 scm_cond_timedwait, scm_cond_signal, scm_cond_broadcast,
209 scm_key_create, scm_key_delete, scm_setspecific, scm_getspecific,
210 scm_thread_select): Removed. Replaced with scm_i_pthread
211 functions as appropriate.
212 (scm_in_guile, scm_outside_guile): Removed.
213 (scm_t_guile_ticket, scm_leave_guile, scm_enter_guile): Return and
214 take a ticket.
215 (scm_with_guile, scm_without_guile, scm_i_with_guile_and_parent):
216 New.
217 (scm_i_frame_single_threaded): New.
218 (scm_init_threads_default_dynamic_state): New.
219 (scm_i_create_thread): Removed.
220 (scm_make_fair_mutex, scm_make_fair_condition_variable): Removed.
221 (scm_make_recursive_mutex): New.
222 (scm_frame_critical_section): New.
223 (SCM_CURRENT_THREAD, SCM_I_CURRENT_THREAD): Renamed former to
224 latter, changed all uses.
225 (scm_i_dynwinds, scm_i_setdynwinds, scm_i_last_debug_frame,
226 scm_i_set_last_debug_frame): New, use them instead of scm_root
227 stuff.
228 (SCM_THREAD_LOCAL_DATA, SCM_SET_THREAD_LOCAL_DATA,
229 scm_i_root_state_key,m scm_i_set_thread_data): Removed.
230 (scm_pthread_mutex_lock, scm_frame_pthread_mutex_lock,
231 scm_pthread_cond_wait, scm_pthread_cond_timedwait).
232 (remqueue): Allow the removal of already removed cells. Indicate
233 whether a real removal has happened.
234 (scm_thread): Removed, replaced with scm_i_thread.
235 (make_thread, init_thread_creatant): Removed.
236 (cur_thread): Removed.
237 (block_self, unblock_from_queue): New.
238 (block, timed_block, unblock): Removed.
239 (guilify_self_1, guilify_self_2, do_thread_exit,
240 init_thread_key_once, init_thread_key,
241 scm_i_init_thread_for_guile, get_thread_stack_base,
242 scm_init_guile): New initialisation method.
243 (scm_call_with_new_thread, scm_spawn_thread): Use it to simplify
244 thread creation.
245 (fair_mutex, fat_mutex, etc, fair_condvar, fat_condvar): Renamed
246 "fair" to fat and implemented new semantics, including reliable
247 interruption.
248 (all_threads): Now a pointer to a scm_i_thread, not a SCM.
249 (scm_threads_mark_stacks): Explicitly mark handle.
250 (scm_std_select): Allow interruption by also selecting on the
251 sleep_pipe.
252 (scm_i_thread_put_to_sleep): Handle recursive requests for
253 single-threadedness.
254 (scm_threads_prehistory, scm_init_threads): Put current thread
255 into guile mode via guileify_self_1 and guileify_self_2,
256 respectively.
257
258 * fluid.h (SCM_FLUIDP): Deprecated.
259
260 * coop-threads.c: Removed.
261
262 * continuations.h, continuations.c (scm_with_continuation_barrier,
263 scm_c_with_continuation_barrier, scm_i_with_continuation_barrier):
264 New.
265
266 * async.h, async.c (scm_i_setup_sleep, scm_i_reset_sleep): New.
267 (async_mutex): New.
268 (scm_async_click): Protected with async_mutex. Do not deal with
269 signal_asyncs, which are gone. Set cdr of handled async cell to
270 #f.
271 (scm_i_queue_async_cell): Protected with async_mutex. Interrupt
272 current sleep.
273 (scm_system_async_mark_for_thread): Do not use scm_current_thread
274 since that might not work during early initialization.
275
276 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS, SCM_REDEFER_INTS,
277 SCM_REALLOW_INTS): Deprecated by moving into deprecated.h and
278 deprecated.c. Replaced all uses with SCM_CRITICAL_SECTION_START
279 and SCM_CRITICAL_SECTION_END.
280 (SCM_ENTER_A_SECTION, SCM_EXIT_A_SECTION): Removed. Replaced with
281 SCM_CRITICAL_SECTION_START/END.
282
283 * Makefile.am (modinclude_HEADER): Removed threads-plugin.h.
284 (libguile_la_SOURCES): Added null-threads.c
285 (EXTRA_libguile_la_SOURCES): Removed pthread-threads.c and
286 threads-plugin.c.
287 * pthread-threads.c, threads-plugin.c, threads-plugin.h: Removed.
288
289 * root.h, root.c (scm_tc16_root, SCM_ROOTP, SCM_ROOT_STATE,
290 scm_root_state, scm_stack_base, scm_save_regs_gc_mark,
291 scm_errjmp_bad, scm_rootcont, scm_dynwinds, scm_progargs,
292 scm_last_debug_frame, scm_exitval, scm_cur_inp, scm_outp,
293 scm_cur_err, scm_cur_loadp, scm_root, scm_set_root,
294 scm_make_root): Removed or deprecated. Replaced with references
295 to the current thread, dynamic state, continuation barrier, or
296 some fluid, as appropriate.
297 (root_mark, root_print): Removed.
298 (scm_internal_cwdr): Reimplemented guts with
299 scm_frame_current_dynamic_state and
300 scm_i_with_continuation_barrier.
301 (scm_dynamic_root): Return current continuation barrier.
302
303
ad3d5a65
MV
3042005-02-28 Marius Vollmer <mvo@zagadka.de>
305
306 * socket.c (scm_setsockopt): Handle IP_ADD_MEMBERSHIP and
307 IP_DROP_MEMBERSHIP options. Also, reorganized the code a bit for
308 cleanliness.
309 (scm_init_socket): Define IP_ADD_MEMBERSHIP and
310 IP_DROP_MEMBERSHIP.
311 Thanks to Greg Troxel!
312
73a90115
MD
3132005-02-27 Mikael Djurfeldt <djurfeldt@nada.kth.se>
314
315 * gh.h: Bugfix: Include <libguile.h> outside of the extern "C"
316 block.
317
5d2cb3ab
MV
3182005-02-25 Marius Vollmer <mvo@zagadka.de>
319
320 * hashtab.c (scm_i_rehash): Remove elements from old bucket vector
321 so that no two weak alist vectors share a spine.
322 (scm_hash_fn_create_handle_x): Deal with a possible rehashing
323 during GC before inserting the new alist cell.
324
838c4126
MV
3252005-02-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
326
327 * hashtab.c (scm_i_rehash): Cope with the case that a GC modifies
328 the hashtable.
329 (scm_hash_fn_create_handle_x): Likewise.
330 * vectors.h (SCM_I_SET_WVECT_TYPE): New, for use in scm_i_rehash.
331
29fed193
MD
3322005-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
333
334 * unif.c (prototype_to_type): Bugfix: Don't compare prototype to
335 the prototypical examples mentioned in the old reference manual.
336 Instead keep the old semantics of dispatching on type. (Yes, this
337 is extremely ugly, but the whole point of keeping the deprecated
338 interface is not to break old code.)
339
9cc49060
MD
3402005-02-08 Mikael Djurfeldt <djurfeldt@nada.kth.se>
341
342 * deprecated.h (SCM_ARRAY_DIMS): Rename scm_i_attay_dims -->
343 scm_i_array_dims.
344
8447f463
KR
3452005-01-28 Kevin Ryde <user42@zip.com.au>
346
347 * numbers.c (scm_ash): Rewrite using shifts, much faster than
348 integer-expt and multiply/divide. Inexacts and fractions no longer
349 supported (they happened to work before for left shifts, but not
350 right). Don't really need inexacts and fractions, since ash is
351 documented as a "bitwise operation", and all the rest of those only
352 take exact integers.
353
1367aa5e
HWN
3542005-01-27 Han-Wen Nienhuys <hanwen@xs4all.nl>
355
856fca7e
HWN
356 * gc-card.c (scm_i_card_statistics): map structs, closures and
357 subrs to one tag.
358
1367aa5e 359 * gc.c (s_scm_gc_live_object_stats): return alist, not hashtable.
856fca7e 360 (tag_table_to_type_alist): ignore unknown types.
1367aa5e
HWN
361
362 * gc-segment.c (scm_i_all_segments_statistics): new function.
363 (scm_i_heap_segment_statistics): new function
364
365 * gc.c (s_scm_gc_live_object_stats): new GUILE callable: return
366 statistics on the number of live objects of each type.
367
368 * gc-card.c (scm_i_tag_name): new function.
369 (scm_i_card_statistics): new function.
370
333db3b8
KR
3712005-01-24 Kevin Ryde <user42@zip.com.au>
372
373 * posix.c (scm_setlocale): Force errno=EINVAL for an error, since
374 POSIX and C99 don't document errno being set. Reported by Bruno
375 Haible.
376 (scm_flock): Update docstring from manual.
377
8447f463
KR
378 * random.c (scm_i_init_rstate): Compare w to -1 not 0xffffffffUL, now
379 that it's an scm_t_int32. Otherwise gcc 3.4 says it's always false on
380 a 64-bit system.
381
382 * scmsigs.c (scm_sigaction_for_thread): Use scm_to_long for
383 sa_handler, needs to be a long on 64-bit systems where int is only 32
384 bits.
385
88f59e53
MV
3862005-01-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
387
0eeb2611
MV
388 * environments.c (obarray_enter, obarray_replace): Call
389 SCM_HASHTABLE_INCREMENT when adding a new entry.
390
88f59e53
MV
391 * objects.c: Include goops.h for the scm_class_of prototype.
392
393 * hashtab.c (hashtable_size, HASHTABLE_SIZE_N): Restrict hashtable
394 sizes to be smaller than the maximum lengths of vectors.
395
219b2868
MV
3962005-01-18 Marius Vollmer <marius.vollmer@uni-dortmund.de>
397
398 * ports.c, smob.c: Include "libguile/goops.h".
399
400 * objects.h, objects.c, goops.c, goops.h (scm_class_boolean,
401 scm_class_char, scm_class_pair, scm_class_procedure,
402 scm_class_string, scm_class_symbol,
403 scm_class_procedure_with_setter, scm_class_primitive_generic,
404 scm_class_vector, scm_class_null, scm_class_real,
405 scm_class_complex, scm_class_integer, scm_class_fraction,
406 scm_class_unknown, scm_port_class, scm_smob_class,
407 scm_no_applicable_method, scm_class_of): Moved from objects to
408 goops since they are only useable once goops has been loaded.
409 (scm_classes_initialized): Removed.
410 (scm_class_of): Do not check it.
411 (create_standard_classes): Do not set it.
412
009c6b9c
MV
4132005-01-17 Marius Vollmer <marius.vollmer@uni-dortmund.de>
414
50472546
MV
415 * objects.h, objects.c (scm_classes_initialized): New.
416 (scm_class_of): Signal error when scm_classes_initialized is zero.
417 * goops.c (create_standard_classes): Set scm_classes_initialized
418 to one.
419
009c6b9c
MV
420 * random.c (scm_random_solid_sphere_x): Use
421 scm_c_generalized_vector_length instead of
422 scm_uniform_vector_length.
423
7719cbe9
MV
4242005-01-16 Marius Vollmer <mvo@zagadka.de>
425
426 * script.c (scm_compile_shell_switches): Removed debugging output.
427
1ec44fed
KR
4282005-01-15 Kevin Ryde <user42@zip.com.au>
429
430 * numbers.c (scm_logtest, scm_logbit_p, scm_integer_expt): Update
431 docstrings from manual.
432 * random.c (scm_random_solid_sphere_x): Update docstring from manual.
433
6e4cd850
MV
4342005-01-14 Marius Vollmer <marius.vollmer@uni-dortmund.de>
435
0b5a0521
MV
436 * random.c: Don't check for definedness of SCM_HAVE_T_INT64, check
437 its value.
438
439 Implement u64 and s64 uniform numeric vectors with bignums when
440 scm_t_uint64 and scm_t_int64 are not available.
441
442 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_take_u64vector,
443 scm_array_handle_u64_elements,
444 scm_array_handle_u64_writable_elements, scm_u64vector_elements,
445 scm_u64vector_writable_elements): Do not define when scm_t_uint64
446 is not available.
447 (scm_take_s64vector, scm_array_handle_s64_elements,
448 scm_array_handle_s64_writable_elements, scm_s64vector_elements,
449 scm_s64vector_writable_elements): Likewise for scm_t_int64.
450 (uvec_sizes, uvec_print, uvec_equalp): Use SCM bignums when
451 scm_t_int64/scm_t_uint64 are not available.
452 (uvec_mark): New, to mark the bignums.
453 (alloc_uvec): Initialize bignums.
454 (uvec_fast_ref): Return bignums directly.
455 (scm_uint64_min, scm_uint64_max, scm_int64_min, scm_int64_max,
456 assert_exact_integer): New.
457 (uvec_fast_set): Use them to validate the bignums.
458 (scm_init_srfi_4): Set mark function of smob when needed.
459 Initialize scm_uint64_min, scm_uint64_max, scm_int64_min,
460 scm_int64_max.
461
6e4cd850
MV
462 Recognize 1.4 -e syntax.
463
464 * script.c (sym_at, sym_atat, sym_main, all_symbols): New.
465 (scm_compile_shell_switches): Use them to recognize and convert
466 1.4 "-e" syntax.
467
3b698afe
MV
4682005-01-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
469
470 * deprecated.h, deprecated.c, strings.h, strings.c: Turn all
471 deprecated features that once were macros but are now functions
472 back into macros.
473
d6dc83a9
MV
4742005-01-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
475
49086691
MV
476 * eval.c, debug.h (SCM_WARN_DEPRECATED): New debug option.
477 * deprecation.c (scm_issue_deprecation_warning,
478 scm_c_issue_deprecation_warning_fmt): Use it.
479 (mode): Removed.
480 (print_summary): New.
481 (scm_init_deprecation): Initialize SCM_WARN_DEPRECATED instead of
482 mode.
483
d6dc83a9
MV
484 Deprecated SCM_ARRAY* macros.
485
486 * unif.h, unif.c, ramap.c, vectors.c, srfi-4.c, srfi-4.i.c
487 (SCM_ARRAYP, SCM_I_ARRAYP): Renamed former to latter internal
488 version. Changed all uses.
489 (scm_tc16_array, scm_i_tc16_array,
490 scm_tc16_enclosed_array, scm_i_tc16_enclosed_array,
491 SCM_ARRAY_FLAG_CONTIGUOUS, SCM_I_ARRAY_FLAG_CONTIGUOUS,
492 SCM_ENCLOSE_ARRAYP, SCM_I_ENCLOSE_ARRAYP,
493 SCM_ARRAY_NDIM, SCM_I_ARRAY_NDIM,
494 SCM_ARRAY_CONTP, SCM_I_ARRAY_CONTP,
495 SCM_ARRAY_MEM, SCM_I_ARRAY_MEM,
496 SCM_ARRAY_V, SCM_I_ARRAY_V,
497 SCM_ARRAY_BASE, SCM_I_ARRAY_BASE,
498 SCM_ARRAY_DIMS, SCM_I_ARRAY_DIMS,
499 scm_t_array, scm_i_t_array): Likewise.
500 (SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG):
501 Moved from unif.h to unif.c.
502 (scm_c_array_rank): New.
503 (scm_array_rank): Reimplement using it.
504
505 * deprecated.h, deprecated.c (SCM_ARRAYP, SCM_ARRAY_NDIM,
506 SCM_ARRAY_CONTP, SCM_ARRAY_MEM, SCM_ARRAY_V, SCM_ARRAY_BASE,
507 SCM_ARRAY_DIMS, scm_t_array): New deprecated versions.
508
dc91d8de
MV
5092005-01-11 Marius Vollmer <mvo@zagadka.de>
510
511 * ramap.c: Replace uses of scm_make_ra with scm_i_make_ra.
512 (GVREF, GVSET): New abbreviations. Use them everywhere instead of
513 scm_c_generalized_vector_ref and scm_cvref, and
514 scm_c_generalized_vector_set_x, respectively.
515 (RVREF, IVDEP, BINARY_ELTS_CODE, BINARY_PAIR_ELTS_CODE,
516 UNARY_ELTS_CODE, UNARY_PAIR_ELTS_CODE): Removed since unused.
517
518 * unif.h, unif.c (indices_to_pos, scm_array_handle_pos): Renamed
519 former to latter and made public. Changed all uses.
520 (scm_i_make_ra): Made public, changed tag param to enclosed flag.
521 (scm_make_ra): Deprecated, changed all uses to scm_i_make_ra.
522 (scm_i_shap2ra): New internal version of scm_shap2ra.
523 (scm_shap2ra): Deprecated, changed all uses to scm_i_shap2ra.
524 (scm_i_ra_set_contp): New internal version of scm_ra_set_contp.
525 (scm_ra_set_contp): Deprecated, changed all uses to
526 scm_i_ra_set_contp.
527 (scm_cvref, scm_aind, scm_raprin1): Deprecated.
528
66d33784
MV
5292005-01-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
530
b06f099d
MV
531 * eval.c (scm_eval): Added example to docstring. Thanks to Issac
532 Trotts!
533
5d35ad81
MV
534 * unif.c (scm_list_to_typed_array): Allow the specification of the
535 upper bound as well. This is needed for empty arrays.
536 (l2ra): Give needed number of elements in error message.
537 (scm_i_print_array): Print length information for arrays that need
538 it.
539 (scm_i_read_array): Parse it.
540
66d33784
MV
541 * deprecated.h, deprecated.c (SCM_CHARS, SCM_UCHARS, SCM_LENGTH,
542 scm_i_object_chars, scm_i_object_length): Brought back from the
543 dead.
544
d7d7d401
MV
5452005-01-10 Marius Vollmer <mvo@zagadka.de>
546
74c58fce
MV
547 * ramap.c: Replaced single-index uses of scm_array_set_x with
548 scm_c_generalized_vector_set_x.
549
d7d7d401
MV
550 * unif.c (scm_array_rank, scm_array_dimensions,
551 scm_shared_array_offset, scm_shared_array_increments,
552 scm_array_ref, scm_array_set_x): Use scm_t_array_handle operations
553 to simplify code and make it more general.
554 (scm_shared_array_root): Work with all kinds of arrays, including
555 naked vectors.
556 (indices_to_pos): New.
74c58fce
MV
557 (scm_make_shared_array): Use it instead of scm_aind; use handle
558 for oldra.
559
4475d3fe
KR
5602005-01-10 Kevin Ryde <user42@zip.com.au>
561
562 * posix.c (scm_mkstemp): Update docstring from manual.
563
d3ddc95e
KR
564 * stime.c (scm_mktime): Missing default errno=EINVAL from prev change.
565
8c8491f5
MV
5662005-01-09 Marius Vollmer <mvo@zagadka.de>
567
b89ecc6f
MV
568 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_i_uniform_vector_ref_proc,
569 scm_i_uniform_vector_set_proc): New.
570 (u8ref, u8set, s8ref, s8set, etc): New.
571 (uvec_reffers, uvec_setters): New.
572 (uvec_to_list): Use generic scm_array_handle_ref instead of
573 uvec_fast_ref since scm_array_handle_ref should be faster now.
8cb01d9f
MV
574 (coerce_to_uvec, scm_c_uniform_vector_ref,
575 scm_c_uniform_vector_set_x): Likewise.
b89ecc6f
MV
576
577 * unif.h, unif.c, inline.h (scm_i_t_array_ref, scm_i_t_array_set):
578 New.
579 (scm_t_array_handle): Added ref, set, elements and
580 writable_elements for fast inline operation of
581 scm_array_handle_ref and scm_array_handle_set.
582 (scm_array_handle_ref, scm_array_handle_set): Moved to inline.h
583 and replaced with inline code that simply calls the ref/set
584 members of the handle.
585 (enclosed_ref, vector_ref, string_ref, bitvector_ref, memoize_ref,
586 enclosed_set, vector_set, string_set, bitvector_set, memoize_set):
587 New.
588 (scm_array_handle_get): Initialize ref/set fields to memoize_ref
589 and memoize_set.
590 (scm_bitvector_fill_x, scm_bitvector_to_list, scm_bit_count,
591 scm_bit_position, scm_bit_set_star_x, scm_bit_count_star,
592 scm_bit_invert_x): Correctly multiply index with increment in the
593 general case.
594
8c8491f5
MV
595 * unif.c (scm_array_handle_set): Correctly execute only one
596 alternative. D'Oh!
597 (scm_list_to_typed_array, l2ra): Use scm_t_array_handle to fill
598 the array; this covers all cases with much simpler code.
599
600 * srfi-4.c (scm_uniform_element_size): Deprecated implementation
601 as well.
602
cd5d55c7
MV
6032005-01-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
604
605 * srfi-4.c (uvec_type): New.
606 (uvec_to_list, uvec_ref, uvec_set_x, scm_c_uniform_vector_ref,
607 scm_c_uniform_vector_x): Use it to get concrete type.
608
609 * unif.h (scm_t_array_dim): Changed type of members to ssize_t, to
610 fit the docs.
611
612 * unif.c (ra2l): Handle zero rank arrays.
613 (scm_i_print_array): Print zero rank arrays specially.
614 (tag_to_type): Return #t for an empty tag, not the empty symbol.
615 (scm_i_read_array): Allow zero rank arrays.
616
a4aad74e
MV
6172005-01-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
618
619 * hashtab.h, hashtab.c (SCM_HASHTAB_BUCKET_LOC): Removed.
620 (scan_weak_hashtables): Rewrote its use with SCM_HASHTAB_BUCKET
621 and SCM_SET_HASHTAB_BUCKET.
622
623 * print.h, print.c (scm_print_state, SCM_PRINT_STATE_LAYOUT):
624 Removed ref_stack field.
625 (PSTATE_STACK_REF, PSTATE_STACK_SET): New, for accessing the stack
626 of a print state. Use them everywhere instead of ref_stack.
627
3a40d5e1
MV
628 * srfi-4.h (scm_uniform_element_size): Deprecated for real.
629
a4aad74e
MV
630 * srfi-4.c: Include deprecation.h.
631
632 * vectors.h, vectors.c, unif.h, unif.c, deprecated.h,
633 deprecated.c, eq.c
634 (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR): Removed.
635 (scm_vector_elements, scm_vector_writable_elements,
636 scm_generalized_vector_get_handle): Moved to vectors.[hc] from
637 unif.[hc].
638 (SCM_SIMPLE_VECTOR_LOC): Removed.
639 (SCM_VECTOR_MAX_LENGTH, SCM_VECTOR_LENGTH, SCM_VELTS,
640 SCM_WRITABLE_VELTS, SCM_VECTOR_REF, SCM_VECTOR_SET,
641 scm_vector_equal_p): Moved from vectors.[hc] to deprecated.[hc].
642 (scm_vector_equal_p, scm_i_vector_equal_p): Renamed former to
643 latter. Changed use in eq.c.
644
f01fe441
MV
6452005-01-07 Marius Vollmer <mvo@zagadka.de>
646
647 Make the uniform vector routines also deal with one dimensional
648 arrays.
649
650 * srfi-4.c (SCM_IS_UVEC): New, use it instead of
651 SCM_SMOB_PREDICATE in this file.
652 (is_uvec): Also recognize one-dimensional uniform numeric arrays
653 of the right type.
654 (scm_is_uniform_vector): Likewise.
655 (uvec_fast_ref): Made BASE param const.
656 (uvec_writable_elements, uvec_elements): New.
657 (uvec_to_list, uvec_ref, uvec_set_x, uvec_length,
658 scm_c_uniform_vector_length, scm_c_uniform_vector_ref,
659 scm_c_uniform_set_x): Use them to also deal with one-dimensional
660 arrays.
661 (scm_uniform_vector_ref, scm_uniform_vector_set_x): Deprecate old
662 argument convention.
663 (scm_uniform_vector_to_list): Let uvec_to_list do all the
664 checking.
665 (scm_uniform_vector_length): Use uvec_length.
666
2aaf5726
MV
6672005-01-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
668
669 * srfi-4.h, srfi-4.c (scm_c_uniform_vector_element_size,
670 scm_c_uniform_vector_size): Removed.
671 (scm_array_handle_uniform_element_size): New.
672
673
674 * unif.h (scm_array_handle_ref, scm_array_handle_set): Changed
675 type of POS parameter to be signed, positions can be negative.
676 (scm_array_handle_release): New, changed all uses of
677 scm_t_array_handle to properly call it.
678 (scm_vector_get_handle, scm_generalized_vector_get_handle):
679 Renamed former to latter, changed all uses.
680
34ae52fc
MV
6812005-01-05 Marius Vollmer <mvo@zagadka.de>
682
683 Updated bitvector routines to also use scm_t_array_handles.
684
685 * unif.h (scm_bitvector_elements,
686 scm_bitvector_writable_elements): Use a scm_t_array_handle and
687 deliver offset, length and increment to caller. Changed all uses.
688 (scm_bitvector_release_elements,
689 scm_frame_bitvector_release_elements,
690 scm_bitvector_release_writable_elements,
691 scm_frame_bitvector_release_writable_elements): Removed.
692 (scm_array_handle_bit_elements,
693 scm_array_handle_bit_writable_elements,
694 scm_array_handle_bit_elements_offset): New.
695 (scm_make_typed_array): The special value for non-initialized
696 arrays is now SCM_UNSPECIFIED. The old special value SCM_BOOL_F
697 was a valid value to fill bitvectors with, so it can't really be
698 specialed out.
699
c4cb7628
KR
7002005-01-04 Kevin Ryde <user42@zip.com.au>
701
702 * stime.c (scm_strftime): Free t.tm_zone produced by bdtime2c.
703 Reported by Bill Schottstaedt.
704
0356881d
MV
7052005-01-02 Marius Vollmer <mvo@zagadka.de>
706
707 * sort.c (quicksort): Added INC parameter for non-contigous
708 vectors.
709 (quicksort1): New, for contigous vectors. Both functions are
710 generated from the same code by including "quicksort.i.c".
711 (scm_restricted_vector_sort_x): Call one of quicksort and
712 quicksort1, depending on increment of vector.
713 (scm_sort): Simply call scm_sort_x on a copy of the list or
714 vector.
715 (scm_merge_vector_x, scm_merge_vector_step): Changed indices to
716 size_t, added inc parameter.
717 (scm_stable_sort_x): Allocate temporary storage as Scheme vector
718 so that it doesn't leak.
719 (scm_stable_sort): Simply call scm_stable_sort_x on a copy of the
720 list or vector.
721
722 * ramap.c (scm_array_map_x): Do not try to convert fill value
723 before filling, any necessary conversion is done while storing.
724
725 * gc-card.c (scm_i_sweep_card): Call scm_i_vector_free instead of
726 doing it inline.
727
728 * hashtab.c, hashtab.h (SCM_HASHTABLE_BUCKETS): Removed.
729 (SCM_HASHTABLE_BUCKET, SCM_HASHTABLE_BUCKET_LOC): New. Replaced
730 all uses of SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET.
731
732 * tags.h, weaks.c, vports.c, hashtab.c, convert.c, sort.c,
733 convert.c, convert.h, convert.i.c, deprecated.c, environments.c,
734 eval.c, filesys.c, fluids.c, gc-mark.c, gh.h, gh_data.c, goops.c,
735 hash.c, init.c, libguile_la-arrays.loT, modules.c, net_db.c,
736 objects.c, ports.c, posix.c, print.c, random.c, read.c,
737 regex-posix.c, scmsigs.c, socket.c, stime.c, symbols.c: Use new
738 vector elements API or simple vector API, as appropriate. Removed
739 SCM_HAVE_ARRAYS ifdefery. Replaced all uses of
740 SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET.
741
742 * srfi-4.h, srfi-4.c,
743 srfi-4.i.c (scm_array_handle_uniform_elements,
744 scm_array_handle_uniform_writable_elements,
745 scm_uniform_vector_elements,
746 scm_uniform_vector_writable_elements):
747 (scm_<foo>vector_elements, scm_<foo>vector_writable_elements): Use
748 scm_t_array_handle, deliver length and increment.
749 (scm_array_handle_<foo>_elements,
750 scm_array_handle_<foo>_writable_elements): New.
751
752 * gen-scmconfig.h.in (SCM_I_GSC_HAVE_ARRAYS): Removed.
753 * gen-scmconfig.c: Hard code SCM_HAVE_ARRAYS to "1".
754
755 * unif.h, unif.c (scm_t_array_handle, scm_array_get_handle,
756 scm_array_handle_rank, scm_array_handle_dims, scm_array_handle_ref
757 scm_array_handle_set, scm_array_handle_elements
758 scm_array_handle_writable_elements, scm_vector_get_handle): New.
759 (scm_make_uve, scm_array_prototype, scm_list_to_uniform_array,
760 scm_dimensions_to_uniform_array): Deprecated for real.
761 (scm_array_p, scm_i_array_p): Use latter for SCM_DEFINE since
762 snarfing wont allow a mismatch between C and Scheme arglists.
763 (scm_make_shared_array, scm_enclose_array): Correctly use
764 scm_c_generalized_vector_length instead of
765 scm_uniform_vector_length.
766
767 * validate.h (SCM_VALIDATE_VECTOR,
768 SCM_VALIDATE_VECTOR_OR_DVECTOR): use scm_is_simple_vector instead
769 of SCM_VECTORP.
770
771 * weaks.h, weaks.c: Use new internal weak vector API from
772 vectors.h.
773
774 * Makefile.am (libguile_la_SOURCES, DOT_X_FILES, DOT_DOC_FILES,
775 EXTRA_libguile_la_SOURCES): Changed ramap.c and unif.c from being
776 'extra' to being regular sources.
777 (noinst_HEADERS): Added quicksort.i.c.
778 * quicksort.i.c: New file.
779
780 * vectors.h, vector.c (SCM_VECTORP, SCM_VECTOR_LENGTH, SCM_VELTS,
781 SCM_WRITABLE_VELTS, SCM_VECTOR_REF, SCM_VECTOR_SET): Deprecated
782 and reimplemented. Replaced all uses with scm_vector_elements,
783 scm_vector_writable_elements, or SCM_SIMPLE_VECTOR_*, as
784 appropriate.
785 (scm_is_simple_vector, SCM_SIMPLE_VECTOR_LENGTH,
786 SCM_SIMPLE_VECTOR_REF, SCM_SIMPLE_VECTOR_SET,
787 SCM_SIMPLE_VECTOR_LOC): New.
788 (SCM_VECTOR_BASE, SCM_SET_VECTOR_BASE, SCM_VECTOR_MAX_LENGTH,
789 SCM_MAKE_VECTOR_TAG, SCM_SET_VECTOR_LENGTH,
790 SCM_VELTS_AS_STACKITEMS, SCM_SETVELTS, SCM_GC_WRITABLE_VELTS):
791 Removed.
792 (scm_vector_copy): New.
793 (scm_vector_elements, scm_vector_writable_elements): Use
794 scm_t_array_handle, deliver length and increment. Moved to
795 unif.h. Changed all uses.
796 (scm_vector_release_elements,
797 scm_vector_release_writable_elements,
798 (scm_frame_vector_release_elements,
799 scm_frame_vector_release_writable_elements): Removed.
800 (SCM_I_IS_VECTOR, SCM_I_VECTOR_ELTS, SCM_I_VECTOR_WELTS,
801 SCM_I_VECTOR_LENGTH, scm_i_vector_free): New internal API.
802 (SCM_I_WVECTP SCM_I_WVECT_LENGTH SCM_I_WVECT_VELTS
803 SCM_I_WVECT_GC_WVELTS SCM_I_WVECT_TYPE SCM_I_WVECT_GC_CHAIN
804 SCM_I_SET_WVECT_GC_CHAIN, scm_i_allocate_weak_vector): New, for
805 weak vectors.
806
0336d18b
MV
8072004-12-29 Marius Vollmer <mvo@zagadka.de>
808
809 No longer use creators to specify the type of an array. Creators
810 expose the fact that arrays are wrapped around vectors, but that
811 might change.
812
813 * srfi-4.h (scm_i_proc_make_u8vector, scm_i_proc_make_s8vector,
814 scm_i_proc_make_u16vector, scm_i_proc_make_s16vector,
815 scm_i_proc_make_u32vector, scm_i_proc_make_s32vector,
816 scm_i_proc_make_u64vector, scm_i_proc_make_s64vector,
817 scm_i_proc_make_f32vector, scm_i_proc_make_f64vector,
818 scm_i_proc_make_c32vector, scm_i_proc_make_c64vector,
819 uvec_proc_vars): Removed.
820 (scm_i_generalized_vector_creator): Removed.
821 (scm_i_generalized_vector_type): New.
822
823 * unif.h, unif.c (scm_typed_array_p, scm_make_array,
824 scm_make_typed_array, scm_array_type, scm_list_to_array,
825 scm_list_to_typed_array, scm_is_array, scm_is_typed_array): New.
826 (scm_array_creator): Removed.
827 (scm_array_p): Deprecated second PROT argument.
828 (scm_dimensions_to_uniform_array, scm_list_to_uniform_array):
829 Deprecated, reimplemented in terms of scm_make_typed_array and
830 scm_list_to_typed_array.
831 (scm_i_proc_make_vector, scm_i_proc_make_string,
832 scm_i_proc_make_bitvector): Removed.
833 (type_creator_table, init_type_creator_table, type_to_creator,
834 make_typed_vector): New.
835 (scm_i_convert_old_prototype): Removed.
836 (prototype_to_type): New.
837 (scm_make_uve): Deprecated, reimplemented using make_typed_vector.
838 (scm_array_dimensions): Use scm_list_1 instead of scm_cons for
839 minor added clarity.
840 (scm_make_shared_array, scm_ra2contig): Use make_typed_vector
841 instead of scm_make_uve.
842 (tag_creator_table, scm_i_tag_to_creator): Removed.
843 (tag_to_type): New.
844 (scm_i_read_array): Use scm_list_to_typed_array instead of
845 scm_list_to_uniform_array.
846
277e8472
MV
8472004-12-27 Marius Vollmer <mvo@zagadka.de>
848
32b26202
MV
849 * unif.h, unif.c (scm_bitvector_elements): Made return value "const".
850 (scm_bitvector_writable_elements): New.
851 (scm_bitvector_release, scm_bitvector_release_elements):
852 Renamed former to latter. Added explicit call to
853 scm_remember_upto_here_1.
854 (scm_frame_bitvector_release,
855 scm_frame_bitvector_release_elements): Renamed former to latter.
856 (scm_bitvector_release_writable_elements,
857 scm_bitvector_release_writable_elements): New.
858 Changed all uses as required by the changes above.
859
860 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_uniform_vector_elements,
861 scm_u8vector_elements, etc): Made return value "const".
862 (scm_uniform_vector_writable_elements,
863 scm_u8vector_writable_elements, etc): New.
864 (scm_uniform_vector_release, scm_uniform_vector_release_elements):
865 Renamed former to latter. Added explicit call to
866 scm_remember_upto_here_1.
867 (scm_frame_uniform_vector_release,
868 scm_frame_uniform_vector_release_elements): Renamed former to latter.
869 (scm_uniform_vector_release_writable_elements,
870 scm_frame_uniform_vector_release_writable_elements): New. Takes
871 crown of longest identifier yet.
872 Changed all uses as required by the changes above.
873
277e8472
MV
874 * vectors.h, vectors.c (scm_c_vector_set_x): Make return type
875 void.
876 (scm_is_vector, scm_vector_p, scm_vector_length,
877 scm_c_vector_length, scm_vector_ref, scm_c_vector_ref,
878 scm_vector_set_x, scm_c_vector_set_x, scm_vector_to_list,
879 scm_vector_move_left_x, scm_vector_move_right_x,
880 scm_vector_fill_x): handle one-dimensional arrays.
32b26202
MV
881 (scm_vector_elements, scm_vector_release_elements,
882 scm_vector_frame_release_elements, scm_vector_writable_elements,
883 scm_vector_release_writable_elements,
884 scm_vector_frame_release_writable_elements): New.
885 (scm_list_to_vector, scm_vector_to_list, scm_vector_fill,
886 scm_vector_move_left_x, scm_vector_move_right_x): Use them.
277e8472
MV
887
888 * ramap.c (scm_ramapc, scm_raeql): Use
889 scm_c_generalized_vector_length instead of
890 scm_uniform_vector_length.
891 (scm_ramap, rafe): Use scm_c_vector_ref instead of SCM_VELTS. use
892 scm_c_generalized_vector_ref instead of scm_uniform_vector_ref.
893
49c51610
MV
8942004-12-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
895
896 * continuations.h, continuations.c (scm_t_contregs): New 'offset'
897 member for relocating debug frames.
898 (scm_make_continuation): Set it.
899
900 * stacks.c (read_frame, read_frames, scm_make_stack,
901 scm_last_stack_frame, scm_stack_id): Use the new 'offset' member
902 of continuations instead of calculating the offset ourselves.
903 Relocate 'vect' member of scm_t_debug_frame.
904
3b2ee265
KR
9052004-12-16 Kevin Ryde <user42@zip.com.au>
906
907 * ramap.c (scm_array_map_x): Check for at least one source argument.
908
e120686a
KR
9092004-12-14 Kevin Ryde <user42@zip.com.au>
910
911 * srfi-13.c (string-any, string-every): Use a scheme wrapper around
912 the C code so for the final call to the predicate procedure is a tail
913 call, per SRFI-13 spec.
914
680b5237
KR
9152004-12-10 Kevin Ryde <user42@zip.com.au>
916
917 * eq.c (scm_eq_p, scm_eqv_p, scm_equal_p): Update docstrings from
918 recent revision to the reference manual.
919
920 * numbers.c (scm_modulo): Amend fixme comment about negative divisor
921 with "%", C99 says it's well-defined.
922
923 * socket.c (scm_from_ipv6): Just use mpz_import. Don't bother trying
924 to fit scm_from_ulong_long, since that uses mpz_import anyway. Don't
925 bother trying to fit scm_from_ulong, not really worth the trouble if
926 addresses are more than 4 bytes usually.
927
446d320c
KR
9282004-11-30 Kevin Ryde <user42@zip.com.au>
929
930 * gc_os_dep.c (NetBSD): Test __m68k__ and __arm__ as well as m68k and
931 arm32. Reported by Greg Troxel.
932
f2654760
MV
9332004-11-14 mvo <mvo@zagadka.de>
934
935 * unif.c, unif.h (scm_i_cvref): Made non-static for ramap.c.
936
937 * Makefile.am (INCLUDES): It is "@LTDLINCL@", not "@LTDLINC@".
938
d550e35f
MV
9392004-11-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
940
941 Enclosed arrays are now their own smob. This has been done to
942 make the code more explicit about them and to prepare for the time
f2654760
MV
943 when generalized vectors include arbitrary one-dimensional
944 arrays. (Uptonow, enclosed arrays have been recognized by their
945 use of an array as their storage 'vector'. When all generalized
946 vectors are allowed as storage, including one-dimensional arrays,
947 this will no longer work.)
d550e35f
MV
948
949 * unif.h, unif.c: (scm_tc16_enclosed_array, SCM_ENCLOSED_ARRAYP):
950 New.
951 (exactly_one_third, singp): Removed.
952 (scm_array_p, scm_array_dimensions, scm_shared_array_root,
953 scm_shared_array_offset, scm_shared_array_increments): Handle
954 enclosed arrays explicitely.
955 (scm_array_rank): Likewise. Also, do not return zero for
956 non-arrays, signal an error instead since arrays with rank zero do
957 exist.
958 (scm_i_make_ra): New, for specifying the tag of the new array.
959 (scm_make_enclosed_array): Use it.
960 (scm_make_ra): Reimplemented in terms of scm_i_make_ra.
961 (scm_make_shared_array): Use scm_c_generalized_vector_length
962 instead of scm_uniform_vector_length.
963 (scm_array_in_bounds_p): Rewritten to be much cleaner.
964 (scm_i_cvref): New, doing the job of scm_cvref.
965 (scm_cvref): Use scm_i_cvref.
966 (scm_array_ref): Do not accept non-arrays when no indices are
967 given. Use scm_i_cvref to do the actual access.
968 ("uniform-array-set1"): Do not register.
969 (scm_array_set_x, scm_uniform_array_read_x,
970 scm_uniform_array_write): Handle enclosed arrays explicitly.
971 (ra2l): Use scm_i_cvref instead of scm_uniform_vector_ref to also
972 handle enclosed arrays.
973 (scm_array_to_list): Handle enclosed arrays explicitly.
974 (rapr1): Removed.
975 (scm_i_print_array_dimension): Use scm_i_cvref to also handle
976 enclosed arrays.
977 (scm_i_print_enclosed_array): New.
978 (tag_proto_table, tag_creator_table): Renamed former to latter.
979 Added "a" and "b" for strings and bitvectors, resp.
980 (scm_i_tag_to_prototype, scm_i_tag_to_creator): Renamed former to
981 latter. Tag "a" is in the table now, no need to handle it as a
982 legacy tag.
983 (scm_raprin1): Just call scm_iprin1.
984 (scm_array_creator, scm_array_prototype): Handle enclosed arrays
985 explicitly.
986 (scm_init_unif): Initialize scm_tc16_enclosed_array smob.
987 Use scm_i_print_array as printer for scm_tc16_array.
988
2ed34885
MV
9892004-11-10 Marius Vollmer <mvo@zagadka.de>
990
823086c1
MV
991 * ramap.c (cind): Changed second arg to be pointer to long instead
992 of uniform vector.
993 (scm_ramapc): Allocate index vector with scm_malloc and not as
d550e35f 994 uniform vector. Wrap it in a frame so that it gets properly freed.
823086c1
MV
995 (scm_array_index_map_x): Likewise.
996
997 * unif.c: Changed all uses of scm_array_prototype to
998 scm_array_creator. (scm_i_get_old_prototype): Signal error when no
999 prototype is known.
1000 (scm_uniform_array_read_x, scm_uniform_array_write): Reimplemented
1001 in terms of scm_uniform_vector_read_x and
1002 scm_uniform_vector_write, respectively. Strings and
1003 bitvector support has been dropped.
1004
2ed34885
MV
1005 * srfi-4.h, srfi-4.c: Do not include <libguile.h>, include the
1006 needed files directly. Include config.h, <unistd.h> and <io.h>
1007 when available.
1008 (scm_uniform_vector_read_x, scm_uniform_vector_write): New.
1009
2c72f253
MV
10102004-11-09 Marius Vollmer <mvo@zagadka.de>
1011
1012 * gh_data.c (gh_uniform_vector_length): Properly use
1013 scm_c_uniform_vector_length instead of scm_uniform_vector_length.
1014
3cc0a296
MV
10152004-11-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1016
1017 * srfi-4.h (scm_c_uniform_vector_ref, scm_c_uniform_vector_set_x):
1018 New.
1019 (scm_i_uniform_vector_creator): Removed.
1020 (scm_i_generalized_vector_creator): New.
1021 (scm_uniform_vector_length, scm_uniform_element_size): Do not
1022 handle generalized vectors, only uniform numeric vectors.
1023 (alloc_uvec): Do length check here...
1024 (make_uvec): ...but not here.
1025 (coerce_to_uvec): Use new generalized vector functions to handle
1026 all kinds of vectors in one go.
1027
1028 * tags.h (scm_tc7_bvect): Renamed to scm_tc7_unused7, renaming the
1029 remaining scm_tc7_unused tags to get a neatly ordered list.
1030
1031 * eq.c, evalext.c, gc-card.c, gc-mark.c, objects.c, print.c: Do no
1032 longer handle scm_tc7_bvect bitvectors.
1033
1034 * ramap.c: Use the new generalized vector functions to handle all
1035 vector like things.
1036
1037 * vectors.h, vectors.c (scm_is_vector, scm_c_vector_length,
1038 scm_c_vector_ref, scm_c_vector_set_x, scm_generalized_vector_p,
1039 scm_generalized_vector_length, scm_generalized_vector_ref,
1040 scm_generalized_vector_set_x, scm_generalized_vector_to_list,
1041 scm_is_generalized_vector, scm_c_generalized_vector_length,
1042 scm_c_generalized_vector_ref, scm_c_generalized_vector_set_x):
1043 New.
1044
1045 * unif.h, unif.c (scm_bitvector_p, scm_bitvector,
1046 scm_make_bitvector, scm_bitvector_length, scm_bitvector_ref,
1047 scm_bitvector_set_x, scm_list_to_bitvector, scm_bitvector_to_list,
1048 scm_bitvector_fill_x, scm_is_bitvector, scm_c_make_bitvector,
1049 scm_c_bitvector_length, scm_c_bitvector_ref,
1050 scm_c_bitvector_set_x, scm_bitvector_elements,
1051 scm_bitvector_release, scm_frame_bitvector_release,
1052 scm_tc16_bitvector, bitvector_free, bitvector_print,
1053 bitvector_equalp, count_ones, find_first_one): New.
1054 (scm_bit_count, scm_bit_position, scm_bit_set_star_x,
1055 scm_bit_count_star, scm_bit_invert_x, scm_istr2bve): Rewritten
1056 using the new C API for bitvectors and maybe count_ones or
1057 find_first_one, as appropriate.
1058 (SCM_I_MAX_LENGTH, SCM_BITVECTOR_P, SCM_BITVECTOR_BASE,
1059 SCM_SET_BITVECTOR_BASE, SCM_BITVECTOR_MAX_LENGTH,
1060 SCM_BITVECTOR_LENGTH, SCM_MAKE_BITVECTOR_TAG,
1061 SCM_SET_BITVECTOR_LENGTH): Removed. Replaced all uses with the
1062 new functions from above.
1063 (scm_i_proc_make_vector, scm_i_proc_make_string,
1064 scm_i_proc_make_bitvector): Made non-static for use in
1065 scm_i_generalized_vector_creator.
1066 (scm_make_u1vector): Removed, replaced by scm_make_bitvector.
1067 (scm_make_uve): Validate that the created object is a generalized
1068 vector.
1069 (scm_i_legacy_tag): Removed.
1070 (scm_i_print_array): Do it here.
1071 (scm_raprin1): Only print enclosed arrays.
1072
1073 * Makefile.am (DOT_DOC_FILES): Added srfi-4.doc.
1074
c24d026b
MV
10752004-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1076
1f2328fe
MV
1077 * srfi-4.c (make_uvec): Use SCM_I_SIZE_MAX instead of SIZE_MAX for
1078 added portability.
1079
1080 * chars.c (scm_charnames, scm_charnums): Added "sp" as an alias
1081 for "space". Thanks to Bruce Korb!
1082
c24d026b
MV
1083 * rw.c (scm_read_string_x_partial): Bugfix, apply offset to dest
1084 only after dest has been set. Thanks to Hyper Division!
1085
1086 * gh_data.c (gh_uniform_vector_length): Use
1087 scm_uniform_vector_length instead of SCM_UVECTOR_LENGTH.
1088
d4ea47c8
MV
10892004-11-03 Marius Vollmer <mvo@zagadka.de>
1090
1091 * unif.h (SCM_UVECTOR_BASE, SCM_SET_UVECTOR_BASE,
1092 SCM_UVECTOR_MAXLENGTH, SCM_UVECTOR_LENGTH, SCM_MAKE_UVECTOR_TAG,
1093 SCM_SET_UVECTOR_LENGTH): Removed.
1094
236288e2
MV
10952004-11-02 Marius Vollmer <mvo@zagadka.de>
1096
1097