frontend/define.c, trcopy(), rename `nn' --> `args'
This commit is contained in:
parent
e99ba7478b
commit
37979de65a
|
|
@ -28,7 +28,7 @@ static void savetree(struct pnode *pn);
|
|||
static void prdefs(char *name);
|
||||
static void prtree(struct udfunc *ud, FILE *fp);
|
||||
static void prtree1(struct pnode *pn, FILE *fp);
|
||||
static struct pnode *trcopy(struct pnode *tree, char *arg_names, struct pnode *nn);
|
||||
static struct pnode *trcopy(struct pnode *tree, char *arg_names, struct pnode *args);
|
||||
static struct pnode *ntharg(int num, struct pnode *args);
|
||||
|
||||
static struct udfunc *udfuncs = NULL;
|
||||
|
|
@ -304,7 +304,7 @@ ft_substdef(const char *name, struct pnode *args)
|
|||
*/
|
||||
|
||||
static struct pnode *
|
||||
trcopy(struct pnode *tree, char *arg_names, struct pnode *nn)
|
||||
trcopy(struct pnode *tree, char *arg_names, struct pnode *args)
|
||||
{
|
||||
struct pnode *pn;
|
||||
struct dvec *d;
|
||||
|
|
@ -331,7 +331,7 @@ trcopy(struct pnode *tree, char *arg_names, struct pnode *nn)
|
|||
}
|
||||
|
||||
if (*s)
|
||||
return ntharg(i, nn);
|
||||
return ntharg(i, args);
|
||||
else
|
||||
return tree;
|
||||
|
||||
|
|
@ -348,7 +348,7 @@ trcopy(struct pnode *tree, char *arg_names, struct pnode *nn)
|
|||
/* pn_func are pointers to a global constant struct */
|
||||
pn->pn_func = tree->pn_func;
|
||||
|
||||
pn->pn_left = trcopy(tree->pn_left, arg_names, nn);
|
||||
pn->pn_left = trcopy(tree->pn_left, arg_names, args);
|
||||
pn->pn_left->pn_use++;
|
||||
|
||||
} else if (tree->pn_op) {
|
||||
|
|
@ -358,11 +358,11 @@ trcopy(struct pnode *tree, char *arg_names, struct pnode *nn)
|
|||
/* pn_op are pointers to a global constant struct */
|
||||
pn->pn_op = tree->pn_op;
|
||||
|
||||
pn->pn_left = trcopy(tree->pn_left, arg_names, nn);
|
||||
pn->pn_left = trcopy(tree->pn_left, arg_names, args);
|
||||
pn->pn_left->pn_use++;
|
||||
|
||||
if (pn->pn_op->op_arity == 2) {
|
||||
pn->pn_right = trcopy(tree->pn_right, arg_names, nn);
|
||||
pn->pn_right = trcopy(tree->pn_right, arg_names, args);
|
||||
pn->pn_right->pn_use++;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue