diff --git a/src/frontend/plotting/graf.c b/src/frontend/plotting/graf.c index bab14a351..304b56c00 100644 --- a/src/frontend/plotting/graf.c +++ b/src/frontend/plotting/graf.c @@ -20,6 +20,7 @@ Author: 1988 Jeffrey M. Hsu #include "ngspice/graph.h" #include "ngspice/ftedbgra.h" #include "ngspice/ftedev.h" +#include "ngspice/sim.h" #include #include "graf.h" #include "graphdb.h" @@ -315,15 +316,13 @@ static void gr_start_internal(struct dvec *dv, bool copyvec) { struct dveclist *link; - char *s; /* Do something special with poles and zeros. Poles are 'x's, and * zeros are 'o's. */ - s = ft_typenames(dv->v_type); - if (eq(s, "pole")) { + if (dv->v_type == SV_POLE) { dv->v_linestyle = 'x'; return; - } else if (eq(s, "zero")) { + } else if (dv->v_type == SV_ZERO) { dv->v_linestyle = 'o'; return; } @@ -658,7 +657,7 @@ iplot(struct plot *pl, int id) for (yt = pl->pl_dvecs->v_type, v = pl->pl_dvecs->v_next; v; v = v->v_next) if ((v->v_flags & VF_PLOT) && (v->v_type != yt)) { - yt = 0; + yt = SV_NOTYPE; break; } diff --git a/src/frontend/rawfile.c b/src/frontend/rawfile.c index 4ccf4082d..dafecc5ed 100644 --- a/src/frontend/rawfile.c +++ b/src/frontend/rawfile.c @@ -12,6 +12,7 @@ Author: 1986 Wayne A. Christopher, U. C. Berkeley CAD Group #include "ngspice/ftedefs.h" #include "dimens.h" #include "ngspice/dvec.h" +#include "ngspice/sim.h" #include "rawfile.h" #include "variable.h" @@ -154,14 +155,14 @@ raw_write(char *name, struct plot *pl, bool app, bool binary) fprintf(fp, "Variables:\n"); for (i = 0, v = pl->pl_dvecs; v; v = v->v_next) { - if (strcmp(ft_typenames(v->v_type), "current") == 0) { + if (v->v_type == SV_CURRENT) { branch = NULL; if ((branch = strstr(v->v_name, "#branch")) != NULL) { *branch = '\0'; } fprintf(fp, "\t%d\ti(%s)\t%s", i++, v->v_name, ft_typenames(v->v_type)); if (branch != NULL) *branch = '#'; - } else if (strcmp(ft_typenames(v->v_type), "voltage") == 0) { + } else if (v->v_type == SV_VOLTAGE) { fprintf(fp, "\t%d\t%s\t%s", i++, v->v_name, ft_typenames(v->v_type)); } else { fprintf(fp, "\t%d\t%s\t%s", i++, v->v_name, ft_typenames(v->v_type));