com_print(), com_cross(), use for(;;) loops
This commit is contained in:
parent
fe828c5081
commit
f95aaaafc1
|
|
@ -72,7 +72,7 @@ com_print(wordlist *wl)
|
||||||
{
|
{
|
||||||
struct dvec *v, *lv = NULL, *bv, *nv, *vecs = NULL;
|
struct dvec *v, *lv = NULL, *bv, *nv, *vecs = NULL;
|
||||||
int i, j, ll, width = DEF_WIDTH, height = DEF_HEIGHT, npoints, lineno;
|
int i, j, ll, width = DEF_WIDTH, height = DEF_HEIGHT, npoints, lineno;
|
||||||
struct pnode *nn;
|
struct pnode *nn, *names;
|
||||||
struct plot *p;
|
struct plot *p;
|
||||||
bool col = TRUE, nobreak = FALSE, noprintscale, plotnames = FALSE;
|
bool col = TRUE, nobreak = FALSE, noprintscale, plotnames = FALSE;
|
||||||
bool optgiven = FALSE;
|
bool optgiven = FALSE;
|
||||||
|
|
@ -97,7 +97,8 @@ com_print(wordlist *wl)
|
||||||
}
|
}
|
||||||
|
|
||||||
ngood = 0;
|
ngood = 0;
|
||||||
for (nn = ft_getpnames(wl, TRUE); nn; nn = nn->pn_next) {
|
names = ft_getpnames(wl, TRUE);
|
||||||
|
for (nn = names; nn; nn = nn->pn_next) {
|
||||||
if ((v = ft_evaluate(nn)) == NULL)
|
if ((v = ft_evaluate(nn)) == NULL)
|
||||||
continue;
|
continue;
|
||||||
if (!vecs)
|
if (!vecs)
|
||||||
|
|
@ -689,7 +690,7 @@ com_cross(wordlist *wl)
|
||||||
{
|
{
|
||||||
char *newvec, *s;
|
char *newvec, *s;
|
||||||
struct dvec *n, *v, *vecs = NULL, *lv = NULL;
|
struct dvec *n, *v, *vecs = NULL, *lv = NULL;
|
||||||
struct pnode *pn;
|
struct pnode *pn, *names;
|
||||||
int i, ind;
|
int i, ind;
|
||||||
bool comp = FALSE;
|
bool comp = FALSE;
|
||||||
double *d;
|
double *d;
|
||||||
|
|
@ -706,8 +707,8 @@ com_cross(wordlist *wl)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
wl = wl->wl_next;
|
wl = wl->wl_next;
|
||||||
pn = ft_getpnames(wl, TRUE);
|
names = ft_getpnames(wl, TRUE);
|
||||||
while (pn) {
|
for (pn = names; pn; pn = pn->pn_next) {
|
||||||
if ((n = ft_evaluate(pn)) == NULL)
|
if ((n = ft_evaluate(pn)) == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
@ -718,7 +719,6 @@ com_cross(wordlist *wl)
|
||||||
|
|
||||||
for (lv = n; lv->v_link2; lv = lv->v_link2)
|
for (lv = n; lv->v_link2; lv = lv->v_link2)
|
||||||
;
|
;
|
||||||
pn = pn->pn_next;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (n = vecs, i = 0; n; n = n->v_link2) {
|
for (n = vecs, i = 0; n; n = n->v_link2) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue