diff options
Diffstat (limited to 'math.c')
-rw-r--r-- | math.c | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -92,15 +92,19 @@ struct op { | |||
92 | }; | 92 | }; |
93 | 93 | ||
94 | static const struct op operators[] = { | 94 | static const struct op operators[] = { |
95 | {"+", add}, | 95 | {"+", add}, |
96 | {"-", sub}, | 96 | {"add", add}, |
97 | {"*", mul}, | 97 | {"-", sub}, |
98 | {"/", divide}, | 98 | {"sub", sub}, |
99 | {"*", mul}, | ||
100 | {"mul", mul}, | ||
101 | {"/", divide}, | ||
102 | {"div", divide}, | ||
99 | {"and", and}, | 103 | {"and", and}, |
100 | {"or", or}, | 104 | {"or", or}, |
101 | {"not", not}, | 105 | {"not", not}, |
102 | {"eor", eor}, | 106 | {"eor", eor}, |
103 | {0, 0} | 107 | {0, 0} |
104 | }; | 108 | }; |
105 | 109 | ||
106 | static void stack_machine(const char *argument) | 110 | static void stack_machine(const char *argument) |