com_print(), com_cross(), use for(;;) loops

This commit is contained in:
rlar 2012-10-01 17:53:01 +02:00
parent fe828c5081
commit f95aaaafc1
1 changed files with 6 additions and 6 deletions

View File

@ -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;
struct pnode *nn, *names;
struct plot *p;
bool col = TRUE, nobreak = FALSE, noprintscale, plotnames = FALSE;
bool optgiven = FALSE;
@ -97,7 +97,8 @@ com_print(wordlist *wl)
}
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)
continue;
if (!vecs)
@ -689,7 +690,7 @@ com_cross(wordlist *wl)
{
char *newvec, *s;
struct dvec *n, *v, *vecs = NULL, *lv = NULL;
struct pnode *pn;
struct pnode *pn, *names;
int i, ind;
bool comp = FALSE;
double *d;
@ -706,8 +707,8 @@ com_cross(wordlist *wl)
return;
}
wl = wl->wl_next;
pn = ft_getpnames(wl, TRUE);
while (pn) {
names = ft_getpnames(wl, TRUE);
for (pn = names; pn; pn = pn->pn_next) {
if ((n = ft_evaluate(pn)) == NULL)
return;
@ -718,7 +719,6 @@ com_cross(wordlist *wl)
for (lv = n; lv->v_link2; lv = lv->v_link2)
;
pn = pn->pn_next;
}
for (n = vecs, i = 0; n; n = n->v_link2) {