65382d9dca4aaff82f248b52876f31c2272a4aec
[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 double *storage;
18 int storage_size;
19 double *argument;
20 int argument_size;
21 element_t *root;
22 tab_t *stack;
23 char *string;
24 } workspace_t;
25
26 extern workspace_t *programs;
27 extern int nb_programs;
28
29 /* program function */
30
31 void prog (int id, element_t *root);
32 double arg (int id);
33 double call (int id, int nbargs, element_t **args);
34 void list ();
35 void edit (int id);
36 void savestring (int id, char *string);
37 void del (int id);
38
39 #endif /* __PROGRAM_H__ */
40
41 /* vim: set ts=4 sw=4 et: */