X-Git-Url: https://secure.softndesign.org/git/?a=blobdiff_plain;f=program.c;h=1e960f728641a02a44c5f660600031403ae28f3d;hb=9e527b672cea0530effc91bc13e0ce49d552ecdd;hp=7db9d40291b3433a503b32f07c0b605f2ff7497e;hpb=89a2c19deeb8b45dc8c655e59bc58f7a606ecd2c;p=calc.git diff --git a/program.c b/program.c index 7db9d40..1e960f7 100644 --- a/program.c +++ b/program.c @@ -83,30 +83,37 @@ double call (int id, int nbargs, element_t **args) } /* set arguments */ + VERBOSE (DEBUG, fprintf (stdout, "1 arg[0]: %g\n", get_tab (argument, 1))); tab_t *old_argument = copy_tab (argument); /* backup context */ workspace_t *tmp = backup_ws (alloc_ws ()); restore_ws (programs[n]); + VERBOSE (DEBUG, fprintf (stdout, "2 arg[0]: %g\n", get_tab (argument, 1))); /* set arguments */ argument = def (nbargs, args); + VERBOSE (DEBUG, fprintf (stdout, "3 arg[0]: %g\n", get_tab (argument, 1))); /* evaluate program */ answer = 0; element_t *elements = dupelement (programs[n]->root); + VERBOSE (DEBUG, fprintf (stdout, "4 arg[0]: %g\n", get_tab (argument, 1))); ret = evaluate_element (elements, 0); VERBOSE (DEBUG, fprintf (stdout, "ret; %g\n", ret)); + VERBOSE (DEBUG, fprintf (stdout, "5 arg[0]: %g\n", get_tab (argument, 1))); delelement (elements); /* restore context */ backup_ws (programs[n]); restore_ws (tmp); free_ws (tmp); + VERBOSE (DEBUG, fprintf (stdout, "6 arg[0]: %g\n", get_tab (argument, 1))); /* clean arguments */ free_tab (argument); argument = old_argument; + VERBOSE (DEBUG, fprintf (stdout, "7 arg[0]: %g\n", get_tab (argument, 1))); return ret; }