summaryrefslogtreecommitdiff
path: root/libguile/unif.h
AgeCommit message (Collapse)AuthorFilesLines
2009-07-19rename unif.[ch] to arrays.[ch]Andy Wingo1-110/+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-39/+0
* 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-33/+1
* 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 scm_i_make_ra to scm_i_make_arrayAndy Wingo1-1/+1
* 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-19/+2
* libguile/unif.h: * libguile/unif.c: Remove deprecated functions. * module/ice-9/deprecated.scm: Remove array-related deprecated functions. * NEWS: Update.
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/+3
* 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-05-31Add `SCM_INTERNAL' macro, use it.Ludovic Courtès1-5/+5
2006-04-17merge from 1.8 branchKevin Ryde1-1/+1
2005-05-23The FSF has a new address.Marius Vollmer1-1/+1
2005-01-11(SCM_ARRAYP, SCM_I_ARRAYP): Renamed former to latter internalMarius Vollmer1-25/+25
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-11/+13
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-09* unif.h, unif.c, inline.h (scm_i_t_array_ref, scm_i_t_array_set):Marius Vollmer1-3/+13
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_t_array_dim): Changed type of members to ssize_t, toMarius Vollmer1-16/+6
fit the docs.
2005-01-07(SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR): Removed.Marius Vollmer1-9/+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-5/+7
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-6/+13
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-3/+31
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-4/+9
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-3/+6
(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-11-14(scm_i_cvref): Made non-static for ramap.c.Marius Vollmer1-0/+1
2004-11-12(scm_tc16_enclosed_array, SCM_ENCLOSED_ARRAYP):Marius Vollmer1-7/+11
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-09(scm_bitvector_p, scm_bitvector,Marius Vollmer1-17/+38
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-03(SCM_UVECTOR_BASE, SCM_SET_UVECTOR_BASE,Marius Vollmer1-15/+12
SCM_UVECTOR_MAXLENGTH, SCM_UVECTOR_LENGTH, SCM_MAKE_UVECTOR_TAG, SCM_SET_UVECTOR_LENGTH): Removed.
2004-10-29* unif.h, unif.c (scm_array_creator): New.Marius Vollmer1-0/+1
(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_make_u1vector): New, but only temporary.Marius Vollmer1-0/+3
(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-3/+1
* 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-08-19* strings.h, strings.c: (scm_i_string_chars, scm_i_string_length,Marius Vollmer1-1/+1
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.
2003-04-05Changed license terms to the plain LGPL thru-out.Marius Vollmer1-35/+11
2002-07-202002-07-20 Han-Wen <hanwen@cs.uu.nl>Han-Wen Nienhuys1-2/+2
* *.c: add space after commas everywhere. * *.c: use SCM_VECTOR_SET everywhere, where a vector is written. Document cases where SCM_WRITABLE_VELTS() is used. * vectors.h (SCM_VELTS): prepare for write barrier, and let SCM_VELTS() return a const pointer (SCM_VECTOR_SET): add macro. * autogen.sh (mscripts): find and check version number of autoconf. Complain if 2.53 is not found.
2002-02-22* Fix a typo that crept in with the scm_X_t to scm_t_X rename.Neil Jerram1-1/+1
* Partial fix for date-week-number bug.
2001-11-25(SCM_MAKE_BITVECTOR_TAG, SCM_MAKE_UVECTOR_TAG): New.Marius Vollmer1-2/+4
2001-11-02Prefixed each each exported symbol with SCM_API.Marius Vollmer1-37/+37
2001-10-03 * continuations.h, unif.h: in the descriptions of the bit patternsGary Houston1-5/+5
of the heap cells, make bit 0 the least significant.
2001-08-31* Remove deprecated macros and typenames.Dirk Herrmann1-28/+7
* Rename header macros to SCM_<filename>_H. * Prefer !SCM_<foo> over SCM_N<foo>.
2001-07-09Remove "face-lift" comment.Thien-Thi Nguyen1-2/+0
2001-06-14replace "scm_*_t" with "scm_t_*".Marius Vollmer1-11/+11
2001-06-14* unif.h (SCM_ARRAY_NDIM): Shift then cast so that the no signMarius Vollmer1-1/+1
extension takes place. * strings.h (SCM_STRING_LENGTH): Likewise. (SCM_STRING_MAX_LENGTH): Use unsigned numbers.
2001-06-08* Fixed some bugs, some reported by Matthias Koeppe.Dirk Herrmann1-1/+1
2001-05-26revert the ill-considered part of the 2001-05-24 changesMichael Livshin1-12/+12
2001-05-24 * unif.c (scm_make_ra, array_free), unif.h (SCM_ARRAY_DIMS):Martin Grabmüller1-1/+1
Changed use of scm_array->scm_array_t and scm_array_dim->scm_array_dim_t to enable build with --disable-deprecated.
2001-05-24* validate.hMichael Livshin1-21/+28
(SCM_NUM2{SIZE,PTRDIFF,SHORT,USHORT,BITS,UBITS,INT,UINT}[_DEF]): new macros. * unif.h: type renaming: scm_array -> scm_array_t scm_array_dim -> scm_array_dim_t the old names are deprecated, all in-Guile uses changed. * tags.h (scm_ubits_t): new typedef, representing unsigned scm_bits_t. * stacks.h: type renaming: scm_info_frame -> scm_info_frame_t scm_stack -> scm_stack_t the old names are deprecated, all in-Guile uses changed. * srcprop.h: type renaming: scm_srcprops -> scm_srcprops_t scm_srcprops_chunk -> scm_srcprops_chunk_t the old names are deprecated, all in-Guile uses changed. * gsubr.c, procs.c, print.c, ports.c, read.c, rdelim.c, ramap.c, rw.c, smob.c, sort.c, srcprop.c, stacks.c, strings.c, strop.c, strorder.c, strports.c, struct.c, symbols.c, unif.c, values.c, vectors.c, vports.c, weaks.c: various int/size_t -> size_t/scm_bits_t changes. * random.h: type renaming: scm_rstate -> scm_rstate_t scm_rng -> scm_rng_t scm_i_rstate -> scm_i_rstate_t the old names are deprecated, all in-Guile uses changed. * procs.h: type renaming: scm_subr_entry -> scm_subr_entry_t the old name is deprecated, all in-Guile uses changed. * options.h (scm_option_t.val): unsigned long -> scm_bits_t. type renaming: scm_option -> scm_option_t the old name is deprecated, all in-Guile uses changed. * objects.c: various long -> scm_bits_t changes. (scm_i_make_class_object): flags: unsigned long -> scm_ubits_t * numbers.h (SCM_FIXNUM_BIT): deprecated, renamed to SCM_I_FIXNUM_BIT. * num2integral.i.c: new file, multiply included by numbers.c, used to "templatize" the various integral <-> num conversion routines. * numbers.c (scm_mkbig, scm_big2num, scm_adjbig, scm_normbig, scm_copybig, scm_2ulong2big, scm_dbl2big, scm_big2dbl): deprecated. (scm_i_mkbig, scm_i_big2inum, scm_i_adjbig, scm_i_normbig, scm_i_copybig, scm_i_short2big, scm_i_ushort2big, scm_i_int2big, scm_i_uint2big, scm_i_long2big, scm_i_ulong2big, scm_i_bits2big, scm_i_ubits2big, scm_i_size2big, scm_i_ptrdiff2big, scm_i_long_long2big, scm_i_ulong_long2big, scm_i_dbl2big, scm_i_big2dbl, scm_short2num, scm_ushort2num, scm_int2num, scm_uint2num, scm_bits2num, scm_ubits2num, scm_size2num, scm_ptrdiff2num, scm_num2short, scm_num2ushort, scm_num2int, scm_num2uint, scm_num2bits, scm_num2ubits, scm_num2ptrdiff, scm_num2size): new functions. * modules.c (scm_module_reverse_lookup): i, n: int -> scm_bits_t.x * load.c: change int -> size_t in various places (where the variable is used to store a string length). (search-path): call scm_done_free, not scm_done_malloc. * list.c (scm_ilength): return a scm_bits_t, not long. some other {int,long} -> scm_bits_t changes. * hashtab.c: various [u]int -> scm_bits_t changes. scm_ihashx_closure -> scm_ihashx_closure_t (and made a typedef). (scm_ihashx): n: uint -> scm_bits_t use scm_bits2num instead of scm_ulong2num. * gsubr.c: various int -> scm_bits_t changes. * gh_data.c (gh_scm2double): no loss of precision any more. * gh.h (gh_str2scm): len: int -> size_t (gh_{get,set}_substr): start: int -> scm_bits_t, len: int -> size_t (gh_<num>2scm): n: int -> scm_bits_t (gh_*vector_length): return scm_[u]size_t, not unsigned long. (gh_length): return scm_bits_t, not unsigned long. * fports.h: type renaming: scm_fport -> scm_fport_t the old name is deprecated, all in-Guile uses changed. * fports.c (fport_fill_input): count: int -> scm_bits_t (fport_flush): init_size, remaining, count: int -> scm_bits_t * debug.h (scm_lookup_cstr, scm_lookup_soft, scm_evstr): removed those prototypes, as the functions they prototype don't exist. * fports.c (default_buffer_size): int -> size_t (scm_fport_buffer_add): read_size, write_size: int -> scm_bits_t default_size: int -> size_t (scm_setvbuf): csize: int -> scm_bits_t * fluids.c (n_fluids): int -> scm_bits_t (grow_fluids): old_length, i: int -> scm_bits_t (next_fluid_num, scm_fluid_ref, scm_fluid_set_x): n: int -> scm_bits_t (scm_c_with_fluids): flen, vlen: int -> scm_bits_t * filesys.c (s_scm_open_fdes): changed calls to SCM_NUM2LONG to the new and shiny SCM_NUM2INT. * extensions.c: extension -> extension_t (and made a typedef). * eval.h (SCM_IFRAME): cast to scm_bits_t, not int. just so there are no nasty surprises if/when the various deeply magic tag bits move somewhere else. * eval.c: changed the locals used to store results of SCM_IFRAME, scm_ilength and such to be of type scm_bits_t (and not int/long). (iqq): depth, edepth: int -> scm_bits_t (scm_eval_stack): int -> scm_bits_t (SCM_CEVAL): various vars are not scm_bits_t instead of int. (check_map_args, scm_map, scm_for_each): len: long -> scm_bits_t i: int -> scm_bits_t * environments.c: changed the many calls to scm_ulong2num to scm_ubits2num. (import_environment_fold): proc_as_ul: ulong -> scm_ubits_t * dynwind.c (scm_dowinds): delta: long -> scm_bits_t * debug.h: type renaming: scm_debug_info -> scm_debug_info_t scm_debug_frame -> scm_debug_frame_t the old names are deprecated, all in-Guile uses changed. (scm_debug_eframe_size): int -> scm_bits_t * debug.c (scm_init_debug): use scm_c_define instead of the deprecated scm_define. * continuations.h: type renaming: scm_contregs -> scm_contregs_t the old name is deprecated, all in-Guile uses changed. (scm_contregs_t.num_stack_items): size_t -> scm_bits_t (scm_contregs_t.num_stack_items): ulong -> scm_ubits_t * continuations.c (scm_make_continuation): change the type of stack_size form long to scm_bits_t. * ports.h: type renaming: scm_port_rw_active -> scm_port_rw_active_t (and made a typedef) scm_port -> scm_port_t scm_ptob_descriptor -> scm_ptob_descriptor_t the old names are deprecated, all in-Guile uses changed. (scm_port_t.entry): int -> scm_bits_t. (scm_port_t.line_number): int -> long. (scm_port_t.putback_buf_size): int -> size_t. * __scm.h (long_long, ulong_long): deprecated (they pollute the global namespace and have little value besides that). (SCM_BITS_LENGTH): new, is the bit size of scm_bits_t (i.e. of an SCM handle). (ifdef spaghetti): include sys/types.h and sys/stdtypes.h, if they exist (for size_t & ptrdiff_t) (scm_sizet): deprecated. * Makefile.am (noinst_HEADERS): add num2integral.i.c
2001-04-19* unif.h (SCM_ARRAY_CONTIGUOUS): Reintroduced as deprecated.Mikael Djurfeldt1-0/+4
* RELEASE: Added deprecated macro SCM_ARRAY_CONTIGUOUS
2001-04-19* Eliminate some further applications of SCM_C[AD]R to non pair cells.Dirk Herrmann1-10/+15
2000-12-08Smob-related creanup.Keisuke Nishida1-2/+2
2000-11-23* Deprecated SCM_LENGTH_MAX.Dirk Herrmann1-0/+2
2000-11-23* SCM_SETCHARS deprecated.Dirk Herrmann1-0/+2
2000-11-23* Deprecated SCM_SETLENGTH.Dirk Herrmann1-0/+2
2000-10-30* Change a couple of functions to accept either symbols or strings only.Dirk Herrmann1-8/+13
* Get rid of remainig uses of SCM_LENGTH etc.
2000-10-10* Removed further calls to SCM_LENGTH.Dirk Herrmann1-0/+2