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