mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-19 05:39:18 +02:00
Don't load all of (scheme small) for scripts.
This commit is contained in:
parent
854f2f09ed
commit
fdc2558a76
1 changed files with 4 additions and 2 deletions
4
main.c
4
main.c
|
@ -358,6 +358,7 @@ static sexp sexp_load_standard_repl_env (sexp ctx, sexp env, sexp k, int bootp)
|
|||
#if SEXP_USE_MODULES
|
||||
if (!bootp)
|
||||
e = sexp_eval_string(ctx, sexp_default_environment, -1, sexp_global(ctx, SEXP_G_META_ENV));
|
||||
if (!sexp_exceptionp(e))
|
||||
sexp_add_import_binding(ctx, e);
|
||||
#endif
|
||||
if (!sexp_exceptionp(e))
|
||||
|
@ -605,13 +606,14 @@ void run_main (int argc, char **argv) {
|
|||
|
||||
done_options:
|
||||
if (!quit || main_symbol != NULL) {
|
||||
load_init(0);
|
||||
init_context();
|
||||
/* build argument list */
|
||||
if (i < argc)
|
||||
for (j=argc-1; j>=i; j--)
|
||||
args = sexp_cons(ctx, tmp=sexp_c_string(ctx,argv[j],-1), args);
|
||||
if (i >= argc || main_symbol != NULL)
|
||||
args = sexp_cons(ctx, tmp=sexp_c_string(ctx,argv[0],-1), args);
|
||||
load_init(i < argc || main_symbol != NULL);
|
||||
sexp_set_parameter(ctx, sexp_meta_env(ctx), sym=sexp_intern(ctx, sexp_argv_symbol, -1), args);
|
||||
if (i >= argc && main_symbol == NULL) {
|
||||
/* no script or main, run interactively */
|
||||
|
|
Loading…
Add table
Reference in a new issue