Use (test-suite lib) module.
[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 1104.
CommitLineData
2aaf5726
MV
12005-01-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2
3 * srfi-4.h, srfi-4.c (scm_c_uniform_vector_element_size,
4 scm_c_uniform_vector_size): Removed.
5 (scm_array_handle_uniform_element_size): New.
6
7
8 * unif.h (scm_array_handle_ref, scm_array_handle_set): Changed
9 type of POS parameter to be signed, positions can be negative.
10 (scm_array_handle_release): New, changed all uses of
11 scm_t_array_handle to properly call it.
12 (scm_vector_get_handle, scm_generalized_vector_get_handle):
13 Renamed former to latter, changed all uses.
14
34ae52fc
MV
152005-01-05 Marius Vollmer <mvo@zagadka.de>
16
17 Updated bitvector routines to also use scm_t_array_handles.
18
19 * unif.h (scm_bitvector_elements,
20 scm_bitvector_writable_elements): Use a scm_t_array_handle and
21 deliver offset, length and increment to caller. Changed all uses.
22 (scm_bitvector_release_elements,
23 scm_frame_bitvector_release_elements,
24 scm_bitvector_release_writable_elements,
25 scm_frame_bitvector_release_writable_elements): Removed.
26 (scm_array_handle_bit_elements,
27 scm_array_handle_bit_writable_elements,
28 scm_array_handle_bit_elements_offset): New.
29 (scm_make_typed_array): The special value for non-initialized
30 arrays is now SCM_UNSPECIFIED. The old special value SCM_BOOL_F
31 was a valid value to fill bitvectors with, so it can't really be
32 specialed out.
33
c4cb7628
KR
342005-01-04 Kevin Ryde <user42@zip.com.au>
35
36 * stime.c (scm_strftime): Free t.tm_zone produced by bdtime2c.
37 Reported by Bill Schottstaedt.
38
0356881d
MV
392005-01-02 Marius Vollmer <mvo@zagadka.de>
40
41 * sort.c (quicksort): Added INC parameter for non-contigous
42 vectors.
43 (quicksort1): New, for contigous vectors. Both functions are
44 generated from the same code by including "quicksort.i.c".
45 (scm_restricted_vector_sort_x): Call one of quicksort and
46 quicksort1, depending on increment of vector.
47 (scm_sort): Simply call scm_sort_x on a copy of the list or
48 vector.
49 (scm_merge_vector_x, scm_merge_vector_step): Changed indices to
50 size_t, added inc parameter.
51 (scm_stable_sort_x): Allocate temporary storage as Scheme vector
52 so that it doesn't leak.
53 (scm_stable_sort): Simply call scm_stable_sort_x on a copy of the
54 list or vector.
55
56 * ramap.c (scm_array_map_x): Do not try to convert fill value
57 before filling, any necessary conversion is done while storing.
58
59 * gc-card.c (scm_i_sweep_card): Call scm_i_vector_free instead of
60 doing it inline.
61
62 * hashtab.c, hashtab.h (SCM_HASHTABLE_BUCKETS): Removed.
63 (SCM_HASHTABLE_BUCKET, SCM_HASHTABLE_BUCKET_LOC): New. Replaced
64 all uses of SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET.
65
66 * tags.h, weaks.c, vports.c, hashtab.c, convert.c, sort.c,
67 convert.c, convert.h, convert.i.c, deprecated.c, environments.c,
68 eval.c, filesys.c, fluids.c, gc-mark.c, gh.h, gh_data.c, goops.c,
69 hash.c, init.c, libguile_la-arrays.loT, modules.c, net_db.c,
70 objects.c, ports.c, posix.c, print.c, random.c, read.c,
71 regex-posix.c, scmsigs.c, socket.c, stime.c, symbols.c: Use new
72 vector elements API or simple vector API, as appropriate. Removed
73 SCM_HAVE_ARRAYS ifdefery. Replaced all uses of
74 SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET.
75
76 * srfi-4.h, srfi-4.c,
77 srfi-4.i.c (scm_array_handle_uniform_elements,
78 scm_array_handle_uniform_writable_elements,
79 scm_uniform_vector_elements,
80 scm_uniform_vector_writable_elements):
81 (scm_<foo>vector_elements, scm_<foo>vector_writable_elements): Use
82 scm_t_array_handle, deliver length and increment.
83 (scm_array_handle_<foo>_elements,
84 scm_array_handle_<foo>_writable_elements): New.
85
86 * gen-scmconfig.h.in (SCM_I_GSC_HAVE_ARRAYS): Removed.
87 * gen-scmconfig.c: Hard code SCM_HAVE_ARRAYS to "1".
88
89 * unif.h, unif.c (scm_t_array_handle, scm_array_get_handle,
90 scm_array_handle_rank, scm_array_handle_dims, scm_array_handle_ref
91 scm_array_handle_set, scm_array_handle_elements
92 scm_array_handle_writable_elements, scm_vector_get_handle): New.
93 (scm_make_uve, scm_array_prototype, scm_list_to_uniform_array,
94 scm_dimensions_to_uniform_array): Deprecated for real.
95 (scm_array_p, scm_i_array_p): Use latter for SCM_DEFINE since
96 snarfing wont allow a mismatch between C and Scheme arglists.
97 (scm_make_shared_array, scm_enclose_array): Correctly use
98 scm_c_generalized_vector_length instead of
99 scm_uniform_vector_length.
100
101 * validate.h (SCM_VALIDATE_VECTOR,
102 SCM_VALIDATE_VECTOR_OR_DVECTOR): use scm_is_simple_vector instead
103 of SCM_VECTORP.
104
105 * weaks.h, weaks.c: Use new internal weak vector API from
106 vectors.h.
107
108 * Makefile.am (libguile_la_SOURCES, DOT_X_FILES, DOT_DOC_FILES,
109 EXTRA_libguile_la_SOURCES): Changed ramap.c and unif.c from being
110 'extra' to being regular sources.
111 (noinst_HEADERS): Added quicksort.i.c.
112 * quicksort.i.c: New file.
113
114 * vectors.h, vector.c (SCM_VECTORP, SCM_VECTOR_LENGTH, SCM_VELTS,
115 SCM_WRITABLE_VELTS, SCM_VECTOR_REF, SCM_VECTOR_SET): Deprecated
116 and reimplemented. Replaced all uses with scm_vector_elements,
117 scm_vector_writable_elements, or SCM_SIMPLE_VECTOR_*, as
118 appropriate.
119 (scm_is_simple_vector, SCM_SIMPLE_VECTOR_LENGTH,
120 SCM_SIMPLE_VECTOR_REF, SCM_SIMPLE_VECTOR_SET,
121 SCM_SIMPLE_VECTOR_LOC): New.
122 (SCM_VECTOR_BASE, SCM_SET_VECTOR_BASE, SCM_VECTOR_MAX_LENGTH,
123 SCM_MAKE_VECTOR_TAG, SCM_SET_VECTOR_LENGTH,
124 SCM_VELTS_AS_STACKITEMS, SCM_SETVELTS, SCM_GC_WRITABLE_VELTS):
125 Removed.
126 (scm_vector_copy): New.
127 (scm_vector_elements, scm_vector_writable_elements): Use
128 scm_t_array_handle, deliver length and increment. Moved to
129 unif.h. Changed all uses.
130 (scm_vector_release_elements,
131 scm_vector_release_writable_elements,
132 (scm_frame_vector_release_elements,
133 scm_frame_vector_release_writable_elements): Removed.
134 (SCM_I_IS_VECTOR, SCM_I_VECTOR_ELTS, SCM_I_VECTOR_WELTS,
135 SCM_I_VECTOR_LENGTH, scm_i_vector_free): New internal API.
136 (SCM_I_WVECTP SCM_I_WVECT_LENGTH SCM_I_WVECT_VELTS
137 SCM_I_WVECT_GC_WVELTS SCM_I_WVECT_TYPE SCM_I_WVECT_GC_CHAIN
138 SCM_I_SET_WVECT_GC_CHAIN, scm_i_allocate_weak_vector): New, for
139 weak vectors.
140
0336d18b
MV
1412004-12-29 Marius Vollmer <mvo@zagadka.de>
142
143 No longer use creators to specify the type of an array. Creators
144 expose the fact that arrays are wrapped around vectors, but that
145 might change.
146
147 * srfi-4.h (scm_i_proc_make_u8vector, scm_i_proc_make_s8vector,
148 scm_i_proc_make_u16vector, scm_i_proc_make_s16vector,
149 scm_i_proc_make_u32vector, scm_i_proc_make_s32vector,
150 scm_i_proc_make_u64vector, scm_i_proc_make_s64vector,
151 scm_i_proc_make_f32vector, scm_i_proc_make_f64vector,
152 scm_i_proc_make_c32vector, scm_i_proc_make_c64vector,
153 uvec_proc_vars): Removed.
154 (scm_i_generalized_vector_creator): Removed.
155 (scm_i_generalized_vector_type): New.
156
157 * unif.h, unif.c (scm_typed_array_p, scm_make_array,
158 scm_make_typed_array, scm_array_type, scm_list_to_array,
159 scm_list_to_typed_array, scm_is_array, scm_is_typed_array): New.
160 (scm_array_creator): Removed.
161 (scm_array_p): Deprecated second PROT argument.
162 (scm_dimensions_to_uniform_array, scm_list_to_uniform_array):
163 Deprecated, reimplemented in terms of scm_make_typed_array and
164 scm_list_to_typed_array.
165 (scm_i_proc_make_vector, scm_i_proc_make_string,
166 scm_i_proc_make_bitvector): Removed.
167 (type_creator_table, init_type_creator_table, type_to_creator,
168 make_typed_vector): New.
169 (scm_i_convert_old_prototype): Removed.
170 (prototype_to_type): New.
171 (scm_make_uve): Deprecated, reimplemented using make_typed_vector.
172 (scm_array_dimensions): Use scm_list_1 instead of scm_cons for
173 minor added clarity.
174 (scm_make_shared_array, scm_ra2contig): Use make_typed_vector
175 instead of scm_make_uve.
176 (tag_creator_table, scm_i_tag_to_creator): Removed.
177 (tag_to_type): New.
178 (scm_i_read_array): Use scm_list_to_typed_array instead of
179 scm_list_to_uniform_array.
180
277e8472
MV
1812004-12-27 Marius Vollmer <mvo@zagadka.de>
182
32b26202
MV
183 * unif.h, unif.c (scm_bitvector_elements): Made return value "const".
184 (scm_bitvector_writable_elements): New.
185 (scm_bitvector_release, scm_bitvector_release_elements):
186 Renamed former to latter. Added explicit call to
187 scm_remember_upto_here_1.
188 (scm_frame_bitvector_release,
189 scm_frame_bitvector_release_elements): Renamed former to latter.
190 (scm_bitvector_release_writable_elements,
191 scm_bitvector_release_writable_elements): New.
192 Changed all uses as required by the changes above.
193
194 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_uniform_vector_elements,
195 scm_u8vector_elements, etc): Made return value "const".
196 (scm_uniform_vector_writable_elements,
197 scm_u8vector_writable_elements, etc): New.
198 (scm_uniform_vector_release, scm_uniform_vector_release_elements):
199 Renamed former to latter. Added explicit call to
200 scm_remember_upto_here_1.
201 (scm_frame_uniform_vector_release,
202 scm_frame_uniform_vector_release_elements): Renamed former to latter.
203 (scm_uniform_vector_release_writable_elements,
204 scm_frame_uniform_vector_release_writable_elements): New. Takes
205 crown of longest identifier yet.
206 Changed all uses as required by the changes above.
207
277e8472
MV
208 * vectors.h, vectors.c (scm_c_vector_set_x): Make return type
209 void.
210 (scm_is_vector, scm_vector_p, scm_vector_length,
211 scm_c_vector_length, scm_vector_ref, scm_c_vector_ref,
212 scm_vector_set_x, scm_c_vector_set_x, scm_vector_to_list,
213 scm_vector_move_left_x, scm_vector_move_right_x,
214 scm_vector_fill_x): handle one-dimensional arrays.
32b26202
MV
215 (scm_vector_elements, scm_vector_release_elements,
216 scm_vector_frame_release_elements, scm_vector_writable_elements,
217 scm_vector_release_writable_elements,
218 scm_vector_frame_release_writable_elements): New.
219 (scm_list_to_vector, scm_vector_to_list, scm_vector_fill,
220 scm_vector_move_left_x, scm_vector_move_right_x): Use them.
277e8472
MV
221
222 * ramap.c (scm_ramapc, scm_raeql): Use
223 scm_c_generalized_vector_length instead of
224 scm_uniform_vector_length.
225 (scm_ramap, rafe): Use scm_c_vector_ref instead of SCM_VELTS. use
226 scm_c_generalized_vector_ref instead of scm_uniform_vector_ref.
227
49c51610
MV
2282004-12-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
229
230 * continuations.h, continuations.c (scm_t_contregs): New 'offset'
231 member for relocating debug frames.
232 (scm_make_continuation): Set it.
233
234 * stacks.c (read_frame, read_frames, scm_make_stack,
235 scm_last_stack_frame, scm_stack_id): Use the new 'offset' member
236 of continuations instead of calculating the offset ourselves.
237 Relocate 'vect' member of scm_t_debug_frame.
238
3b2ee265
KR
2392004-12-16 Kevin Ryde <user42@zip.com.au>
240
241 * ramap.c (scm_array_map_x): Check for at least one source argument.
242
e120686a
KR
2432004-12-14 Kevin Ryde <user42@zip.com.au>
244
245 * srfi-13.c (string-any, string-every): Use a scheme wrapper around
246 the C code so for the final call to the predicate procedure is a tail
247 call, per SRFI-13 spec.
248
680b5237
KR
2492004-12-10 Kevin Ryde <user42@zip.com.au>
250
251 * eq.c (scm_eq_p, scm_eqv_p, scm_equal_p): Update docstrings from
252 recent revision to the reference manual.
253
254 * numbers.c (scm_modulo): Amend fixme comment about negative divisor
255 with "%", C99 says it's well-defined.
256
257 * socket.c (scm_from_ipv6): Just use mpz_import. Don't bother trying
258 to fit scm_from_ulong_long, since that uses mpz_import anyway. Don't
259 bother trying to fit scm_from_ulong, not really worth the trouble if
260 addresses are more than 4 bytes usually.
261
446d320c
KR
2622004-11-30 Kevin Ryde <user42@zip.com.au>
263
264 * gc_os_dep.c (NetBSD): Test __m68k__ and __arm__ as well as m68k and
265 arm32. Reported by Greg Troxel.
266
f2654760
MV
2672004-11-14 mvo <mvo@zagadka.de>
268
269 * unif.c, unif.h (scm_i_cvref): Made non-static for ramap.c.
270
271 * Makefile.am (INCLUDES): It is "@LTDLINCL@", not "@LTDLINC@".
272
d550e35f
MV
2732004-11-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
274
275 Enclosed arrays are now their own smob. This has been done to
276 make the code more explicit about them and to prepare for the time
f2654760
MV
277 when generalized vectors include arbitrary one-dimensional
278 arrays. (Uptonow, enclosed arrays have been recognized by their
279 use of an array as their storage 'vector'. When all generalized
280 vectors are allowed as storage, including one-dimensional arrays,
281 this will no longer work.)
d550e35f
MV
282
283 * unif.h, unif.c: (scm_tc16_enclosed_array, SCM_ENCLOSED_ARRAYP):
284 New.
285 (exactly_one_third, singp): Removed.
286 (scm_array_p, scm_array_dimensions, scm_shared_array_root,
287 scm_shared_array_offset, scm_shared_array_increments): Handle
288 enclosed arrays explicitely.
289 (scm_array_rank): Likewise. Also, do not return zero for
290 non-arrays, signal an error instead since arrays with rank zero do
291 exist.
292 (scm_i_make_ra): New, for specifying the tag of the new array.
293 (scm_make_enclosed_array): Use it.
294 (scm_make_ra): Reimplemented in terms of scm_i_make_ra.
295 (scm_make_shared_array): Use scm_c_generalized_vector_length
296 instead of scm_uniform_vector_length.
297 (scm_array_in_bounds_p): Rewritten to be much cleaner.
298 (scm_i_cvref): New, doing the job of scm_cvref.
299 (scm_cvref): Use scm_i_cvref.
300 (scm_array_ref): Do not accept non-arrays when no indices are
301 given. Use scm_i_cvref to do the actual access.
302 ("uniform-array-set1"): Do not register.
303 (scm_array_set_x, scm_uniform_array_read_x,
304 scm_uniform_array_write): Handle enclosed arrays explicitly.
305 (ra2l): Use scm_i_cvref instead of scm_uniform_vector_ref to also
306 handle enclosed arrays.
307 (scm_array_to_list): Handle enclosed arrays explicitly.
308 (rapr1): Removed.
309 (scm_i_print_array_dimension): Use scm_i_cvref to also handle
310 enclosed arrays.
311 (scm_i_print_enclosed_array): New.
312 (tag_proto_table, tag_creator_table): Renamed former to latter.
313 Added "a" and "b" for strings and bitvectors, resp.
314 (scm_i_tag_to_prototype, scm_i_tag_to_creator): Renamed former to
315 latter. Tag "a" is in the table now, no need to handle it as a
316 legacy tag.
317 (scm_raprin1): Just call scm_iprin1.
318 (scm_array_creator, scm_array_prototype): Handle enclosed arrays
319 explicitly.
320 (scm_init_unif): Initialize scm_tc16_enclosed_array smob.
321 Use scm_i_print_array as printer for scm_tc16_array.
322
2ed34885
MV
3232004-11-10 Marius Vollmer <mvo@zagadka.de>
324
823086c1
MV
325 * ramap.c (cind): Changed second arg to be pointer to long instead
326 of uniform vector.
327 (scm_ramapc): Allocate index vector with scm_malloc and not as
d550e35f 328 uniform vector. Wrap it in a frame so that it gets properly freed.
823086c1
MV
329 (scm_array_index_map_x): Likewise.
330
331 * unif.c: Changed all uses of scm_array_prototype to
332 scm_array_creator. (scm_i_get_old_prototype): Signal error when no
333 prototype is known.
334 (scm_uniform_array_read_x, scm_uniform_array_write): Reimplemented
335 in terms of scm_uniform_vector_read_x and
336 scm_uniform_vector_write, respectively. Strings and
337 bitvector support has been dropped.
338
2ed34885
MV
339 * srfi-4.h, srfi-4.c: Do not include <libguile.h>, include the
340 needed files directly. Include config.h, <unistd.h> and <io.h>
341 when available.
342 (scm_uniform_vector_read_x, scm_uniform_vector_write): New.
343
2c72f253
MV
3442004-11-09 Marius Vollmer <mvo@zagadka.de>
345
346 * gh_data.c (gh_uniform_vector_length): Properly use
347 scm_c_uniform_vector_length instead of scm_uniform_vector_length.
348
3cc0a296
MV
3492004-11-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
350
351 * srfi-4.h (scm_c_uniform_vector_ref, scm_c_uniform_vector_set_x):
352 New.
353 (scm_i_uniform_vector_creator): Removed.
354 (scm_i_generalized_vector_creator): New.
355 (scm_uniform_vector_length, scm_uniform_element_size): Do not
356 handle generalized vectors, only uniform numeric vectors.
357 (alloc_uvec): Do length check here...
358 (make_uvec): ...but not here.
359 (coerce_to_uvec): Use new generalized vector functions to handle
360 all kinds of vectors in one go.
361
362 * tags.h (scm_tc7_bvect): Renamed to scm_tc7_unused7, renaming the
363 remaining scm_tc7_unused tags to get a neatly ordered list.
364
365 * eq.c, evalext.c, gc-card.c, gc-mark.c, objects.c, print.c: Do no
366 longer handle scm_tc7_bvect bitvectors.
367
368 * ramap.c: Use the new generalized vector functions to handle all
369 vector like things.
370
371 * vectors.h, vectors.c (scm_is_vector, scm_c_vector_length,
372 scm_c_vector_ref, scm_c_vector_set_x, scm_generalized_vector_p,
373 scm_generalized_vector_length, scm_generalized_vector_ref,
374 scm_generalized_vector_set_x, scm_generalized_vector_to_list,
375 scm_is_generalized_vector, scm_c_generalized_vector_length,
376 scm_c_generalized_vector_ref, scm_c_generalized_vector_set_x):
377 New.
378
379 * unif.h, unif.c (scm_bitvector_p, scm_bitvector,
380 scm_make_bitvector, scm_bitvector_length, scm_bitvector_ref,
381 scm_bitvector_set_x, scm_list_to_bitvector, scm_bitvector_to_list,
382 scm_bitvector_fill_x, scm_is_bitvector, scm_c_make_bitvector,
383 scm_c_bitvector_length, scm_c_bitvector_ref,
384 scm_c_bitvector_set_x, scm_bitvector_elements,
385 scm_bitvector_release, scm_frame_bitvector_release,
386 scm_tc16_bitvector, bitvector_free, bitvector_print,
387 bitvector_equalp, count_ones, find_first_one): New.
388 (scm_bit_count, scm_bit_position, scm_bit_set_star_x,
389 scm_bit_count_star, scm_bit_invert_x, scm_istr2bve): Rewritten
390 using the new C API for bitvectors and maybe count_ones or
391 find_first_one, as appropriate.
392 (SCM_I_MAX_LENGTH, SCM_BITVECTOR_P, SCM_BITVECTOR_BASE,
393 SCM_SET_BITVECTOR_BASE, SCM_BITVECTOR_MAX_LENGTH,
394 SCM_BITVECTOR_LENGTH, SCM_MAKE_BITVECTOR_TAG,
395 SCM_SET_BITVECTOR_LENGTH): Removed. Replaced all uses with the
396 new functions from above.
397 (scm_i_proc_make_vector, scm_i_proc_make_string,
398 scm_i_proc_make_bitvector): Made non-static for use in
399 scm_i_generalized_vector_creator.
400 (scm_make_u1vector): Removed, replaced by scm_make_bitvector.
401 (scm_make_uve): Validate that the created object is a generalized
402 vector.
403 (scm_i_legacy_tag): Removed.
404 (scm_i_print_array): Do it here.
405 (scm_raprin1): Only print enclosed arrays.
406
407 * Makefile.am (DOT_DOC_FILES): Added srfi-4.doc.
408
c24d026b
MV
4092004-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
410
1f2328fe
MV
411 * srfi-4.c (make_uvec): Use SCM_I_SIZE_MAX instead of SIZE_MAX for
412 added portability.
413
414 * chars.c (scm_charnames, scm_charnums): Added "sp" as an alias
415 for "space". Thanks to Bruce Korb!
416
c24d026b
MV
417 * rw.c (scm_read_string_x_partial): Bugfix, apply offset to dest
418 only after dest has been set. Thanks to Hyper Division!
419
420 * gh_data.c (gh_uniform_vector_length): Use
421 scm_uniform_vector_length instead of SCM_UVECTOR_LENGTH.
422
d4ea47c8
MV
4232004-11-03 Marius Vollmer <mvo@zagadka.de>
424
425 * unif.h (SCM_UVECTOR_BASE, SCM_SET_UVECTOR_BASE,
426 SCM_UVECTOR_MAXLENGTH, SCM_UVECTOR_LENGTH, SCM_MAKE_UVECTOR_TAG,
427 SCM_SET_UVECTOR_LENGTH): Removed.
428
236288e2
MV
4292004-11-02 Marius Vollmer <mvo@zagadka.de>
430
431