(coerce_to_uvec, scm_c_uniform_vector_ref,
[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 1389.
CommitLineData
4475d3fe
KR
12005-01-10 Kevin Ryde <user42@zip.com.au>
2
3 * posix.c (scm_mkstemp): Update docstring from manual.
4
8c8491f5
MV
52005-01-09 Marius Vollmer <mvo@zagadka.de>
6
b89ecc6f
MV
7 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_i_uniform_vector_ref_proc,
8 scm_i_uniform_vector_set_proc): New.
9 (u8ref, u8set, s8ref, s8set, etc): New.
10 (uvec_reffers, uvec_setters): New.
11 (uvec_to_list): Use generic scm_array_handle_ref instead of
12 uvec_fast_ref since scm_array_handle_ref should be faster now.
13 More changes like this are upcoming.
14
15 * unif.h, unif.c, inline.h (scm_i_t_array_ref, scm_i_t_array_set):
16 New.
17 (scm_t_array_handle): Added ref, set, elements and
18 writable_elements for fast inline operation of
19 scm_array_handle_ref and scm_array_handle_set.
20 (scm_array_handle_ref, scm_array_handle_set): Moved to inline.h
21 and replaced with inline code that simply calls the ref/set
22 members of the handle.
23 (enclosed_ref, vector_ref, string_ref, bitvector_ref, memoize_ref,
24 enclosed_set, vector_set, string_set, bitvector_set, memoize_set):
25 New.
26 (scm_array_handle_get): Initialize ref/set fields to memoize_ref
27 and memoize_set.
28 (scm_bitvector_fill_x, scm_bitvector_to_list, scm_bit_count,
29 scm_bit_position, scm_bit_set_star_x, scm_bit_count_star,
30 scm_bit_invert_x): Correctly multiply index with increment in the
31 general case.
32
8c8491f5
MV
33 * unif.c (scm_array_handle_set): Correctly execute only one
34 alternative. D'Oh!
35 (scm_list_to_typed_array, l2ra): Use scm_t_array_handle to fill
36 the array; this covers all cases with much simpler code.
37
38 * srfi-4.c (scm_uniform_element_size): Deprecated implementation
39 as well.
40
cd5d55c7
MV
412005-01-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
42
43 * srfi-4.c (uvec_type): New.
44 (uvec_to_list, uvec_ref, uvec_set_x, scm_c_uniform_vector_ref,
45 scm_c_uniform_vector_x): Use it to get concrete type.
46
47 * unif.h (scm_t_array_dim): Changed type of members to ssize_t, to
48 fit the docs.
49
50 * unif.c (ra2l): Handle zero rank arrays.
51 (scm_i_print_array): Print zero rank arrays specially.
52 (tag_to_type): Return #t for an empty tag, not the empty symbol.
53 (scm_i_read_array): Allow zero rank arrays.
54
a4aad74e
MV
552005-01-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
56
57 * hashtab.h, hashtab.c (SCM_HASHTAB_BUCKET_LOC): Removed.
58 (scan_weak_hashtables): Rewrote its use with SCM_HASHTAB_BUCKET
59 and SCM_SET_HASHTAB_BUCKET.
60
61 * print.h, print.c (scm_print_state, SCM_PRINT_STATE_LAYOUT):
62 Removed ref_stack field.
63 (PSTATE_STACK_REF, PSTATE_STACK_SET): New, for accessing the stack
64 of a print state. Use them everywhere instead of ref_stack.
65
3a40d5e1
MV
66 * srfi-4.h (scm_uniform_element_size): Deprecated for real.
67
a4aad74e
MV
68 * srfi-4.c: Include deprecation.h.
69
70 * vectors.h, vectors.c, unif.h, unif.c, deprecated.h,
71 deprecated.c, eq.c
72 (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR): Removed.
73 (scm_vector_elements, scm_vector_writable_elements,
74 scm_generalized_vector_get_handle): Moved to vectors.[hc] from
75 unif.[hc].
76 (SCM_SIMPLE_VECTOR_LOC): Removed.
77 (SCM_VECTOR_MAX_LENGTH, SCM_VECTOR_LENGTH, SCM_VELTS,
78 SCM_WRITABLE_VELTS, SCM_VECTOR_REF, SCM_VECTOR_SET,
79 scm_vector_equal_p): Moved from vectors.[hc] to deprecated.[hc].
80 (scm_vector_equal_p, scm_i_vector_equal_p): Renamed former to
81 latter. Changed use in eq.c.
82
f01fe441
MV
832005-01-07 Marius Vollmer <mvo@zagadka.de>
84
85 Make the uniform vector routines also deal with one dimensional
86 arrays.
87
88 * srfi-4.c (SCM_IS_UVEC): New, use it instead of
89 SCM_SMOB_PREDICATE in this file.
90 (is_uvec): Also recognize one-dimensional uniform numeric arrays
91 of the right type.
92 (scm_is_uniform_vector): Likewise.
93 (uvec_fast_ref): Made BASE param const.
94 (uvec_writable_elements, uvec_elements): New.
95 (uvec_to_list, uvec_ref, uvec_set_x, uvec_length,
96 scm_c_uniform_vector_length, scm_c_uniform_vector_ref,
97 scm_c_uniform_set_x): Use them to also deal with one-dimensional
98 arrays.
99 (scm_uniform_vector_ref, scm_uniform_vector_set_x): Deprecate old
100 argument convention.
101 (scm_uniform_vector_to_list): Let uvec_to_list do all the
102 checking.
103 (scm_uniform_vector_length): Use uvec_length.
104
2aaf5726
MV
1052005-01-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
106
107 * srfi-4.h, srfi-4.c (scm_c_uniform_vector_element_size,
108 scm_c_uniform_vector_size): Removed.
109 (scm_array_handle_uniform_element_size): New.
110
111
112 * unif.h (scm_array_handle_ref, scm_array_handle_set): Changed
113 type of POS parameter to be signed, positions can be negative.
114 (scm_array_handle_release): New, changed all uses of
115 scm_t_array_handle to properly call it.
116 (scm_vector_get_handle, scm_generalized_vector_get_handle):
117 Renamed former to latter, changed all uses.
118
34ae52fc
MV
1192005-01-05 Marius Vollmer <mvo@zagadka.de>
120
121 Updated bitvector routines to also use scm_t_array_handles.
122
123 * unif.h (scm_bitvector_elements,
124 scm_bitvector_writable_elements): Use a scm_t_array_handle and
125 deliver offset, length and increment to caller. Changed all uses.
126 (scm_bitvector_release_elements,
127 scm_frame_bitvector_release_elements,
128 scm_bitvector_release_writable_elements,
129 scm_frame_bitvector_release_writable_elements): Removed.
130 (scm_array_handle_bit_elements,
131 scm_array_handle_bit_writable_elements,
132 scm_array_handle_bit_elements_offset): New.
133 (scm_make_typed_array): The special value for non-initialized
134 arrays is now SCM_UNSPECIFIED. The old special value SCM_BOOL_F
135 was a valid value to fill bitvectors with, so it can't really be
136 specialed out.
137
c4cb7628
KR
1382005-01-04 Kevin Ryde <user42@zip.com.au>
139
140 * stime.c (scm_strftime): Free t.tm_zone produced by bdtime2c.
141 Reported by Bill Schottstaedt.
142
0356881d
MV
1432005-01-02 Marius Vollmer <mvo@zagadka.de>
144
145 * sort.c (quicksort): Added INC parameter for non-contigous
146 vectors.
147 (quicksort1): New, for contigous vectors. Both functions are
148 generated from the same code by including "quicksort.i.c".
149 (scm_restricted_vector_sort_x): Call one of quicksort and
150 quicksort1, depending on increment of vector.
151 (scm_sort): Simply call scm_sort_x on a copy of the list or
152 vector.
153 (scm_merge_vector_x, scm_merge_vector_step): Changed indices to
154 size_t, added inc parameter.
155 (scm_stable_sort_x): Allocate temporary storage as Scheme vector
156 so that it doesn't leak.
157 (scm_stable_sort): Simply call scm_stable_sort_x on a copy of the
158 list or vector.
159
160 * ramap.c (scm_array_map_x): Do not try to convert fill value
161 before filling, any necessary conversion is done while storing.
162
163 * gc-card.c (scm_i_sweep_card): Call scm_i_vector_free instead of
164 doing it inline.
165
166 * hashtab.c, hashtab.h (SCM_HASHTABLE_BUCKETS): Removed.
167 (SCM_HASHTABLE_BUCKET, SCM_HASHTABLE_BUCKET_LOC): New. Replaced
168 all uses of SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET.
169
170 * tags.h, weaks.c, vports.c, hashtab.c, convert.c, sort.c,
171 convert.c, convert.h, convert.i.c, deprecated.c, environments.c,
172 eval.c, filesys.c, fluids.c, gc-mark.c, gh.h, gh_data.c, goops.c,
173 hash.c, init.c, libguile_la-arrays.loT, modules.c, net_db.c,
174 objects.c, ports.c, posix.c, print.c, random.c, read.c,
175 regex-posix.c, scmsigs.c, socket.c, stime.c, symbols.c: Use new
176 vector elements API or simple vector API, as appropriate. Removed
177 SCM_HAVE_ARRAYS ifdefery. Replaced all uses of
178 SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET.
179
180 * srfi-4.h, srfi-4.c,
181 srfi-4.i.c (scm_array_handle_uniform_elements,
182 scm_array_handle_uniform_writable_elements,
183 scm_uniform_vector_elements,
184 scm_uniform_vector_writable_elements):
185 (scm_<foo>vector_elements, scm_<foo>vector_writable_elements): Use
186 scm_t_array_handle, deliver length and increment.
187 (scm_array_handle_<foo>_elements,
188 scm_array_handle_<foo>_writable_elements): New.
189
190 * gen-scmconfig.h.in (SCM_I_GSC_HAVE_ARRAYS): Removed.
191 * gen-scmconfig.c: Hard code SCM_HAVE_ARRAYS to "1".
192
193 * unif.h, unif.c (scm_t_array_handle, scm_array_get_handle,
194 scm_array_handle_rank, scm_array_handle_dims, scm_array_handle_ref
195 scm_array_handle_set, scm_array_handle_elements
196 scm_array_handle_writable_elements, scm_vector_get_handle): New.
197 (scm_make_uve, scm_array_prototype, scm_list_to_uniform_array,
198 scm_dimensions_to_uniform_array): Deprecated for real.
199 (scm_array_p, scm_i_array_p): Use latter for SCM_DEFINE since
200 snarfing wont allow a mismatch between C and Scheme arglists.
201 (scm_make_shared_array, scm_enclose_array): Correctly use
202 scm_c_generalized_vector_length instead of
203 scm_uniform_vector_length.
204
205 * validate.h (SCM_VALIDATE_VECTOR,
206 SCM_VALIDATE_VECTOR_OR_DVECTOR): use scm_is_simple_vector instead
207 of SCM_VECTORP.
208
209 * weaks.h, weaks.c: Use new internal weak vector API from
210 vectors.h.
211
212 * Makefile.am (libguile_la_SOURCES, DOT_X_FILES, DOT_DOC_FILES,
213 EXTRA_libguile_la_SOURCES): Changed ramap.c and unif.c from being
214 'extra' to being regular sources.
215 (noinst_HEADERS): Added quicksort.i.c.
216 * quicksort.i.c: New file.
217
218 * vectors.h, vector.c (SCM_VECTORP, SCM_VECTOR_LENGTH, SCM_VELTS,
219 SCM_WRITABLE_VELTS, SCM_VECTOR_REF, SCM_VECTOR_SET): Deprecated
220 and reimplemented. Replaced all uses with scm_vector_elements,
221 scm_vector_writable_elements, or SCM_SIMPLE_VECTOR_*, as
222 appropriate.
223 (scm_is_simple_vector, SCM_SIMPLE_VECTOR_LENGTH,
224 SCM_SIMPLE_VECTOR_REF, SCM_SIMPLE_VECTOR_SET,
225 SCM_SIMPLE_VECTOR_LOC): New.
226 (SCM_VECTOR_BASE, SCM_SET_VECTOR_BASE, SCM_VECTOR_MAX_LENGTH,
227 SCM_MAKE_VECTOR_TAG, SCM_SET_VECTOR_LENGTH,
228 SCM_VELTS_AS_STACKITEMS, SCM_SETVELTS, SCM_GC_WRITABLE_VELTS):
229 Removed.
230 (scm_vector_copy): New.
231 (scm_vector_elements, scm_vector_writable_elements): Use
232 scm_t_array_handle, deliver length and increment. Moved to
233 unif.h. Changed all uses.
234 (scm_vector_release_elements,
235 scm_vector_release_writable_elements,
236 (scm_frame_vector_release_elements,
237 scm_frame_vector_release_writable_elements): Removed.
238 (SCM_I_IS_VECTOR, SCM_I_VECTOR_ELTS, SCM_I_VECTOR_WELTS,
239 SCM_I_VECTOR_LENGTH, scm_i_vector_free): New internal API.
240 (SCM_I_WVECTP SCM_I_WVECT_LENGTH SCM_I_WVECT_VELTS
241 SCM_I_WVECT_GC_WVELTS SCM_I_WVECT_TYPE SCM_I_WVECT_GC_CHAIN
242 SCM_I_SET_WVECT_GC_CHAIN, scm_i_allocate_weak_vector): New, for
243 weak vectors.
244
0336d18b
MV
2452004-12-29 Marius Vollmer <mvo@zagadka.de>
246
247 No longer use creators to specify the type of an array. Creators
248 expose the fact that arrays are wrapped around vectors, but that
249 might change.
250
251 * srfi-4.h (scm_i_proc_make_u8vector, scm_i_proc_make_s8vector,
252 scm_i_proc_make_u16vector, scm_i_proc_make_s16vector,
253 scm_i_proc_make_u32vector, scm_i_proc_make_s32vector,
254 scm_i_proc_make_u64vector, scm_i_proc_make_s64vector,
255 scm_i_proc_make_f32vector, scm_i_proc_make_f64vector,
256 scm_i_proc_make_c32vector, scm_i_proc_make_c64vector,
257 uvec_proc_vars): Removed.
258 (scm_i_generalized_vector_creator): Removed.
259 (scm_i_generalized_vector_type): New.
260
261 * unif.h, unif.c (scm_typed_array_p, scm_make_array,
262 scm_make_typed_array, scm_array_type, scm_list_to_array,
263 scm_list_to_typed_array, scm_is_array, scm_is_typed_array): New.
264 (scm_array_creator): Removed.
265 (scm_array_p): Deprecated second PROT argument.
266 (scm_dimensions_to_uniform_array, scm_list_to_uniform_array):
267 Deprecated, reimplemented in terms of scm_make_typed_array and
268 scm_list_to_typed_array.
269 (scm_i_proc_make_vector, scm_i_proc_make_string,
270 scm_i_proc_make_bitvector): Removed.
271 (type_creator_table, init_type_creator_table, type_to_creator,
272 make_typed_vector): New.
273 (scm_i_convert_old_prototype): Removed.
274 (prototype_to_type): New.
275 (scm_make_uve): Deprecated, reimplemented using make_typed_vector.
276 (scm_array_dimensions): Use scm_list_1 instead of scm_cons for
277 minor added clarity.
278 (scm_make_shared_array, scm_ra2contig): Use make_typed_vector
279 instead of scm_make_uve.
280 (tag_creator_table, scm_i_tag_to_creator): Removed.
281 (tag_to_type): New.
282 (scm_i_read_array): Use scm_list_to_typed_array instead of
283 scm_list_to_uniform_array.
284
277e8472
MV
2852004-12-27 Marius Vollmer <mvo@zagadka.de>
286
32b26202
MV
287 * unif.h, unif.c (scm_bitvector_elements): Made return value "const".
288 (scm_bitvector_writable_elements): New.
289 (scm_bitvector_release, scm_bitvector_release_elements):
290 Renamed former to latter. Added explicit call to
291 scm_remember_upto_here_1.
292 (scm_frame_bitvector_release,
293 scm_frame_bitvector_release_elements): Renamed former to latter.
294 (scm_bitvector_release_writable_elements,
295 scm_bitvector_release_writable_elements): New.
296 Changed all uses as required by the changes above.
297
298 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_uniform_vector_elements,
299 scm_u8vector_elements, etc): Made return value "const".
300 (scm_uniform_vector_writable_elements,
301 scm_u8vector_writable_elements, etc): New.
302 (scm_uniform_vector_release, scm_uniform_vector_release_elements):
303 Renamed former to latter. Added explicit call to
304 scm_remember_upto_here_1.
305 (scm_frame_uniform_vector_release,
306 scm_frame_uniform_vector_release_elements): Renamed former to latter.
307 (scm_uniform_vector_release_writable_elements,
308 scm_frame_uniform_vector_release_writable_elements): New. Takes
309 crown of longest identifier yet.
310 Changed all uses as required by the changes above.
311
277e8472
MV
312 * vectors.h, vectors.c (scm_c_vector_set_x): Make return type
313 void.
314 (scm_is_vector, scm_vector_p, scm_vector_length,
315 scm_c_vector_length, scm_vector_ref, scm_c_vector_ref,
316 scm_vector_set_x, scm_c_vector_set_x, scm_vector_to_list,
317 scm_vector_move_left_x, scm_vector_move_right_x,
318 scm_vector_fill_x): handle one-dimensional arrays.
32b26202
MV
319 (scm_vector_elements, scm_vector_release_elements,
320 scm_vector_frame_release_elements, scm_vector_writable_elements,
321 scm_vector_release_writable_elements,
322 scm_vector_frame_release_writable_elements): New.
323 (scm_list_to_vector, scm_vector_to_list, scm_vector_fill,
324 scm_vector_move_left_x, scm_vector_move_right_x): Use them.
277e8472
MV
325
326 * ramap.c (scm_ramapc, scm_raeql): Use
327 scm_c_generalized_vector_length instead of
328 scm_uniform_vector_length.
329 (scm_ramap, rafe): Use scm_c_vector_ref instead of SCM_VELTS. use
330 scm_c_generalized_vector_ref instead of scm_uniform_vector_ref.
331
49c51610
MV
3322004-12-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
333
334 * continuations.h, continuations.c (scm_t_contregs): New 'offset'
335 member for relocating debug frames.
336 (scm_make_continuation): Set it.
337
338 * stacks.c (read_frame, read_frames, scm_make_stack,
339 scm_last_stack_frame, scm_stack_id): Use the new 'offset' member
340 of continuations instead of calculating the offset ourselves.
341 Relocate 'vect' member of scm_t_debug_frame.
342
3b2ee265
KR
3432004-12-16 Kevin Ryde <user42@zip.com.au>
344
345 * ramap.c (scm_array_map_x): Check for at least one source argument.
346
e120686a
KR
3472004-12-14 Kevin Ryde <user42@zip.com.au>
348
349 * srfi-13.c (string-any, string-every): Use a scheme wrapper around
350 the C code so for the final call to the predicate procedure is a tail
351 call, per SRFI-13 spec.
352
680b5237
KR
3532004-12-10 Kevin Ryde <user42@zip.com.au>
354
355 * eq.c (scm_eq_p, scm_eqv_p, scm_equal_p): Update docstrings from
356 recent revision to the reference manual.
357
358 * numbers.c (scm_modulo): Amend fixme comment about negative divisor
359 with "%", C99 says it's well-defined.
360
361 * socket.c (scm_from_ipv6): Just use mpz_import. Don't bother trying
362 to fit scm_from_ulong_long, since that uses mpz_import anyway. Don't
363 bother trying to fit scm_from_ulong, not really worth the trouble if
364 addresses are more than 4 bytes usually.
365
446d320c
KR
3662004-11-30 Kevin Ryde <user42@zip.com.au>
367
368 * gc_os_dep.c (NetBSD): Test __m68k__ and __arm__ as well as m68k and
369 arm32. Reported by Greg Troxel.
370
f2654760
MV
3712004-11-14 mvo <mvo@zagadka.de>
372
373 * unif.c, unif.h (scm_i_cvref): Made non-static for ramap.c.
374
375 * Makefile.am (INCLUDES): It is "@LTDLINCL@", not "@LTDLINC@".
376
d550e35f
MV
3772004-11-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
378
379 Enclosed arrays are now their own smob. This has been done to
380 make the code more explicit about them and to prepare for the time
f2654760
MV
381 when generalized vectors include arbitrary one-dimensional
382 arrays. (Uptonow, enclosed arrays have been recognized by their
383 use of an array as their storage 'vector'. When all generalized
384 vectors are allowed as storage, including one-dimensional arrays,
385 this will no longer work.)
d550e35f
MV
386
387 * unif.h, unif.c: (scm_tc16_enclosed_array, SCM_ENCLOSED_ARRAYP):
388 New.
389 (exactly_one_third, singp): Removed.
390 (scm_array_p, scm_array_dimensions, scm_shared_array_root,
391 scm_shared_array_offset, scm_shared_array_increments): Handle
392 enclosed arrays explicitely.
393 (scm_array_rank): Likewise. Also, do not return zero for
394 non-arrays, signal an error instead since arrays with rank zero do
395 exist.
396 (scm_i_make_ra): New, for specifying the tag of the new array.
397 (scm_make_enclosed_array): Use it.
398 (scm_make_ra): Reimplemented in terms of scm_i_make_ra.
399 (scm_make_shared_array): Use scm_c_generalized_vector_length
400 instead of scm_uniform_vector_length.
401 (scm_array_in_bounds_p): Rewritten to be much cleaner.
402 (scm_i_cvref): New, doing the job of scm_cvref.
403 (scm_cvref): Use scm_i_cvref.
404 (scm_array_ref): Do not accept non-arrays when no indices are
405 given. Use scm_i_cvref to do the actual access.
406 ("uniform-array-set1"): Do not register.
407 (scm_array_set_x, scm_uniform_array_read_x,
408 scm_uniform_array_write): Handle enclosed arrays explicitly.
409 (ra2l): Use scm_i_cvref instead of scm_uniform_vector_ref to also
410 handle enclosed arrays.
411 (scm_array_to_list): Handle enclosed arrays explicitly.
412 (rapr1): Removed.
413 (scm_i_print_array_dimension): Use scm_i_cvref to also handle
414 enclosed arrays.
415 (scm_i_print_enclosed_array): New.
416 (tag_proto_table, tag_creator_table): Renamed former to latter.
417 Added "a" and "b" for strings and bitvectors, resp.
418 (scm_i_tag_to_prototype, scm_i_tag_to_creator): Renamed former to
419 latter. Tag "a" is in the table now, no need to handle it as a
420 legacy tag.
421 (scm_raprin1): Just call scm_iprin1.
422 (scm_array_creator, scm_array_prototype): Handle enclosed arrays
423 explicitly.
424 (scm_init_unif): Initialize scm_tc16_enclosed_array smob.
425 Use scm_i_print_array as printer for scm_tc16_array.
426
2ed34885
MV
4272004-11-10 Marius Vollmer <mvo@zagadka.de>
428
823086c1
MV
429 * ramap.c (cind): Changed second arg to be pointer to long instead
430 of uniform vector.
431 (scm_ramapc): Allocate index vector with scm_malloc and not as
d550e35f 432 uniform vector. Wrap it in a frame so that it gets properly freed.
823086c1
MV
433 (scm_array_index_map_x): Likewise.
434
435 * unif.c: Changed all uses of scm_array_prototype to
436 scm_array_creator. (scm_i_get_old_prototype): Signal error when no
437 prototype is known.
438 (scm_uniform_array_read_x, scm_uniform_array_write): Reimplemented
439 in terms of scm_uniform_vector_read_x and
440 scm_uniform_vector_write, respectively. Strings and
441 bitvector support has been dropped.
442
2ed34885
MV
443 * srfi-4.h, srfi-4.c: Do not include <libguile.h>, include the
444 needed files directly. Include config.h, <unistd.h> and <io.h>
445 when available.
446 (scm_uniform_vector_read_x, scm_uniform_vector_write): New.
447
2c72f253
MV
4482004-11-09 Marius Vollmer <mvo@zagadka.de>
449
450 * gh_data.c (gh_uniform_vector_length): Properly use
451 scm_c_uniform_vector_length instead of scm_uniform_vector_length.
452
3cc0a296
MV
4532004-11-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
454
455 * srfi-4.h (scm_c_uniform_vector_ref, scm_c_uniform_vector_set_x):
456 New.
457 (scm_i_uniform_vector_creator): Removed.
458 (scm_i_generalized_vector_creator): New.
459 (scm_uniform_vector_length, scm_uniform_element_size): Do not
460 handle generalized vectors, only uniform numeric vectors.
461 (alloc_uvec): Do length check here...
462 (make_uvec): ...but not here.
463 (coerce_to_uvec): Use new generalized vector functions to handle
464 all kinds of vectors in one go.
465
466 * tags.h (scm_tc7_bvect): Renamed to scm_tc7_unused7, renaming the
467 remaining scm_tc7_unused tags to get a neatly ordered list.
468
469 * eq.c, evalext.c, gc-card.c, gc-mark.c, objects.c, print.c: Do no
470 longer handle scm_tc7_bvect bitvectors.
471
472 * ramap.c: Use the new generalized vector functions to handle all
473 vector like things.
474
475 * vectors.h, vectors.c (scm_is_vector, scm_c_vector_length,
476 scm_c_vector_ref, scm_c_vector_set_x, scm_generalized_vector_p,
477 scm_generalized_vector_length, scm_generalized_vector_ref,
478 scm_generalized_vector_set_x, scm_generalized_vector_to_list,
479 scm_is_generalized_vector, scm_c_generalized_vector_length,
480 scm_c_generalized_vector_ref, scm_c_generalized_vector_set_x):
481 New.
482
483 * unif.h, unif.c (scm_bitvector_p, scm_bitvector,
484 scm_make_bitvector, scm_bitvector_length, scm_bitvector_ref,
485 scm_bitvector_set_x, scm_list_to_bitvector, scm_bitvector_to_list,
486 scm_bitvector_fill_x, scm_is_bitvector, scm_c_make_bitvector,
487 scm_c_bitvector_length, scm_c_bitvector_ref,
488 scm_c_bitvector_set_x, scm_bitvector_elements,
489 scm_bitvector_release, scm_frame_bitvector_release,
490 scm_tc16_bitvector, bitvector_free, bitvector_print,
491 bitvector_equalp, count_ones, find_first_one): New.
492 (scm_bit_count, scm_bit_position, scm_bit_set_star_x,
493 scm_bit_count_star, scm_bit_invert_x, scm_istr2bve): Rewritten
494 using the new C API for bitvectors and maybe count_ones or
495 find_first_one, as appropriate.
496 (SCM_I_MAX_LENGTH, SCM_BITVECTOR_P, SCM_BITVECTOR_BASE,
497 SCM_SET_BITVECTOR_BASE, SCM_BITVECTOR_MAX_LENGTH,
498 SCM_BITVECTOR_LENGTH, SCM_MAKE_BITVECTOR_TAG,
499 SCM_SET_BITVECTOR_LENGTH): Removed. Replaced all uses with the
500 new functions from above.
501 (scm_i_proc_make_vector, scm_i_proc_make_string,
502 scm_i_proc_make_bitvector): Made non-static for use in
503 scm_i_generalized_vector_creator.
504 (scm_make_u1vector): Removed, replaced by scm_make_bitvector.
505 (scm_make_uve): Validate that the created object is a generalized
506 vector.
507 (scm_i_legacy_tag): Removed.
508 (scm_i_print_array): Do it here.
509 (scm_raprin1): Only print enclosed arrays.
510
511 * Makefile.am (DOT_DOC_FILES): Added srfi-4.doc.
512
c24d026b
MV
5132004-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
514
1f2328fe
MV
515 * srfi-4.c (make_uvec): Use SCM_I_SIZE_MAX instead of SIZE_MAX for
516 added portability.
517
518 * chars.c (scm_charnames, scm_charnums): Added "sp" as an alias
519 for "space". Thanks to Bruce Korb!
520
c24d026b
MV
521 * rw.c (scm_read_string_x_partial): Bugfix, apply offset to dest
522 only after dest has been set. Thanks to Hyper Division!
523
524 * gh_data.c (gh_uniform_vector_length): Use
525 scm_uniform_vector_length instead of SCM_UVECTOR_LENGTH.
526
d4ea47c8
MV
5272004-11-03 Marius Vollmer <mvo@zagadka.de>
528
529 * unif.h (SCM_UVECTOR_BASE, SCM_SET_UVECTOR_BASE,
530 SCM_UVECTOR_MAXLENGTH, SCM_UVECTOR_LENGTH, SCM_MAKE_UVECTOR_TAG,
531 SCM_SET_UVECTOR_LENGTH): Removed.
532
236288e2
MV
5332004-11-02 Marius Vollmer <mvo@zagadka.de>
534
535