Marius Vollmer [Thu, 4 Nov 2004 14:01:18 +0000 (14:01 +0000)]
(scm_read_string_x_partial): Bugfix, apply offset to dest
only after dest has been set. Thanks to Hyper Division!
Marius Vollmer [Thu, 4 Nov 2004 13:53:31 +0000 (13:53 +0000)]
(gh_uniform_vector_length): Use scm_uniform_vector_length instead of
SCM_UVECTOR_LENGTH.
Marius Vollmer [Wed, 3 Nov 2004 22:02:13 +0000 (22:02 +0000)]
*** empty log message ***
Marius Vollmer [Wed, 3 Nov 2004 21:55:43 +0000 (21:55 +0000)]
(SCM_UVECTOR_BASE, SCM_SET_UVECTOR_BASE,
SCM_UVECTOR_MAXLENGTH, SCM_UVECTOR_LENGTH, SCM_MAKE_UVECTOR_TAG,
SCM_SET_UVECTOR_LENGTH): Removed.
Marius Vollmer [Tue, 2 Nov 2004 22:50:19 +0000 (22:50 +0000)]
*** empty log message ***
Marius Vollmer [Tue, 2 Nov 2004 22:49:14 +0000 (22:49 +0000)]
(scm_display_backtrace_with_highlights): Join the
first and the second line of the SCM_DEFINE macro call, since old
preprocessors cannot handle definitions that are split into two
lines.
Marius Vollmer [Tue, 2 Nov 2004 22:47:36 +0000 (22:47 +0000)]
(scm_cell, scm_double_cell): Don't use C99 variable
declarations.
Marius Vollmer [Tue, 2 Nov 2004 22:47:14 +0000 (22:47 +0000)]
(scm_i_chase_pairs): Replace scm_t_bits with scm_t_uint32 to fix the
mismatch between the function declaration and definition.
Marius Vollmer [Tue, 2 Nov 2004 22:46:42 +0000 (22:46 +0000)]
(quicksort): Don't use C99 variable declarations.
Marius Vollmer [Tue, 2 Nov 2004 22:46:26 +0000 (22:46 +0000)]
(uvec_fast_ref): Avoid a compiler warning by returning
SCM_BOOL_F if no type matches.
Marius Vollmer [Tue, 2 Nov 2004 22:45:36 +0000 (22:45 +0000)]
(thread_print): Cast a pointer to size_t when printing
with scm_uintprint.
Marius Vollmer [Tue, 2 Nov 2004 22:45:22 +0000 (22:45 +0000)]
(scm_i_tag_to_prototype): Make sure that "instead" gets defined.
(scm_array_prototype): Deprecated.
Marius Vollmer [Tue, 2 Nov 2004 20:16:06 +0000 (20:16 +0000)]
More docs.
Marius Vollmer [Tue, 2 Nov 2004 20:15:42 +0000 (20:15 +0000)]
*** empty log message ***
Marius Vollmer [Tue, 2 Nov 2004 20:15:32 +0000 (20:15 +0000)]
* srfi-4.h, srfi-4.c (scm_frame_uniform_vector_release): New.
* unif.c (scm_bit_set_star_x, scm_bit_count_star_x): Use it to get
more efficient access to the u32vector.
Marius Vollmer [Tue, 2 Nov 2004 19:52:26 +0000 (19:52 +0000)]
*** empty log message ***
Marius Vollmer [Tue, 2 Nov 2004 19:52:16 +0000 (19:52 +0000)]
(scm_tc7_llvect, scm_tc7_uvect, scm_tc7_fvect, scm_tc7_dvect,
scm_tc7_cvect, scm_tc7_svect, scm_tc7_byvect, scm_tc7_ivect): Renamed
to scm_tc7_unused_1 to scm_tc7_unused_8.
Marius Vollmer [Tue, 2 Nov 2004 19:50:11 +0000 (19:50 +0000)]
* eq.c, evalext.c, gc-card.c, gc-mark.c, objects.c, print.c,
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.
Marius Vollmer [Tue, 2 Nov 2004 19:47:20 +0000 (19:47 +0000)]
Do no longer handle old-style uniform vectors.
Marius Vollmer [Tue, 2 Nov 2004 19:46:29 +0000 (19:46 +0000)]
(SCM_VALIDATE_VECTOR_OR_DVECTOR): Accept f64vectors instead of the
old-style dvectors.
Marius Vollmer [Tue, 2 Nov 2004 19:44:49 +0000 (19:44 +0000)]
Use new-style uniform arrays in place of old-style ones.
Marius Vollmer [Tue, 2 Nov 2004 19:38:55 +0000 (19:38 +0000)]
Rewritten completely, using scm_any_to_u8vector, etc and other
new-style uniform vector functions.
Marius Vollmer [Tue, 2 Nov 2004 19:36:50 +0000 (19:36 +0000)]
(scm_random_solid_sphere_x, scm_random_hollow_sphere_x): Do not
validate vector argument, this is already done elsewhere.
Marius Vollmer [Tue, 2 Nov 2004 19:34:30 +0000 (19:34 +0000)]
(coerce_to_uvec, scm_any_to_u8vector, etc): New.
(scm_uniform_element_size, scm_uniform_vector_length): Do no longer
handle old-style uniform vectors.
Marius Vollmer [Tue, 2 Nov 2004 15:59:47 +0000 (15:59 +0000)]
*** empty log message ***
Marius Vollmer [Tue, 2 Nov 2004 15:53:53 +0000 (15:53 +0000)]
(scm_lreadr): Bugfix: include the last bit in the bit vector.
Marius Vollmer [Fri, 29 Oct 2004 16:14:37 +0000 (16:14 +0000)]
*** empty log message ***
Marius Vollmer [Fri, 29 Oct 2004 16:14:00 +0000 (16:14 +0000)]
(Uniform Vectors): Added c32 and c64 docs.
Marius Vollmer [Fri, 29 Oct 2004 15:42:02 +0000 (15:42 +0000)]
Removed commented out code.
Marius Vollmer [Fri, 29 Oct 2004 15:41:54 +0000 (15:41 +0000)]
*** empty log message ***
Marius Vollmer [Fri, 29 Oct 2004 15:41:26 +0000 (15:41 +0000)]
* 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.
Marius Vollmer [Fri, 29 Oct 2004 14:50:13 +0000 (14:50 +0000)]
(scm_i_print_array): It's "ndim", not "rank". D'Oh!
Marius Vollmer [Fri, 29 Oct 2004 14:47:29 +0000 (14:47 +0000)]
*** empty log message ***
Marius Vollmer [Fri, 29 Oct 2004 14:47:15 +0000 (14:47 +0000)]
Do not install read-hash procedure for reading arrays, this is done in
libguile now.
Marius Vollmer [Fri, 29 Oct 2004 14:45:19 +0000 (14:45 +0000)]
(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.
Marius Vollmer [Fri, 29 Oct 2004 14:41:14 +0000 (14:41 +0000)]
(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.
Marius Vollmer [Fri, 29 Oct 2004 14:17:20 +0000 (14:17 +0000)]
(scm_i_print_complex, icmplx2str): New.
(iflo2str): Use icmplx2str for complex numbers.
Marius Vollmer [Fri, 29 Oct 2004 14:10:49 +0000 (14:10 +0000)]
(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.
Marius Vollmer [Fri, 29 Oct 2004 14:06:02 +0000 (14:06 +0000)]
(scm_take_u8vector, etc): use uvec_sizes instead of
sizeof(CTYPE) as explained in the comment.
Marius Vollmer [Wed, 27 Oct 2004 19:38:04 +0000 (19:38 +0000)]
*** empty log message ***
Marius Vollmer [Wed, 27 Oct 2004 19:34:17 +0000 (19:34 +0000)]
Removed tests that tried to store a character into a byte vector,
which no longer works. Characters are not bytes.
Marius Vollmer [Wed, 27 Oct 2004 19:32:41 +0000 (19:32 +0000)]
*** empty log message ***
Marius Vollmer [Wed, 27 Oct 2004 19:32:29 +0000 (19:32 +0000)]
Added scm_take_u8vector, etc.
Marius Vollmer [Wed, 27 Oct 2004 19:32:11 +0000 (19:32 +0000)]
* 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.
Marius Vollmer [Wed, 27 Oct 2004 19:28:05 +0000 (19:28 +0000)]
(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.
Marius Vollmer [Wed, 27 Oct 2004 19:25:14 +0000 (19:25 +0000)]
* srfi-4.c (take_uvec): New.
(alloc_uvec): Use it.
* srfi-4.h, srfi-4.i.c (scm_take_u8vector, etc): New.
Marius Vollmer [Wed, 27 Oct 2004 18:29:20 +0000 (18:29 +0000)]
(gh_chars2byvect): Reimplemented with scm_make_s8vector.
(gh_scm2chars): Handle s8vectors, removed code for scm_tc7_byvect.
Marius Vollmer [Wed, 27 Oct 2004 18:21:43 +0000 (18:21 +0000)]
* 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.
Marius Vollmer [Wed, 27 Oct 2004 18:16:26 +0000 (18:16 +0000)]
(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
Marius Vollmer [Wed, 27 Oct 2004 18:12:20 +0000 (18:12 +0000)]
(scm_tc7_byvect): Commented out.
Marius Vollmer [Wed, 27 Oct 2004 18:11:14 +0000 (18:11 +0000)]
* 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.
Marius Vollmer [Wed, 27 Oct 2004 17:39:04 +0000 (17:39 +0000)]
*** empty log message ***
Marius Vollmer [Wed, 27 Oct 2004 17:38:51 +0000 (17:38 +0000)]
Moved SRFI-4 docs into main part. Moved bit vectors out of array
section to make them more visible.
Marius Vollmer [Wed, 27 Oct 2004 17:36:16 +0000 (17:36 +0000)]
(uniform-vector?, uniform-vector-set!): Removed, now provided by
libguile.
Marius Vollmer [Wed, 27 Oct 2004 17:32:18 +0000 (17:32 +0000)]
Include "libguile/srfi-4.h".
Marius Vollmer [Tue, 26 Oct 2004 17:05:46 +0000 (17:05 +0000)]
*** empty log message ***
Marius Vollmer [Tue, 26 Oct 2004 17:05:32 +0000 (17:05 +0000)]
Added srfi-4 to cond-expand features.
Marius Vollmer [Tue, 26 Oct 2004 17:01:35 +0000 (17:01 +0000)]
Moved content into core; only the skeletons remains.
Marius Vollmer [Tue, 26 Oct 2004 17:00:13 +0000 (17:00 +0000)]
* 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.
Marius Vollmer [Tue, 26 Oct 2004 16:57:56 +0000 (16:57 +0000)]
(scm_init_guile_1): Call scm_init_srfi_4.
Marius Vollmer [Tue, 26 Oct 2004 16:57:00 +0000 (16:57 +0000)]
* 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.
Marius Vollmer [Tue, 26 Oct 2004 16:56:02 +0000 (16:56 +0000)]
New files, initially from ../srfi/ but heavily modified.
Marius Vollmer [Tue, 26 Oct 2004 16:53:23 +0000 (16:53 +0000)]
(scm_i_print_double): New.
Marius Vollmer [Mon, 25 Oct 2004 13:41:06 +0000 (13:41 +0000)]
*** empty log message ***
Marius Vollmer [Mon, 25 Oct 2004 12:52:19 +0000 (12:52 +0000)]
Added explicit invocation of libtoolize before autoreconf so that
libltdl/ is updated as well.
Marius Vollmer [Fri, 22 Oct 2004 15:14:21 +0000 (15:14 +0000)]
*** empty log message ***
Marius Vollmer [Fri, 22 Oct 2004 15:13:12 +0000 (15:13 +0000)]
* 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.
Marius Vollmer [Fri, 22 Oct 2004 15:11:39 +0000 (15:11 +0000)]
Include "libguile/print.h".
Marius Vollmer [Fri, 22 Oct 2004 13:58:43 +0000 (13:58 +0000)]
*** empty log message ***
Marius Vollmer [Fri, 22 Oct 2004 13:58:34 +0000 (13:58 +0000)]
(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.
Marius Vollmer [Fri, 22 Oct 2004 13:52:22 +0000 (13:52 +0000)]
*** empty log message ***
Marius Vollmer [Fri, 22 Oct 2004 13:52:09 +0000 (13:52 +0000)]
(scm_uintprint): New, for printing scm_t_uintmax values.
(scm_intprint): Argument type changed to scm_t_intmax.
Marius Vollmer [Fri, 22 Oct 2004 13:50:39 +0000 (13:50 +0000)]
(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.
Marius Vollmer [Fri, 22 Oct 2004 13:17:44 +0000 (13:17 +0000)]
*** empty log message ***
Marius Vollmer [Fri, 22 Oct 2004 13:17:04 +0000 (13:17 +0000)]
(quicksort, scm_merge, scm_merge_list_x,
scm_merge_list_step, scm_merge_vector_step): Inserted SCM_TICKs at
strategic places so that the loops can be interrupted.
Marius Vollmer [Fri, 22 Oct 2004 13:04:09 +0000 (13:04 +0000)]
*** empty log message ***
Marius Vollmer [Fri, 22 Oct 2004 13:01:59 +0000 (13:01 +0000)]
* Makefile.am (INCLUDES): Use @LTDLINC@ instead of
"-I$(top_srcdir)/libguile-ltdl".
(libguile_la_LIBADD): Use @LIBLTDL@ instead of
"../libguile-ltdl/libguile-ltdl.a".
* guile.c, dynl.c: Switched to using libltdl directly. Replaced
all references to scm_lt_* with just lt_*. Include <ltdl.h>
instead of <libguile-ltdl.h>.
Marius Vollmer [Fri, 22 Oct 2004 13:01:32 +0000 (13:01 +0000)]
* configure.in: Call AC_LIBLTDL_INSTALLABLE instead of
AC_LIB_LTDL.
(AC_CONFIG_SUBDIRS): Added libltdl.
(DLPREOPEN, LTDLINC, LIBLTDL): Moved AC_SUBST near other libtool
stuff. Also subst LTDLINC instead of INCLTDL.
(AC_CONFIG_FILES): Removed libguile-ltdl/Makefile and
libguile-ltdl/upstream/Makefile.
* Makefile.am (SUBDIRS): Replaced libguile-ltdl with libltdl.
Marius Vollmer [Tue, 19 Oct 2004 22:51:02 +0000 (22:51 +0000)]
*** empty log message ***
Marius Vollmer [Tue, 19 Oct 2004 22:49:51 +0000 (22:49 +0000)]
(quicksort): Copy pivot out of the array while constructing the
partitions; it could get overwritten otherwise. Because of the
ultimate insertion sort, this bug did not cause quicksort to fail, it
just put all the burdon on the insertion sort and was thus very slow.
Thanks to Rolan Orre for reporting the slowness!
Marius Vollmer [Tue, 19 Oct 2004 16:02:11 +0000 (16:02 +0000)]
*** empty log message ***
Marius Vollmer [Tue, 19 Oct 2004 15:59:56 +0000 (15:59 +0000)]
* numbers.c (scm_i_range_error): New.
* conv-integer.i.c, conv-uinteger.i.c: Use it instead of
scm_out_of_range.
Marius Vollmer [Tue, 19 Oct 2004 15:58:49 +0000 (15:58 +0000)]
(scm_restricted_vector_sort_x): Validate startpos <= endpos. State
inclusiveness/exclusiveness if bounds in docstring.
Marius Vollmer [Tue, 19 Oct 2004 15:57:18 +0000 (15:57 +0000)]
(scm_array_p): When no prototype is given, explicitely test for
allowable types, do not simply return true. Thanks to Roland Orre for
reporting this!
Marius Vollmer [Tue, 19 Oct 2004 13:55:18 +0000 (13:55 +0000)]
*** empty log message ***
Marius Vollmer [Tue, 19 Oct 2004 13:55:06 +0000 (13:55 +0000)]
(smob mark function): List admissible functions
to call.
Marius Vollmer [Tue, 19 Oct 2004 13:53:17 +0000 (13:53 +0000)]
(SCM_DEFAULT_MAX_SEGMENT_SIZE): Increase to 20 Mib.
Marius Vollmer [Tue, 19 Oct 2004 13:51:22 +0000 (13:51 +0000)]
(scm_i_get_new_heap_segment): Limit size of new
segment to scm_max_segment_size.
Marius Vollmer [Mon, 18 Oct 2004 15:26:50 +0000 (15:26 +0000)]
*** empty log message ***
Marius Vollmer [Mon, 18 Oct 2004 15:26:41 +0000 (15:26 +0000)]
(format:obj->str): Simplified considerably by using
object->string or display instead of implementing our own printer.
Handle format:read-proof here. Unreadable objects are recognized
by their "#<" prefix instead of by being unknown to the custom
printer (which would treat keywords as unprintable, for example).
(format:iobj->str): Removed.
Han-Wen Nienhuys [Fri, 8 Oct 2004 10:22:26 +0000 (10:22 +0000)]
remove display-separated.
(build-link): cleanup.
(build-compile): remove space between -I and path.
Han-Wen Nienhuys [Fri, 8 Oct 2004 10:03:14 +0000 (10:03 +0000)]
remove display-separated.
(build-link): cleanup.
(build-compile): remove space between -I and path.
Han-Wen Nienhuys [Fri, 8 Oct 2004 09:46:23 +0000 (09:46 +0000)]
remove display-separated.
(build-link): cleanup.
(build-compile): remove space between -I and path.
Han-Wen Nienhuys [Thu, 7 Oct 2004 23:42:41 +0000 (23:42 +0000)]
(scm_igc): put scm_gc_running-- before running hooks.
Han-Wen Nienhuys [Thu, 7 Oct 2004 22:52:22 +0000 (22:52 +0000)]
(scm_double_cell): abort if GC running.
(scm_cell): idem.
Marius Vollmer [Mon, 4 Oct 2004 18:54:43 +0000 (18:54 +0000)]
*** empty log message ***
Marius Vollmer [Mon, 4 Oct 2004 18:54:32 +0000 (18:54 +0000)]
Synced from libguile/
Marius Vollmer [Mon, 4 Oct 2004 18:54:18 +0000 (18:54 +0000)]
* api-data.texi: Removed primitive keyword section, updated
keyword docs.
* api-undocumented.texi: Moved keyword dash-symbol docs here.
Marius Vollmer [Mon, 4 Oct 2004 18:52:35 +0000 (18:52 +0000)]
(scm_wrong_type_arg): Do not talk about "argument" for
pos == 0.
Marius Vollmer [Mon, 4 Oct 2004 18:07:12 +0000 (18:07 +0000)]
*** empty log message ***