History

repl: fix files as arguments

Sigrid Haflínudóttir committed 6 years ago

Commit d8403a61 parent 7e7bad91 file · +6 −3Browse files

Unified · Split

repl.c+6−3
@@ -41,9 +41,12 @@ main(int argc, char **argv) · 40 unmodified lines
41 curctx = ctx;41 curctx = ctx;
42 notify(onnote);42 notify(onnote);
43 43
44 if(argc > 1 && (fp = Bopen(argv[1], OREAD)) == nil)44 if(argc > 1){
45 aa_error(ctx, "could not open input file");45 if((fp = Bopen(argv[1], OREAD)) == nil)
46 else{46 aa_error(ctx, "could not open input file");
47 else
48 ctx->fd[0] = *fp;
49 }else{
47 fp = &ctx->fd[0];50 fp = &ctx->fd[0];
48 aa_handlers(ctx)->error = onerror;51 aa_handlers(ctx)->error = onerror;
49 }52 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t