summary refs log tree commit diff
diff options
context:
space:
mode:
-rwxr-xr-x.bin/rpn.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/.bin/rpn.c b/.bin/rpn.c
index d3fe0667..b7d3e0a1 100755
--- a/.bin/rpn.c
+++ b/.bin/rpn.c
@@ -55,10 +55,8 @@ static bool stack_op(char op) {
         return true;
     }
     if (stack.op == '"') {
-        if (op == '"')
-            stack.op = 0;
-        else
-            push(op);
+        if (op == '"') stack.op = 0;
+        else push(op);
         return true;
     }
 
@@ -73,6 +71,7 @@ static bool stack_op(char op) {
         break; case '*': a = pop(); push(pop() * a);
         break; case '/': a = pop(); push(pop() / a);
         break; case '%': a = pop(); push(pop() % a);
+        break; case '!': a = pop(); push(!a);
         break; case '~': a = pop(); push(~a);
         break; case '&': a = pop(); push(pop() & a);
         break; case '|': a = pop(); push(pop() | a);
3 00:15:02 -0400'>2018-08-23Alias bc='bc -l'June McEnroe 2018-08-20Update usage of scheme in READMEJune McEnroe 2018-08-20Use scheme.h in fbatt and fbclockJune McEnroe 2018-08-20Generate scheme.hJune McEnroe 2018-08-20Add dependencies on gfx.hJune McEnroe 2018-08-18Add Blondie — Heart of GlassJune McEnroe 2018-08-18Set FCEDIT=$EDITORJune McEnroe 2018-08-18Only post commits with bodies to MastodonJune McEnroe 2018-08-18Run tf/cfg link script with /bin/shJune McEnroe 2018-08-18Run {,s,t}up with /bin/shJune McEnroe 2018-08-18Use whence instead of typeJune McEnroe 2018-08-18Cut off path components until right prompt fitsJune McEnroe 2018-08-17Add "private" alias to source encrypted fileJune McEnroe 2018-08-17Add vim mapping to add a #includeJune McEnroe