From 8a2f81f61fdd2a751744629f325f4ac8bfc0e32c Mon Sep 17 00:00:00 2001 From: h_vogt Date: Fri, 11 Dec 2009 17:18:03 +0000 Subject: [PATCH] warning: .meas not possible with -b --- ChangeLog | 1 + src/frontend/measure.c | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index c82f2ceaf..e48b95b2d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ 2009-12-11 Holger Vogt * bug 2909730, patch for parsing expressions applied + * measure.c: Proper warning that .measure is not available in batch mode with -b 2009-12-10 Dietmar Warning * spicelib/parser/inptree.c: omit some debug printf's diff --git a/src/frontend/measure.c b/src/frontend/measure.c index 12750b147..cf42e6148 100644 --- a/src/frontend/measure.c +++ b/src/frontend/measure.c @@ -30,7 +30,7 @@ static bool just_chk_meas; /* TRUE: only check if measurement can be done succ no output generated (if option autostop is set)*/ static bool measures_passed; /* TRUE: stop simulation (if option autostop is set)*/ - +extern bool ft_batchmode; static bool chkAnalysisType( char *an_type ) { @@ -43,6 +43,7 @@ chkAnalysisType( char *an_type ) { if ( strcmp( an_type, "tran" ) != 0 && strcmp( an_type, "ac" ) != 0 && strcmp( an_type, "dc" ) != 0) return FALSE; +// else if (ft_batchmode == TRUE) return FALSE; else return TRUE; } @@ -114,6 +115,13 @@ do_measure( strtolower( an_name ); measure_word_list = NULL ; + /* don't allow .meas if batchmode is set by -b */ + if (ft_batchmode) { + fprintf(cp_err, "\nNo .measure possible in batch mode (-b)!\n"); + fprintf(cp_err, "Select interactive mode (optionally with .control section) instead.\n\n"); + return; + } + /* 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: