blob: fc7a4e55c59677e50dc481e20ccc6c27ed5df309 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#ifndef STATE_H
#define STATE_H
#include <stdio.h>
#define STACK_SIZE 100
typedef struct {
double val[STACK_SIZE];
int count;
} stack;
typedef struct {
char *name;
stack (*exec)(stack);
char *description;
short int required_args;
} command;
typedef struct {
int command_count;
FILE *defbuf;
FILE *defout;
char last_op;
char *prompt;
stack stk;
/* btree elements */
command *sorted; /* sorted by function name */
int numel;
} state;
#endif
|