variable rename, unify the source
checked for object file invariance
This commit is contained in:
parent
f52ae6eccd
commit
26bbb39a68
|
|
@ -33,7 +33,7 @@ com_fft(wordlist *wl)
|
||||||
double delta_t, span;
|
double delta_t, span;
|
||||||
int fpts, i, j, tlen, ngood;
|
int fpts, i, j, tlen, ngood;
|
||||||
struct dvec *f, *vlist, *lv = NULL, *vec;
|
struct dvec *f, *vlist, *lv = NULL, *vec;
|
||||||
struct pnode *names, *first_name;
|
struct pnode *pn, *names;
|
||||||
|
|
||||||
#ifdef GREEN
|
#ifdef GREEN
|
||||||
int mm;
|
int mm;
|
||||||
|
|
@ -155,13 +155,13 @@ com_fft(wordlist *wl)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
names = ft_getpnames(wl, TRUE);
|
pn = ft_getpnames(wl, TRUE);
|
||||||
first_name = names;
|
names = pn;
|
||||||
vlist = NULL;
|
vlist = NULL;
|
||||||
ngood = 0;
|
ngood = 0;
|
||||||
while (names) {
|
while (pn) {
|
||||||
vec = ft_evaluate(names);
|
vec = ft_evaluate(pn);
|
||||||
names = names->pn_next;
|
pn = pn->pn_next;
|
||||||
while (vec) {
|
while (vec) {
|
||||||
if (vec->v_length != tlen) {
|
if (vec->v_length != tlen) {
|
||||||
fprintf(cp_err, "Error: lengths of %s vectors don't match: %d, %d\n",
|
fprintf(cp_err, "Error: lengths of %s vectors don't match: %d, %d\n",
|
||||||
|
|
@ -187,7 +187,7 @@ com_fft(wordlist *wl)
|
||||||
ngood++;
|
ngood++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
free_pnode_o(first_name);
|
free_pnode_o(names);
|
||||||
if (!ngood) {
|
if (!ngood) {
|
||||||
tfree(win);
|
tfree(win);
|
||||||
return;
|
return;
|
||||||
|
|
@ -288,7 +288,7 @@ com_psd(wordlist *wl)
|
||||||
unsigned long size, ngood, fpts, i, j, tlen, jj, smooth, hsmooth;
|
unsigned long size, ngood, fpts, i, j, tlen, jj, smooth, hsmooth;
|
||||||
char *s;
|
char *s;
|
||||||
struct dvec *f, *vlist, *lv = NULL, *vec;
|
struct dvec *f, *vlist, *lv = NULL, *vec;
|
||||||
struct pnode *names, *first_name;
|
struct pnode *pn, *names;
|
||||||
|
|
||||||
double *reald, *imagd;
|
double *reald, *imagd;
|
||||||
int sign, isreal;
|
int sign, isreal;
|
||||||
|
|
@ -425,13 +425,13 @@ com_psd(wordlist *wl)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
names = ft_getpnames(wl, TRUE);
|
pn = ft_getpnames(wl, TRUE);
|
||||||
first_name = names;
|
names = pn;
|
||||||
vlist = NULL;
|
vlist = NULL;
|
||||||
ngood = 0;
|
ngood = 0;
|
||||||
while (names) {
|
while (pn) {
|
||||||
vec = ft_evaluate(names);
|
vec = ft_evaluate(pn);
|
||||||
names = names->pn_next;
|
pn = pn->pn_next;
|
||||||
while (vec) {
|
while (vec) {
|
||||||
if (vec->v_length != (int)tlen) {
|
if (vec->v_length != (int)tlen) {
|
||||||
fprintf(cp_err, "Error: lengths of %s vectors don't match: %d, %lu\n",
|
fprintf(cp_err, "Error: lengths of %s vectors don't match: %d, %lu\n",
|
||||||
|
|
@ -457,7 +457,7 @@ com_psd(wordlist *wl)
|
||||||
ngood++;
|
ngood++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
free_pnode_o(first_name);
|
free_pnode_o(names);
|
||||||
if (!ngood)
|
if (!ngood)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ com_let(wordlist *wl)
|
||||||
wordlist fake_wl;
|
wordlist fake_wl;
|
||||||
int need_open;
|
int need_open;
|
||||||
int offset, length;
|
int offset, length;
|
||||||
struct pnode *nn;
|
struct pnode *names;
|
||||||
struct dvec *n, *t;
|
struct dvec *n, *t;
|
||||||
int i, cube;
|
int i, cube;
|
||||||
int j, depth;
|
int j, depth;
|
||||||
|
|
@ -80,16 +80,16 @@ com_let(wordlist *wl)
|
||||||
/* evaluate expression between s and q */
|
/* evaluate expression between s and q */
|
||||||
/* va, indexing */
|
/* va, indexing */
|
||||||
fake_wl.wl_word = s;
|
fake_wl.wl_word = s;
|
||||||
nn = ft_getpnames(&fake_wl, TRUE);
|
names = ft_getpnames(&fake_wl, TRUE);
|
||||||
if (!nn) {
|
if (!names) {
|
||||||
/* XXX error message */
|
/* XXX error message */
|
||||||
tfree(p);
|
tfree(p);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
t = ft_evaluate(nn);
|
t = ft_evaluate(names);
|
||||||
if (!t) {
|
if (!t) {
|
||||||
fprintf(cp_err, "Error: Can't evaluate %s\n", s);
|
fprintf(cp_err, "Error: Can't evaluate %s\n", s);
|
||||||
free_pnode(nn);
|
free_pnode(names);
|
||||||
tfree(p);
|
tfree(p);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -106,10 +106,10 @@ com_let(wordlist *wl)
|
||||||
|
|
||||||
indices[numdims++] = j;
|
indices[numdims++] = j;
|
||||||
|
|
||||||
/* va: garbage collection for t, if pnode nn is no simple value */
|
/* va: garbage collection for t, if pnode `names' is no simple value */
|
||||||
if (nn != NULL && nn->pn_value == NULL && t != NULL)
|
if (names != NULL && names->pn_value == NULL && t != NULL)
|
||||||
vec_free(t);
|
vec_free(t);
|
||||||
free_pnode(nn); /* frees also t, if pnode nn is simple value */
|
free_pnode(names); /* frees also t, if pnode `names' is simple value */
|
||||||
|
|
||||||
for (s = q; *s && isspace(*s); s++)
|
for (s = q; *s && isspace(*s); s++)
|
||||||
;
|
;
|
||||||
|
|
@ -131,16 +131,16 @@ com_let(wordlist *wl)
|
||||||
|
|
||||||
/* evaluate rhs */
|
/* evaluate rhs */
|
||||||
fake_wl.wl_word = rhs;
|
fake_wl.wl_word = rhs;
|
||||||
nn = ft_getpnames(&fake_wl, TRUE);
|
names = ft_getpnames(&fake_wl, TRUE);
|
||||||
if (nn == NULL) {
|
if (names == NULL) {
|
||||||
/* XXX error message */
|
/* XXX error message */
|
||||||
tfree(p);
|
tfree(p);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
t = ft_evaluate(nn);
|
t = ft_evaluate(names);
|
||||||
if (!t) {
|
if (!t) {
|
||||||
fprintf(cp_err, "Error: Can't evaluate %s\n", rhs);
|
fprintf(cp_err, "Error: Can't evaluate %s\n", rhs);
|
||||||
free_pnode(nn);
|
free_pnode(names);
|
||||||
tfree(p);
|
tfree(p);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -240,9 +240,9 @@ com_let(wordlist *wl)
|
||||||
cp_addkword(CT_VECTOR, n->v_name);
|
cp_addkword(CT_VECTOR, n->v_name);
|
||||||
|
|
||||||
quit:
|
quit:
|
||||||
/* va: garbage collection for t, if pnode nn is no simple value */
|
/* va: garbage collection for t, if pnode `names' is no simple value */
|
||||||
if (nn != NULL && nn->pn_value == NULL && t != NULL)
|
if (names != NULL && names->pn_value == NULL && t != NULL)
|
||||||
vec_free(t);
|
vec_free(t);
|
||||||
free_pnode(nn); /* frees also t, if pnode nn is simple value */
|
free_pnode(names); /* frees also t, if pnode `names' is simple value */
|
||||||
tfree(p);
|
tfree(p);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue