summaryrefslogtreecommitdiff
path: root/libguile/srfi-4.c
AgeCommit message (Collapse)AuthorFilesLines
2004-12-29* srfi-4.h (scm_i_proc_make_u8vector, scm_i_proc_make_s8vector,Marius Vollmer1-50/+8
scm_i_proc_make_u16vector, scm_i_proc_make_s16vector, scm_i_proc_make_u32vector, scm_i_proc_make_s32vector, scm_i_proc_make_u64vector, scm_i_proc_make_s64vector, scm_i_proc_make_f32vector, scm_i_proc_make_f64vector, scm_i_proc_make_c32vector, scm_i_proc_make_c64vector, uvec_proc_vars): Removed. (scm_i_generalized_vector_creator): Removed. (scm_i_generalized_vector_type): New. * unif.h, unif.c (scm_typed_array_p, scm_make_array, scm_make_typed_array, scm_array_type, scm_list_to_array, scm_list_to_typed_array, scm_is_array, scm_is_typed_array): New. (scm_array_creator): Removed. (scm_array_p): Deprecated second PROT argument. (scm_dimensions_to_uniform_array, scm_list_to_uniform_array): Deprecated, reimplemented in terms of scm_make_typed_array and scm_list_to_typed_array. (scm_i_proc_make_vector, scm_i_proc_make_string, scm_i_proc_make_bitvector): Removed. (type_creator_table, init_type_creator_table, type_to_creator, make_typed_vector): New. (scm_i_convert_old_prototype): Removed. (prototype_to_type): New. (scm_make_uve): Deprecated, reimplemented using make_typed_vector. (scm_array_dimensions): Use scm_list_1 instead of scm_cons for minor added clarity. (scm_make_shared_array, scm_ra2contig): Use make_typed_vector instead of scm_make_uve. (tag_creator_table, scm_i_tag_to_creator): Removed. (tag_to_type): New. (scm_i_read_array): Use scm_list_to_typed_array instead of scm_list_to_uniform_array.
2004-12-27(scm_uniform_vector_elements,Marius Vollmer1-8/+41
scm_u8vector_elements, etc): Made return value "const". (scm_uniform_vector_writable_elements, scm_u8vector_writable_elements, etc): New. (scm_uniform_vector_release, scm_uniform_vector_release_elements): Renamed former to latter. Added explicit call to scm_remember_upto_here_1. (scm_frame_uniform_vector_release, scm_frame_uniform_vector_release_elements): Renamed former to latter. (scm_uniform_vector_release_writable_elements, scm_frame_uniform_vector_release_writable_elements): New. Takes crown of longest identifier yet. Changed all uses as required by the changes above.
2004-11-10Do not include <libguile.h>, include theMarius Vollmer1-1/+200
needed files directly. Include config.h, <unistd.h> and <io.h> when available. (scm_uniform_vector_read_x, scm_uniform_vector_write): New.
2004-11-09(scm_c_uniform_vector_ref, scm_c_uniform_vector_set_x): New.Marius Vollmer1-38/+54
(scm_i_uniform_vector_creator): Removed. (scm_i_generalized_vector_creator): New. (scm_uniform_vector_length, scm_uniform_element_size): Do not handle generalized vectors, only uniform numeric vectors. (alloc_uvec): Do length check here... (make_uvec): ...but not here. (coerce_to_uvec): Use new generalized vector functions to handle all kinds of vectors in one go.
2004-11-04(make_uvec): Use SCM_I_SIZE_MAX instead of SIZE_MAX for addedMarius Vollmer1-1/+2
portability.
2004-11-02(uvec_fast_ref): Avoid a compiler warning by returningMarius Vollmer1-0/+2
SCM_BOOL_F if no type matches.
2004-11-02* srfi-4.h, srfi-4.c (scm_frame_uniform_vector_release): New.Marius Vollmer1-0/+7
* unif.c (scm_bit_set_star_x, scm_bit_count_star_x): Use it to get more efficient access to the u32vector.
2004-11-02(coerce_to_uvec, scm_any_to_u8vector, etc): New.Marius Vollmer1-61/+44
(scm_uniform_element_size, scm_uniform_vector_length): Do no longer handle old-style uniform vectors.
2004-10-29(scm_i_read_homogenous_vector,Marius Vollmer1-101/+92
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-27* srfi-4.c (take_uvec): New.Marius Vollmer1-3/+12
(alloc_uvec): Use it. * srfi-4.h, srfi-4.i.c (scm_take_u8vector, etc): New.
2004-10-27* srfi-4.h, srfi-4.i.c (scm_u8vector_elements, etc): New.Marius Vollmer1-32/+281
* 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-26New files, initially from ../srfi/ but heavily modified.Marius Vollmer1-0/+486