Unified · Split
| @@ -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 | } |