From f79e9e703cb846ee3830eae11e032412a0fbb895 Mon Sep 17 00:00:00 2001 From: pnenzi Date: Sat, 27 Aug 2005 07:58:01 +0000 Subject: [PATCH] Previous commit was incomplete. --- src/frontend/dotcards.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/frontend/dotcards.c b/src/frontend/dotcards.c index 30dbd39d0..0abf04320 100644 --- a/src/frontend/dotcards.c +++ b/src/frontend/dotcards.c @@ -447,35 +447,35 @@ fixem(char *string) else if (eq(string + 2, "0")) (void) sprintf(buf, "-v(%s)", s); else (void) sprintf(buf, "v(%s)-v(%s)", string + 2, s); - } else if (ciprefix("vm(", string)) { + } else if (ciprefix("vm(", string) &&strchr(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 + 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)) { + } else if (ciprefix("vp(", string) &&strchr(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 + 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)) { + } else if (ciprefix("vi(", string) &&strchr(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 + 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)) { + } else if (ciprefix("vr(", string) &&strchr(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 + 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)) { + } else if (ciprefix("vdb(", string) &&strchr(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);