summaryrefslogtreecommitdiff
path: root/libguile/unif.c
AgeCommit message (Collapse)AuthorFilesLines
2009-07-19rename unif.[ch] to arrays.[ch]Andy Wingo1-1634/+0
* libguile/Makefile.am: * libguile/unif.c: * libguile/unif.h: * libguile/arrays.c: * libguile/arrays.h: Rename unif.[ch] to arrays.[ch]. * libguile.h: * libguile/array-handle.c: * libguile/array-map.c: * libguile/bitvectors.c: * libguile/bytevectors.c: * libguile/eq.c: * libguile/gc-card.c: * libguile/gc-malloc.c: * libguile/gc-mark.c: * libguile/gc.c: * libguile/init.c: * libguile/inline.h: * libguile/print.c: * libguile/random.c: * libguile/read.c: * libguile/socket.c: * libguile/sort.c: * libguile/srfi-4.c: * libguile/srfi-4.h: * libguile/strports.c: * libguile/vectors.c: * libguile/vectors.h: Update includers.
2009-07-19bitvector exodus from unif.[ch]Andy Wingo1-831/+1
* libguile/Makefile.am: * libguile/unif.c: * libguile/unif.h: * libguile/bitvectors.c: * libguile/bitvectors.h: Move bitvector functionality out of unif.[ch]. * libguile/array-handle.c: * libguile/array-map.c: * libguile/init.c: * libguile/read.c: * libguile/srfi-4.c: * libguile/vectors.c: Oh, what a tangled web we weave...
2009-07-19parts of unif.[ch] to array-handle.[ch]Andy Wingo1-238/+0
* libguile/array-handle.c: * libguile/array-handle.h: Move some parts of unif.c and unif.h to these new files. * libguile/unif.c: * libguile/unif.h: Update includers. Since unif.h depends on the array handle type, we include array-handle.h, which also means that there will be no difference for our callers. * libguile/init.c: Call scm_init_array_handle, though it does nothing as of yet. * libguile/Makefile.am: Adapt for new files.
2009-07-19rename ramap.[ch] to array-map.[ch]Andy Wingo1-1/+1
* libguile/array-map.c: * libguile/array-map.h: Rename from ramap.c and ramap.h. * libguile.h: * libguile/Makefile.am: * libguile/eq.c: * libguile/init.c: * libguile/sort.c: * libguile/unif.c: * libguile/vectors.c: All referrers changed.
2009-07-19rename scm_i_make_ra to scm_i_make_arrayAndy Wingo1-8/+8
* libguile/unif.c (scm_i_make_array): Rename from scm_i_make_ra. All callers changed.
2009-07-19remove deprecated functions from unif.cAndy Wingo1-334/+2
* libguile/unif.h: * libguile/unif.c: Remove deprecated functions. * module/ice-9/deprecated.scm: Remove array-related deprecated functions. * NEWS: Update.
2009-06-22Make bytevectors accessible using the generalized-vector API.Ludovic Courtès1-1/+30
As a side effect, this allows compilation of literal bytevectors ("#vu8(...)"), which gets done by the generic array handling of the GLIL->assembly compiler. * doc/ref/api-compound.texi (Generalized Vectors): Mention bytevectors. (Arrays, Array Syntax): Likewise. * doc/ref/api-data.texi (Bytevectors as Generalized Vectors): New node. * libguile/bytevectors.c (scm_i_bytevector_generalized_set_x): New. * libguile/bytevectors.h (scm_i_bytevector_generalized_set_x): New declaration. * libguile/srfi-4.c (scm_i_generalized_vector_type, scm_array_handle_uniform_element_size, scm_array_handle_uniform_writable_elements): Add support for bytevectors. * libguile/unif.c (type_creator_table): Add `vu8'. (bytevector_ref, bytevector_set): New functions. (memoize_ref, memoize_set): Add support for bytevectors. * libguile/vectors.c (scm_is_generalized_vector, scm_c_generalized_vector_length, scm_c_generalized_vector_ref, scm_c_generalized_vector_set_x): Add support for bytevectors. * test-suite/tests/bytevectors.test ("Generalized Vectors"): New test set.
2009-06-17Change Guile license to LGPLv3+Neil Jerram1-6/+7
(Not quite finished, the following will be done tomorrow. module/srfi/*.scm module/rnrs/*.scm module/scripts/*.scm testsuite/*.scm guile-readline/* )
2009-06-05add ability to compile uniform arraysAndy Wingo1-0/+47
* module/rnrs/bytevector.scm (rnrs): * libguile/bytevectors.h: * libguile/bytevectors.c (scm_uniform_array_to_bytevector): New function. * libguile/unif.h: * libguile/unif.c (scm_from_contiguous_typed_array): New function. * libguile/vm-i-loader.c (load-array): New instruction, for loading byte data into uniform vectors. Currently it copies out the data, though in the future we could avoid that. * module/language/assembly.scm (align-code): New exported function, aligns code on some boundary. (align-program): Use align-code. * module/language/assembly/compile-bytecode.scm (write-bytecode): Support the load-array instruction. * module/language/glil/compile-assembly.scm (dump-object): Dump uniform arrays. Neat :)
2008-09-13Include <config.h> in all C files; use `#ifdef HAVE_CONFIG_H' rather than `#if'.Ludovic Courtès1-1/+1
2006-12-12Changes from arch/CVS synchronizationLudovic Courtès1-5/+9
2006-04-17merge from 1.8 branchKevin Ryde1-9/+9
2006-02-12* deprecated.scm (make-uniform-array): Don't pass the prototype asMarius Vollmer1-0/+12
the fill value, dimensions->uniform-array will do the right thing now. See scm_dimensions_to_uniform_array why we need to be tricky about the fill value. * unif.c (scm_dimensions_to_uniform_array): Use the prototype for filling when the fill parameter is omitted, as documented, but turn #\nul into 0 since s8 arrays (signified by a #\nul prototype) can not store characters.
2005-06-06(scm_array_in_bounds_p): First test for real arrays, thenMarius Vollmer1-12/+16
check for generalized vectors. This ensures that the generalized vector case need only work with zero-origin ranges.
2005-05-23The FSF has a new address.Marius Vollmer1-1/+1
2005-05-22(scm_make_shared_array): Add old base to new base sinceMarius Vollmer1-2/+2
scm_array_handle_pos does not include the base. (scm_aind): Likewise.
2005-05-12* unif.c (scm_i_read_array): Declare rank as ssize_t, to guaranteeNeil Jerram1-2/+2
that it is signed. * strports.c (st_resize_port): Add unsigned char cast. (scm_mkstrport): Make read/write_buf cast unsigned. * srfi-13.c (string_titlecase_x): Add unsigned char cast. * rdelim.c (scm_read_line): Initialize slen. * load.c (scm_search_path): Remove weird >=1, and add parentheses to clarify conditions. * hash.c (scm_hasher): Add const unsigned char cast. * gh_data.c (gh_chars2byvect): Add scm_t_int8 cast.
2005-03-02See ChangeLog from 2005-03-02.Marius Vollmer1-2/+2
2005-02-10(prototype_to_type): Bugfix: Don't compare prototype toMikael Djurfeldt1-13/+37
the prototypical examples mentioned in the old reference manual. Instead keep the old semantics of dispatching on type. (Yes, this is extremely ugly, but the whole point of keeping the deprecated interface is not to break old code.)
2005-01-11(SCM_ARRAYP, SCM_I_ARRAYP): Renamed former to latter internalMarius Vollmer1-180/+190
version. Changed all uses. (scm_tc16_array, scm_i_tc16_array, scm_tc16_enclosed_array, scm_i_tc16_enclosed_array, SCM_ARRAY_FLAG_CONTIGUOUS, SCM_I_ARRAY_FLAG_CONTIGUOUS, SCM_ENCLOSE_ARRAYP, SCM_I_ENCLOSE_ARRAYP, SCM_ARRAY_NDIM, SCM_I_ARRAY_NDIM, SCM_ARRAY_CONTP, SCM_I_ARRAY_CONTP, SCM_ARRAY_MEM, SCM_I_ARRAY_MEM, SCM_ARRAY_V, SCM_I_ARRAY_V, SCM_ARRAY_BASE, SCM_I_ARRAY_BASE, SCM_ARRAY_DIMS, SCM_I_ARRAY_DIMS, scm_t_array, scm_i_t_array): Likewise. (SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG): Moved from unif.h to unif.c. (scm_c_array_rank): New. (scm_array_rank): Reimplement using it.
2005-01-11(indices_to_pos, scm_array_handle_pos): RenamedMarius Vollmer1-89/+96
former to latter and made public. Changed all uses. (scm_i_make_ra): Made public, changed tag param to enclosed flag. (scm_make_ra): Deprecated, changed all uses to scm_i_make_ra. (scm_i_shap2ra): New internal version of scm_shap2ra. (scm_shap2ra): Deprecated, changed all uses to scm_i_shap2ra. (scm_i_ra_set_contp): New internal version of scm_ra_set_contp. (scm_ra_set_contp): Deprecated, changed all uses to scm_i_ra_set_contp. (scm_cvref, scm_aind, scm_raprin1): Deprecated.
2005-01-10(scm_list_to_typed_array): Allow the specification of theMarius Vollmer1-69/+136
upper bound as well. This is needed for empty arrays. (l2ra): Give needed number of elements in error message. (scm_i_print_array): Print length information for arrays that need it. (scm_i_read_array): Parse it.
2005-01-10(scm_make_shared_array): Use it instead of scm_aind; use handleMarius Vollmer1-29/+16
for oldra.
2005-01-10(scm_array_rank, scm_array_dimensions,Marius Vollmer1-99/+71
scm_shared_array_offset, scm_shared_array_increments, scm_array_ref, scm_array_set_x): Use scm_t_array_handle operations to simplify code and make it more general. (scm_shared_array_root): Work with all kinds of arrays, including naked vectors. (indices_to_pos): New.
2005-01-09* unif.h, unif.c, inline.h (scm_i_t_array_ref, scm_i_t_array_set):Marius Vollmer1-34/+157
New. (scm_t_array_handle): Added ref, set, elements and writable_elements for fast inline operation of scm_array_handle_ref and scm_array_handle_set. (scm_array_handle_ref, scm_array_handle_set): Moved to inline.h and replaced with inline code that simply calls the ref/set members of the handle. (enclosed_ref, vector_ref, string_ref, bitvector_ref, memoize_ref, enclosed_set, vector_set, string_set, bitvector_set, memoize_set): New. (scm_array_handle_get): Initialize ref/set fields to memoize_ref and memoize_set. (scm_bitvector_fill_x, scm_bitvector_to_list, scm_bit_count, scm_bit_position, scm_bit_set_star_x, scm_bit_count_star, scm_bit_invert_x): Correctly multiply index with increment in the general case. * unif.c (scm_array_handle_set): Correctly execute only one alternative. D'Oh! (scm_list_to_typed_array, l2ra): Use scm_t_array_handle to fill the array; this covers all cases with much simpler code.
2005-01-09(scm_array_handle_set): Correctly execute only oneMarius Vollmer1-49/+27
alternative. D'Oh! (scm_list_to_typed_array, l2ra): Use scm_t_array_handle to fill the array; this covers all cases with much simpler code.
2005-01-09(ra2l): Handle zero rank arrays.Marius Vollmer1-46/+77
(scm_i_print_array): Print zero rank arrays specially. (tag_to_type): Return #t for an empty tag, not the empty symbol. (scm_i_read_array): Allow zero rank arrays.
2005-01-07(SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR): Removed.Marius Vollmer1-36/+0
(scm_vector_elements, scm_vector_writable_elements, scm_generalized_vector_get_handle): Moved to vectors.[hc] from unif.[hc]. (SCM_SIMPLE_VECTOR_LOC): Removed. (SCM_VECTOR_MAX_LENGTH, SCM_VECTOR_LENGTH, SCM_VELTS, SCM_WRITABLE_VELTS, SCM_VECTOR_REF, SCM_VECTOR_SET, scm_vector_equal_p): Moved from vectors.[hc] to deprecated.[hc]. (scm_vector_equal_p, scm_i_vector_equal_p): Renamed former to latter. Changed use in eq.c.
2005-01-06(scm_array_handle_ref, scm_array_handle_set): ChangedMarius Vollmer1-8/+48
type of POS parameter to be signed, positions can be negative. (scm_array_handle_release): New, changed all uses of scm_t_array_handle to properly call it. (scm_vector_get_handle, scm_generalized_vector_get_handle): Renamed former to latter.
2005-01-04(scm_bitvector_elements,Marius Vollmer1-181/+349
scm_bitvector_writable_elements): Use a scm_t_array_handle and deliver offset, length and increment to caller. Changed all uses. (scm_bitvector_release_elements, scm_frame_bitvector_release_elements, scm_bitvector_release_writable_elements, scm_frame_bitvector_release_writable_elements): Removed. (scm_array_handle_bit_elements, scm_array_handle_bit_writable_elements, scm_array_handle_bit_elements_offset): New. (scm_make_typed_array): The special value for non-initialized arrays is now SCM_UNSPECIFIED. The old special value SCM_BOOL_F was a valid value to fill bitvectors with, so it can't really be specialed out.
2005-01-02* weaks.c: Use new vector elements API or simple vectorMarius Vollmer1-30/+146
API, as appropriate. * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_array_handle_uniform_elements, scm_array_handle_uniform_writable_elements, scm_uniform_vector_elements, scm_uniform_vector_writable_elements): (scm_<foo>vector_elements, scm_<foo>vector_writable_elements): Use scm_t_array_handle, deliver length and increment. (scm_array_handle_<foo>_elements, scm_array_handle_<foo>_writable_elements): New. * unif.h, unif.c (scm_t_array_handle, scm_array_get_handle, scm_array_handle_rank, scm_array_handle_dims, scm_array_handle_ref scm_array_handle_set, scm_array_handle_elements scm_array_handle_writable_elements, scm_vector_get_handle): New. (scm_make_uve, scm_array_prototype, scm_list_to_uniform_array, scm_dimensions_to_uniform_array): Deprecated for real. (scm_array_p, scm_i_array_p): Use latter for SCM_DEFINE since snarfing wont allow a mismatch between C and Scheme arglists. (scm_make_shared_array, scm_enclose_array): Correctly use scm_c_generalized_vector_length instead of scm_uniform_vector_length. * weaks.h, weaks.c: Use new internal weak vector API from vectors.h. * Makefile.am (libguile_la_SOURCES, DOT_X_FILES, DOT_DOC_FILES, EXTRA_libguile_la_SOURCES): Changed ramap.c and unif.c from being 'extra' to being regular sources. (noinst_HEADERS): Added quicksort.i.c. * quicksort.i.c: New file. * vectors.h, vector.c (SCM_VECTORP, SCM_VECTOR_LENGTH, SCM_VELTS, SCM_WRITABLE_VELTS, SCM_VECTOR_REF, SCM_VECTOR_SET): Deprecated and reimplemented. Replaced all uses with scm_vector_elements, scm_vector_writable_elements, or SCM_SIMPLE_VECTOR_*, as appropriate. (scm_is_simple_vector, SCM_SIMPLE_VECTOR_LENGTH, SCM_SIMPLE_VECTOR_REF, SCM_SIMPLE_VECTOR_SET, SCM_SIMPLE_VECTOR_LOC): New. (SCM_VECTOR_BASE, SCM_SET_VECTOR_BASE, SCM_VECTOR_MAX_LENGTH, SCM_MAKE_VECTOR_TAG, SCM_SET_VECTOR_LENGTH, SCM_VELTS_AS_STACKITEMS, SCM_SETVELTS, SCM_GC_WRITABLE_VELTS): Removed. (scm_vector_copy): New. (scm_vector_elements, scm_vector_writable_elements): Use scm_t_array_handle, deliver length and increment. Moved to unif.h. Changed all uses. (scm_vector_release_elements, scm_vector_release_writable_elements, (scm_frame_vector_release_elements, scm_frame_vector_release_writable_elements): Removed. (SCM_I_IS_VECTOR, SCM_I_VECTOR_ELTS, SCM_I_VECTOR_WELTS, SCM_I_VECTOR_LENGTH, scm_i_vector_free): New internal API. (SCM_I_WVECTP SCM_I_WVECT_LENGTH SCM_I_WVECT_VELTS SCM_I_WVECT_GC_WVELTS SCM_I_WVECT_TYPE SCM_I_WVECT_GC_CHAIN SCM_I_SET_WVECT_GC_CHAIN, scm_i_allocate_weak_vector): New, for weak vectors.
2004-12-29* srfi-4.h (scm_i_proc_make_u8vector, scm_i_proc_make_s8vector,Marius Vollmer1-209/+248
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_bitvector_elements): Made return value "const".Marius Vollmer1-30/+52
(scm_bitvector_writable_elements): New. (scm_bitvector_release, scm_bitvector_release_elements): Renamed former to latter. Added explicit call to scm_remember_upto_here_1. (scm_frame_bitvector_release, scm_frame_bitvector_release_elements): Renamed former to latter. (scm_bitvector_release_writable_elements, scm_bitvector_release_writable_elements): New. Changed all uses as required by the changes above.
2004-12-27* unif.c (scm_bitvector_release): Added explicit call toMarius Vollmer1-4/+6
scm_remember_upto_here_1. (scm_uniform_vector_elements, 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-14(scm_i_cvref): Made non-static for ramap.c.Marius Vollmer1-1/+1
2004-11-12(scm_tc16_enclosed_array, SCM_ENCLOSED_ARRAYP):Marius Vollmer1-331/+188
New. (exactly_one_third, singp): Removed. (scm_array_p, scm_array_dimensions, scm_shared_array_root, scm_shared_array_offset, scm_shared_array_increments): Handle enclosed arrays explicitely. (scm_array_rank): Likewise. Also, do not return zero for non-arrays, signal an error instead since arrays with rank zero do exist. (scm_i_make_ra): New, for specifying the tag of the new array. (scm_make_enclosed_array): Use it. (scm_make_ra): Reimplemented in terms of scm_i_make_ra. (scm_make_shared_array): Use scm_c_generalized_vector_length instead of scm_uniform_vector_length. (scm_array_in_bounds_p): Rewritten to be much cleaner. (scm_i_cvref): New, doing the job of scm_cvref. (scm_cvref): Use scm_i_cvref. (scm_array_ref): Do not accept non-arrays when no indices are given. Use scm_i_cvref to do the actual access. ("uniform-array-set1"): Do not register. (scm_array_set_x, scm_uniform_array_read_x, scm_uniform_array_write): Handle enclosed arrays explicitly. (ra2l): Use scm_i_cvref instead of scm_uniform_vector_ref to also handle enclosed arrays. (scm_array_to_list): Handle enclosed arrays explicitly. (rapr1): Removed. (scm_i_print_array_dimension): Use scm_i_cvref to also handle enclosed arrays. (scm_i_print_enclosed_array): New. (tag_proto_table, tag_creator_table): Renamed former to latter. Added "a" and "b" for strings and bitvectors, resp. (scm_i_tag_to_prototype, scm_i_tag_to_creator): Renamed former to latter. Tag "a" is in the table now, no need to handle it as a legacy tag. (scm_raprin1): Just call scm_iprin1. (scm_array_creator, scm_array_prototype): Handle enclosed arrays explicitly. (scm_init_unif): Initialize scm_tc16_enclosed_array smob. Use scm_i_print_array as printer for scm_tc16_array.
2004-11-10Changed all uses of scm_array_prototype toMarius Vollmer1-221/+51
scm_array_creator. (scm_i_get_old_prototype): Signal error when no prototype is known. (scm_uniform_array_read_x, scm_uniform_array_write): Reimplemented in terms of scm_uniform_vector_read_x and scm_uniform_vector_write, respectively. Strings and bitvector support has been dropped.
2004-11-09(scm_bitvector_p, scm_bitvector,Marius Vollmer1-733/+709
scm_make_bitvector, scm_bitvector_length, scm_bitvector_ref, scm_bitvector_set_x, scm_list_to_bitvector, scm_bitvector_to_list, scm_bitvector_fill_x, scm_is_bitvector, scm_c_make_bitvector, scm_c_bitvector_length, scm_c_bitvector_ref, scm_c_bitvector_set_x, scm_bitvector_elements, scm_bitvector_release, scm_frame_bitvector_release, scm_tc16_bitvector, bitvector_free, bitvector_print, bitvector_equalp, count_ones, find_first_one): New. (scm_bit_count, scm_bit_position, scm_bit_set_star_x, scm_bit_count_star, scm_bit_invert_x, scm_istr2bve): Rewritten using the new C API for bitvectors and maybe count_ones or find_first_one, as appropriate. (SCM_I_MAX_LENGTH, SCM_BITVECTOR_P, SCM_BITVECTOR_BASE, SCM_SET_BITVECTOR_BASE, SCM_BITVECTOR_MAX_LENGTH, SCM_BITVECTOR_LENGTH, SCM_MAKE_BITVECTOR_TAG, SCM_SET_BITVECTOR_LENGTH): Removed. Replaced all uses with the new functions from above. (scm_i_proc_make_vector, scm_i_proc_make_string, scm_i_proc_make_bitvector): Made non-static for use in scm_i_generalized_vector_creator. (scm_make_u1vector): Removed, replaced by scm_make_bitvector. (scm_make_uve): Validate that the created object is a generalized vector. (scm_i_legacy_tag): Removed. (scm_i_print_array): Do it here. (scm_raprin1): Only print enclosed arrays.
2004-11-02(scm_i_tag_to_prototype): Make sure that "instead" gets defined.Marius Vollmer1-0/+6
(scm_array_prototype): Deprecated.
2004-11-02* srfi-4.h, srfi-4.c (scm_frame_uniform_vector_release): New.Marius Vollmer1-19/+27
* 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* eq.c, evalext.c, gc-card.c, gc-mark.c, objects.c, print.c,Marius Vollmer1-493/+98
ramap.c, unif.c: Do no longer handle old-style uniform vectors. * unif.c (scm_bit_set_star_x, scm_bit_count_star_x): Use u32vectors instead of old-sytle uvectors.
2004-10-29* unif.h, unif.c (scm_array_creator): New.Marius Vollmer1-11/+79
(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(scm_i_print_array): It's "ndim", not "rank". D'Oh!Marius Vollmer1-1/+1
2004-10-29(scm_make_u1vector): New, but only temporary.Marius Vollmer1-77/+361
(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-27* srfi-4.h, srfi-4.i.c (scm_u8vector_elements, etc): New.Marius Vollmer1-256/+343
* 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-22Include "libguile/print.h".Marius Vollmer1-0/+1
2004-10-19(scm_array_p): When no prototype is given, explicitely test forMarius Vollmer1-1/+23
allowable types, do not simply return true. Thanks to Roland Orre for reporting this!
2004-09-22*** empty log message ***Marius Vollmer1-24/+24
2004-08-24Include "srfi-13.h" instead of "strop.h".Marius Vollmer1-1/+1
2004-08-19* strings.h, strings.c: (scm_i_string_chars, scm_i_string_length,Marius Vollmer1-42/+71
scm_i_string_writable_chars, scm_i_string_stop_writing): New, to replace SCM_I_STRING_CHARS and SCM_I_STRING_LENGTH. Updated all uses. (scm_i_make_string, scm_c_make_string): New, to replace scm_allocate_string. Updated all uses. (SCM_STRINGP, SCM_STRING_CHARS, SCM_STRING_UCHARS, SCM_STRING_LENGTH): Deprecated. (scm_allocate_string, scm_take_str, scm_take0str, scm_mem2string, scm_str2string, scm_makfrom0str, scm_makfrom0str_opt): Discouraged. Replaced all uses with scm_from_locale_string or similar, as appropriate. (scm_c_string_length, scm_c_string_ref, scm_c_string_set_x, scm_c_substring, scm_c_substring_shared, scm_c_substring_copy, scm_substring_shared, scm_substring_copy): New. * symbols.c, symbols.h (SCM_SYMBOLP, SCM_SYMBOL_FUNC, SCM_SET_SYMBOL_FUNC, SCM_SYMBOL_PROPS, SCM_SET_SYMBOL_PROPS, SCM_SYMBOL_HASH, SCM_SYMBOL_INTERNED_P, scm_mem2symbol, scm_str2symbol, scm_mem2uninterned_symbol): Discouraged. (SCM_SYMBOL_LENGTH, SCM_SYMBOL_CHARS, scm_c_symbol2str): Deprecated. (SCM_MAKE_SYMBOL_TAG, SCM_SET_SYMBOL_LENGTH, SCM_SET_SYMBOL_CHARS, SCM_PROP_SLOTS, SCM_SET_PROP_SLOTS): Removed. (scm_is_symbol, scm_from_locale_symbol, scm_from_locale_symboln): New, to replace scm_str2symbol and scm_mem2symbol, respectively. Updated all uses. (scm_gensym): Generate only the number suffix in the buffer, just string-append the prefix.