bug fix, (#329233)
This commit is contained in:
parent
b778c50bd6
commit
46da3b066e
20
ChangeLog
20
ChangeLog
|
|
@ -1,4 +1,20 @@
|
|||
2011-04-27 Robert Larice
|
||||
2011-04-28 Robert Larice
|
||||
* src/frontend/inpcom.c ,
|
||||
bug fix, (#329233)
|
||||
http://sourceforge.net/tracker/?func=detail&atid=423915&aid=3292330&group_id=38962
|
||||
this fix is for
|
||||
E1 OUT 0 vol='V(IN)>1 && V(IN)>0 ? 1 : 0'
|
||||
|
||||
FIXME,
|
||||
INPevaluate() should skip a trailing `unit' string
|
||||
|
||||
FIXME,
|
||||
E1 OUT 0 vol='(V(IN)>1) and (V(IN)>0) ? 1 : 0'
|
||||
this is simply incorrect syntax, but shoudn't segfault.
|
||||
inp_chk_for_multi_in_vcvs()
|
||||
is much to simple minded.
|
||||
|
||||
2011-04-28 Robert Larice
|
||||
* src/main.c ,
|
||||
* src/frontend/com_measure2.c ,
|
||||
* src/frontend/inpcom.c ,
|
||||
|
|
@ -10,7 +26,7 @@
|
|||
* src/spicelib/devices/vsrc/vsrcacct.c :
|
||||
code cleanup, some warnings, some casts, ...
|
||||
|
||||
2011-04-27 Robert Larice
|
||||
2011-04-28 Robert Larice
|
||||
* */** :
|
||||
code cleanup, drop NULL pointer casts
|
||||
|
||||
|
|
|
|||
|
|
@ -4334,8 +4334,6 @@ static void inp_bsource_compat(struct line *deck)
|
|||
char buf[512];
|
||||
size_t i, xlen, ustate = 0;
|
||||
int skip_control = 0;
|
||||
char *cvalue;
|
||||
double dvalue;
|
||||
int error1;
|
||||
|
||||
for (card = deck; card; card = card->li_next) {
|
||||
|
|
@ -4538,15 +4536,17 @@ static void inp_bsource_compat(struct line *deck)
|
|||
else if (isdigit(actchar))
|
||||
{
|
||||
/* allow 100p, 5MEG etc. */
|
||||
dvalue = INPevaluate(&str_ptr, &error1, 2);
|
||||
cvalue = TMALLOC(char, 19);
|
||||
sprintf(cvalue,"%18.10e", dvalue);
|
||||
double dvalue = INPevaluate(&str_ptr, &error1, 0);
|
||||
char cvalue[19];
|
||||
/* unary -, change sign */
|
||||
if (ustate == 2) {
|
||||
cvalue[0] = '-';
|
||||
}
|
||||
if (ustate == 2)
|
||||
dvalue *= -1;
|
||||
sprintf(cvalue,"%18.10e", dvalue);
|
||||
cwl->wl_word = copy(cvalue);
|
||||
ustate = 0; /* we have a number */
|
||||
/* skip the `unit', FIXME INPevaluate() should do this */
|
||||
while(isalpha(*str_ptr))
|
||||
str_ptr++;
|
||||
}
|
||||
else /* strange char */
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue