use tab_t for storage
[calc.git] / program.h
1 #ifndef __PROGRAM_H__
2 #define __PROGRAM_H__
3
4 #include "element.h"
5 #include "tabular.h"
6
7 /* global variables */
8
9 extern int argument_size;
10 extern double *argument;
11
12 /* workspace type */
13
14 typedef struct _workspace_t {
15 int id;
16 double answer;
17 tab_t *storage;
18 double *argument;
19 int argument_size;
20 element_t *root;
21 tab_t *stack;
22 char *string;
23 } workspace_t;
24
25 extern workspace_t *programs;
26 extern int nb_programs;
27
28 /* program function */
29
30 void prog (int id, element_t *root);
31 double arg (int id);
32 double call (int id, int nbargs, element_t **args);
33 void list ();
34 void edit (int id);
35 void savestring (int id, char *string);
36 void del (int id);
37
38 #endif /* __PROGRAM_H__ */
39
40 /* vim: set ts=4 sw=4 et: */