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

4 commits

Author SHA1 Message Date
Rob Browning
eaec153f17 * srfi-4.c: major overhaul -- essentially all functions affected.
Changes fix various type related issues, including 64-bit print
problems.  Uniform vector lengths are now officially a size_t
stored in a cell.
(VALIDATE_UVEC, RANGE_CHECK_AND_COPY_UVEC_INDEX): new macros.
(print_int64, print_uint64, print_uint32): new helper functions.
(uvec_print): reworked to use a union.
(uvec_equalp): new function.
(make_uvec): reworked -- now checks for possible overflow.
(uvec_length): new helper function.

(scm_u8vector_p, scm_make_u8vector, scm_u8vector): reworked.
(scm_u8vector_length): reworked.
(scm_u8vector_ref, scm_u8vector_set_x): reworked.
(scm_u8vector_to_list, scm_list_to_u8vector): reworked.

(scm_s8vector_p, scm_make_s8vector, scm_s8vector): reworked.
(scm_s8vector_length): reworked.
(scm_s8vector_ref, scm_s8vector_set_x): reworked.
(scm_s8vector_to_list, scm_list_to_s8vector): reworked.

(scm_u16vector_p, scm_make_u16vector, scm_u16vector): reworked.
(scm_u16vector_length): reworked.
(scm_u16vector_ref, scm_u16vector_set_x): reworked.
(scm_u16vector_to_list, scm_list_to_u16vector): reworked.

(scm_s16vector_p, scm_make_s16vector, scm_s16vector): reworked.
(scm_s16vector_length): reworked.
(scm_s16vector_ref, scm_s16vector_set_x): reworked.
(scm_s16vector_to_list, scm_list_to_s16vector): reworked.

(scm_u32vector_p, scm_make_u32vector, scm_u32vector): reworked.
(scm_u32vector_length): reworked.
(scm_u32vector_ref, scm_u32vector_set_x): reworked.
(scm_u32vector_to_list, scm_list_to_u32vector): reworked.

(scm_s32vector_p, scm_make_s32vector, scm_s32vector): reworked.
(scm_s32vector_length): reworked.
(scm_s32vector_ref, scm_s32vector_set_x): reworked.
(scm_s32vector_to_list, scm_list_to_s32vector): reworked.

(scm_u64vector_p, scm_make_u64vector, scm_u64vector): reworked.
(scm_u64vector_length): reworked.
(scm_u64vector_ref, scm_u64vector_set_x): reworked.
(scm_u64vector_to_list, scm_list_to_u64vector): reworked.

(scm_s64vector_p, scm_make_s64vector, scm_s64vector): reworked.
(scm_s64vector_length): reworked.
(scm_s64vector_ref, scm_s64vector_set_x): reworked.
(scm_s64vector_to_list, scm_list_to_s64vector): reworked.

(scm_init_srfi_4): added check to make sure a size_t fits in a cell.
2004-08-07 17:03:54 +00:00
Thien-Thi Nguyen
19570609ad Retire inclusion guard macro SCM_MAGIC_SNARFER. 2002-03-14 05:32:48 +00:00
Martin Grabmüller
2c4df45186 * srfi-4.c: Minor cleanups.
* srfi-14.c (scm_char_set_fold, scm_char_set_unfold)
	(scm_char_set_unfold_x, scm_char_set_for_each)
	(scm_char_set_map, scm_char_set_filter)
	(scm_char_set_filter_x, scm_char_set_count)
	(scm_char_set_every, scm_char_set_any): Replace calls to
	scm_apply() with the corresponding scm_call_N() functions.

	* srfi-14.c (scm_char_set_ref, scm_char_set_cursor_next)
	(scm_char_set_unfold, scm_char_set_unfold_x)
	(scm_char_set_map, scm_char_set_diff_plus_intersection)
	(scm_char_set_diff_plus_intersection_x): Replace deprecated macros
	SCM_LISTN with calls to scm_list_N().

	* srfi-13.c (scm_string_tabulate, scm_string_map)
	(scm_string_map_x, scm_string_unfold)
	(scm_string_unfold_right): Replace deprecated macros SCM_LISTN
	with calls to scm_list_N().

	* srfi-13.c (scm_string_any, scm_string_every),
	(scm_string_tabulate, scm_string_trim),
	(scm_string_trim_right, scm_string_trim_both),
	(scm_string_compare, scm_string_compare_ci),
	(scm_string_indexS, scm_string_index_right),
	(scm_string_skip, scm_string_skip_right, scm_string_count),
	(scm_string_map, scm_string_map_x, scm_string_fold),
	(scm_string_fold_right, scm_string_unfold),
	(scm_string_unfold_right, scm_string_for_each),
	(scm_string_filter, scm_string_delete): Replace calls to
	scm_apply() with the corresponding scm_call_N() functions.
2001-06-28 16:39:00 +00:00
Martin Grabmüller
71ca65d982 * Makefile.am: Added SRFI-4 files in various places.
* srfi-4.c, srfi-4.h, srfi-4.scm: New files implementing SRFI-4.
2001-06-27 13:18:40 +00:00