X-Git-Url: https://secure.softndesign.org/git/?a=blobdiff_plain;f=workspace.h;fp=workspace.h;h=7bca4e08345366a8eeff87cda916d61ecf248cf6;hb=e952523a06b81e8915751bdcb01ca87aad06ce1c;hp=0000000000000000000000000000000000000000;hpb=e4c7b5133d7af32573567e4e639f03c8fb11bc79;p=calc.git diff --git a/workspace.h b/workspace.h new file mode 100644 index 0000000..7bca4e0 --- /dev/null +++ b/workspace.h @@ -0,0 +1,31 @@ +#ifndef __WORKSPACE_H__ +#define __WORKSPACE_H__ + +#include "element.h" +#include "tabular.h" + +/* global variables */ + +/* workspace type */ + +typedef struct _workspace_t { + double answer; + tab_t *argument; + int id; + element_t *root; + tab_t *stack; + tab_t *storage; + char *string; +} workspace_t; + +/* workspace functions */ + +workspace_t *alloc_ws (); +workspace_t *backup_ws (workspace_t *ws); +workspace_t *clean_ws (workspace_t *ws); +void free_ws (workspace_t *ws); +void restore_ws (workspace_t *ws); + +#endif /* __WORKSPACE_H__ */ + +/* vim: set ts=4 sw=4 et: */