split code into multiple files
[calc.git] / program.h
CommitLineData
a24bd519
LM
1#ifndef __PROGRAM_H__
2#define __PROGRAM_H__
3
4#include "element.h"
5
6/* global variables */
7
8extern int argument_size;
9extern double *argument;
10
11/* workspace type */
12
13typedef struct _workspace_t {
14 int id;
15 double answer;
16 double *storage;
17 int storage_size;
18 double *argument;
19 int argument_size;
20 element_t *root;
21 double *stack;
22 int stack_size;
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: */