frontend/define.c, cleanup
This commit is contained in:
parent
29dde7206a
commit
501c0238d7
|
|
@ -65,8 +65,8 @@ com_define(wordlist *wlist)
|
||||||
if (wl) {
|
if (wl) {
|
||||||
for (t = buf; *t; t++)
|
for (t = buf; *t; t++)
|
||||||
;
|
;
|
||||||
for (s = wl->wl_word; *s && (*s != ')'); s++, t++)
|
for (s = wl->wl_word; *s && (*s != ')');)
|
||||||
*t = *s;
|
*t++ = *s++;
|
||||||
*t++ = ')';
|
*t++ = ')';
|
||||||
*t = '\0';
|
*t = '\0';
|
||||||
if (*++s)
|
if (*++s)
|
||||||
|
|
@ -297,7 +297,7 @@ ft_substdef(const char *name, struct pnode *args)
|
||||||
fprintf(cp_err,
|
fprintf(cp_err,
|
||||||
"Warning: the user-defined function %s has %d args\n",
|
"Warning: the user-defined function %s has %d args\n",
|
||||||
name, rarity);
|
name, rarity);
|
||||||
return (NULL);
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (s = udf->ud_name; *s; s++)
|
for (s = udf->ud_name; *s; s++)
|
||||||
|
|
@ -307,7 +307,7 @@ ft_substdef(const char *name, struct pnode *args)
|
||||||
/* Now we have to traverse the tree and copy it over,
|
/* Now we have to traverse the tree and copy it over,
|
||||||
* substituting args.
|
* substituting args.
|
||||||
*/
|
*/
|
||||||
return (trcopy(udf->ud_text, s, args));
|
return trcopy(udf->ud_text, s, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -346,13 +346,13 @@ trcopy(struct pnode *tree, char *args, struct pnode *nn)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (*s)
|
if (*s)
|
||||||
return (ntharg(i, nn));
|
return ntharg(i, nn);
|
||||||
else
|
else
|
||||||
return (tree);
|
return tree;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
return (tree);
|
return tree;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -383,10 +383,10 @@ trcopy(struct pnode *tree, char *args, struct pnode *nn)
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
fprintf(cp_err, "trcopy: Internal Error: bad parse node\n");
|
fprintf(cp_err, "trcopy: Internal Error: bad parse node\n");
|
||||||
return (NULL);
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (pn);
|
return pn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -456,10 +456,8 @@ com_undefine(wordlist *wlist)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifndef LINT
|
/*
|
||||||
|
* This is only here so I can "call" it from gdb/dbx
|
||||||
/* Watch out, this is not at all portable. It's only here so I can
|
|
||||||
* call it from dbx with an int value (all you can give with "call")...
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -467,5 +465,3 @@ ft_pnode(struct pnode *pn)
|
||||||
{
|
{
|
||||||
prtree1(pn, cp_err);
|
prtree1(pn, cp_err);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue