diff options
author | John Beppu <beppu@lbox.org> | 2000-06-21 18:00:46 +0000 |
---|---|---|
committer | John Beppu <beppu@lbox.org> | 2000-06-21 18:00:46 +0000 |
commit | c03525475e0e72b8579a5fbec5571467a99c725a (patch) | |
tree | 8687adb45e009fe47f40f32d964d56234ce35d44 | |
parent | e63ad9ba06d1462f6f55941c4a08ee68618c6cd3 (diff) | |
download | busybox-w32-c03525475e0e72b8579a5fbec5571467a99c725a.tar.gz busybox-w32-c03525475e0e72b8579a5fbec5571467a99c725a.tar.bz2 busybox-w32-c03525475e0e72b8579a5fbec5571467a99c725a.zip |
+ made it so that you can use the mnemonics
(add, sub, mul, div) in lieu of (+, -, *, /)
-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) |