mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-07-04 19:56:36 +02:00
If unbound, using current-output-port in place of current-error-port for -x languages.
Allows -xscheme.r5rs.
This commit is contained in:
parent
3c8c1fe74b
commit
db32409452
1 changed files with 2 additions and 1 deletions
3
main.c
3
main.c
|
@ -212,10 +212,11 @@ static void repl (sexp ctx, sexp env) {
|
|||
in = sexp_param_ref(ctx, env, sexp_global(ctx, SEXP_G_CUR_IN_SYMBOL));
|
||||
out = sexp_param_ref(ctx, env, sexp_global(ctx, SEXP_G_CUR_OUT_SYMBOL));
|
||||
err = sexp_param_ref(ctx, env, sexp_global(ctx, SEXP_G_CUR_ERR_SYMBOL));
|
||||
if (in == NULL || out == NULL || err == NULL) {
|
||||
if (in == NULL || out == NULL) {
|
||||
fprintf(stderr, "Standard I/O ports not found, aborting. Maybe a bad -x language?\n");
|
||||
exit_failure();
|
||||
}
|
||||
if (err == NULL) err = out;
|
||||
sexp_port_sourcep(in) = 1;
|
||||
while (1) {
|
||||
sexp_write_string(ctx, "> ", out);
|
||||
|
|
Loading…
Add table
Reference in a new issue