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

956 commits

Author SHA1 Message Date
Mikael Djurfeldt
3237b129f7 * iselect.c: Small fixes. 1998-01-26 01:42:43 +00:00
Mikael Djurfeldt
3d9352fb80 * error.c (scm_wta): Added support for SCM_ARG6 and SCM_ARG7. 1998-01-25 12:00:47 +00:00
Mikael Djurfeldt
a48b6916e2 * iselect.c: Now several threads can wait on the same file
descriptor.  The behaviour is compatible with OS select: All
threads waiting for the fd return with the same status.
1998-01-24 01:50:43 +00:00
Mikael Djurfeldt
df366c2615 * coop-threads.c, threads.h (scm_spawn_thread): New function.
Can spawn a thread from application C code.
1998-01-23 20:51:47 +00:00
Mikael Djurfeldt
f3a2c4cfe6 * gh.h, gh_data.c (gh_doubles2scm, gh_doubles2dvect,
gh_doubles2scm): New functions.
1998-01-20 17:57:01 +00:00
Mark Galassi
770827b0f0 some trivial cleanup 1998-01-16 00:32:28 +00:00
Gary Houston
ef9ff3fd0a * socket.c (scm_bind): free soka after use.
* stime.c (tzvar): new variable.
	(setzone, restorezone, scm_localtime, scm_mktime, scm_strftime):
	avoid memory leaks when allocating.
1998-01-04 02:50:12 +00:00
Jim Blandy
7a35faf841 *** empty log message *** 1998-01-04 00:31:25 +00:00
Jim Blandy
ab256d3909 * gc.c, tags.h: Doc fixes. 1998-01-04 00:31:13 +00:00
Jim Blandy
bb3b902f56 * iselect.h: Some systems require <sys/types.h> to get the FD_SET
macro definitions.
1998-01-04 00:31:05 +00:00
Jim Blandy
e7c5fb3770 Doc fix. 1998-01-04 00:09:54 +00:00
Mikael Djurfeldt
b971e6c65c * eval.c (macro-eval!): Removed. This function was a design bug.
It allowed memoized code to leak out to the scheme level.  Most
things that you could do with `macro-eval!' can be done with
`local-eval'.
1998-01-02 16:44:05 +00:00
Tim Pierce
377474477c * fports.c (scm_pipob): Use scm_generic_fgets for line i/o, since
scm_fgets now depends on ftell(3) to know how many bytes were
	read.  Sigh.
1997-12-20 13:52:09 +00:00
Tim Pierce
66d1e129c9 * gh_data.c (gh_scm2newstr, gh_get_substr): Use RO macros for
dealing with strings.
1997-12-16 05:09:50 +00:00
Tim Pierce
848f2a0114 boot-9.scm (read-line): Rewritten to use %read-line.
ioext.c (%read-line): Return a cons of the input line and its terminator.
fports.c, genio.c, genio.h, ports.c, ports.h: Change fgets methods
	to return the string length as well as its contents.
1997-12-13 08:33:33 +00:00
Mikael Djurfeldt
cafc12ffdd * filesys.c (set_element): Return file descriptor.
(fill_select_type): Return the highest file descriptor.
(scm_select): Tell select about the highest file descriptor.  On
some systems the SELECT_SET_SIZE can be as much as 128 bytes.
Therefore the extra overhead for calculating the maximum fd seems
to be more than compensated.  Is this correct?  In any case,
scm_internal_select will be much faster with this info.
(scm_select, fill_select_type, set_element): Don't accept any kind
of object in the file descriptor list or vector.
1997-12-08 18:15:44 +00:00
Gary Houston
341eaef04b * README: using Automake 1.2d
* configure.in: AC_CHECK_FUNCS: add "system".
	* simpos.c (scm_system): always define: use sysmissing if not
	available.  Check for HAVE_SYSTEM instead of _Windows (does
	Windows lack system or does it have an unusable one?).
	Check for error conditions -1 and 127.  Use SCM_DEFER_INTS.
	Let the argument be optional: if not supplied, call system(NULL).
	* ports.c (scm_close_port): relax the type check from OPPORTP to
	PORTP; closing a closed port is allowed.
1997-12-07 07:02:17 +00:00
Tim Pierce
8122b543c1 * fports.c (scm_fgets): Return if the last char in a chunk is
newline.  When fgets returns a string whose length is `size-1', it
	is ambiguous whether a whole line was retrieved, so we must check
	explicitly whether a line terminator is present.
1997-12-04 19:05:05 +00:00
Mikael Djurfeldt
1ea4704837 * filesys.c (scm_stat): Slightly optimized. 1997-12-04 16:40:53 +00:00
Mikael Djurfeldt
bfc471e7a1 * print.h (SCM_COERCE_OUTPORT): Check that the object is a pair
before taking the CDR.
1997-12-04 16:18:59 +00:00
Mikael Djurfeldt
380463881a * filesys.c (scm_stat): Coerce output port only if argument *is*
an output port!  (Thanks to Harald Meland.)
1997-12-04 16:03:58 +00:00
Jim Blandy
1d16e405be *** empty log message *** 1997-12-03 17:31:51 +00:00
Jim Blandy
f131e6311a * guile-snarf.in: Pass args through to gcc in a way that preserves
whitespace boundaries.  (Thanks to Greg Badros.)
1997-12-03 17:30:39 +00:00
Jim Blandy
3c1750f377 * ports.c (scm_close_port): Make sure the port is open before
trying to close it.
1997-12-03 17:30:24 +00:00
Jim Blandy
a1a4b8ed86 Add copyrights; tweak comments. 1997-12-03 17:29:12 +00:00
Tim Pierce
afa92d1965 * stacks.c (scm_frame_procedure): Reverse the logic in the return
statement.  (Thanks to Doug Evans for pointing this out.)
1997-12-02 17:34:07 +00:00
Tim Pierce
c06768c880 acconfig.h: Add USCORE.
scmconfig.h.in: Regenerated.
1997-12-01 18:22:04 +00:00
Mikael Djurfeldt
c44bfbc946 * coop-defs.h (struct coop_t): Renamed errno --> _errno to prevent
errno macro expansion of this field name.  (errno is a C
preprocessor macro on some systems.)
1997-11-30 10:36:13 +00:00
Tim Pierce
756fa4f89b Doc fix. 1997-11-30 02:35:18 +00:00
Mikael Djurfeldt
b6609fc78a * init.c (scm_start_stack): Removed initialization of
scm_the_last_stack_var.

* backtrace.h: Declare scm_the_last_stack_var.

* backtrace.c: Define scm_the_last_stack_var.

* root.c (mark_root): Don't mark the_last_stack_var.

* root.h (scm_root_state): Removed the_last_stack_var.

* throw.c: Added #include "fluids.h"
(ss_handler): `the-last-stack' is now a fluid.

* (backtrace.h, backtrace.c, throw.c): Renamed the_last_stack_var
--> the_last_stack_fluid.

* backtrace.c: Added #include "fluids.h"
(scm_init_backtrace): Initialize `the-last-stack' to a fluid.
(scm_backtrace): `the-last-stack' is now a fluid.

* init.c (scm_boot_guile_1): Moved call to scm_init_backtrace
after scm_init_fluids.
1997-11-29 10:49:18 +00:00
Mikael Djurfeldt
a5d6d578d6 * backtrace.c: Added #include "fluids.h"
(scm_init_backtrace): Initialize `the-last-stack' to a fluid.
(scm_backtrace): `the-last-stack' is now a fluid.

* init.c (scm_boot_guile_1): Moved call to scm_init_backtrace
after scm_init_fluids.
1997-11-29 01:10:21 +00:00
Tim Pierce
e085f7a634 * iselect.c: #ifdef USE_THREADS around thread-related includes.
* dynl-dl.c (sysdep_dynl_func): Check both USCORE and
	DLSYM_ADDS_USCORE to decide whether to add an underscore.
1997-11-28 22:58:10 +00:00
Mikael Djurfeldt
c718cb0702 * iselect.c (coop_next_runnable_thread,
coop_wait_for_runnable_thread): Disable interrupts so that no
async is executed before a potential error_revive.
(scm_internal_select): Disable interrupts during the parts of the
code which manipulate the sleep queue and the file descriptors.
1997-11-28 01:11:12 +00:00
Mikael Djurfeldt
81e81a5cb7 * iselect.c (coop_next_runnable_thread,
coop_wait_for_runnable_thread): Disable interrupts so that no
async is executed before a potential error_revive.
1997-11-28 00:50:58 +00:00
Mikael Djurfeldt
3666451eb0 * iselect.h, iselect.c: New files. Implements
scm_internal_select.  (See NEWS.)
1997-11-27 18:06:33 +00:00
Mikael Djurfeldt
b902580806 Updated 1997-11-27 18:05:28 +00:00
Mikael Djurfeldt
44e8413c73 * Makefile.am: Added iselect.c and iselect.h.
* coop.c (coop_qinit): Initialize fields used by
scm_internal_select.
(coop_qget, coop_qget, coop_tmp_queue): Made global.
(coop_next_runnable_thread): If GUILE_ISELECT enabled, use
replacement in iselect.c.
(coop_mutex_lock, coop_condition_variable_wait, coop_abort,
coop_join): If GUILE_ISELECT enabled, use
coop_wait_for_runnable_thread instead of
coop_next_runnable_thread.
(usleep, sleep): New replacements for system functions if
GUILE_ISELECT is enabled.

* coop-threads.h: Declare coop_wait_for_runnable_thread.

* coop-defs.h (coop_t): Added fields used by scm_internal_select.

* filesys.c: Added #include "iselect.h".  Moved FD-macros to
iselect.h.  Implement Scheme level `select' using
scm_internal_select.  (See NEWS.)

* genio.c (scm_getc): Block with scm_internal_select.  (See NEWS.)

* init.c: Call scm_init_iselect.
1997-11-27 18:04:56 +00:00
Tim Pierce
3e2043c4dd Fix a memory leak in scm_read_line and a type cast bug in the ptob.
* fports.c (scm_fgets): Use malloc/free rather than scm_must_malloc
 	and scm_must_free, since ultimately the	string returned will be copied
 	by scm_makfrom0str anyway.  Also, read any characters that may have
	been pushed onto the port with scm_ungetc.
	* ports.c (scm_generic_fgets): Same as for scm_fgets.
	* ioext.c (scm_read_line): Free string after Guilifying it.
	* ports.h (scm_ptobfuns): fgets method returns a char *, not a char.
1997-11-27 06:39:46 +00:00
Anthony Green
2c92112b3d gh bug fix 1997-11-26 03:45:23 +00:00
Anthony Green
18daf95b39 gh bug fix 1997-11-26 03:13:00 +00:00
Mark Galassi
5aadf8c195 completing changes to gh_repl and uniform array stuff 1997-11-25 17:20:23 +00:00
Mark Galassi
ef5d3ae175 made changes in gh_repl() and started adding the uniform array stuff to gh_ 1997-11-25 06:18:08 +00:00
Tim Pierce
0113293e54 fixed dynl memory leak 1997-11-22 19:15:09 +00:00
Tim Pierce
2a0d71767f Added support for leading dlsym underscore. 1997-11-21 19:39:23 +00:00
Tim Pierce
e41530ba09 *** empty log message *** 1997-11-20 04:40:02 +00:00
Mikael Djurfeldt
03ca35af55 Small fix of last fix... 1997-11-06 17:50:19 +00:00
Mikael Djurfeldt
80b991c346 * regex-posix.c (scm_free_regex_t): Return size of regex_t instead
of 0; size_t --> scm_size_t.  Thanks to Bernard Urban.
1997-11-06 15:09:30 +00:00
Mikael Djurfeldt
fdc0361488 * scmconfig.h.in: Updated (HAVE_LIBTERMCAP was added when
configure.in was changed).
1997-10-26 16:06:23 +00:00
Jim Blandy
3fa5bb75c3 *** empty log message *** 1997-10-26 07:24:36 +00:00
Jim Blandy
99dc0f92fb * Makefile.am (modinclude_HEADERS): Include readline.h here.
* Makefile.in: Regenerated.
1997-10-26 07:24:04 +00:00