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

851 commits

Author SHA1 Message Date
Jim Blandy
614590c57a *** empty log message *** 1997-09-02 23:17:28 +00:00
Jim Blandy
e69ebe6af6 * gh_predicates.c (gh_boolean_p, gh_symbol_p, gh_char_p,
gh_vector_p, gh_pair_p, gh_number_p, gh_string_p, gh_procedure_p,
gh_list_p, gh_inexact_p, gh_exact_p, gh_eq_p, gh_eqv_p,
gh_equal_p): Use SCM_NFALSEP, instead of testing against
SCM_BOOL_T.  Any non-false value is true.
1997-09-02 23:17:15 +00:00
Mikael Djurfeldt
1ff4df7a83 * symbols.h (scm_builtin_bindings, scm_builtin_weak_bindings,
scm_gensym): Added prototypes.

* symbols.c (scm_gensym): New function.  This will speed up
certain types of applications (such as macro systems) which
generate lots of symbols.
1997-09-01 22:28:49 +00:00
Mikael Djurfeldt
d28da0496e * numbers.c (logand, logior, logxor): Handle 0 or 1 arguments. 1997-09-01 20:41:31 +00:00
Gary Houston
20a54673cd * unif.c (scm_shap2ra): tighten the checking of the array dimension
specifier, since (2) or (2 . 3) would cause SEGV.
(scm_transpose_array): more argument checking fixes.
1997-08-30 19:28:38 +00:00
Jim Blandy
6f527da051 * Makefile.in: Regenerated. 1997-08-29 04:50:17 +00:00
Jim Blandy
34695603c7 *** empty log message *** 1997-08-27 22:48:58 +00:00
Jim Blandy
2fe609e0d7 * Makefile.in: Regenerated, so it uses "tar", not "gtar". 1997-08-27 22:47:18 +00:00
Jim Blandy
4dd8323f1f doc fix 1997-08-26 23:53:28 +00:00
Mikael Djurfeldt
02fbff5e8d Regenerated. 1997-08-25 20:05:30 +00:00
Mikael Djurfeldt
f2ae0a19bd Updated 1997-08-25 13:34:17 +00:00
Mikael Djurfeldt
88482b31af * error.c, error.h (scm_error_callback): Removed (see NEWS). 1997-08-25 12:33:50 +00:00
Mikael Djurfeldt
365d0782b1 Regenerated 1997-08-24 15:37:10 +00:00
Mikael Djurfeldt
a46d5ff2dd * regex-posix.c: If <regex.h> can't be found, try <rxposix.h> or
<rx/rxposix.h>.  (This is in order to accomodate for the GNU Rx
library.)
1997-08-24 15:33:49 +00:00
Mikael Djurfeldt
95f5b0f5ec * ramap.c (scm_ra_matchp, scm_array_fill_int, racp, ramap_1,
ramap_2o, scm_array_index_map_x, raeql_1, scm_array_equal_p),
unif.c (scm_vector_set_length_x, scm_uniform_vector_length,
scm_array_p, scm_array_rank, scm_array_dimensions,
scm_enclose_array, scm_array_in_bounds_p, scm_uniform_vector_ref,
scm_cvref, scm_array_set_x, scm_array_contents, scm_array_to_list,
scm_array_prototype): Added case scm_tc7_wvect.
1997-08-24 03:29:35 +00:00
Gary Houston
efb997f535 * errno.h: prototype for scm_strerror.
* error.c (scm_strerror): new procedure.
1997-08-23 18:49:35 +00:00
Mikael Djurfeldt
1a0e096c86 * list.c (scm_list_append_x): Allow non-pair as last argument.
This is consistent with the R4RS append and is probably the
correct behaviour as specified by R2RS.  (Thanks to Radey Shouman)
1997-08-18 13:17:46 +00:00
Gary Houston
6afcd3b2b6 * stime.h: prototype for scm_times.
* stime.c (scm_times): new procedure.
* ioext.c (scm_fseek): if the first argument is a file descriptor
call lseek.
(scm_ftell): if the first argument is a file descriptor call lseek
(sic).
* filesys.h: prototypes for scm_open_fdes, scm_fsync.
* filesys.c (scm_chmod): if the first argument is a file descriptor,
call fchmod.
(scm_chown): if the first argument is a port or file descriptor,
call fchown.
(scm_truncate_file): new procedure.
Add DEFER/ALLOW INTS to a few other procedures.
(scm_fsync): new procedure.
(scm_open_fdes): new procedure.
(scm_open): use scm_open_fdes.  If mode isn't specified, 666 will
now be used.
(scm_fcntl): the first argument can now be a file descriptor.  The
third argument is now optional.

* posix.c (scm_execl, scm_execlp): make the filename argument
compulsory, since omitting it causes SEGV.
(scm_sync): return unspecified instead of #f.
(scm_execle): new procedure.
(environ_list_to_c): new procedure.
(scm_environ): use environ_list_to_c.  disable interrupts.
(scm_convert_exec_args): take pos and subr arguments and
improve error checking.

* boot-9.scm: define tms accessors: clock, utime, stime, cutime,
cstime.
1997-08-16 18:48:44 +00:00
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