fix bracket evaluation
[calc.git] / workspace.h
1 #ifndef __WORKSPACE_H__
2 #define __WORKSPACE_H__
3
4 #include "element.h"
5 #include "tabular.h"
6
7 /* global variables */
8
9 /* workspace type */
10
11 typedef struct _workspace_t {
12 double answer;
13 int id;
14 element_t *root;
15 tab_t *stack;
16 tab_t *storage;
17 char *string;
18 } workspace_t;
19
20 /* workspace functions */
21
22 workspace_t *alloc_ws ();
23 workspace_t *backup_ws (workspace_t *ws);
24 workspace_t *clean_ws (workspace_t *ws);
25 void free_ws (workspace_t *ws);
26 void restore_ws (workspace_t *ws);
27
28 #endif /* __WORKSPACE_H__ */
29
30 /* vim: set ts=4 sw=4 et: */