mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-29 16:30:19 +02:00
* init.c: Doc fixes.
This commit is contained in:
parent
6b8d19d302
commit
bdca108323
1 changed files with 33 additions and 0 deletions
|
@ -39,6 +39,8 @@
|
||||||
* whether to permit this exception to apply to your modifications.
|
* whether to permit this exception to apply to your modifications.
|
||||||
* If you do not wish that, delete this exception notice. */
|
* If you do not wish that, delete this exception notice. */
|
||||||
|
|
||||||
|
/* Include the headers for just about everything.
|
||||||
|
We call all their initialization functions. */
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "_scm.h"
|
#include "_scm.h"
|
||||||
|
@ -126,6 +128,7 @@
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Setting up the stack. */
|
||||||
|
|
||||||
static void start_stack SCM_P ((void *base));
|
static void start_stack SCM_P ((void *base));
|
||||||
static void restart_stack SCM_P ((void * base));
|
static void restart_stack SCM_P ((void * base));
|
||||||
|
@ -275,6 +278,34 @@ scm_init_standard_ports ()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* Loading the startup Scheme files. */
|
||||||
|
|
||||||
|
/* The boot code "ice-9/boot-9" is only loaded by scm_boot_guile 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;
|
||||||
|
|
||||||
|
void
|
||||||
|
scm_load_startup_files ()
|
||||||
|
{
|
||||||
|
/* 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);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* The main init code. */
|
||||||
|
|
||||||
#ifdef _UNICOS
|
#ifdef _UNICOS
|
||||||
typedef int setjmp_type;
|
typedef int setjmp_type;
|
||||||
#else
|
#else
|
||||||
|
@ -502,6 +533,8 @@ invoke_main_func (body_data)
|
||||||
{
|
{
|
||||||
struct main_func_closure *closure = (struct main_func_closure *) body_data;
|
struct main_func_closure *closure = (struct main_func_closure *) body_data;
|
||||||
|
|
||||||
|
scm_load_startup_files ();
|
||||||
|
|
||||||
(*closure->main_func) (closure->closure, closure->argc, closure->argv);
|
(*closure->main_func) (closure->closure, closure->argc, closure->argv);
|
||||||
|
|
||||||
/* never reached */
|
/* never reached */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue