1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-09 21:40:33 +02:00

* feature.c (scm_loc_features): Make this static.

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.
* Makefile.in (feature.o, load.o): Dependencies updated.
This commit is contained in:
Jim Blandy 1996-09-05 16:49:47 +00:00
parent a0f52599f3
commit f072db0c41

View file

@ -42,37 +42,20 @@
#include <stdio.h>
#include "_scm.h"
#include "libpath.h"
#ifdef HAVE_STRING_H
#include <string.h>
#endif
SCM *scm_loc_features;
static SCM *scm_loc_features;
void
scm_add_feature(str)
char* str;
{
*scm_loc_features = scm_cons(SCM_CAR(scm_intern(str, strlen(str))), *scm_loc_features);
}
/* {Help finding slib}
*/
SCM_PROC(s_compiled_library_path, "compiled-library-path", 0, 0, 0, scm_compiled_library_path);
SCM
scm_compiled_library_path ()
{
#ifndef LIBRARY_PATH
return SCM_BOOL_F;
#else
return scm_makfrom0str (LIBRARY_PATH);
#endif
*scm_loc_features = scm_cons(SCM_CAR(scm_intern(str, strlen(str))),
*scm_loc_features);
}
@ -86,8 +69,6 @@ scm_program_arguments ()
}
void
@ -113,7 +94,6 @@ scm_init_feature()
scm_add_feature ("full-continuation");
#endif
scm_sysintern ("char-code-limit", SCM_MAKINUM (SCM_CHAR_SCM_CODE_LIMIT));
#include "feature.x"
}