From a51953d93ee0de928d2a4f81d88c068fea36bde8 Mon Sep 17 00:00:00 2001 From: h_vogt Date: Sat, 14 Apr 2012 13:17:14 +0200 Subject: [PATCH] allow `time', `temper', and `hertz' in expressions of behavioral R,L,C devices --- src/frontend/inpcom.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/frontend/inpcom.c b/src/frontend/inpcom.c index be3232ee7..47c52f203 100644 --- a/src/frontend/inpcom.c +++ b/src/frontend/inpcom.c @@ -4370,7 +4370,9 @@ static void inp_compat(struct line *deck) BRxxx pos neg I = V(pos, neg)/{equation} */ else if ( *curr_line == 'r' ) { - if ((!strstr(curr_line, "v(")) && (!strstr(curr_line, "i("))) + if ((!strstr(curr_line, "v(")) && (!strstr(curr_line, "i(")) + && (!strstr(curr_line, "temper")) && (!strstr(curr_line, "hertz")) + && (!strstr(curr_line, "time"))) /* no handling in B-Source, so we have to prepare ternary fcn for numparam */ if ( strstr( curr_line, "?" ) && strstr( curr_line, ":" ) ) { @@ -4455,7 +4457,9 @@ static void inp_compat(struct line *deck) Bxxx n2 n1 I = i(Exxx) * equation */ else if ( *curr_line == 'c' ) { - if ((!strstr(curr_line, "v(")) && (!strstr(curr_line, "i("))) + if ((!strstr(curr_line, "v(")) && (!strstr(curr_line, "i(")) + && (!strstr(curr_line, "temper")) && (!strstr(curr_line, "hertz")) + && (!strstr(curr_line, "time"))) /* no handling in B-Source, so we have to prepare ternary fcn for numparam */ if ( strstr( curr_line, "?" ) && strstr( curr_line, ":" ) ) { @@ -4561,7 +4565,9 @@ static void inp_compat(struct line *deck) Bxxx n1 n2 V = v(n-aux) * equation */ else if ( *curr_line == 'l' ) { - if ((!strstr(curr_line, "v(")) && (!strstr(curr_line, "i("))) + if ((!strstr(curr_line, "v(")) && (!strstr(curr_line, "i(")) + && (!strstr(curr_line, "temper")) && (!strstr(curr_line, "hertz")) + && (!strstr(curr_line, "time"))) /* no handling in B-Source, so we have to prepare ternary fcn for numparam */ if ( strstr( curr_line, "?" ) && strstr( curr_line, ":" ) ) {