Warning message, when 'run' is called without job

(tran, op, ac etc.) is defined.
This commit is contained in:
Holger Vogt 2022-09-20 20:09:42 +02:00
parent 3af627db44
commit 6037450952
2 changed files with 11 additions and 0 deletions

View File

@ -349,6 +349,12 @@ static int dosim(
err = 1;
cp_vset("sim_status", CP_NUM, &err);
}
else if (err == 3) {
fprintf(cp_err, "%s simulation not started\n", what);
ft_curckt->ci_inprogress = FALSE;
err = 1;
cp_vset("sim_status", CP_NUM, &err);
}
else {
ft_curckt->ci_inprogress = FALSE;
}

View File

@ -330,6 +330,11 @@ if_run(CKTcircuit *ckt, char *what, wordlist *args, INPtables *tab)
if (eq(what, "run")) {
ft_curckt->ci_curTask = ft_curckt->ci_defTask;
ft_curckt->ci_curOpt = ft_curckt->ci_defOpt;
if (ft_curckt->ci_curTask->jobs == NULL) {
/* nothing to 'run' */
fprintf(stderr, "Warning: No job (tran, ac, op etc.) defined:\n");
return (3);
}
}
/* -- Find out what we are supposed to do. */