1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 11:50:28 +02:00

* 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.
This commit is contained in:
Jim Blandy 1996-08-15 07:21:17 +00:00
parent ac335fa89d
commit 47b44240b9

View file

@ -51,17 +51,12 @@
#endif #endif
#ifdef __STDC__
void
scm_start_stack (void * base, FILE * in, FILE * out, FILE * err)
#else
void void
scm_start_stack (base, in, out, err) scm_start_stack (base, in, out, err)
void * base; void * base;
FILE * in; FILE * in;
FILE * out; FILE * out;
FILE * err; FILE * err;
#endif
{ {
struct scm_port_table * pt; 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 void
scm_restart_stack (base) scm_restart_stack (base)
void * base; void * base;
#endif
{ {
scm_dynwinds = SCM_EOL; scm_dynwinds = SCM_EOL;
SCM_DYNENV (scm_rootcont) = 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. * argc and argv are made the return values of program-arguments.
* *
* in, out, and err, if not NULL, become the standard ports. * 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. * standard ports.
* *
* boot_cmd is a string containing a Scheme expression to evaluate * 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_ok - evaluation concluded normally
* scm_boot_error - evaluation concluded with a Scheme error * scm_boot_error - evaluation concluded with a Scheme error
* scm_boot_emem - allocation error mallocing *result * 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 int
scm_boot_guile (char ** result, int argc, char ** argv, FILE * in, FILE * out, FILE * err, char * boot_cmd) scm_boot_guile (result, argc, argv, in, out, err, init_func, boot_cmd)
#else
int
scm_boot_guile (result, argc, argv, in, out, err, boot_cmd)
char ** result; char ** result;
int argc; int argc;
char ** argv; char ** argv;
FILE * in; FILE * in;
FILE * out; FILE * out;
FILE * err; FILE * err;
void (*init_func) ();
char * boot_cmd; char * boot_cmd;
#endif
{ {
static int initialized = 0; static int initialized = 0;
static int live = 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_posix ();
scm_init_procs (); scm_init_procs ();
scm_init_procprop (); scm_init_procprop ();
scm_init_rgx ();
scm_init_scmsigs (); scm_init_scmsigs ();
scm_init_socket (); scm_init_socket ();
scm_init_stackchk (); scm_init_stackchk ();
@ -349,7 +335,6 @@ scm_boot_guile (result, argc, argv, in, out, err, boot_cmd)
scm_init_ramap (); scm_init_ramap ();
scm_init_unif (); scm_init_unif ();
scm_init_simpos (); scm_init_simpos ();
scm_appinit ();
scm_progargs = scm_makfromstrs (argc, argv); scm_progargs = scm_makfromstrs (argc, argv);
initialized = 1; initialized = 1;
} }
@ -369,6 +354,11 @@ scm_boot_guile (result, argc, argv, in, out, err, boot_cmd)
SCM last; SCM last;
scm_init_signals (); 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 p;
SCM form; SCM form;