diff options
author | John Beppu | 2000-06-21 18:00:46 +0000 |
---|---|---|
committer | John Beppu | 2000-06-21 18:00:46 +0000 |
commit | c03525475e0e72b8579a5fbec5571467a99c725a (patch) | |
tree | 8687adb45e009fe47f40f32d964d56234ce35d44 | |
parent | e63ad9ba06d1462f6f55941c4a08ee68618c6cd3 (diff) | |
download | busybox-c03525475e0e72b8579a5fbec5571467a99c725a.zip busybox-c03525475e0e72b8579a5fbec5571467a99c725a.tar.gz |
+ 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 { }; static const struct op operators[] = { - {"+", add}, - {"-", sub}, - {"*", mul}, - {"/", divide}, + {"+", add}, + {"add", add}, + {"-", sub}, + {"sub", sub}, + {"*", mul}, + {"mul", mul}, + {"/", divide}, + {"div", divide}, {"and", and}, - {"or", or}, + {"or", or}, {"not", not}, {"eor", eor}, - {0, 0} + {0, 0} }; static void stack_machine(const char *argument) |