variable rename, unify the source
checked for object file invariance
This commit is contained in:
parent
f95aaaafc1
commit
35c0e9eca3
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue