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