summaryrefslogtreecommitdiff
path: root/expr.c
diff options
context:
space:
mode:
authorChet Ramey <chet.ramey@case.edu>2011-12-12 22:11:41 -0500
committerChet Ramey <chet.ramey@case.edu>2011-12-12 22:11:41 -0500
commite88665cc6061ba2df7bfd4b406d809fcbd287069 (patch)
tree745404a519d74705d4d37f4f34bde56800d4a18f /expr.c
parent643db9d29613d05abca69e0afc4b18526678839f (diff)
downloadbash-e88665cc6061ba2df7bfd4b406d809fcbd287069.tar.gz
commit bash-20101217 snapshot
Diffstat (limited to 'expr.c')
-rw-r--r--expr.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/expr.c b/expr.c
index 5089d95d..d608b91a 100644
--- a/expr.c
+++ b/expr.c
@@ -852,6 +852,16 @@ exp1 ()
readtok ();
val = ~exp1 ();
}
+ else if (curtok == MINUS)
+ {
+ readtok ();
+ val = - exp1 ();
+ }
+ else if (curtok == PLUS)
+ {
+ readtok ();
+ val = exp1 ();
+ }
else
val = exp0 ();
@@ -891,6 +901,7 @@ exp0 ()
curtok = NUM; /* make sure --x=7 is flagged as an error */
readtok ();
}
+#if 0
else if (curtok == MINUS)
{
readtok ();
@@ -901,6 +912,7 @@ exp0 ()
readtok ();
val = exp0 ();
}
+#endif
else if (curtok == LPAR)
{
readtok ();