diff --git a/src/main.c b/src/main.c index 380645bf4..cc3944f71 100644 --- a/src/main.c +++ b/src/main.c @@ -1091,13 +1091,17 @@ int main(int argc, char **argv) cp_nocc = FALSE; } +#ifndef HAS_WINGUI if ((iflag || istty) && !ft_batchmode) { /* Enable interactive prompting. */ - +#else + if (iflag && !ft_batchmode) { +#endif bool x_true = TRUE; cp_vset("interactive", CP_BOOL, &x_true); } + if (ft_servermode) { /* in server no init file */ readinit = FALSE; } @@ -1322,6 +1326,8 @@ int main(int argc, char **argv) /* Copy the input file name for becoming another file search path */ if (inp_spsource(tempfile, FALSE, dname, FALSE) != 0) { fprintf(stderr, " Simulation interrupted due to error!\n\n"); + if (oflag && !cp_getvar("interactive", CP_BOOL, NULL, 0)) + exit(EXIT_BAD); } tfree(dname); gotone = TRUE;