X-Git-Url: https://secure.softndesign.org/git/?a=blobdiff_plain;f=program.h;h=f3f5369981795ba5e49c87e607c960c92d2a44d8;hb=89a2c19deeb8b45dc8c655e59bc58f7a606ecd2c;hp=65382d9dca4aaff82f248b52876f31c2272a4aec;hpb=3559b26cba4b13ce35a27aed478b3a5e0433be31;p=calc.git diff --git a/program.h b/program.h index 65382d9..f3f5369 100644 --- a/program.h +++ b/program.h @@ -3,33 +3,16 @@ #include "element.h" #include "tabular.h" +#include "workspace.h" /* global variables */ -extern int argument_size; -extern double *argument; - -/* workspace type */ - -typedef struct _workspace_t { - int id; - double answer; - double *storage; - int storage_size; - double *argument; - int argument_size; - element_t *root; - tab_t *stack; - char *string; -} workspace_t; - -extern workspace_t *programs; +extern workspace_t **programs; extern int nb_programs; /* program function */ void prog (int id, element_t *root); -double arg (int id); double call (int id, int nbargs, element_t **args); void list (); void edit (int id);