aboutsummaryrefslogtreecommitdiff
path: root/src/ops.h
blob: e8eface6abef54a0667418af8af181550c3dd0d1 (plain)
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
33
#ifndef OPS_H
#define OPS_H

#include <obstack.h>

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