From 252df6c74c7be9b82aa89cdb4972f91c87b06184 Mon Sep 17 00:00:00 2001 From: Comrade Martin Miroslavovich Michalec Date: Mon, 27 Nov 2023 00:34:11 +0300 Subject: publish --- src/ops.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 src/ops.h (limited to 'src/ops.h') 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 @@ +#ifndef OPS_H +#define OPS_H + +#include + +enum op { + OP_NOP, + OP_DUP, + OP_DEL, + OP_CLR, + OP_SWP, + OP_NEG, + OP_ADD, + OP_MUL, + OP_SUB, + OP_DIV, + OP_MOD, + OP_INC, + OP_DEC, + OP_POW, + OP_GCD, + OP_LCM, + OP_COUNT, +}; + +typedef void (*op_fn) (void); + +extern op_fn op_fns[OP_COUNT]; +extern const char *op_names[OP_COUNT]; + +enum op str2op (const char *str); + +#endif -- cgit v1.3.1