aboutsummaryrefslogtreecommitdiff
path: root/src/ops.h
diff options
context:
space:
mode:
authorLibravatar Comrade Martin Miroslavovich Michalec <martin@michalec.dev>2023-11-26 21:34:11 +0000
committerLibravatar Martin Michalec <martin@michalec.dev>2026-11-07 02:13:38 +0000
commit252df6c74c7be9b82aa89cdb4972f91c87b06184 (patch)
tree988497c67eb3d8d8789aa9bdea47bafd300e25b2 /src/ops.h
downloadcoursework-252df6c74c7be9b82aa89cdb4972f91c87b06184.tar.gz
publishHEADmaster
Diffstat (limited to 'src/ops.h')
-rw-r--r--src/ops.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/ops.h b/src/ops.h
new file mode 100644
index 0000000..e8eface
--- /dev/null
+++ b/src/ops.h
@@ -0,0 +1,33 @@
1#ifndef OPS_H
2#define OPS_H
3
4#include <obstack.h>
5
6enum op {
7 OP_NOP,
8 OP_DUP,
9 OP_DEL,
10 OP_CLR,
11 OP_SWP,
12 OP_NEG,
13 OP_ADD,
14 OP_MUL,
15 OP_SUB,
16 OP_DIV,
17 OP_MOD,
18 OP_INC,
19 OP_DEC,
20 OP_POW,
21 OP_GCD,
22 OP_LCM,
23 OP_COUNT,
24};
25
26typedef void (*op_fn) (void);
27
28extern op_fn op_fns[OP_COUNT];
29extern const char *op_names[OP_COUNT];
30
31enum op str2op (const char *str);
32
33#endif