Commit | Line | Data |
---|---|---|
e952523a LM |
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 | tab_t *argument; | |
14 | int id; | |
15 | element_t *root; | |
16 | tab_t *stack; | |
17 | tab_t *storage; | |
18 | char *string; | |
19 | } workspace_t; | |
20 | ||
21 | /* workspace functions */ | |
22 | ||
23 | workspace_t *alloc_ws (); | |
24 | workspace_t *backup_ws (workspace_t *ws); | |
25 | workspace_t *clean_ws (workspace_t *ws); | |
26 | void free_ws (workspace_t *ws); | |
27 | void restore_ws (workspace_t *ws); | |
28 | ||
29 | #endif /* __WORKSPACE_H__ */ | |
30 | ||
31 | /* vim: set ts=4 sw=4 et: */ |