Browse Source

String offset wrong. Expression were translated incorrectly.

pre-master-46
pnenzi 21 years ago
parent
commit
8274fff4fe
  1. 6
      ChangeLog
  2. 10
      src/frontend/dotcards.c

6
ChangeLog

@ -2,6 +2,12 @@
============================ Rework-16 ==================================
2005-08-26 Paolo Nenzi <p.nenzi@ieee.org>
* src/fronted/dotcards.c: expressions were not parsed correctly, the bug
was in the offset from string base: corrected.
2005-08-23 Paolo Nenzi <p.nenzi@ieee.org>
* src/xspice/icm/xtradev/aswitch/cfunc.mod: Added minimum on resistance

10
src/frontend/dotcards.c

@ -451,35 +451,35 @@ fixem(char *string)
for (s = string; *s && (*s != ','); s++) ; *s++ = '\0';
for (t = s; *t && (*t != ')'); t++) ; *t = '\0';
if (eq(s, "0")) (void) sprintf(buf, "mag(v(%s))", string + 3);
else if (eq(string + 2, "0"))
else if (eq(string + 3, "0"))
(void) sprintf(buf, "mag(-v(%s))", s);
else (void) sprintf(buf, "mag(v(%s)-v(%s))", string + 3, s);
} else if (ciprefix("vp(", string)) {
for (s = string; *s && (*s != ','); s++) ; *s++ = '\0';
for (t = s; *t && (*t != ')'); t++) ; *t = '\0';
if (eq(s, "0")) (void) sprintf(buf, "ph(v(%s))", string + 3);
else if (eq(string + 2, "0"))
else if (eq(string + 3, "0"))
(void) sprintf(buf, "ph(-v(%s))", s);
else (void) sprintf(buf, "ph(v(%s)-v(%s))", string + 3, s);
} else if (ciprefix("vi(", string)) {
for (s = string; *s && (*s != ','); s++) ; *s++ = '\0';
for (t = s; *t && (*t != ')'); t++) ; *t = '\0';
if (eq(s, "0")) (void) sprintf(buf, "imag(v(%s))", string + 3);
else if (eq(string + 2, "0"))
else if (eq(string + 3, "0"))
(void) sprintf(buf, "imag(-v(%s))", s);
else (void) sprintf(buf, "imag(v(%s)-v(%s))", string + 3, s);
} else if (ciprefix("vr(", string)) {
for (s = string; *s && (*s != ','); s++) ; *s++ = '\0';
for (t = s; *t && (*t != ')'); t++) ; *t = '\0';
if (eq(s, "0")) (void) sprintf(buf, "real(v(%s))", string + 3);
else if (eq(string + 2, "0"))
else if (eq(string + 3, "0"))
(void) sprintf(buf, "real(-v(%s))", s);
else (void) sprintf(buf, "real(v(%s)-v(%s))", string + 3, s);
} else if (ciprefix("vdb(", string)) {
for (s = string; *s && (*s != ','); s++) ; *s++ = '\0';
for (t = s; *t && (*t != ')'); t++) ; *t = '\0';
if (eq(s, "0")) (void) sprintf(buf, "db(v(%s))", string + 4);
else if (eq(string + 2, "0"))
else if (eq(string + 4, "0"))
(void) sprintf(buf, "db(-v(%s))", s);
else (void) sprintf(buf, "db(v(%s)-v(%s))", string + 4, s);
} else if (ciprefix("i(", string)) {

Loading…
Cancel
Save