reinstate a missing if(numerical), which got lost

This commit is contained in:
rlar 2011-02-13 20:24:10 +00:00
parent f6ed60844f
commit 24cdf89344
3 changed files with 16 additions and 5 deletions

View File

@ -1,3 +1,9 @@
2011-02-13 Robert Larice
* src/frontend/numparam/spicenum.c ,
* src/frontend/numparam/xpressn.c :
reinstate a missing if(numerical), which got lost
and fix a few comments
2011-02-13 Robert Larice
part 2, the actual change

View File

@ -60,7 +60,7 @@ extern int dynmaxline; /* inpcom.c:1529 */
overwrite any line pointers, or we start a new set after each sig=0 ?
Anyway, we neutralize all & and .param lines (category[] array!)
and we substitute all {} &() and &id placeholders by dummy numbers.
The placeholders are long long integers 100000000000000+n (17 digits, n small).
The placeholders are long long integers 10000000000000000+n (17 digits, n small).
*/
/********** string handling ***********/

View File

@ -1555,9 +1555,14 @@ evaluate (tdico * dico, SPICE_DSTRINGPTR qstr_p, char *t, unsigned char mode)
u = formula (dico, t, &err);
numeric = 1;
}
/* set string to total length 17, mantissa after . is of length 9
use sprintf with format string %17.10g */
strf (u, 17, 10, qstr_p);
if (numeric)
{
/* set string to total length 17, mantissa after . is of length 9
use sprintf with format string %17.10g */
strf (u, 17, 10, qstr_p);
}
spice_dstring_free(&vstr) ;
return err;
}
@ -1857,7 +1862,7 @@ insertnumber (tdico * dico, int i, char *s, SPICE_DSTRINGPTR ustr_p)
while (found && (k < 17))
{
/* parse a 15-digit number */
/* parse a 17-digit number */
found = num (s[i + k]);
if (found)