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