diff options
author | Jim Blandy <jimb@red-bean.com> | 1996-08-15 07:21:17 +0000 |
---|---|---|
committer | Jim Blandy <jimb@red-bean.com> | 1996-08-15 07:21:17 +0000 |
commit | 47b44240b9e67361f2327c78ae39f55fa79d8469 (patch) | |
tree | d0532639e23f2c3fd6a6cafe7f08e5e9059baa9e /libguile/init.c | |
parent | ac335fa89db13cc948fa5a16df188cff2a62630a (diff) | |
download | guile-47b44240b9e67361f2327c78ae39f55fa79d8469.tar.gz |
* init.c (scm_boot_guile): Don't call scm_init_rgx; it's a plugin,
and should be called by the final client.
* init.h (scm_start_stack, scm_restart_stack): Use PROTO;
eliminate all the __STDC__ conditionals.
(scm_boot_guile): Add declaration.
* init.c (scm_start_stack, scm_restart_stack, scm_boot_guile):
Remove __STDC__ conditionals around function definitions; the
declarations in init.h will provide the same information, more
usefully.
* init.c (scm_boot_guile): Add init_func argument; call
(*init_func) instead of calling scm_appinit; it's ucky to
hard-code names for the user's procedures.
* init.h (scm_boot_guile): Adjust declaration.
Diffstat (limited to 'libguile/init.c')
-rw-r--r-- | libguile/init.c | 30 |
1 files changed, 10 insertions, 20 deletions
diff --git a/libguile/init.c b/libguile/init.c index 32bc50908..6b7d2c55e 100644 --- a/libguile/init.c +++ b/libguile/init.c @@ -51,17 +51,12 @@ #endif -#ifdef __STDC__ -void -scm_start_stack (void * base, FILE * in, FILE * out, FILE * err) -#else void scm_start_stack (base, in, out, err) void * base; FILE * in; FILE * out; FILE * err; -#endif { struct scm_port_table * pt; @@ -148,14 +143,9 @@ scm_start_stack (base, in, out, err) } -#ifdef __STDC__ -void -scm_restart_stack (void * base) -#else void scm_restart_stack (base) void * base; -#endif { scm_dynwinds = SCM_EOL; SCM_DYNENV (scm_rootcont) = SCM_EOL; @@ -235,7 +225,7 @@ typedef long setjmp_type; * argc and argv are made the return values of program-arguments. * * in, out, and err, if not NULL, become the standard ports. - * If NULL is passed, your "scm_appinit" should set up the + * If NULL is passed, your "initfunc" should set up the * standard ports. * * boot_cmd is a string containing a Scheme expression to evaluate @@ -248,23 +238,20 @@ typedef long setjmp_type; * scm_boot_ok - evaluation concluded normally * scm_boot_error - evaluation concluded with a Scheme error * scm_boot_emem - allocation error mallocing *result - * scm_boot_ereenter - scm_boot_guile was called re-entrantly, which is prohibited. + * scm_boot_ereenter - scm_boot_guile was called re-entrantly, which is + * prohibited. */ -#ifdef __STDC__ -int -scm_boot_guile (char ** result, int argc, char ** argv, FILE * in, FILE * out, FILE * err, char * boot_cmd) -#else int -scm_boot_guile (result, argc, argv, in, out, err, boot_cmd) +scm_boot_guile (result, argc, argv, in, out, err, init_func, boot_cmd) char ** result; int argc; char ** argv; FILE * in; FILE * out; FILE * err; + void (*init_func) (); char * boot_cmd; -#endif { static int initialized = 0; static int live = 0; @@ -323,7 +310,6 @@ scm_boot_guile (result, argc, argv, in, out, err, boot_cmd) scm_init_posix (); scm_init_procs (); scm_init_procprop (); - scm_init_rgx (); scm_init_scmsigs (); scm_init_socket (); scm_init_stackchk (); @@ -349,7 +335,6 @@ scm_boot_guile (result, argc, argv, in, out, err, boot_cmd) scm_init_ramap (); scm_init_unif (); scm_init_simpos (); - scm_appinit (); scm_progargs = scm_makfromstrs (argc, argv); initialized = 1; } @@ -369,6 +354,11 @@ scm_boot_guile (result, argc, argv, in, out, err, boot_cmd) SCM last; scm_init_signals (); + /* Call the initialization function passed in by the user, if + present. */ + if (init_func) (*init_func) (); + + /* Evaluate boot_cmd string. */ { SCM p; SCM form; |