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