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

4887 commits

Author SHA1 Message Date
Kevin Ryde
3b2ee265fb *** empty log message *** 2004-12-16 00:41:39 +00:00
Kevin Ryde
e96a9fada5 (scm_array_map_x): Check for at least one source argument. 2004-12-15 23:01:32 +00:00
Kevin Ryde
e120686ac0 *** empty log message *** 2004-12-14 00:23:52 +00:00
Kevin Ryde
fdc6aebfaf (string-any, string-every): Use a scheme
wrapper around the C code so for the final call to the predicate
procedure is a tail call, per SRFI-13 spec.
2004-12-14 00:21:25 +00:00
Kevin Ryde
680b523714 *** empty log message *** 2004-12-13 22:40:08 +00:00
Kevin Ryde
4450a22762 More of:
(scm_eq_p, scm_eqv_p, scm_equal_p): Update docstrings from
recent revision to the reference manual.
2004-12-10 00:49:51 +00:00
Kevin Ryde
2b4d15471c (scm_from_ipv6): Just use mpz_import. Don't bother trying
to fit scm_from_ulong_long, since that uses mpz_import anyway.  Don't
bother trying to fit scm_from_ulong, not really worth the trouble if
addresses are more than 4 bytes usually.
2004-12-10 00:41:33 +00:00
Kevin Ryde
66b1c775d2 (scm_modulo): Amend fixme comment about negative divisor
with "%", C99 says it's well-defined.
2004-12-10 00:00:27 +00:00
Kevin Ryde
602d32dd48 (scm_eq_p, scm_eqv_p, scm_equal_p): Update docstrings from
recent revision to the reference manual.
2004-12-09 23:49:46 +00:00
Kevin Ryde
446d320c8e *** empty log message *** 2004-11-29 21:16:54 +00:00
Kevin Ryde
083ff9955e (NetBSD): Test __m68k__ and __arm__ as well as m68k and
arm32.  Reported by Greg Troxel.
2004-11-29 21:13:57 +00:00
Marius Vollmer
f26547600b *** empty log message *** 2004-11-14 00:25:10 +00:00
Marius Vollmer
2d4d7f27ae (scm_i_cvref): Made non-static for ramap.c. 2004-11-14 00:23:08 +00:00
Marius Vollmer
dd893484ec (INCLUDES): It is "@LTDLINCL@", not "@LTDLINC@". 2004-11-14 00:18:26 +00:00
Marius Vollmer
d550e35f37 *** empty log message *** 2004-11-12 19:00:36 +00:00
Marius Vollmer
02339e5b9b (scm_tc16_enclosed_array, SCM_ENCLOSED_ARRAYP):
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-12 18:55:25 +00:00
Marius Vollmer
823086c18b *** empty log message *** 2004-11-10 01:57:04 +00:00
Marius Vollmer
03a5397a53 Changed all uses of scm_array_prototype to
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-10 01:55:26 +00:00
Marius Vollmer
b4b3363620 (cind): Changed second arg to be pointer to long instead
of uniform vector.
(scm_ramapc): Allocate index vector with scm_malloc and not as
uniform vector.  Wrap it in a frameso that it gets properly freed.
(scm_array_index_map_x): Likewise.
2004-11-10 01:47:44 +00:00
Marius Vollmer
2ed348854d *** empty log message *** 2004-11-10 01:03:43 +00:00
Marius Vollmer
69730f92ca Do not include <libguile.h>, include the
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-10 01:02:32 +00:00
Marius Vollmer
2c72f25301 *** empty log message *** 2004-11-09 22:12:33 +00:00
Marius Vollmer
65b39e8ab7 (gh_uniform_vector_length): Properly use scm_c_uniform_vector_length
instead of scm_uniform_vector_length.
2004-11-09 22:10:59 +00:00
Marius Vollmer
3cc0a2961f *** empty log message *** 2004-11-09 16:17:20 +00:00
Marius Vollmer
20930f28b3 (scm_bitvector_p, scm_bitvector,
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-09 16:16:19 +00:00
Marius Vollmer
887975809f (scm_is_vector, scm_c_vector_length, scm_c_vector_ref,
scm_c_vector_set_x, scm_generalized_vector_p,
scm_generalized_vector_length, scm_generalized_vector_ref,
scm_generalized_vector_set_x, scm_generalized_vector_to_list,
scm_is_generalized_vector, scm_c_generalized_vector_length,
scm_c_generalized_vector_ref, scm_c_generalized_vector_set_x): New.
2004-11-09 16:14:46 +00:00
Marius Vollmer
399aba0a2b Use the new generalized vector functions to handle all
vector like things.
2004-11-09 16:14:33 +00:00
Marius Vollmer
241b64d63f Do no longer handle scm_tc7_bvect bitvectors. 2004-11-09 16:14:22 +00:00
Marius Vollmer
6cf0f51de8 (scm_tc7_bvect): Renamed to scm_tc7_unused7, renaming the
remaining scm_tc7_unused tags to get a neatly ordered list.
2004-11-09 16:14:09 +00:00
Marius Vollmer
811eb6d0ee (scm_c_uniform_vector_ref, scm_c_uniform_vector_set_x): New.
(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-09 16:13:58 +00:00
Marius Vollmer
1d227e527a (DOT_DOC_FILES): Added srfi-4.doc. 2004-11-09 13:55:20 +00:00
Marius Vollmer
1f2328fec2 *** empty log message *** 2004-11-04 17:08:37 +00:00
Marius Vollmer
66842ba3d5 (scm_charnames, scm_charnums): Added "sp" as an alias for "space".
Thanks to Bruce Korb!
2004-11-04 17:08:26 +00:00
Marius Vollmer
b0780bc595 (make_uvec): Use SCM_I_SIZE_MAX instead of SIZE_MAX for added
portability.
2004-11-04 17:07:42 +00:00
Marius Vollmer
c24d026b3b *** empty log message *** 2004-11-04 14:04:35 +00:00
Marius Vollmer
a9d13d445b (scm_read_string_x_partial): Bugfix, apply offset to dest
only after dest has been set.  Thanks to Hyper Division!
2004-11-04 14:01:18 +00:00
Marius Vollmer
6697f945b9 (gh_uniform_vector_length): Use scm_uniform_vector_length instead of
SCM_UVECTOR_LENGTH.
2004-11-04 13:53:31 +00:00
Marius Vollmer
d4ea47c8da *** empty log message *** 2004-11-03 22:02:13 +00:00
Marius Vollmer
219592225f (SCM_UVECTOR_BASE, SCM_SET_UVECTOR_BASE,
SCM_UVECTOR_MAXLENGTH, SCM_UVECTOR_LENGTH, SCM_MAKE_UVECTOR_TAG,
SCM_SET_UVECTOR_LENGTH): Removed.
2004-11-03 21:55:43 +00:00
Marius Vollmer
236288e205 *** empty log message *** 2004-11-02 22:50:19 +00:00
Marius Vollmer
09c6d80a27 (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.
2004-11-02 22:49:14 +00:00
Marius Vollmer
5e1e20c89c (scm_cell, scm_double_cell): Don't use C99 variable
declarations.
2004-11-02 22:47:36 +00:00
Marius Vollmer
7dab4b370c (scm_i_chase_pairs): Replace scm_t_bits with scm_t_uint32 to fix the
mismatch between the function declaration and definition.
2004-11-02 22:47:14 +00:00
Marius Vollmer
1938c6dab7 (quicksort): Don't use C99 variable declarations. 2004-11-02 22:46:42 +00:00
Marius Vollmer
28d4aef1f0 (uvec_fast_ref): Avoid a compiler warning by returning
SCM_BOOL_F if no type matches.
2004-11-02 22:46:26 +00:00
Marius Vollmer
a95ba079dc (thread_print): Cast a pointer to size_t when printing
with scm_uintprint.
2004-11-02 22:45:36 +00:00
Marius Vollmer
72d05aa477 (scm_i_tag_to_prototype): Make sure that "instead" gets defined.
(scm_array_prototype): Deprecated.
2004-11-02 22:45:22 +00:00
Marius Vollmer
5d1015ec8c *** empty log message *** 2004-11-02 20:15:42 +00:00
Marius Vollmer
d44ff083ea * 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.
2004-11-02 20:15:32 +00:00
Marius Vollmer
034486df89 *** empty log message *** 2004-11-02 19:52:26 +00:00