From 0e6b785728b7efdabb582c7f90f993dc5abc890c Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Fri, 9 Jun 2023 16:10:37 +0200 Subject: [PATCH] Remove the error message when a simulation has been started via the .control section. --- src/main.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main.c b/src/main.c index bba99a714..eecf01f04 100644 --- a/src/main.c +++ b/src/main.c @@ -1403,6 +1403,8 @@ int main(int argc, char **argv) if (ft_batchmode) { + int error3 = 1; + /* If we get back here in batch mode then something is wrong, * so exit. */ @@ -1425,6 +1427,9 @@ int main(int argc, char **argv) cp_interactive = FALSE; + /* Check if a simulation has run from a .control section */ + cp_getvar("sim_status", CP_NUM, &error3, 0); + if (rflag) { /* If -r is specified, then dot cards (.width, .plot, .print, .op, .meas, .tf) are ignored, except .save, which has been handled by ft_dotsaves() @@ -1443,6 +1448,10 @@ int main(int argc, char **argv) if (ft_cktcoms(FALSE) || error2) sp_shutdown(EXIT_BAD); } + else if (error3 == 0) { + fprintf(stdout, "Note: Simulation executed from .control section \n"); + sp_shutdown(EXIT_NORMAL); + } else { fprintf(stderr, "Note: No \".plot\", \".print\", or \".fourier\" lines; "