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

3667 commits

Author SHA1 Message Date
Dirk Herrmann
2ade72d773 * Remove uses of SCM_ASSERT that may result in error messages different
from wrong-type-arg errors.
2001-03-06 01:22:37 +00:00
Mikael Djurfeldt
586d7da237 * eval.c (scm_m_letstar): Removed check for duplicate bindings.
Duplicate bindings are OK in a let* since a let* is semantically
equivalent to a nested set of let:s.
2001-03-05 18:54:55 +00:00
Martin Grabmüller
1dd05fd8aa * print.c (scm_print_options): Fixed texinfo in docstring.
* net_db.c (scm_getserv, scm_getproto, scm_getnet): Return #f if
	the underlying functions getservent, getprotoent or getnetent
	return NULL instead of signalling an error.
2001-03-05 07:25:56 +00:00
Gary Houston
2772dc1af3 *** empty log message *** 2001-03-04 23:35:21 +00:00
Gary Houston
439006bf6e * socket.c (scm_fill_sockaddr): don't allow buffer overflows when
taking an unexpectedly large filename for an AF_UNIX socket from
	bind/connect/sendto (thanks to Martin Grabmueller).

	* socket.c (scm_sock_fd_to_port, SCM_SOCK_FD_TO_PORT): removed the
	former and adjusted the latter.
	(scm_socket, scm_socketpair): cosmetic changes.
	(scm_getsockopt, scm_setsockopt): declare optlen as int, not
	size_t as socklen_t substitute.  don't restrict args/return values
	to INUM: allow full range of int or size_t.
	(scm_fill_sockaddr): check arguments before allocating memory, to
	avoid leakage.  use malloc, not scm_must_malloc.
	(scm_connect, scm_bind, scm_sendto): use int, not size_t as socklen_t
	substitute.  free the sockaddr structure before throwing an error.
	(scm_init_add_buffer): procedure removed, together with its static
	buffer scm_addr_buffer, which wouldn't be thread safe.  instead,
	define a macro MAX_ADDR_SIZE and declare the buffer where needed.
	(scm_accept, scm_getpeername, scm_getsockname, scm_recvfrom,
	scm_sendto): use a local buffer instead of scm_addr_buffer.
	adjust for new SCM_SOCK_FD_TO_PORT.  use int for address size,
	not size_t.
	(scm_recvfrom): set addr->sa_family to AF_UNSPEC before the recvfrom
	call to detect whether recvfrom could be bothered to set the address.
	(scm_init_socket): don't call scm_init_addr_buffer.
2001-03-04 23:34:16 +00:00
Dirk Herrmann
276dd6775c * Eliminate another couple of calls to scm_wta. 2001-03-04 22:48:13 +00:00
Mikael Djurfeldt
5e03762c12 * goops.c, goops.h (scm_sys_pre_expand_closure_x): Removed.
(scm_sys_tag_body): Added.
2001-03-04 20:46:04 +00:00
Dirk Herrmann
db4b4ca64f * Eliminate some calls to scm_wta. 2001-03-04 17:09:34 +00:00
Mikael Djurfeldt
87e7741df7 * goops.c (scm_sys_pre_expand_closure_x): New procedure. 2001-03-04 05:27:41 +00:00
Marius Vollmer
d19b0aac73 *** empty log message *** 2001-03-03 23:56:28 +00:00
Marius Vollmer
185ab0ef10 * eval.c (scm_s_duplicate_bindings): New error message.
(scm_m_letrec1, scm_m_letstar): Check for duplicate bindings.
2001-03-03 23:52:57 +00:00
Marius Vollmer
14fe4fe9ce *** empty log message *** 2001-03-03 17:25:22 +00:00
Marius Vollmer
d9d39d76e7 Cosmetic cleanups. 2001-03-03 17:24:51 +00:00
Marius Vollmer
2fd945df34 *** empty log message *** 2001-03-03 15:17:05 +00:00
Marius Vollmer
5280aacabc * eval.h (SCM_EVALIM2): New macro. Use it when a
immediate, literal constant should be evaluated.
* eval.c (scm_s_duplicate_formals): New error message string.
(scm_c_improper_memq): New function.
(scm_m_lambda): Check for duplicate arguments.
(scm_ceval, scm_deval): When executing a body: only cons a new
toplevel environment frame when it is different from the
existing one; use EVALCAR instead of SIDEVAL so that we can properly
check for empty combinations; use SCM_EVALIM2 for the same reason
in the non-toplevel loop.
(nontoplevel_cdrxnoap, nontoplevel_cdrxbegin, nontoplevel_begin):
New labels with the meaning of their non-"nontoplevel" partners,
but they are used when it is known that the body is not evaluated at
top-level.
(scm_apply, scm_dapply): use SCM_EVALIM2 to get proper error
reporting for empty combinations.
2001-03-03 15:10:37 +00:00
Keisuke Nishida
9e6fc585b2 Remove dump facilities. 2001-03-02 23:41:18 +00:00
Martin Grabmüller
eae54bf072 *** empty log message *** 2001-03-02 09:09:06 +00:00
Martin Grabmüller
942e5b9162 * vectors.c (s_scm_vector_p, list->vector, scm_vector)
(scm_vector_ref, scm_vector_set_x, scm_vector_to_list)
	(scm_vector_fill_x), strorder.c (scm_string_equal_p)
	(scm_string_ci_equal_p, scm_string_less_p, scm_string_leq_p)
	(scm_string_gr_p, scm_string_geq_p, scm_string_ci_less_p)
	(scm_string_ci_geq_p), symbols.c (scm_symbol_p)
	(scm_symbol_to_string, scm_string_to_symbol): Changed use of @t{}
	to @code{} as the texinfo manual recommends, converted the
	examples to use a @lisp{}-environment.

	* strports.c (scm_eval_string): Cleaned up the docstring.

	* struct.c (scm_struct_p, scm_struct_vtable_p): Added texinfo
	markup.

	* numbers.c (scm_exact_p, scm_odd_p, scm_even_p)
	(scm_number_to_string, scm_string_to_number, scm_number_p)
	(scm_real_p, scm_integer_p, scm_inexact_p, scm_make_rectangular)
	(scm_make_polar, scm_inexact_to_exact): Added texinfo markup.
	(scm_ash): Added texinfo markup and removed obsolete @refill.
	(scm_gr_p): Corrected comment.
	(scm_gr_p, scm_leq_p, scm_geq_p): Added texinfo markup to (future
	docstring) comments.
	(scm_positive_p, scm_less_p, scm_num_eq_p, scm_real_p)
	(scm_number_p, scm_negative_p, scm_max, scm_min, scm_sum)
	(scm_difference, scm_product, scm_divide, scm_asinh, scm_acosh)
	(scm_atanh, scm_truncate, scm_round, scm_exact_to_inexact)
	(floor, ceiling, $sqrt, $abs, $exp, $log, $sin, $cos, $tan, $asin)
	($acos, $atan, $sinh, $cosh, $tanh, scm_real_part, scm_imag_part)
	(scm_magnitude, scm_angle, scm_abs, scm_quotient, scm_remainder)
	(scm_modulo, scm_gcd, scm_lcm): Added (future docstring) comments.
2001-03-02 09:07:22 +00:00
Dirk Herrmann
23deee8161 * Minor fixes to error checking macros. 2001-02-28 16:58:12 +00:00
Mikael Djurfeldt
6fe692e911 ports.c, ports.h (scm_c_read, scm_c_write): New functions.
ports.h (SCM_READ_BUFFER_EMPTY_P): New macro.
2001-02-26 03:06:57 +00:00
Neil Jerram
27c3700636 * numbers.c (scm_two_doubles, scm_sys_expt, scm_sys_atan2,
scm_make_polar): Rename arguments `z1' and `z2' to `x' and `y',
	since use of `z' suggests that the arguments may be complex.

	* goops.c (scm_make), numbers.c (scm_sys_expt): Fix docstring
	typos.
2001-02-24 23:46:04 +00:00
Neil Jerram
2069af3835 * Minor docstring updates. 2001-02-23 20:24:15 +00:00
Marius Vollmer
97ea55f832 *** empty log message *** 2001-02-22 20:54:36 +00:00
Marius Vollmer
23c46fa69a * eval.c (scm_ceval, scm_deval): When evaluating expressions on
top level, create a fresh top-level environment for each
expression instead of mutating the exisint frame.  This is
important when that frame is closed over.
2001-02-22 20:54:12 +00:00
Marius Vollmer
0ba8a0a583 * goops.c (scm_add_method, DEFVAR): Use scm_eval instead of
scm_i_eval.
(make_class_from_template): Do not bother to set the current
module around the call to DEFVAR, scm_eval takes care of that.
(scm_init_goops): Make scm_module_goops and
scm_goops_lookup_closure permanent objects.
2001-02-22 20:53:55 +00:00
Marius Vollmer
f1b7a06676 * load.c (load): Use scm_primtive_eval_x instead of scm_i_eval_x. 2001-02-22 20:52:46 +00:00
Marius Vollmer
b42ff18090 *** empty log message *** 2001-02-22 09:25:32 +00:00
Marius Vollmer
5fa207514c * numbers.c (s_scm_logior) [SCM_DIGSTOOBIG]: Also use
SCM_DIGSPERLONG instead of DIGSPERLONG.
2001-02-22 09:25:03 +00:00
Marius Vollmer
a820af98a7 Only check number of arguments for closures, see last change.
I just love this evaluator, man.
2001-02-21 22:52:59 +00:00
Marius Vollmer
09f2ab1e04 *** empty log message *** 2001-02-21 20:19:31 +00:00
Marius Vollmer
134ec96519 * numbers.c (scm_logior) [SCM_DIGSTOOBIG]: Correctly use
SCM_BIGDIG instead of BIGDIG.  Thanks to Steven G. Johnson!
2001-02-21 20:16:05 +00:00
Marius Vollmer
d6a35f3f61 Added copyright and licence notice. 2001-02-21 20:15:15 +00:00
Marius Vollmer
e37a4fbae1 * eval.c (scm_ceval, scm_deval): Check for wrong number of args
before applying arrow procedure in `cond' and before applying
receiver procedure in call-with-current-continuation.
(scm_i_eval): Do not invoke scm_copy_tree in argument in SCM_XEVAL
macro.  The argument is expanded more than one time.
2001-02-21 20:14:47 +00:00
Martin Grabmüller
7090240cf4 *** empty log message *** 2001-02-17 11:36:16 +00:00
Martin Grabmüller
cb87e06ae6 (scm_make_arbiter, scm_try_arbiter)
(scm_release_arbiter): Added texinfo markup to docstrings.
Changed `Returns' to `Return'.
(arbiter_print): Changed SCM_CDR to SCM_SMOB_DATA.
2001-02-17 11:34:26 +00:00
Martin Grabmüller
e1546b65f8 (scm_drain_input): Lowercased argument to @var.
(scm_current_input_port, scm_current_output_port): Filled in
missing explanation.
(scm_current_load_port, scm_set_current_output_port)
(scm_set_current_error_port, scm_port_line, scm_set_port_line_x):
Added texinfo markup.
2001-02-17 11:33:42 +00:00
Martin Grabmüller
0fb104edba (scm_environment_p)
(scm_environment_bound_p, scm_environment_ref)
(scm_environment_fold, scm_environment_define)
(scm_environment_undefine, scm_environment_set_x)
(scm_environment_cell, scm_environment_observe)
(scm_environment_observe_weak, scm_environment_unobserve)
(scm_make_eval_environment, scm_eval_environment_p)
(scm_eval_environment_set_local_x, scm_eval_environment_local)
(scm_eval_environment_imported)
(scm_eval_environment_set_imported_x, scm_make_import_environment)
(scm_import_environment_p, scm_import_environment_imports)
(scm_import_environment_set_imports_x, scm_make_export_environment)
(scm_export_environment_p, scm_export_environment_private)
(scm_export_environment_set_private_x)
(scm_export_environment_signature)
(scm_export_environment_set_signature_x, scm_leaf_environment_p):
Added texinfo markup.
2001-02-17 11:32:16 +00:00
Martin Grabmüller
6836c87b3a (scm_malloc_stats): Added texinfo markup. 2001-02-17 11:30:34 +00:00
Martin Grabmüller
eca65e90f7 (scm_newline, scm_write_char, scm_simple_format): Added texinfo markup. 2001-02-17 11:29:58 +00:00
Martin Grabmüller
3b64451459 (scm_seed_to_random_state, scm_copy_random_state, scm_random):
Added texinfo markup.
2001-02-17 11:29:16 +00:00
Martin Grabmüller
a8eac221a7 (scm_strptime, scm_mktime): Added texinfo markup. 2001-02-17 11:28:30 +00:00
Martin Grabmüller
0d26a824c7 (scm_string_p, scm_make_string, scm_read_only_string_p, scm_string_length)
(scm_string_ref, scm_string_set_x, scm_substring, scm_string_append):
Added texinfo markup.
2001-02-17 11:27:41 +00:00
Martin Grabmüller
16bad70540 (scm_gentemp, scm_gensym): Added texinfo markup. 2001-02-17 11:26:26 +00:00
Martin Grabmüller
c7eb87615a (scm_bit_count, scm_bit_set_star_x): Added texinfo markup. 2001-02-17 11:25:34 +00:00
Martin Grabmüller
647e35e27c (scm_values): Added texinfo markup. 2001-02-17 11:24:30 +00:00
Martin Grabmüller
03ba3d5b68 (scm_make_variable, scm_make_undefined_variable)
(scm_variable_ref, scm_variable_set_x, scm_builtin_variable)
(scm_variable_bound_p): Added texinfo markup.
2001-02-17 11:23:29 +00:00
Neil Jerram
2570385024 * guile-snarf.awk.in: Quote any `@'s that occur in Scheme names,
by doubling them to `@@'.
2001-02-16 18:57:11 +00:00
Martin Grabmüller
73c0fdce7e Massive docstring work. 2001-02-16 15:25:09 +00:00
Martin Grabmüller
811cf8467a (scm_async, scm_system_async, scm_async_mark, scm_system_async_mark,
scm_run_asyncs, scm_noop, scm_set_tick_rate, scm_set_switch_rate,
scm_unmask_signals, scm_mask_signals): Added docstrings.
2001-02-16 15:22:58 +00:00
Martin Grabmüller
c73bdd3a73 (scm_display_error, scm_set_print_params_x, scm_display_application,
scm_display_backtrace, scm_backtrace): Added docstrings.
2001-02-16 15:21:21 +00:00