new type tab_t and rebuild of stack
[calc.git] / program.h
CommitLineData
a24bd519
LM
1#ifndef __PROGRAM_H__
2#define __PROGRAM_H__
3
4#include "element.h"
3559b26c 5#include "tabular.h"
a24bd519
LM
6
7/* global variables */
8
9extern int argument_size;
10extern double *argument;
11
12/* workspace type */
13
14typedef 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;
3559b26c 22 tab_t *stack;
a24bd519
LM
23 char *string;
24} workspace_t;
25
26extern workspace_t *programs;
27extern int nb_programs;
28
29/* program function */
30
31void prog (int id, element_t *root);
32double arg (int id);
33double call (int id, int nbargs, element_t **args);
34void list ();
35void edit (int id);
36void savestring (int id, char *string);
37void del (int id);
38
39#endif /* __PROGRAM_H__ */
40
41/* vim: set ts=4 sw=4 et: */