1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-02 21:10:27 +02:00
Commit graph

3667 commits

Author SHA1 Message Date
Marius Vollmer
90cd76d9d8 * eval.c (SCM_APPLY): Check that arg1 is bound for scm_tc7_cxr. 2001-03-29 22:38:00 +00:00
Martin Grabmüller
91344cebe0 * strop.c (scm_string_to_list): Fixed docstring markup.
(scm_string_upcase_x, scm_string_upcase, scm_string_downcase_x),
	(scm_string_downcase, scm_string_capitalize_x),
	(scm_string_capitalize): Rewrote and corrected docstrings.
	(scm_string_ci_to_symbol): Made docstring more explicit.
2001-03-27 15:40:18 +00:00
Marius Vollmer
0757681299 *** empty log message *** 2001-03-26 22:43:50 +00:00
Marius Vollmer
752af22794 * values.h (scm_values_vtable, SCM_VALUESP): Moved here so that
eval.c can use it.
(scm_call_with_values): Removed.
* values.c (values_vtable, scm_values_vtable): Added "scm_" prefix
so that it can be exported.
(scm_call_with_values): Removed.
2001-03-26 22:43:23 +00:00
Marius Vollmer
a513ead308 * tags.h (SCM_IM_CALL_WITH_VALUES): New isym.
* eval.c: Include "libguile/values.h"
(scm_m_at_call_with_values, scm_sym_at_call_with_values):
New.
(unmemocopy, scm_ceval, scm_deval): Handle new isym.
* eval.h (scm_sym_at_call_with_values, scm_m_at_call_with_values):
New delcarations to support above change.

* eval.c (scm_primitive_eval_x, scm_primitive_eval): Fix syntax
errors with last change.

* eval.c (scm_primitive_eval_x, scm_primitive_eval, scm_i_eval_x,
scm_i_eval): Moved the application of the system transformer from
scm_i_eval to scm_primitive_eval.
2001-03-26 22:39:35 +00:00
Marius Vollmer
baeda60023 * tags.h (SCM_IM_CALL_WITH_VALUES): New isym.
* eval.c (scm_m_at_call_with_values, scm_sym_at_call_with_values):
New.
(unmemocopy, scm_ceval, scm_deval): Handle new isym.
* eval.h (scm_sym_at_call_with_values, scm_m_at_call_with_values):
New delcarations to support above change.
2001-03-26 22:36:56 +00:00
Neil Jerram
a6be01a45e * Minor docstring updates. 2001-03-23 17:24:28 +00:00
Neil Jerram
a17bb5fdc2 * Fix docstring typos. 2001-03-23 16:14:47 +00:00
Dirk Herrmann
be54b15d85 * Replace function scm_makstr with new function scm_allocate_string. 2001-03-22 12:52:03 +00:00
Gary Houston
6d163216bd * posix.c (scm_tmpnam): check that return value from tmpnam is not
NULL.  rewrote the docstring.
	(scm_mkstemp): new procedure implementing "mkstemp!".
	* posix.h: declare scm_mkstemp.

	* net_db.c: declare h_errno if configure didn't define HAVE_H_ERRNO.
	normally it would be found in netdb.h.
2001-03-18 20:29:58 +00:00
Gary Houston
789ecc0581 * net_db.c: define h_errno if configure didn't define HAVE_H_ERRNO.
normally it would be found in netdb.h.
2001-03-18 11:54:25 +00:00
Gary Houston
e9e225e5ac * configure.in: don't append threads.doc to EXTRA_DOT_DOC_FILES,
since EXTRA_DOT_DOC_FILES is redefined later.  define
	EXTRA_DOT_X_FILES and hand it to AC_SUBST.
	* sort.c (scm_sort): move sortvec variable to avoid a compiler
	warning	when HAVE_ARRAYS is not defined.  move len too.
	* Makefile.am (DOT_X_FILES): remove net_db.x, posix.x, socket.x.
	(EXTRA_DOT_X_FILES): let configure set the value.
	(DOT_DOC_FILES): remove net_db.doc, posix.doc, socket.doc.
2001-03-17 21:20:20 +00:00
Gary Houston
c6c79933b5 * gc.c (scm_must_malloc): changed the comment explaining when
scm_must variants of malloc/free etc., should be used, based on
	explanation from Dirk Herrmann.
	* fports.c (scm_fport_buffer_add): use FUNC_NAME instead of a local
	string with procedure name.  use scm_must_malloc instead of malloc.
	(scm_setvbuf, scm_fdes_to_port, fport_close): use scm_must variants
	of malloc/free.
	* ports.c (scm_add_to_port_table, scm_remove_from_port_table,
	scm_ungetc): use scm_must variants of malloc/realloc/free.
	(scm_add_to_port_table, scm_ungetc): define FUNC_NAME.
2001-03-17 16:59:48 +00:00
Dirk Herrmann
b3fcac341b * __scm.h (SCM_ASSERT, SCM_WTA_DISPATCH_0, SCM_WTA_DISPATCH_1,
SCM_WTA_DISPATCH_2, SCM_WTA_DISPATCH_n):  Don't call scm_wta, call
scm_wrong_type_arg instead.

(SCM_WNA):  Deprecated.

* error.[ch] (scm_wta):  Deprecated.

* numbers.c (s_i_log):  Minor comment fix.

* read.c (scm_lreadr), unif.c (scm_aind, scm_shap2ra,
scm_make_shared_array, scm_transpose_array, scm_enclose_array,
scm_array_in_bounds_p): Don't use SCM_ASSERT to check for
wrong-num-args or misc errors.

* unif.c (scm_make_shared_array, scm_transpose_array,
scm_enclose_array, scm_array_in_bounds_p, scm_array_set_x):
Validate the rest argument (note: this is only done when guile is
built with SCM_DEBUG_REST_ARGUMENT=1)

(scm_array_in_bounds_p, scm_uniform_vector_ref, scm_array_set_x):
Replace calls to scm_wrong_num_args by SCM_WRONG_NUM_ARGS.

* validate.h (SCM_FUNC_NAME, SCM_VALIDATE_NUMBER_COPY,
SCM_VALIDATE_NUMBER_DEF_COPY):  Deprecated.
2001-03-17 13:34:21 +00:00
Dirk Herrmann
68baa7e7f8 * validate.h (SCM_WRONG_NUM_ARGS): Call scm_error_num_args_subr
instead of scm_wrong_num_args.

* coop-threads.c:  Don't include libguile/strings.h.  (Was only
needed for former implementation of SCM_WRONG_NUM_ARGS.)

* debug.c (scm_m_start_stack):  Don't use SCM_ASSERT to check for
wrong-num-args errors.
2001-03-17 12:20:36 +00:00
Dirk Herrmann
9f40cd879d * Added function scm_error_num_args_subr. 2001-03-17 11:32:56 +00:00
Martin Grabmüller
5352393c55 * list.c (scm_list, scm_cons_star, scm_null_p, scm_list_p),
(scm_length, scm_append, scm_reverse, scm_list_ref),
	(scm_memq, scm_memv, scm_member, scm_delv_x, scm_delete_x),
	(scm_delq, scm_delv, scm_delete, scm_delq1_x, scm_delv1_x),
	(scm_delete1_x), gc.c (scm_map_free_list),
	(scm_free_list_length), hash.c (scm_hashq, scm_hashv),
	(scm_hash), hashtab.c (scm_hashq_ref, scm_hashq_set_x),
	(scm_hashq_remove_x, scm_hashv_ref, scm_hashv_set_x),
	(scm_hashv_remove_x, scm_hash_ref, scm_hash_set_x),
	(scm_hash_remove_x), ports.c (scm_pt_size, scm_pt_member), print.c
	(scm_current_pstate), scmsigs.c (scm_usleep), goops.c
	(scm_get_keyword, scm_sys_compute_slots): Added texinfo markup.

	* weaks.c (scm_weak_vector_p, scm_weak_key_hash_table_p),
	(scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p),
	rdelim.c (scm_read_delimited_x), strop.c (scm_string_index),
	symbols.c (scm_symbol_interned_p), numbers.c
	(scm_string_to_number), ports.c (scm_port_p): Corrected texinfo
	markup.
2001-03-16 10:00:17 +00:00
Keisuke Nishida
a9205f0774 * snarf.h (SCM_CONST_LONG): Deprecated.
* tag.c (CONST_INUM): New macro.  Use it to define scm_utag_*.
2001-03-16 05:11:34 +00:00
Marius Vollmer
6d583887bb *** empty log message *** 2001-03-15 20:04:56 +00:00
Marius Vollmer
caf08e652e * numbers.c (scm_num2ulong): Check that a bignum is positive
before looking at the magnitude.  Correctly check for overflow
during conversion.
(scm_num2long_long): Likewise.
(scm_num2ulong_long): New.
(ULONG_LONG_MAX): Define if not already defined.
* numbers.h: (scm_num2ulong_long): New prototype.
2001-03-15 20:04:41 +00:00
Marius Vollmer
5345cf7cae * numbers.c (scm_num2ulong): Check that a bignum is positive
before looking at the magnitude.  Correctly check for overflow
during conversion.
2001-03-15 19:21:51 +00:00
Martin Grabmüller
e87a03fce7 * validate.h (SCM_VALIDATE_OPOUTSTRPORT): New macro.
* strports.h (SCM_STRPORTP, SCM_OPSTRPORTP, SCM_OPINSTRPORTP),
	(SCM_OPOUTSTRPORTP): New predicate macros.
	(scm_open_input_string, scm_open_output_string),
	(scm_get_output_string): New prototypes.

	* strports.c (scm_open_input_string, scm_open_output_string),
	(scm_get_output_string): New procedures (SRFI-6 compliant).
	Made scm_tc16_strport non-static.
2001-03-15 11:24:45 +00:00
Dirk Herrmann
160bb34a53 * Removed unused object parameter from SCM_ASSYNT. 2001-03-15 09:50:20 +00:00
Dirk Herrmann
80dee77b86 * Use const specifier in function signature of gh_ints2scm. 2001-03-15 00:42:10 +00:00
Martin Grabmüller
d3dd80ab5b * gh_data.c (gh_scm2chars, gh_scm2shorts, gh_scm2longs),
(gh_scm2floats, gh_scm2doubles): Check for malloc() returning NULL
in various places.
(gh_scm2newstr, gh_symbol2newstr): Change call to
scm_must_malloc() to malloc(), because user-free()able memory is
allocated.
* gc.c: Added declaration of `scm_debug_check_freelist'.
2001-03-14 10:02:12 +00:00
Martin Grabmüller
26a3038db8 * ports.c (scm_port_mode): Changed `mode' array size to 4,
avoiding buffer overflow.
2001-03-13 08:02:02 +00:00
Keisuke Nishida
fe78b6c096 (scm_object_to_string): Takes an optional argument. 2001-03-13 05:59:42 +00:00
Keisuke Nishida
1a92274c8e Use FUNC_NAME. 2001-03-13 02:14:12 +00:00
Keisuke Nishida
1f3908c46a * strports.c (scm_object_to_string): New procedure.
(scm_strprint_obj): Deprecated.
2001-03-13 02:09:57 +00:00
Dirk Herrmann
e11208ca72 * Cleaned up uses and definition of SCM_ASSYNT. 2001-03-12 14:34:44 +00:00
Martin Grabmüller
67e8151b65 * load.c (scm_primitive_load, scm_primitive_load_path),
(scm_sys_search_load_path): Corrected docstrings (file ->
	filename).

	* eval.c (scm_force): Added texinfo markup to docstring.
	(scm_promise_p): Renamed parameter to `obj' to match docstring.

	* debug-malloc.c: Reinserted #include <stdio.h>.
2001-03-12 07:08:46 +00:00
Keisuke Nishida
a51fe2479e Split up. 2001-03-11 23:57:16 +00:00
Keisuke Nishida
e39c3de479 * list.c (s_scm_reverse_x): Use SCM_VALIDATE_LIST. 2001-03-11 23:47:16 +00:00
Keisuke Nishida
e0c08f17b1 Use SCM_LISTn instead of scm_listify. 2001-03-11 09:44:08 +00:00
Mikael Djurfeldt
e6e2e95aa5 * _scm.h: Removed #include <errno.h>.
* error.c, net_db.c, putenv.c, stime.c: Removed declaration of
errno variable (can be a macro on some systems, for example when
using linux libc with threads).

* error.c, filesys.c, gc.c, ioext.c, iselect.c, net_db.c, ports.c,
posix.c, print.c, putenv.c, scmsigs.c, script.c, simpos.c, smob.c,
socket.c, srcprop.c, stime.c, strop.c, unif.c, vports.c: Added
#include <errno.h> in these 20 out of 100 files.
2001-03-10 16:56:09 +00:00
Gary Houston
97d0e20b2e * socket.c: add a definition of SUN_LEN (from glibc) for when it's
not already defined.
2001-03-10 10:30:16 +00:00
Mikael Djurfeldt
e75341b38d * coop.c: Inserted #include <stdio.h>.
* iselect.c: Reinserted #include <stdio.h>.
2001-03-10 03:09:07 +00:00
Marius Vollmer
74355186f0 *** empty log message *** 2001-03-10 01:07:44 +00:00
Marius Vollmer
8b50fe8ed3 * posix.c: Replaced `#define' of __USE_XOPEN right before
including unistd.h with a define of _GNU_SOURCE at the very top of
the file.
2001-03-10 01:07:06 +00:00
Keisuke Nishida
783e777478 Remove #include <stdio.h>. Add #include <string.h>. 2001-03-09 23:33:41 +00:00
Martin Grabmüller
a0f9c651b1 (scm_gethostname): Set initial name length to 256 for
Solaris.
2001-03-09 12:09:17 +00:00
Martin Grabmüller
9a677c37c8 * posix.c (scm_gethostname): Set initial name length to 256 for
Solaris.
2001-03-09 12:08:43 +00:00
Martin Grabmüller
94e6d79391 Added some new posix functions:
(scm_crypt, scm_chroot, scm_getlogin, scm_cuserid),
	(scm_getpriority, scm_setpriority, scm_getpass, scm_flock),
	(scm_sethostname, scm_gethostname): New procedures.
2001-03-09 10:03:47 +00:00
Neil Jerram
650a1cf929 * Docstring fixes. 2001-03-09 00:21:27 +00:00
Mikael Djurfeldt
5e4a4d09fe * ramap.c (racp): Removed optimization which caused array copying
to fail if the two arrays shared storage.  Re-inserted the IVDEP
macros removed in the change of 2000-03-09.  (Don't really have a
complete grasp of what they are for, but they seem to be necessary
on Crays.  This needs testing!)  Thanks to Miroslav Silovic.
2001-03-08 19:34:41 +00:00
Mikael Djurfeldt
9636b49cd2 * hash.c (scm_string_hash): Don't downcase characters. 2001-03-08 18:14:33 +00:00
Mikael Djurfeldt
04a4d6664a *** empty log message *** 2001-03-08 02:49:34 +00:00
Mikael Djurfeldt
a4c91488d3 * symbols.c, symbols.h (scm_sys_symbols): New function GUILE_DEBUG
function.
2001-03-08 02:46:38 +00:00
Mikael Djurfeldt
70ce100d8a * coop-threads.c: Fixed change of 2001-03-06. 2001-03-08 02:45:39 +00:00
Keisuke Nishida
66418d3465 fix problems with gcc-2.96. 2001-03-07 06:06:16 +00:00