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

144 commits

Author SHA1 Message Date
Neil Jerram
2824f4dca1 (do_read_without_guile): Use the "raw_data" passed in
(rather than an uninitialized pointer on the stack).
2005-12-14 00:15:00 +00:00
Marius Vollmer
324a5aa97a (read_without_guile): New.
(signal_delivery_thread): Use it instead of
scm_leave_guile/read/scm_enter_guile.
2005-12-06 20:02:19 +00:00
Marius Vollmer
92205699d0 The FSF has a new address. 2005-05-23 19:57:22 +00:00
Neil Jerram
229a07109c (signal_delivery_thread): Return a value, to avoid
compile warning reported by Werner Scheinast.
2005-05-10 20:04:14 +00:00
Marius Vollmer
9de87eea47 See ChangeLog from 2005-03-02. 2005-03-02 20:42:01 +00:00
Kevin Ryde
3843f734d1 (scm_sigaction_for_thread): Use scm_to_long for
sa_handler, needs to be a long on 64-bit systems where int is only 32
bits.
2005-01-24 00:03:00 +00:00
Marius Vollmer
4057a3e05a Use new vector elements API or simple vector API, as appropriate.
Removed SCM_HAVE_ARRAYS ifdefery.  Replaced all uses of
SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET.
2005-01-02 20:49:04 +00:00
Marius Vollmer
d2e53ed6f8 *** empty log message *** 2004-09-22 17:41:37 +00:00
Marius Vollmer
b9bd8526f0 * numbers.h, numbers.c, discouraged.h, discouraged.c (scm_short2num,
scm_ushort2num, scm_int2num, scm_uint2num, scm_long2num,
scm_ulong2num, scm_size2num, scm_ptrdiff2num, scm_num2short,
scm_num2ushort, scm_num2int, scm_num2uint, scm_num2long,
scm_num2ulong, scm_num2size, scm_num2ptrdiff, scm_long_long2num,
scm_ulong_long2num, scm_num2long_long, scm_num2ulong_long):
Discouraged by moving to discouraged.h and discouraged.c and
reimplementing in terms of scm_from_* and scm_to_*.  Changed all uses
to the new scm_from_* and scm_to_* functions.
2004-08-02 16:14:04 +00:00
Marius Vollmer
bc36d0502b * tags.h, deprecated.h (SCM_EQ_P): Deprecated by moving it into
deprecated.h.  Replaced all uses with scm_is_eq.
2004-07-27 15:41:49 +00:00
Marius Vollmer
e11e83f3d9 * deprecated.h, deprecated.c, numbers.h (SCM_INUMP, SCM_NINUMP,
SCM_INUM): Deprecated by reenaming them to SCM_I_INUMP, SCM_I_NINUMP
and SCM_I_INUM, respectively and adding deprecated versions to
deprecated.h and deprecated.c.  Changed all uses to either use the
SCM_I_ variants or scm_is_*, scm_to_*, or scm_from_*, as appropriate.
2004-07-23 15:43:02 +00:00
Marius Vollmer
a55c2b6809 * validate.h, deprecated.h (SCM_VALIDATE_INUM, SCM_VALIDATE_INUM_COPY,
SCM_VALIDATE_BIGINT, SCM_VALIDATE_INUM_MIN,
SCM_VALIDATE_INUM_MIN_COPY,
SCM_VALIDATE_INUM_MIN_DEF_COPY,SCM_VALIDATE_INUM_DEF,
SCM_VALIDATE_INUM_DEF_COPY, SCM_VALIDATE_INUM_RANGE,
SCM_VALIDATE_INUM_RANGE_COPY): Deprecated because they make the
fixnum/bignum distinction visible.  Changed all uses to scm_to_size_t
or similar.
2004-07-10 14:35:36 +00:00
Marius Vollmer
93ccaef0c6 * numbers.h (SCM_MAKINUM, SCM_I_MAKINUM): Renamed SCM_MAKINUM to
SCM_I_MAKINUM and changed all uses.
2004-07-08 15:58:11 +00:00
Marius Vollmer
7888309be8 * deprecated.h, boolean.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOL,
SCM_NEGATE_BOOL, SCM_BOOLP): Deprecated by moving into "deprecated.h".
Replaced all uses with scm_is_false, scm_is_true, scm_from_bool, and
scm_is_bool, respectively.
2004-07-06 10:59:25 +00:00
Marius Vollmer
43067cec3b (scm_sigaction_for_thread): Validate that the handler is indeed a
procedure when it isn't a number.
2004-05-10 22:09:04 +00:00
Kevin Ryde
2e1fc2e8e3 (scm_sigaction_for_thread): Correction to signum range
test, avoids SCM_VECTOR_REF outside bounds of signal_handlers on
calling (sigaction NSIG).
2004-04-05 22:46:29 +00:00
Marius Vollmer
73be1d9e8e Changed license terms to the plain LGPL thru-out. 2003-04-05 19:15:35 +00:00
Rob Browning
29d36c2dc3 * scmsigs.c: #include <config.h> if HAVE_CONFIG_H. 2003-03-25 23:59:37 +00:00
Marius Vollmer
3d7f708f21 * __scm.h (USE_THREADS, GUILE_ISELECT): Define when
SCM_DEBUG_DEPRECATED.  Removed their use thru-out Guile.
2002-11-03 22:09:20 +00:00
Marius Vollmer
dbbaa07cab (signal_cell_handlers, install_handler_data,
scm_delq_spine_x, really_install_handler, install_handler): New
scheme for triggering signal handlers, to simplify take_signal.
(take_signal): Simplified, to avoid race conditions.
(scm_sigaction_for_thread): Use new Scheme.  Validate that thread
hasn't exited yet.
2002-10-27 20:25:17 +00:00
Marius Vollmer
f6ecc207bf (scm_sigaction_for_thread): It's "USE_THREADS" not "USE_THREAD". 2002-10-16 16:01:22 +00:00
Marius Vollmer
4feac0b904 * async.c (s_scm_system_async_mark_for_thread): Only call
scm_i_thread_root when USE_THREADS is defined.  Use scm_root
otherwise.

* scmsigs.c (take_signal): Only call scm_i_thread_root when
USE_THREADS is defined.  Use scm_root otherwise.
(scm_sigaction_for_thread): Ignore THREAD argument when
USE_THREADS is not defined.  Also, move THREAD argument defaulting
out of HAVE_SIGACTION section, which was a bug.
2002-10-11 13:02:50 +00:00
Marius Vollmer
e581432ec3 (scm_sigaction_for_thread): Store original handler in signal_handlers,
not the closure that is used as the async.  The closure is stored in
signal_handler_cells, as previously.
2002-10-10 18:11:06 +00:00
Marius Vollmer
f6b44bd99f * async.c (scm_async_click): Set the cdr of a executed handler
cell to SCM_BOOL_F, not SCM_EOL.
(scm_i_queue_async_cell): Queue the cell at the end of the list,
and only if the handler procedure is not already present.
(scm_system_async_mark_for_thread): Initialize cdr of handler cell
with SCM_BOOL_F.
* scmsigs.c (scm_sigaction_for_thread): Likewise.
2002-10-05 13:06:58 +00:00
Marius Vollmer
2fbc8609b2 * scmsigs.h (scm_sigaction_for_thread): New prototype.
* scmsigs.c (got_signal): Removed.
(signal_handler_cells, signal_handler_threads): New.
(take_signal): Queue the cell of the signal for the specified
thread.  Reset the signal handler on systems that don't have
sigaction.
(sys_deliver_signals): Removed.
(close_1): New.
(scm_sigaction_for_thread): Renamed from scm_sigaction and
extended to also set the thread of a signal and allocate a cell
for it.  Keep the Scheme name "sigaction".  Check that signum is
within range.  Also, use SCM_VECTOR_REF instead of SCM_VELTS.
(scm_sigaction): Implement in terms of scm_sigaction_for_thread.
(scm_init_scmsigs): Allocate signal_handler_cells and
signal_handler_threads vectors.
2002-10-04 14:13:26 +00:00
Han-Wen Nienhuys
34d19ef643 2002-07-20 Han-Wen <hanwen@cs.uu.nl>
* *.c: add space after commas everywhere.

* *.c: use SCM_VECTOR_SET everywhere, where a vector is written.
Document cases where SCM_WRITABLE_VELTS() is used.

* vectors.h (SCM_VELTS): prepare for write barrier, and let
SCM_VELTS() return a const pointer
(SCM_VECTOR_SET): add macro.

* autogen.sh (mscripts): find and check version number of
autoconf. Complain if 2.53 is not found.
2002-07-20 14:08:34 +00:00
Thien-Thi Nguyen
a6b844c224 Retire inclusion guard macro SCM_MAGIC_SNARFER. 2002-03-14 03:47:43 +00:00
Stefan Jahn
af68e5e5a6 2002-01-28 Stefan Jahn <stefan@lkcc.org>
* configure.in (guile_cv_have_uint32_t): Look also in
        `stdint.h' for uint32_t.

2002-01-28  Stefan Jahn  <stefan@lkcc.org>

        * symbols.c (scm_c_symbol2str): New function, replacement for
        `gh_scm2newsymbol()'.

        * strings.c (scm_c_substring2str): New function.  Proper
        replacement for `gh_get_substr()'.

        * socket.c: Include `stdint.h' if available for the `uint32_t'
        declaration.

        * scmsigs.c (s_scm_sigaction): Initialize `chandler' (inhibits
        compiler warning).

        * backtrace.c: Include `lang.h' for GUILE_DEBUG conditional.
2002-01-28 21:15:55 +00:00
Marius Vollmer
7123fc3b21 (scm_take_signal): Removed all code that assumes that signal handlers
are allowed to divert the flow of control.  Call
scm_system_async_mark_from_signal_handler instead of
scm_system_async_mark.
2001-11-25 15:08:12 +00:00
Neil Jerram
9401323e63 * Documentation work. 2001-11-11 15:01:52 +00:00
Marius Vollmer
ed618cc9c1 Made `usleep()' avalable on MinGW. 2001-11-02 00:16:57 +00:00
Gary Houston
1bed8c28a2 * scmsigs.c: include sys/time.h for itimer stuff. 2001-07-21 21:11:16 +00:00
Rob Browning
53f8a0d20e * scmsigs.c (s_scm_setitimer): new function.
(s_scm_setitimer): new function.
2001-07-19 17:43:22 +00:00
Thien-Thi Nguyen
a06e3a75b2 Remove "face-lift" comment. 2001-07-09 07:36:48 +00:00
Martin Grabmüller
82893676f4 Make compilation under Windows easier. 2001-06-26 17:53:09 +00:00
Keisuke Nishida
fdc2839563 * eval.c (scm_call_0, scm_call_1, scm_call_2, scm_call_3,
scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3): New functions.
2001-06-26 15:46:40 +00:00
Marius Vollmer
9a441ddb34 (scm_c_make_gsubr, scm_c_define_gsubr, scm_c_make_gsubr_with_generic,
scm_c_define_gsubr_with_generic): New functions.  They replace
scm_make_gsubr and scm_make_gsubr_with_generic.  The `make' variants
only create the gsubr object, while the `define' variants also put it
into the current module.  Changed all callers.  (scm_make_gsubr,
scm_make_gsubr_with_generic): Deprecated.

(scm_c_make_subr, scm_c_define_subr, scm_c_make_subr_with_generic,
scm_c_define_subr_with_generic): New functions.  They replace
scm_make_subr, scm_make_subr_opt and scm_make_subr_with_generic.  The
`make' variants only create the subr object, while the `define'
variants also put it into the current module.  Changed all callers.
(scm_make_subr, scm_make_subr_opt, scm_make_subr_with_generic):
Deprecated.
2001-05-20 00:35:43 +00:00
Marius Vollmer
86d31dfe7d Merge from mvo-vcell-cleanup-1-branch. 2001-05-15 14:57:22 +00:00
Neil Jerram
7a095584a9 * eval.c (scm_promise_p), list.c (scm_append_x, scm_reverse_x),
symbols.c (scm_symbol_to_string), vports.c (scm_make_soft_port):
	Change R4RS references to R5RS.

	* guile-snarf.awk.in: Fixes so that (i) blank lines in the
	docstring source are correctly reproduced in the output (ii)
	we don't anymore get occasional trailing quotes.  Also reorganized
	and commented the code a little.

	* scmsigs.c (scm_raise), throw.c (scm_throw): Docstring format
	fixes.

	* new-docstrings.texi, posix.texi, scheme-control.texi,
	scheme-data.texi, scheme-debug.texi, scheme-evaluation.texi,
	scheme-io.texi, scheme-memory.texi, scheme-procedures.texi:
	Automatic docstring updates (mostly argument name updates and
	blank lines).

	* scheme-modules.texi: Change double hyphens to single.

	* scheme-control.texi (Lazy Catch): Completed.

	* posix.texi (Network Databases and Address Conversion): New
	subsubsection `IPv6 Address Conversion'.
2001-05-04 21:54:00 +00:00
Dirk Herrmann
e4b265d817 * Avoid redundant casting of argument numbers to char* and vice versa. 2001-04-10 07:57:05 +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
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
Keisuke Nishida
783e777478 Remove #include <stdio.h>. Add #include <string.h>. 2001-03-09 23:33:41 +00:00
Keisuke Nishida
00ffa0e7d6 New functions: scm_c_make_vector, scm_c_make_hash_table. 2001-02-02 04:56:25 +00:00
Marius Vollmer
8dc9439fc6 * alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,
continuations.c, debug-malloc.c, debug.c, dynl.c, dynwind.c,
environments.c, eq.c, error.c, eval.c, evalext.c, feature.c,
filesys.c, fluids.c, fports.c, gc.c, goops.c, guardians.c, hash.c,
hashtab.c, hooks.c, ioext.c, iselect.c, keywords.c, lang.c,
list.c, load.c, macros.c, modules.c, net_db.c, numbers.c,
objects.c, objprop.c, options.c, pairs.c, ports.c, posix.c,
print.c, procprop.c, procs.c, properties.c, ramap.c, random.c,
read.c, regex-posix.c, root.c, scmsigs.c, script.c, simpos.c,
socket.c, sort.c, srcprop.c, stackchk.c, stacks.c, stime.c,
strings.c, strop.c, strorder.c, strports.c, struct.c, symbols.c,
tag.c, threads.c, throw.c, unif.c, variable.c, vectors.c,
version.c, vports.c, weaks.c: Makes sure the snarfer output
inclusion is disabled when the snarfer is run on the file.  Thanks
to Lars J. Aas!

* Makefile.am: Install guile-procedures.txt in version-specific
directory to enable multiple installed guile versions.  Suggested
by Karl M. Hegbloom <karlheg@debian.org, patch by Matthias Koeppe.
2000-11-17 16:25:05 +00:00
Michael Livshin
6732de1bdf * scmsigs.c (s_scm_sigaction): guard the SIGIOT case with an
#ifdef -- it's missing on at least one platform.  (thanks to
Jan Nieuwenhuizen).
2000-06-18 12:06:01 +00:00
Gary Houston
3efb80f231 * scmsigs.c (scm_init_scmsigs): if HAVE_SIGINTERRUPT is not
defined, add SA_RESTART to the sigaction flags correctly
	(thanks to Dale P. Smith).
2000-06-14 00:09:31 +00:00
Michael Livshin
adb2c53b47 * guile-doc-snarf.in: don't pipe the CPP output right into sed --
write it to the temp file first and check the CPP return code.
(I introduced this bug earlier, and this probably caused people
with non-GNU C preprocessors to get empty *.x files and not to
have the build fail right away...).

* scmsigs.c (s_scm_sigaction): guard the SIGSYS case with an ifdef
-- at least my libc5-based Linux system doesn't define SIGSYS.
2000-06-10 13:24:28 +00:00
Marius Vollmer
0d172d3f6c * scmsigs.c (scm_sigaction): Silently ignore setting handlers for
`program error signals' because they can't currently be handled by
Scheme code.
2000-06-05 22:57:51 +00:00