1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-02 04:40:29 +02:00
Commit graph

833 commits

Author SHA1 Message Date
Mikael Djurfeldt
0824b52425 * stacks.c (scm_make_stack), coop-threads.c, mit-pthreads.c
(scm_call_with_new_thread): Bugfix: SCM_WNA should go as third
argument to SCM_ASSERT.  Furthermore, the name of the function
should be passed as first argument when signalling
SCM_WNA. (Thanks to Thomas Morgan)
1997-08-14 15:00:03 +00:00
Mikael Djurfeldt
adc02cce18 * gsubr.c (scm_gsubr_apply): From Radey Shouman
<shouman@zianet.com>: "The switch in scm_gsubr_apply that
dispatches on the number of actual args has a default case
reporting an internal error.  This is a vestige from a version
that mallocated a SCM vector to hold the arguments.  In the
current version this check is too late: if it ever happens we will
have already overstepped the bounds of the array.

Also, the patch [...] adds a check for too many actual arguments."

mdj: Removed check for "internal programming error".
1997-08-14 14:58:25 +00:00
Mikael Djurfeldt
4ed948d4f1 * * gh_io.c (gh_write): New function. 1997-08-13 14:55:34 +00:00
Mikael Djurfeldt
9538471795 * * gh_eval.c (catch_with_saved_stack): Removed. Replaced by:
throw.c (scm_internal_stack_catch): New sibling to the other catch
	functions.  Code moved from gh_eval.c.
	throw.h: Added header.
	gh_eval.c (gh_eval_str_with_stack_saving_handler): Renamed call to
	scm_internal_stack_catch.
1997-08-13 14:54:49 +00:00
Gary Houston
468b2cf37d really delete primitive-dup. 1997-07-29 03:52:24 +00:00
Gary Houston
7a6f1ffa10 * ioext.h: fix up prototypes.
* ioext.c (scm_dup_to_fdes): renamed from scm_primitive_dup2.
Scheme name is now dup->fdes.
(scm_dup_to_fdes): make the second argument optional and
fold in the functionality of scm_primitive_dup.
(scm_primitive_dup): deleted.
* fports.h (SCM_P): prototypes for scm_setvbuf, scm_setfileno.
* fports.c (scm_setbuf0): don't disable the setbuf if MSDOS or
ultrix are defined.  Use setvbuf instead of setbuf.
(scm_setvbuf): new procedure.
(scm_init_fports): intern _IOFBF, _IOLBF, _IONBF.
(scm_setfileno): moved from ioext.c.
(scm_fgets): cast SCM_STREAM to (FILE *), remove unused lp variable.
(top of file): Delete 25 lines of probably obsolete CPP hair for MSDOS.

* boot-9.scm (move->fdes, dup->port): use dup->fdes, not primitive-dup.
(dup->fdes): deleted, now done in C.
1997-07-29 02:21:08 +00:00
Marius Vollmer
a0cb6cb0ec *** empty log message *** 1997-07-27 09:11:05 +00:00
Marius Vollmer
1e8f77cd7b * struct.c (scm_print_struct): Use scm_printer_apply to call the
user defined struct printer.
1997-07-27 09:09:54 +00:00
Marius Vollmer
c4f37e8038 * print.c (scm_iprin1): Enter printed structures into the print
state as nested data while they are printed.
(print_state_fluid, print_state_fluid_num): New variables.
(scm_init_print): Initialize them.
(scm_iprin): If print_state_fluid carries a print_state, use that
instead of creating a new one.
(scm_printer_apply, apply_stub, struct apply_data): New
definitions to help with calling printer functions written in
Scheme.
* print.h (scm_printer_apply): New prototype.
1997-07-27 09:08:38 +00:00
Marius Vollmer
b3460a507a * dynwind.c (scm_dowinds): Handle fluids on the wind list.
* fluids.h (scm_internal_with_fluids, scm_with_fluids,
scm_swap_fluids, scm_swap_fluids_reverse): New prototypes.
* fluids.c (scm_internal_with_fluids, scm_with_fluids,
scm_swap_fluids, scm_swap_fluids_reverse): New functions.
1997-07-26 20:08:42 +00:00
Mikael Djurfeldt
269861c775 * eval.c (scm_apply): Handle the case when a tc7_sybr_2 is applied
to a list of length zero correctly.
1997-07-25 15:04:50 +00:00
Tim Pierce
3cb988bd00 Line-oriented i/o:
scm_gen_read_line
scm_read_line
scm_fgets
scm_generic_fgets
1997-07-23 21:20:55 +00:00
Gary Houston
e38303a26d * ioext.h: removed scm_duplicate_port prototype.
* ioext.c (scm_primitive_dup2): return the new file descriptor
instead of SCM_UNSPECIFIED, since similarity to scm_primitive_dup
is convenient.
(scm_fdopen): bug fix: don't try to make port unbuffered until its
stream has been set.
(scm_duplicate_port): deleted, there's now an implementation in
boot-9.scm.
(scm_primitive_dup2): do nothing if newfd == oldfd.

* boot-9.scm (dup->port, dup->inport, dup->outport, dup->fdes,
dup, fdes->inport, fdes->outport, port->fdes): new procedures.
(duplicate-port): was a C primitive, now it's here.
(move->fdes): allow the first argument to be a file descriptor.
Return the modified port or file descriptor (was unspecified.)
1997-07-21 08:52:26 +00:00
Gary Houston
a9488d1218 * filesys.c (scm_close): oops, don't call SCM_INUM twice on the
argument.

* ioext.h: new prototypes.
* ioext.c (scm_primitive_dup, scm_primitive_dup2): new procedures.
1997-07-20 10:03:26 +00:00
Gary Houston
eadd48de2b * fluids.c (next_fluid_num): don't do
SCM_THREAD_CRITICAL_SECTION_START/END unless USE_THREADS is defined.

* ports.h: prototypes too.
* ports.c (scm_mode_bits, scm_port_mode): moved from fports.c.

* fports.h: prototype too.
* fports.c (scm_evict_ports): moved from ioext.c.

* ports.c (scm_close_port): return a boolean instead of unspecified.
throw an error if an error other than EBADF occurs.

* filesys.h: scm_close prototype.
* filesys.c (scm_close): new procedure, can close file descriptors
and ports (scsh compatible).

* ports.c (scm_flush_all_ports): SCM_PROC incorrectly allowed an
optional argument.
1997-07-20 05:49:39 +00:00
Gary Houston
9c29ac668f * ports.c (scm_flush_all_ports): SCM_PROC incorrectly allowed an
optional argument.
1997-07-19 18:21:55 +00:00
Marius Vollmer
9482a297ec *** empty log message *** 1997-07-18 16:26:47 +00:00
Marius Vollmer
7f47d2d877 *** empty log message *** 1997-07-18 14:45:38 +00:00
Marius Vollmer
b08323d190 * smob.h: Include "libguile/print.h" to make scm_print_state
visible.
1997-07-18 14:39:52 +00:00
Marius Vollmer
7b4e5a7ae3 * root.h: Added "fluids" member to scm_root_state.
* root.c: Include "fluids.h".  (scm_mark_root): Mark "fluids".
(scm_make_root): Call scm_copy_fluids to make fluid bindings
unique for the new root when it has a parent.
1997-07-18 14:37:36 +00:00
Marius Vollmer
d9dfcf8084 * root.c: Include "fluids.h". (scm_mark_root): Mark "fluids".
(scm_make_root): Call scm_copy_fluids to make fluid bindings
unique for the new root when it has a parent.
1997-07-18 14:35:58 +00:00
Marius Vollmer
ee3ea81d9a * init.c: Include "fluids.h". (scm_boot_guile_1): Added call to
scm_init_fluids to initialize the fluid machine.
(scm_start_stack): Initialize the fluids of the first root with
scm_make_initial_fluids.
1997-07-18 14:33:49 +00:00
Marius Vollmer
c487ad44e7 * dynl.c (free_dynl_obj): New function to free the dynamic object
data. (dynl_smob): Use it.
* dynl.c (scm_dynamic_link): Moved allocating of the memory for
the dynamic object data below the linking of the object to avoid
memory leak when the linking code throws an error.  Now the code
leaks a whole dynamically linked library when must_malloc throws,
but that should be much less likely.
1997-07-18 14:31:06 +00:00
Marius Vollmer
baff2bd54a * fluids.c, fluid.h: New files.
* Makefile.am (libguile_la_SOURCES): Added "fluids.c".
(modinclude_HEADERS): Added "fluids.h"
1997-07-18 14:30:36 +00:00
Gary Houston
f4e5b81064 * configure.in: use AC_CHECK_FUNCS for sethostent etc.,
so scmconfig.h is updated with the test results.  this may
	disable one of the cygwin hacks.
1997-07-18 07:08:54 +00:00
Jim Blandy
32552d73c6 *** empty log message *** 1997-07-11 05:44:05 +00:00
Jim Blandy
0e95879552 Changes to compile under gnu-win32, from Marcus Daniels:
* stime.c (tzset): If tzset isn't provided, make it a NOP.
(scm_localtime): Change SCM_EOF to SCM_EOL.
(scm_mktime): Likewise.
* socket.c: Don't include sys/un.h unless autoconf tells
us Unix domain sockets are available.
(scm_fill_sockaddr): Ignore Unix domain code.
(scm_addr_vector): Likewise.
(scm_init_addr_buffer): Likewise.
(scm_socketpair): Don't include unless socketpair was
found during autoconf.
* simpos.c (SYSTNAME): Treat cygwin like Unix.
* scmsigs.c (scm_pause): Don't include unless pause was found
during autoconf.
* posix.c (scm_getgroups): Don't include unless support function
was found during autoconf (in this case, getgroups).
(scm_setpwent): For setpwent.
(scm_setegid): For setegid.
* net_db.c (scm_inet_netof): Don't include unless support
function was found during autoconf (in this case, inet_netof).
(scm_lnaof): For inet_lnaof.
(scm_inet_makeaddr): For inet_makeaddr.
(scm_getnet): For getnetent, getnetbyname, getnetbyaddr.
(scm_getproto): For getprotoent.
(scm_getserv): For getservent.
(scm_sethost): For sethostent, endhostent.
(scm_setnet): For setnetent, endnetent.
(scm_setproto): For setprotoent, endprotoent.
(scm_setserv): For setservent, endservent.
* scmconfig.h.in: Regenerated.
1997-07-11 05:43:36 +00:00
Jim Blandy
8cedfb2e6c *** empty log message *** 1997-07-10 05:26:41 +00:00
Jim Blandy
604d4dd95c * read.c (recsexpr): Give this a dummy definition if
DEBUG_EXTENSIONS isn't #defined.
1997-07-10 05:26:17 +00:00
Jim Blandy
b1edcd363e * error.c (scm_wta): Pass SCM_EOL to scm_misc_error as the list of
arguments for formatting the error message, not SCM_BOOL_F.  I
think this is left over from the (eq? '() #f) days.
1997-07-10 05:25:44 +00:00
Jim Blandy
da5b3eb149 * stime.c (scm_localtime, scm_mktime): Pass SCM_EOL to
scm_misc_error, not SCM_EOF.
1997-07-10 05:25:35 +00:00
Marius Vollmer
517591cdff *** empty log message *** 1997-07-04 21:48:34 +00:00
Marius Vollmer
1500e3ceb4 * coop-threads.c (scm_wait_condition_variable): Lock mutex again
after waiting.
1997-07-04 21:44:59 +00:00
Marius Vollmer
3f094ddf73 *** empty log message *** 1997-07-03 15:25:25 +00:00
Marius Vollmer
beec890ea8 * root.c (cwdr_outer_body): Bugfix: Pass c' instead of &c' to
scm_internal_catch.
1997-07-03 15:22:59 +00:00
Tim Pierce
4a5fa91c06 alloca configure fixes 1997-06-28 21:32:46 +00:00
Gary Houston
7ad3c1e7c0 * simpos.h: prototype for scm_primitive_exit.
* simpos.c (scm_primitive_exit): new procedure, terminates the
process	without unwinding the stack.
1997-06-28 20:01:20 +00:00
Tim Pierce
c75a590628 *** empty log message *** 1997-06-28 09:03:21 +00:00
Tim Pierce
5d4774bcf6 Regexp flag enhancements 1997-06-28 08:50:43 +00:00
Tim Pierce
9159ebecb4 Build fixes 1997-06-28 02:19:29 +00:00
Tim Pierce
ad6b30a056 Build fixes 1997-06-28 02:13:33 +00:00
Jim Blandy
9230ac780a *** empty log message *** 1997-06-24 18:17:57 +00:00
Jim Blandy
0d46112f16 * script.c (scm_compile_shell_switches): Add 1997 to copyright
years in usage message.
1997-06-24 18:17:40 +00:00
Jim Blandy
9572c0d0dd *** empty log message *** 1997-06-24 17:22:58 +00:00
Jim Blandy
1a222b91b9 * regex-posix.c (scm_init_regex_posix): Delete the regexp/nosub
flag; I don't think we support it.
(scm_make_regexp): Make sure the user doesn't pass the
regexp/nosub flag.
1997-06-24 17:22:45 +00:00
Jim Blandy
b9c307315a * Makefile.am (libguile_la_LDFLAGS): Bump library version.
* Makefile.in: Regenerated.
1997-06-24 17:22:04 +00:00
Jim Blandy
fcff2c5c70 *** empty log message *** 1997-06-24 17:21:11 +00:00
Jim Blandy
9e2310a80c *** empty log message *** 1997-06-24 05:43:29 +00:00
Jim Blandy
db5614083d *** empty log message *** 1997-06-24 05:34:22 +00:00
Jim Blandy
fcfb248d0c * regex-posix.c (scm_make_regexp, scm_regexp_exec): Add optional
FLAGS arguments.
(scm_init_regex_posix): Define constants for the REG_mumble flags;
name them according to the SCSH convention: regexp/mumble.
1997-06-24 05:33:59 +00:00