From f072db0c4191bb9455cf53670a280677a97dad79 Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Thu, 5 Sep 1996 16:49:47 +0000 Subject: [PATCH] * 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 , , and (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. --- libguile/feature.c | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git a/libguile/feature.c b/libguile/feature.c index e9b205386..e0640793e 100644 --- a/libguile/feature.c +++ b/libguile/feature.c @@ -42,37 +42,20 @@ #include #include "_scm.h" -#include "libpath.h" #ifdef HAVE_STRING_H #include #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" }