From 35c0e9eca3e100fc806c853bc3c444c1b4c7e2d8 Mon Sep 17 00:00:00 2001 From: rlar Date: Mon, 1 Oct 2012 17:59:40 +0200 Subject: [PATCH] variable rename, unify the source checked for object file invariance --- src/frontend/cpitf.c | 12 ++++++------ src/frontend/plotting/plotit.c | 14 +++++++------- src/frontend/postcoms.c | 18 +++++++++--------- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/frontend/cpitf.c b/src/frontend/cpitf.c index 0cd6095c9..9b067337c 100644 --- a/src/frontend/cpitf.c +++ b/src/frontend/cpitf.c @@ -301,7 +301,7 @@ cp_istrue(wordlist *wl) { int i; struct dvec *v; - struct pnode *pn; + struct pnode *names; /* First do all the csh-type stuff here... */ wl = wl_copy(wl); @@ -309,28 +309,28 @@ cp_istrue(wordlist *wl) wl = cp_bquote(wl); cp_striplist(wl); - pn = ft_getpnames(wl, TRUE); + names = ft_getpnames(wl, TRUE); wl_free(wl); - v = ft_evaluate(pn); + v = ft_evaluate(names); for (; v; v = v->v_link2) if (isreal(v)) { for (i = 0; i < v->v_length; i++) if (v->v_realdata[i] != 0.0) { - free_pnode(pn); + free_pnode(names); return (TRUE); } } else { for (i = 0; i < v->v_length; i++) if ((realpart(v->v_compdata[i]) != 0.0) || (imagpart(v->v_compdata[i]) != 0.0)) { - free_pnode(pn); + free_pnode(names); return (TRUE); } } - free_pnode(pn); + free_pnode(names); return (FALSE); } diff --git a/src/frontend/plotting/plotit.c b/src/frontend/plotting/plotit.c index 64ffda2e7..db506eb82 100644 --- a/src/frontend/plotting/plotit.c +++ b/src/frontend/plotting/plotit.c @@ -230,7 +230,7 @@ plotit(wordlist *wl, char *hcopy, char *devname) bool gfound = FALSE, pfound = FALSE, oneval = FALSE; double *dd, ylims[2], xlims[2]; - struct pnode *n, *names; + struct pnode *pn, *names; struct dvec *dv, *d = NULL, *vecs = NULL, *lv, *lastvs = NULL; char *xn; int i, j, xt; @@ -534,20 +534,20 @@ plotit(wordlist *wl, char *hcopy, char *devname) goto quit1; /* Now evaluate the names. */ - for (n = names, lv = NULL; n; n = n->pn_next) - if (n->pn_value && (n->pn_value->v_length == 0) && - eq(n->pn_value->v_name, "vs")) + for (pn = names, lv = NULL; pn; pn = pn->pn_next) + if (pn->pn_value && (pn->pn_value->v_length == 0) && + eq(pn->pn_value->v_name, "vs")) { if (!lv) { fprintf(cp_err, "Error: misplaced vs arg\n"); goto quit; } - if ((n = n->pn_next) == NULL) { + if ((pn = pn->pn_next) == NULL) { fprintf(cp_err, "Error: missing vs arg\n"); goto quit; } - dv = ft_evaluate(n); + dv = ft_evaluate(pn); if (!dv) goto quit; @@ -564,7 +564,7 @@ plotit(wordlist *wl, char *hcopy, char *devname) } else { - dv = ft_evaluate(n); + dv = ft_evaluate(pn); if (!dv) goto quit; diff --git a/src/frontend/postcoms.c b/src/frontend/postcoms.c index 8d110533f..8668aec0e 100644 --- a/src/frontend/postcoms.c +++ b/src/frontend/postcoms.c @@ -72,7 +72,7 @@ com_print(wordlist *wl) { struct dvec *v, *lv = NULL, *bv, *nv, *vecs = NULL; int i, j, ll, width = DEF_WIDTH, height = DEF_HEIGHT, npoints, lineno; - struct pnode *nn, *names; + struct pnode *pn, *names; struct plot *p; bool col = TRUE, nobreak = FALSE, noprintscale, plotnames = FALSE; bool optgiven = FALSE; @@ -98,8 +98,8 @@ com_print(wordlist *wl) ngood = 0; names = ft_getpnames(wl, TRUE); - for (nn = names; nn; nn = nn->pn_next) { - if ((v = ft_evaluate(nn)) == NULL) + for (pn = names; pn; pn = pn->pn_next) { + if ((v = ft_evaluate(pn)) == NULL) continue; if (!vecs) vecs = lv = v; @@ -373,7 +373,7 @@ void com_write(wordlist *wl) { char *file, buf[BSIZE_SP]; - struct pnode *n; + struct pnode *pn; struct dvec *d, *vecs = NULL, *lv = NULL, *end, *vv; static wordlist all = { "all", NULL, NULL }; struct pnode *names; @@ -406,8 +406,8 @@ com_write(wordlist *wl) if (names == NULL) return; - for (n = names; n; n = n->pn_next) { - d = ft_evaluate(n); + for (pn = names; pn; pn = pn->pn_next) { + d = ft_evaluate(pn); if (!d) return; if (vecs) @@ -523,7 +523,7 @@ com_write_sparam(wordlist *wl) char *file; char *sbuf[6]; wordlist *wl_sparam; - struct pnode *n; + struct pnode *pn; struct dvec *d, *vecs = NULL, *lv = NULL, *end, *vv, *Rbasevec = NULL; struct pnode *names; bool scalefound, appendwrite = FALSE; @@ -548,8 +548,8 @@ com_write_sparam(wordlist *wl) if (names == NULL) return; - for (n = names; n; n = n->pn_next) { - d = ft_evaluate(n); + for (pn = names; pn; pn = pn->pn_next) { + d = ft_evaluate(pn); if (!d) return;