Marius Vollmer
7a1aba42cf
(scm_i_print_complex, icmplx2str): New.
...
(iflo2str): Use icmplx2str for complex numbers.
2004-10-29 14:17:20 +00:00
Marius Vollmer
cbdc837976
(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.
2004-10-29 14:10:49 +00:00
Marius Vollmer
d2759570ac
(scm_take_u8vector, etc): use uvec_sizes instead of
...
sizeof(CTYPE) as explained in the comment.
2004-10-29 14:06:02 +00:00
Marius Vollmer
f984af077b
*** empty log message ***
2004-10-27 19:32:41 +00:00
Marius Vollmer
d1d2f0941c
* 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.
2004-10-27 19:32:11 +00:00
Marius Vollmer
46d25cffa8
(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.
2004-10-27 19:28:05 +00:00
Marius Vollmer
faa0036593
* srfi-4.c (take_uvec): New.
...
(alloc_uvec): Use it.
* srfi-4.h, srfi-4.i.c (scm_take_u8vector, etc): New.
2004-10-27 19:25:14 +00:00
Marius Vollmer
2a7bd73833
(gh_chars2byvect): Reimplemented with scm_make_s8vector.
...
(gh_scm2chars): Handle s8vectors, removed code for scm_tc7_byvect.
2004-10-27 18:29:20 +00:00
Marius Vollmer
d315ee57b4
* 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.
2004-10-27 18:21:43 +00:00
Marius Vollmer
b4bdaddeed
(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
2004-10-27 18:16:26 +00:00
Marius Vollmer
54c83b6249
(scm_tc7_byvect): Commented out.
2004-10-27 18:12:20 +00:00
Marius Vollmer
e0e496707b
* 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.
2004-10-27 18:11:14 +00:00
Marius Vollmer
79d5218263
*** empty log message ***
2004-10-26 17:05:46 +00:00
Marius Vollmer
a4022e691e
* 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.
2004-10-26 17:00:13 +00:00
Marius Vollmer
358ebb0b74
(scm_init_guile_1): Call scm_init_srfi_4.
2004-10-26 16:57:56 +00:00
Marius Vollmer
02e227755a
* 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.
2004-10-26 16:57:00 +00:00
Marius Vollmer
f857918291
New files, initially from ../srfi/ but heavily modified.
2004-10-26 16:56:02 +00:00
Marius Vollmer
b479fe9ae4
(scm_i_print_double): New.
2004-10-26 16:53:23 +00:00
Marius Vollmer
e64e80b09a
*** empty log message ***
2004-10-22 15:14:21 +00:00
Marius Vollmer
0345e278f4
* 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.
2004-10-22 15:13:12 +00:00
Marius Vollmer
f27d205727
Include "libguile/print.h".
2004-10-22 15:11:39 +00:00
Marius Vollmer
c90ac3a8bc
*** empty log message ***
2004-10-22 13:52:22 +00:00
Marius Vollmer
a406c9e946
(scm_uintprint): New, for printing scm_t_uintmax values.
...
(scm_intprint): Argument type changed to scm_t_intmax.
2004-10-22 13:52:09 +00:00
Marius Vollmer
2881e77b5a
(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.
2004-10-22 13:50:39 +00:00
Marius Vollmer
77c2594f2f
*** empty log message ***
2004-10-22 13:17:44 +00:00
Marius Vollmer
ee1ac75beb
(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.
2004-10-22 13:17:04 +00:00
Marius Vollmer
6191ccecf1
*** empty log message ***
2004-10-22 13:04:09 +00:00
Marius Vollmer
a8255dca08
* 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>.
2004-10-22 13:01:59 +00:00
Marius Vollmer
77600f3e11
*** empty log message ***
2004-10-19 22:51:02 +00:00
Marius Vollmer
14e9281bb3
(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!
2004-10-19 22:49:51 +00:00
Marius Vollmer
192cd79259
*** empty log message ***
2004-10-19 16:02:11 +00:00
Marius Vollmer
1713d319b7
* numbers.c (scm_i_range_error): New.
...
* conv-integer.i.c, conv-uinteger.i.c: Use it instead of
scm_out_of_range.
2004-10-19 15:59:56 +00:00
Marius Vollmer
3bdf7962a7
(scm_restricted_vector_sort_x): Validate startpos <= endpos. State
...
inclusiveness/exclusiveness if bounds in docstring.
2004-10-19 15:58:49 +00:00
Marius Vollmer
9b0018a113
(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!
2004-10-19 15:57:18 +00:00
Marius Vollmer
5000379b92
*** empty log message ***
2004-10-19 13:55:18 +00:00
Marius Vollmer
322a2bf7a0
(SCM_DEFAULT_MAX_SEGMENT_SIZE): Increase to 20 Mib.
2004-10-19 13:53:17 +00:00
Marius Vollmer
c17b358f48
(scm_i_get_new_heap_segment): Limit size of new
...
segment to scm_max_segment_size.
2004-10-19 13:51:22 +00:00
Han-Wen Nienhuys
07b99edbe8
(scm_igc): put scm_gc_running-- before running hooks.
2004-10-07 23:42:41 +00:00
Han-Wen Nienhuys
497eb0b725
(scm_double_cell): abort if GC running.
...
(scm_cell): idem.
2004-10-07 22:52:22 +00:00
Marius Vollmer
83e1ab6ddf
(scm_wrong_type_arg): Do not talk about "argument" for
...
pos == 0.
2004-10-04 18:52:35 +00:00
Marius Vollmer
aef0bdb420
*** empty log message ***
2004-10-04 18:07:12 +00:00
Marius Vollmer
f13b4400d3
(scm_lreadr): Simply do (symbol->keyword (read)) after
...
reading '#:' or ':'. See NEWS for consequences.
2004-10-04 18:03:18 +00:00
Marius Vollmer
db74ed0306
Include discouraged.h and keywords.h. Fixed silly typo.
2004-10-04 18:00:53 +00:00
Marius Vollmer
d7212289db
* keywords.c (scm_symbol_to_keyword): Use SCM_ASSERT_TYPE for a
...
better error message.
2004-10-04 17:59:20 +00:00
Marius Vollmer
ee4140fb99
(SCM_KEYWORD, SCM_GLOBAL_KEYWORD): Use scm_from_locale_keyword instead
...
of scm_c_make_keyword.
2004-10-04 17:58:40 +00:00
Marius Vollmer
c598539a67
Replaced SCM_KEYWORDP with scm_is_keyword.
2004-10-04 17:02:53 +00:00
Marius Vollmer
265a7997fb
* keywords.h, keywords.c, deprecated.h, deprecated.c
...
(SCM_KEYWORDP, SCM_KEYWORDSYM): Deprecated and implemented in
terms of scm_is_keyword and scm_keyword_dash_symbol.
* keywords.h, keywords.c, discouraged.h, discouraged.c
(scm_make_keyword_from_dash_symbol, scm_keyword_dash_symbol,
scm_c_make_keyword): Discouraged.
* keywords.h, keywords.c (scm_symbol_to_keyword,
scm_keyword_to_symbol): Implemented in C.
(scm_is_keyword, scm_from_locale_keyword,
scm_from_locale_keywordn): New.
2004-10-04 17:02:01 +00:00
Marius Vollmer
43c2562635
*** empty log message ***
2004-09-29 18:07:38 +00:00
Marius Vollmer
8631637894
(scm_lreadr): Revert change from 2004-09-22: string literals are now
...
read-write again (until SCM_STRING_CHARS is removed).
2004-09-29 18:01:36 +00:00
Marius Vollmer
556d75dbb8
(SCM_STRING_CHARS): Explicitely reject read-only strings with an error
...
message that blames SCM_STRING_CHARS.
2004-09-29 17:58:39 +00:00