From 745ea9ff3e1daa46cf1aeb7eb0b2e2b0556c7636 Mon Sep 17 00:00:00 2001 From: h_vogt Date: Thu, 9 May 2013 11:45:15 +0200 Subject: [PATCH] measure.c: disable autostop, if no .meas commands found --- src/frontend/measure.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/frontend/measure.c b/src/frontend/measure.c index f74fb821c..546bf92d3 100644 --- a/src/frontend/measure.c +++ b/src/frontend/measure.c @@ -239,6 +239,14 @@ do_measure( return (measures_passed); } + /* don't allow autostop if no .meas commands are given in the input file */ + if ((cp_getvar("autostop", CP_BOOL, NULL)) && (ft_curckt->ci_meas == NULL)) { + fprintf(cp_err, "\nWarning: No .meas commands found!\n"); + fprintf(cp_err, " Option autostop is not available, ignored!\n\n"); + cp_remvar("autostop"); + return (FALSE); + } + /* Evaluating the linked list of .meas cards, assembled from the input deck by fcn inp_spsource() in inp.c:575. A typical .meas card will contain: