all, ignore the entire list of extensions. Also, don't check whether
the file is accessible. If the file exists, accessible or not, we
should return it. Inaccessible files should cause an error later.
(Thanks to Keisuke Nishida for the suggestions.)
* load.c (scm_search_path): Make max_path_len and max_ext_len
unsigned, since they're compared against string sizes.
* load.c (init_build_info): Make i unsigned.
Added #include "objects.h"
* eval.c (scm_makprom): Added SCM_DEFER_INTS and SCM_ALLOW_INTS.
Add #include "feature.h".
* ports.h (SCM_EOF_OBJECT_P): New macro predicate.
This test is needed at many places in the code and should be
abstracted. (Motivated by the need of this test in libguiletk.)
* ports.c (scm_eof_object_p), vports.c (sfgetc), strports.c
(scm_eval_string), load.c (scm_primitive_load,
scm_read_and_eval_x), gh_eval.c (gh_eval_str):
Use SCM_EOF_OBJECT_P.
* eval.c (scm_init_eval): Add feature `delay'.
Makefile directory variables. Print a message, but don't print
all the commands.
(versiondat.h): Print a message, but don't print all the commands.
* load.c: #include "alist.h".
(init_build_info): New function.
(scm_init_load): Call it.
* Makefile.in: Regenerated.
* gdbint.c (gdb_read): update scm_lreadr usage.
* load.h: update prototypes.
* load.c (scm_primitive_load, scm_read_and_eval_x,
scm_primitive_load_path): remove case_insensitive_p, sharp arguments.
* read.h: add prototype for scm_read_hash_extend. Change args for
other prototypes.
* read.c (scm_read_hash_procedures): new variable.
(scm_read_hash_extend): new procedure.
(scm_get_hash_procedure): new procedure.
* (scm_lreadr): use scm_get_hash_procedure instead of an argument
for extended # processing.
(scm_read, scm_lreadr, scm_lreadrecparen, scm_lreadparen,
scm_read_token): remove case_i, sharp arguments. Change callers.
* read.h (SCM_N_READ_OPTIONS): increase to 3.
(SCM_CASE_INSENSITIVE_P): define.
* read.c: add case-insensitive option to scm_read_opts.
* (scm_read_token): use SCM_CASE_INSENSITIVE_P instead of an argument
to determine whether to convert symbol case.
(default_case_i): definition removed.
* read.c (scm_read_token): if case_i, downcase ic before doing
anything with it.
extensions listed in the %load-extensions variable. If FILENAME
is absolute, return it unchanged, without searching the load path.
* (scm_loc_load_extensions): New variable, pointing to
%load-extensions' value cell.
(scm_init_load): Initialize it, and the value it points to.
(scm_primitive_load_path): Improve error reporting.
* * load.c (scm_loc_load_hook): New variable, pointing to value cell
of new Scheme variable %load-hook.
(scm_primitive_load): Apply %load-hook to filename.
and s_primitive_load_path.
* eval.c, load.c, error.c (scm_wta): use scm_misc_error.
* error.h: don't declare error symbols. prototype for scm_misc_error.
* stackchk.c (scm_stack_overflow_key): defined here instead of in
error.c.
* error.c: use SCM_SYMBOL to set up error keys.
scm_misc_error: new procedure.
ramap.c, symbols.c: Added new selectors SCM_CARLOC and SCM_CDRLOC
for obtaining the address of a car or cdr field. Motivation:
&SCM_CXR make assumptions about the internal structure of the
SCM_CXR selectors.
* alist.c, arbiters.c, continuations.c, debug.c, debug.h, eval.c,
eval.h, feature.c, filesys.c, fports.c, gc.c, gsubr.c, init.c,
ioext.c, kw.c, list.c, load.c, mallocs.c, numbers.c, numbers.h,
pairs.c, pairs.h, ports.c, ports.h, posix.c, procprop.c, procs.c,
procs.h, ramap.c, read.c, root.c, srcprop.c, srcprop.h,
strports.c, symbols.c, tags.h, throw.c, unif.c, variable.c,
vports.c: Cleaned up use of pairs: Don't make any special
assumptions about the internal structure of selectors and
mutators: SCM_CXR (<e1>) = <e2> --> SCM_SETCXR (<e1>, <e2>),
SCM_CXR (<e1>) &= <e2> --> SCM_SETAND_CXR (<e1>, <e2>) etc.
(Among other things, this change makes it easier to build Guile
with certain compilers which have problems with casted lvalues.)
from scm_sys_try_load and scm_sys_try_load_path. The Scheme name
of scm_primitive_load_path was also changed to
"primitive-load-path", from "%try-load-path". Callers changed.
We'd like to respect the convention that a function named
"try-mumble" should behave just like the function called "mumble",
but return #f instead of signalling some error.
* load.h: Rename prototypes.
declare the char * to be const. Avoids a warning in rgx.c.
* ports.h: spelling fix.
* filesys.c (scm_sys_stat, scm_sys,lstat): include file name in
error messages.
* load.c (scm_sys_try_load_path): throw an error if file not found
(like it says it in NEWS).
by scm_open_file is #f, it won't be. Always return SCM_UNSPECIFIED.
Change the Scheme name from %try-load to primitive-load.
* error.c (scm_error): convert a NULL message to SCM_BOOL_F.
Can avoid passing a message, allowing it to be derived in the
error handler (e.g., if we want to throw to the key both from
Scheme and C).
Move code to initialize and search %load-path from ice-9 to C
code, so we can use the load-path to find the ice-9 boot code;
this makes it easier to run Guile without installing it. See
corresponding changes in guile/Makefile.in.
* feature.c: Move stuff concerned with the load path to load.c.
(scm_compiled_library_path): Deleted.
Don't #include libpath.h here.
* feature.h: Don't mention scm_compiled_library_path.
* load.c: #include "libpath.h" here, as well as <sys/types.h>,
<sys/stat.h>, and <unistd.h> (if present).
(R_OK): #define if the system hasn't deigned to.
(scm_loc_load_path): New variable.
(scm_init_load_path, scm_sys_search_load_path,
scm_sys_try_load_path): New functions.
(scm_init_load): Initialize scm_loc_load_path to point to the
value cell of the Scheme %load-path variable.
* load.h: Add declarations for scm_sys_search_load_path,
scm_sys_try_load_path.
* init.c: Call scm_init_load_path.
* Makefile.in (feature.o, load.o): Dependencies updated.
* load.c, load.h: Rewrite using PROTO macro.