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