X-Git-Url: https://secure.softndesign.org/git/?a=blobdiff_plain;f=argument.c;h=c5b1504b25409f9795459eb3885e1813d12ea6c4;hb=e2a309f921968691af1566000dd694f191eca857;hp=c8f345f40d4d1c83895492eef5fe00f574a8ca8a;hpb=33b4877a64014cfb19d0ef6928b1ffefe6496903;p=calc.git diff --git a/argument.c b/argument.c index c8f345f..c5b1504 100644 --- a/argument.c +++ b/argument.c @@ -20,18 +20,16 @@ double arg (int n) /* set arguments */ -double def (int nbops, element_t **ops) +tab_t *def (int nbops, element_t **ops) { int i; tab_t *new = alloc_tab (nbops); for (i = 0; i < nbops; i++) { double val = evaluate_element (ops[i], 0); - VERBOSE (DEBUG, fprintf (stdout, "arg[%d] = %g\n", i + i, val)); + VERBOSE (DEBUG, fprintf (stdout, "value %d/%d = %g\n", i + 1, nbops, val)); set_tab (new, i + 1, val); } - free_tab (argument); - argument = new; - return size_tab (argument); + return new; } /* vim: set ts=4 sw=4 et: */