diff options
Diffstat (limited to 'sci-calculators/hexcalc/files/hexcalc-order.diff')
-rw-r--r-- | sci-calculators/hexcalc/files/hexcalc-order.diff | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/sci-calculators/hexcalc/files/hexcalc-order.diff b/sci-calculators/hexcalc/files/hexcalc-order.diff new file mode 100644 index 000000000000..cdc4a93fedce --- /dev/null +++ b/sci-calculators/hexcalc/files/hexcalc-order.diff @@ -0,0 +1,51 @@ +--- a/hexcalc.c 1989-11-22 16:29:06.000000000 -0500 ++++ b/hexcalc.c 2006-07-18 17:36:40.000000000 -0400 +@@ -37,6 +37,7 @@ + #endif + + #include <stdio.h> ++#include <stdlib.h> + #include <ctype.h> + #include <X11/IntrinsicP.h> + #include <X11/StringDefs.h> +@@ -509,14 +508,16 @@ + + switch(topOp) { + case '+' : +- ac = PopArg() + PopArg(); ++ temp = PopArg(); ++ ac = PopArg() + temp; + break; + case '-' : + temp = PopArg(); + ac = PopArg() - temp; + break; + case '*' : +- ac = PopArg() * PopArg(); ++ temp = PopArg(); ++ ac = temp * PopArg(); + break; + case '/' : + temp = PopArg(); +@@ -528,15 +529,18 @@ + break; + + case '|' : +- ac = PopArg() | PopArg(); ++ temp = PopArg(); ++ ac = temp | PopArg(); + break; + + case '&' : +- ac = PopArg() & PopArg(); ++ temp = PopArg(); ++ ac = temp & PopArg(); + break; + + case '^' : +- ac = PopArg() ^ PopArg(); ++ temp = PopArg(); ++ ac = temp ^ PopArg(); + break; + + case '<' : |