1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-01 20:30:28 +02:00
Commit graph

8975 commits

Author SHA1 Message Date
Marius Vollmer
f738b51d25 *** empty log message *** 2004-11-02 15:59:47 +00:00
Marius Vollmer
c35092e670 (scm_lreadr): Bugfix: include the last bit in the bit vector. 2004-11-02 15:53:53 +00:00
Marius Vollmer
dd43e6665d *** empty log message *** 2004-10-29 16:14:37 +00:00
Marius Vollmer
cad31131e5 (Uniform Vectors): Added c32 and c64 docs. 2004-10-29 16:14:00 +00:00
Marius Vollmer
db61edbc10 Removed commented out code. 2004-10-29 15:42:02 +00:00
Marius Vollmer
327114a26a *** empty log message *** 2004-10-29 15:41:54 +00:00
Marius Vollmer
ab1be174c2 * unif.h, unif.c (scm_array_creator): New.
(scm_i_get_old_prototype): New.
(scm_array_prototype): use it to return old-style prototype, never
return creators.
(scm_make_uve): Use scm_call_1 instead of scm_call_2 with a second
arg of SCM_UNDEFINED.  The latter is wrong.
2004-10-29 15:41:26 +00:00
Marius Vollmer
c0fc64c806 (scm_i_print_array): It's "ndim", not "rank". D'Oh! 2004-10-29 14:50:13 +00:00
Marius Vollmer
5e9c05a174 *** empty log message *** 2004-10-29 14:47:29 +00:00
Marius Vollmer
81975bee33 Do not install read-hash procedure for reading arrays, this is done in
libguile now.
2004-10-29 14:47:15 +00:00
Marius Vollmer
eb42ff2564 (scm_lreadr): Call scm_i_read_array for all characters followinf '#'
that can start an array.  Explicitely disambiguate 'i' and 'e' between
introducing numbers and uniform vectors.  Do not call
scm_i_read_homogenous_vector, since that is also handled by
scm_i_read_array now.
2004-10-29 14:45:19 +00:00
Marius Vollmer
bfad4005d2 (scm_make_u1vector): New, but only temporary.
(make_uve): Removed.
(scm_i_proc_make_vector, scm_i_proc_make_string,
scm_i_proc_make_u1vector): New.
(scm_init_unif): Initialize them.
(scm_i_convert_old_prototype): New.
(scm_make_uve): Use it to get the creator procedure.  Removed all
old code that created old-style uniform vectors.
(scm_array_p): Handle generic vectors.
(scm_dimensions_to_uniform_array): Do not fill new array with
prototype when that is a procedure.
(scm_list_to_uniform_array): Also accept a list of lower bounds as
the NDIM argument.
(scm_i_print_array): Print rank for shared or non-zero-origin
vectors.
(tag_proto_table, scm_i_tag_to_prototype, scm_i_read_array): New.
(scm_raprin1): Do not call scm_i_array_print for enclosed arrays,
which I do not understand yet.
(scm_array_prototype): Explicitely handle generic vectors.
2004-10-29 14:41:14 +00:00
Marius Vollmer
7a1aba42cf (scm_i_print_complex, icmplx2str): New.
(iflo2str): Use icmplx2str for complex numbers.
2004-10-29 14:17:20 +00:00
Marius Vollmer
cbdc837976 (scm_i_read_homogenous_vector,
scm_i_uniform_vector_prototype): Removed.
(scm_i_uniform_vector_creator): New.
(SCM_UVEC_C32, scm_c32vector, scm_make_c32vector, etc,
SCM_UVEC_C64, scm_c64vector, scm_make_c64vector, etc): New.
Updated all tables and generic functions to support them.
(scm_i_proc_make_u8vector, scm_i_proc_make_s8vector, etc): New.
(scm_init_srfi_4): Initialize them.
2004-10-29 14:10:49 +00:00
Marius Vollmer
d2759570ac (scm_take_u8vector, etc): use uvec_sizes instead of
sizeof(CTYPE) as explained in the comment.
2004-10-29 14:06:02 +00:00
Marius Vollmer
bb9f50ae10 *** empty log message *** 2004-10-27 19:38:04 +00:00
Marius Vollmer
af4701b0de Removed tests that tried to store a character into a byte vector,
which no longer works.  Characters are not bytes.
2004-10-27 19:34:17 +00:00
Marius Vollmer
f984af077b *** empty log message *** 2004-10-27 19:32:41 +00:00
Marius Vollmer
8d152a329b Added scm_take_u8vector, etc. 2004-10-27 19:32:29 +00:00
Marius Vollmer
d1d2f0941c * convert.i.c: Convert srfi-4 style uniform vectors when
requested.
* convert.c (scm_c_scm2chars, scm_c_chars2scm,
scm_c_chars2byvect): Use a s8vector instead of a scm_tc7_byvect.
2004-10-27 19:32:11 +00:00
Marius Vollmer
46d25cffa8 (vector_scale, vector_scale_x): Renamed former to the
latter, since it modifies its argument.
(vector_scale_x, vector_sum_squares, scm_random_normal_vector_x):
Do not use scm_universal_vector_length for non-uniform vectors.
Use scm_f64vector_elements to access innards of uniform vectors.
2004-10-27 19:28:05 +00:00
Marius Vollmer
faa0036593 * srfi-4.c (take_uvec): New.
(alloc_uvec): Use it.
* srfi-4.h, srfi-4.i.c (scm_take_u8vector, etc): New.
2004-10-27 19:25:14 +00:00
Marius Vollmer
2a7bd73833 (gh_chars2byvect): Reimplemented with scm_make_s8vector.
(gh_scm2chars): Handle s8vectors, removed code for scm_tc7_byvect.
2004-10-27 18:29:20 +00:00
Marius Vollmer
d315ee57b4 * print.c (iprin1): Removed code for scm_tc7_byvect.
* objects.c (scm_class_of): Likewise.
* gc-mark.c (scm_gc_mark_dependencies): Likewise.
* gc-card.c (scm_i_sweep_card): Likewise.
* evalext.c (scm_self_evaluating_p): Likewise.
* eq.c (scm_equal_p): Likewise.
2004-10-27 18:21:43 +00:00
Marius Vollmer
b4bdaddeed (scm_ra_matchp, scm_array_fill_int, racp, scm_array_index_map_x,
raeql_1, scm_array_equal_p): Handle srfi-4 uniform vectors.  Removed
code for scm_tc7_byvect
2004-10-27 18:16:26 +00:00
Marius Vollmer
54c83b6249 (scm_tc7_byvect): Commented out. 2004-10-27 18:12:20 +00:00
Marius Vollmer
e0e496707b * srfi-4.h, srfi-4.i.c (scm_u8vector_elements, etc): New.
* srfi-4.h, srfi-4.c (scm_uniform_vector_p,
scm_uniform_vector_ref, scm_uniform_vector_set_x,
scm_uniform_vector_to_list, scm_is_uniform_vector,
scm_c_uniform_vector_lengths, scm_c_uniform_vector_size,
scm_uniform_vector_elements, scm_uniform_vector_element_size,
scm_uniform_vector_release): New.
(scm_i_uniform_vector_prototype, scm_i_uniform_vector_tag): New.
(scm_uniform_element_size, scm_uniform_vector_length): Moved here
from unif.h, unif.c and extended to handle both the old and new
uniform vectors.

* unif.h, unif.c (scm_uniform_vector_ref, scm_array_ref): Renamed
the former to the latter.
(scm_uniform_vector_length, scm_uniform_element_size): Moved to
srfi-4.h, srfi-4.c.
(scm_make_uve): Call scm_make_s8vector for #\nul prototype.
(scm_array_p, scm_array_rank, scm_array_dimensions,
scm_transpose_array, scm_enclose_array, scm_array_ref, scm_cvref,
scm_array_set_x, scm_array_contents, scm_uniform_array_read_x,
scm_array_to_list, scm_array_prototype): Handle srfi-4 uniform
vectors.  Removed code for scm_tc7_byvect.
(scm_dimensions_to_uniform_array): Fill array with 0 when
prototype is #\nul.
(scm_i_print_array_dimension, scm_i_legacy_tag,
scm_i_print_array): New.
(scm_raprin1): Call scm_i_print_array for arrays.  Removed code
for scm_tc7_byvect.
2004-10-27 18:11:14 +00:00
Marius Vollmer
7b1574ed4f *** empty log message *** 2004-10-27 17:39:04 +00:00
Marius Vollmer
e6b226b9d1 Moved SRFI-4 docs into main part. Moved bit vectors out of array
section to make them more visible.
2004-10-27 17:38:51 +00:00
Marius Vollmer
f51518b2da (uniform-vector?, uniform-vector-set!): Removed, now provided by
libguile.
2004-10-27 17:36:16 +00:00
Marius Vollmer
1b11b14bfa Include "libguile/srfi-4.h". 2004-10-27 17:32:18 +00:00
Marius Vollmer
79d5218263 *** empty log message *** 2004-10-26 17:05:46 +00:00
Marius Vollmer
85acb35ff9 Added srfi-4 to cond-expand features. 2004-10-26 17:05:32 +00:00
Marius Vollmer
0d0f372f5b Moved content into core; only the skeletons remains. 2004-10-26 17:01:35 +00:00
Marius Vollmer
a4022e691e * read.c (scm_lreadr): Call scm_i_read_homogenous_vector for '#f',
'#u', and '#s'.

* read.h, read.c (scm_i_input_error): Renamed from scm_input_error
and made non-static.  Changed all uses.
2004-10-26 17:00:13 +00:00
Marius Vollmer
358ebb0b74 (scm_init_guile_1): Call scm_init_srfi_4. 2004-10-26 16:57:56 +00:00
Marius Vollmer
02e227755a * srfi-4.c, srfi-4.h, srfi-4.i.c: New files, initially from
../srfi/ but heavily modified.
* Makefile.am: Add them in all the right places.
2004-10-26 16:57:00 +00:00
Marius Vollmer
f857918291 New files, initially from ../srfi/ but heavily modified. 2004-10-26 16:56:02 +00:00
Marius Vollmer
b479fe9ae4 (scm_i_print_double): New. 2004-10-26 16:53:23 +00:00
Marius Vollmer
22417f2f4e *** empty log message *** 2004-10-25 13:41:06 +00:00
Marius Vollmer
6ecd214668 Added explicit invocation of libtoolize before autoreconf so that
libltdl/ is updated as well.
2004-10-25 12:52:19 +00:00
Marius Vollmer
e64e80b09a *** empty log message *** 2004-10-22 15:14:21 +00:00
Marius Vollmer
0345e278f4 * variable.c, threads.c, struct.c, stackchk.c, smob.c, root.c,
print.c, ports.c, mallocs.c, hooks.c, hashtab.c, fports.c,
guardians.c, filesys.c, coop-pthreads.c, continuations.c: Use
scm_uintprint to print unsigned integers, raw heap words, and
adresses, using a cast to scm_t_bits to turn pointers into
integers.
2004-10-22 15:13:12 +00:00
Marius Vollmer
f27d205727 Include "libguile/print.h". 2004-10-22 15:11:39 +00:00
Marius Vollmer
3350b67639 *** empty log message *** 2004-10-22 13:58:43 +00:00
Marius Vollmer
376c18e1d2 (print_int64, print_uint64): Removed. (uvec_print): Use scm_intprint
for signed elemets and scm_uintprint for unsigned ones.  Do not use
print_int64 and print_uint64 since scm_intprint and scm_Uintprint can
handle 64 bits now.
2004-10-22 13:58:34 +00:00
Marius Vollmer
c90ac3a8bc *** empty log message *** 2004-10-22 13:52:22 +00:00
Marius Vollmer
a406c9e946 (scm_uintprint): New, for printing scm_t_uintmax values.
(scm_intprint): Argument type changed to scm_t_intmax.
2004-10-22 13:52:09 +00:00
Marius Vollmer
2881e77b5a (SCM_T_INTBUFLEN): Increased to cover
scm_t_intmax values.
(scm_uint2str): New, for scm_t_uintmax.
(scm_iint2str): Argument type changed to scm_t_intmax,
reimplemented in terms of scm_uint2str.
2004-10-22 13:50:39 +00:00
Marius Vollmer
77c2594f2f *** empty log message *** 2004-10-22 13:17:44 +00:00