diff options
author | Jim Blandy <jimb@red-bean.com> | 1998-10-03 17:40:08 +0000 |
---|---|---|
committer | Jim Blandy <jimb@red-bean.com> | 1998-10-03 17:40:08 +0000 |
commit | 6b8d19d30233a2b4276f3ca896e481f0869f60a5 (patch) | |
tree | dfb7eefb3e7d8483f883e46e1a3abd52ec428781 /libguile | |
parent | 541716d15cbeb7cba986ea47d57dbae60e62e135 (diff) | |
download | guile-6b8d19d30233a2b4276f3ca896e481f0869f60a5.tar.gz |
* init.c (invoke_main_func): Load the startup files (boot-9.scm)
from here, not from scm_compile_shell_switches (which is a pretty
dumb place to do it).
(scm_load_startup_files): New function.
(scm_ice_9_already_loaded): Variable moved to here from script.c.
* script.c (scm_compile_shell_switches): Don't load the startup
files here.
(scm_ice_9_already_loaded): Variable moved.
* init.c (scm_load_startup_files): Prototype for new function.
* gh_init.c (gh_enter): Doc fix.
Diffstat (limited to 'libguile')
-rw-r--r-- | libguile/gh_init.c | 1 | ||||
-rw-r--r-- | libguile/init.h | 12 | ||||
-rw-r--r-- | libguile/script.c | 22 |
3 files changed, 8 insertions, 27 deletions
diff --git a/libguile/gh_init.c b/libguile/gh_init.c index 84629ebf8..8661f3650 100644 --- a/libguile/gh_init.c +++ b/libguile/gh_init.c @@ -57,7 +57,6 @@ gh_launch_pad (void *closure, int argc, char **argv) { main_prog_t c_main_prog = (main_prog_t) closure; -/* gh_eval_str ("(primitive-load-path \"ice-9/boot-9.scm\")"); */ c_main_prog (argc, argv); exit (0); } diff --git a/libguile/init.h b/libguile/init.h index 8e1fd4716..75d4f8924 100644 --- a/libguile/init.h +++ b/libguile/init.h @@ -47,10 +47,12 @@ #include "libguile/__scm.h" -extern void scm_boot_guile SCM_P ((int argc, char **argv, - void (*main_func) (void *closure, - int argc, - char **argv), - void *closure)); +extern void scm_boot_guile (int argc, char **argv, + void (*main_func) (void *closure, + int argc, + char **argv), + void *closure); + +extern void scm_load_startup_files (void); #endif /* INITH */ diff --git a/libguile/script.c b/libguile/script.c index 786dc5a68..93d6b133c 100644 --- a/libguile/script.c +++ b/libguile/script.c @@ -424,12 +424,6 @@ SCM_SYMBOL (sym_top_repl, "top-repl"); SCM_SYMBOL (sym_quit, "quit"); -/* The boot code "ice-9/boot-9" is only loaded by - SCM_COMPILE_SHELL_SWITCHES when this is false. The unexec code - uses this, to keep ice_9 from being loaded into dumped guile - executables. */ -int scm_ice_9_already_loaded = 0; - /* Given an array of command-line switches, return a Scheme expression to carry out the actions specified by the switches. @@ -616,24 +610,10 @@ scm_compile_shell_switches (int argc, char **argv) /* After doing all the other actions prescribed by the command line, quit. */ tail = scm_cons (scm_cons (sym_quit, SCM_EOL), - tail); + tail); /* Allow asyncs (signal handlers etc.) to be run. */ scm_mask_ints = 0; } - { - /* We want a path only containing directories from GUILE_LOAD_PATH, - SCM_SITE_DIR and SCM_LIBRARY_DIR when searching for the site init - file, so we do this before loading Ice-9. */ - SCM init_path = scm_sys_search_load_path (scm_makfrom0str ("init.scm")); - - /* Load Ice-9. */ - if (!scm_ice_9_already_loaded) - scm_primitive_load_path (scm_makfrom0str ("ice-9/boot-9.scm")); - - /* Load the init.scm file. */ - if (SCM_NFALSEP (init_path)) - scm_primitive_load (init_path); - } { SCM val = scm_cons (sym_begin, scm_reverse_x (tail, SCM_UNDEFINED)); |